From 91fcf7f4bf7d8a7b333fcedff129c118e142907a Mon Sep 17 00:00:00 2001 From: Mobsuccess Bot Date: Mon, 25 Mar 2024 01:01:30 +0000 Subject: [PATCH] chore(deps): run updater mobsuccess-devops/policy-github-updater-npm --- node_modules/.package-lock.json | 7110 +++++++++ .../word-wrap}/LICENSE | 3 +- .../@aashutoshrathi/word-wrap/README.md | 182 + .../@aashutoshrathi/word-wrap/index.d.ts | 50 + .../@aashutoshrathi/word-wrap/index.js | 52 + .../@aashutoshrathi/word-wrap/package.json | 81 + .../eslint-utils/LICENSE | 0 .../@eslint-community/eslint-utils/README.md | 37 + .../eslint-utils/index.js | 396 +- .../eslint-utils/index.js.map | 1 + .../eslint-utils/index.mjs | 395 +- .../eslint-utils/index.mjs.map | 1 + .../eslint-utils/package.json | 73 + .../{ => @eslint-community}/regexpp/LICENSE | 0 .../{ => @eslint-community}/regexpp/README.md | 33 +- .../@eslint-community/regexpp/index.d.ts | 1065 ++ .../{ => @eslint-community}/regexpp/index.js | 1418 +- .../@eslint-community/regexpp/index.js.map | 1 + .../{ => @eslint-community}/regexpp/index.mjs | 1419 +- .../@eslint-community/regexpp/index.mjs.map | 1 + .../@eslint-community/regexpp/package.json | 93 + node_modules/@eslint/eslintrc/CHANGELOG.md | 32 - node_modules/@eslint/eslintrc/LICENSE | 12 +- node_modules/@eslint/eslintrc/README.md | 74 +- .../@eslint/eslintrc/conf/config-schema.js | 4 +- .../@eslint/eslintrc/conf/environments.js | 41 +- .../@eslint/eslintrc/conf/eslint-all.js | 12 - .../eslintrc/conf/eslint-recommended.js | 12 - .../eslintrc/dist/eslintrc-universal.cjs | 1104 ++ .../eslintrc/dist/eslintrc-universal.cjs.map | 1 + .../@eslint/eslintrc/dist/eslintrc.cjs | 4344 ++++++ .../@eslint/eslintrc/dist/eslintrc.cjs.map | 1 + .../lib/cascading-config-array-factory.js | 39 +- .../eslintrc/lib/config-array-factory.js | 106 +- .../eslintrc/lib/config-array/config-array.js | 35 +- .../lib/config-array/config-dependency.js | 16 +- .../lib/config-array/extracted-config.js | 5 +- .../lib/config-array/ignore-pattern.js | 17 +- .../eslintrc/lib/config-array/index.js | 13 +- .../lib/config-array/override-tester.js | 14 +- .../@eslint/eslintrc/lib/flat-compat.js | 64 +- .../@eslint/eslintrc/lib/index-universal.js | 29 + node_modules/@eslint/eslintrc/lib/index.js | 74 +- .../@eslint/eslintrc/lib/shared/ajv.js | 165 +- .../@eslint/eslintrc/lib/shared/config-ops.js | 219 +- .../eslintrc/lib/shared/config-validator.js | 21 +- .../lib/shared/deprecation-warnings.js | 5 +- .../@eslint/eslintrc/lib/shared/naming.js | 3 +- .../lib/shared/relative-module-resolver.js | 56 +- .../@eslint/eslintrc/lib/shared/types.js | 3 +- .../eslintrc/node_modules/.bin/js-yaml | 1 + .../node_modules/argparse/CHANGELOG.md | 216 + .../eslintrc/node_modules/argparse/LICENSE | 254 + .../eslintrc/node_modules/argparse/README.md | 84 + .../node_modules/argparse/argparse.js | 3707 +++++ .../eslintrc/node_modules/argparse/lib/sub.js | 67 + .../node_modules/argparse/lib/textwrap.js | 440 + .../node_modules/argparse/package.json | 31 + .../node_modules/globals/globals.json | 1586 -- .../eslintrc/node_modules/globals/index.d.ts | 6 - .../eslintrc/node_modules/globals/index.js | 2 - .../node_modules/globals/package.json | 84 - .../eslintrc/node_modules/globals/readme.md | 56 - .../node_modules/js-yaml/CHANGELOG.md | 616 + .../eslintrc/node_modules/js-yaml}/LICENSE | 4 +- .../eslintrc/node_modules/js-yaml/README.md | 246 + .../node_modules/js-yaml/bin/js-yaml.js | 126 + .../node_modules/js-yaml/dist/js-yaml.js | 3874 +++++ .../node_modules/js-yaml/dist/js-yaml.min.js | 2 + .../node_modules/js-yaml/dist/js-yaml.mjs | 3851 +++++ .../eslintrc/node_modules/js-yaml/index.js | 47 + .../node_modules/js-yaml/lib/common.js | 59 + .../node_modules/js-yaml/lib/dumper.js | 965 ++ .../node_modules/js-yaml/lib/exception.js | 55 + .../node_modules/js-yaml/lib/loader.js | 1727 +++ .../node_modules/js-yaml/lib/schema.js | 121 + .../node_modules/js-yaml/lib/schema/core.js | 11 + .../js-yaml/lib/schema/default.js | 22 + .../js-yaml/lib/schema/failsafe.js | 17 + .../node_modules/js-yaml/lib/schema/json.js | 19 + .../node_modules/js-yaml/lib/snippet.js | 101 + .../eslintrc/node_modules/js-yaml/lib/type.js | 66 + .../node_modules/js-yaml/lib/type/binary.js | 125 + .../node_modules/js-yaml/lib/type/bool.js | 35 + .../node_modules/js-yaml/lib/type/float.js | 97 + .../node_modules/js-yaml/lib/type/int.js | 156 + .../node_modules/js-yaml/lib/type/map.js | 8 + .../node_modules/js-yaml/lib/type/merge.js | 12 + .../node_modules/js-yaml/lib/type/null.js | 35 + .../node_modules/js-yaml/lib/type/omap.js | 44 + .../node_modules/js-yaml/lib/type/pairs.js | 53 + .../node_modules/js-yaml/lib/type/seq.js | 8 + .../node_modules/js-yaml/lib/type/set.js | 29 + .../node_modules/js-yaml/lib/type/str.js | 8 + .../js-yaml/lib/type/timestamp.js | 88 + .../node_modules/js-yaml/package.json | 66 + node_modules/@eslint/eslintrc/package.json | 143 +- node_modules/@eslint/eslintrc/universal.js | 9 + node_modules/@eslint/js/LICENSE | 19 + node_modules/@eslint/js/README.md | 57 + node_modules/@eslint/js/package.json | 31 + .../@eslint/js/src/configs/eslint-all.js | 211 + .../js/src/configs}/eslint-recommended.js | 14 +- node_modules/@eslint/js/src/index.js | 17 + .../config-array}/LICENSE | 4 +- .../@humanwhocodes/config-array/README.md | 342 + .../@humanwhocodes/config-array/api.js | 1030 ++ .../@humanwhocodes/config-array/package.json | 61 + .../module-importer/CHANGELOG.md | 15 + .../module-importer}/LICENSE | 4 +- .../@humanwhocodes/module-importer/README.md | 80 + .../module-importer/dist/module-importer.cjs | 22 + .../dist/module-importer.d.cts | 27 + .../module-importer/dist/module-importer.d.ts | 2 + .../module-importer/dist/module-importer.js | 18 + .../module-importer/package.json | 65 + .../module-importer/src/module-importer.cjs | 81 + .../module-importer/src/module-importer.js | 22 + .../@humanwhocodes/object-schema/.eslintrc.js | 29 + .../.github/workflows/nodejs-test.yml | 27 + .../.github/workflows/release-please.yml | 39 + .../@humanwhocodes/object-schema/CHANGELOG.md | 33 + .../@humanwhocodes/object-schema/LICENSE | 29 + .../@humanwhocodes/object-schema/README.md | 234 + .../@humanwhocodes/object-schema/package.json | 33 + .../@humanwhocodes/object-schema/src/index.js | 7 + .../object-schema/src/merge-strategy.js | 53 + .../object-schema/src/object-schema.js | 301 + .../object-schema/src/validation-strategy.js | 102 + .../object-schema/tests/merge-strategy.js | 66 + .../object-schema/tests/object-schema.js | 659 + .../tests/validation-strategy.js | 186 + .../fs.scandir}/LICENSE | 2 +- node_modules/@nodelib/fs.scandir/README.md | 171 + .../@nodelib/fs.scandir/out/adapters/fs.d.ts | 20 + .../@nodelib/fs.scandir/out/adapters/fs.js | 19 + .../@nodelib/fs.scandir/out/constants.d.ts | 4 + .../@nodelib/fs.scandir/out/constants.js | 17 + .../@nodelib/fs.scandir/out/index.d.ts | 12 + node_modules/@nodelib/fs.scandir/out/index.js | 26 + .../fs.scandir/out/providers/async.d.ts | 7 + .../fs.scandir/out/providers/async.js | 104 + .../fs.scandir/out/providers/common.d.ts | 1 + .../fs.scandir/out/providers/common.js | 13 + .../fs.scandir/out/providers/sync.d.ts | 5 + .../@nodelib/fs.scandir/out/providers/sync.js | 54 + .../@nodelib/fs.scandir/out/settings.d.ts | 20 + .../@nodelib/fs.scandir/out/settings.js | 24 + .../@nodelib/fs.scandir/out/types/index.d.ts | 20 + .../fs.scandir/out}/types/index.js | 1 - .../@nodelib/fs.scandir/out/utils/fs.d.ts | 2 + .../@nodelib/fs.scandir/out/utils/fs.js | 19 + .../@nodelib/fs.scandir/out/utils/index.d.ts | 2 + .../fs.scandir/out/utils/index.js} | 4 +- node_modules/@nodelib/fs.scandir/package.json | 44 + .../{is-string => @nodelib/fs.stat}/LICENSE | 3 +- node_modules/@nodelib/fs.stat/README.md | 126 + .../@nodelib/fs.stat/out/adapters/fs.d.ts | 13 + .../@nodelib/fs.stat/out/adapters/fs.js | 17 + node_modules/@nodelib/fs.stat/out/index.d.ts | 12 + node_modules/@nodelib/fs.stat/out/index.js | 26 + .../@nodelib/fs.stat/out/providers/async.d.ts | 4 + .../@nodelib/fs.stat/out/providers/async.js | 36 + .../@nodelib/fs.stat/out/providers/sync.d.ts | 3 + .../@nodelib/fs.stat/out/providers/sync.js | 23 + .../@nodelib/fs.stat/out/settings.d.ts | 16 + node_modules/@nodelib/fs.stat/out/settings.js | 16 + .../@nodelib/fs.stat/out/types/index.d.ts | 4 + .../fs.stat/out/types/index.js} | 1 - node_modules/@nodelib/fs.stat/package.json | 37 + .../fs.walk}/LICENSE | 3 +- node_modules/@nodelib/fs.walk/README.md | 215 + node_modules/@nodelib/fs.walk/out/index.d.ts | 14 + node_modules/@nodelib/fs.walk/out/index.js | 34 + .../@nodelib/fs.walk/out/providers/async.d.ts | 12 + .../@nodelib/fs.walk/out/providers/async.js | 30 + .../@nodelib/fs.walk/out/providers/index.d.ts | 4 + .../@nodelib/fs.walk/out/providers/index.js | 9 + .../fs.walk/out/providers/stream.d.ts | 12 + .../@nodelib/fs.walk/out/providers/stream.js | 34 + .../@nodelib/fs.walk/out/providers/sync.d.ts | 10 + .../@nodelib/fs.walk/out/providers/sync.js | 14 + .../@nodelib/fs.walk/out/readers/async.d.ts | 30 + .../@nodelib/fs.walk/out/readers/async.js | 97 + .../@nodelib/fs.walk/out/readers/common.d.ts | 7 + .../@nodelib/fs.walk/out/readers/common.js | 31 + .../@nodelib/fs.walk/out/readers/reader.d.ts | 6 + .../@nodelib/fs.walk/out/readers/reader.js | 11 + .../@nodelib/fs.walk/out/readers/sync.d.ts | 15 + .../@nodelib/fs.walk/out/readers/sync.js | 59 + .../@nodelib/fs.walk/out/settings.d.ts | 30 + node_modules/@nodelib/fs.walk/out/settings.js | 26 + .../@nodelib/fs.walk/out/types/index.d.ts | 8 + .../fs.walk/out/types/index.js} | 1 - node_modules/@nodelib/fs.walk/package.json | 44 + .../.github/workflows/node.js.yml | 31 + node_modules/@ungap/structured-clone/LICENSE | 15 + .../@ungap/structured-clone/README.md | 95 + .../structured-clone/cjs/deserialize.js | 78 + .../@ungap/structured-clone/cjs/index.js | 27 + .../@ungap/structured-clone/cjs/json.js | 24 + .../@ungap/structured-clone/cjs/package.json | 1 + .../@ungap/structured-clone/cjs/serialize.js | 160 + .../@ungap/structured-clone/cjs/types.js | 22 + .../structured-clone/esm/deserialize.js | 79 + .../@ungap/structured-clone/esm/index.js | 25 + .../@ungap/structured-clone/esm/json.js | 21 + .../@ungap/structured-clone/esm/serialize.js | 161 + .../@ungap/structured-clone/esm/types.js | 11 + .../@ungap/structured-clone/package.json | 53 + .../structured-clone/structured-json.js | 1 + node_modules/acorn-jsx/index.d.ts | 12 + node_modules/acorn-jsx/package.json | 50 +- node_modules/ansi-colors/README.md | 315 - node_modules/ansi-colors/index.js | 177 - node_modules/ansi-colors/package.json | 152 - node_modules/ansi-colors/symbols.js | 70 - node_modules/ansi-colors/types/index.d.ts | 161 - node_modules/ansi-regex/index.js | 2 +- node_modules/ansi-regex/package.json | 139 +- node_modules/ansi-regex/readme.md | 2 +- node_modules/astral-regex/index.d.ts | 28 - node_modules/astral-regex/index.js | 6 - node_modules/astral-regex/package.json | 65 - node_modules/astral-regex/readme.md | 46 - node_modules/call-bind/.eslintignore | 1 - node_modules/call-bind/.eslintrc | 17 - node_modules/call-bind/.github/FUNDING.yml | 12 - node_modules/call-bind/.nycrc | 13 - node_modules/call-bind/CHANGELOG.md | 42 - node_modules/call-bind/LICENSE | 21 - node_modules/call-bind/README.md | 2 - node_modules/call-bind/callBound.js | 15 - node_modules/call-bind/index.js | 47 - node_modules/call-bind/package.json | 108 - node_modules/call-bind/test/callBound.js | 55 - node_modules/call-bind/test/index.js | 66 - node_modules/debug/LICENSE | 19 +- node_modules/debug/README.md | 28 +- node_modules/debug/package.json | 110 +- node_modules/debug/src/common.js | 19 +- node_modules/enquirer/CHANGELOG.md | 135 - node_modules/enquirer/README.md | 1752 --- node_modules/enquirer/index.d.ts | 151 - node_modules/enquirer/index.js | 250 - node_modules/enquirer/lib/ansi.js | 116 - node_modules/enquirer/lib/combos.js | 75 - node_modules/enquirer/lib/completer.js | 52 - node_modules/enquirer/lib/interpolate.js | 266 - node_modules/enquirer/lib/keypress.js | 243 - node_modules/enquirer/lib/placeholder.js | 63 - node_modules/enquirer/lib/prompt.js | 485 - .../enquirer/lib/prompts/autocomplete.js | 113 - .../enquirer/lib/prompts/basicauth.js | 41 - node_modules/enquirer/lib/prompts/confirm.js | 13 - node_modules/enquirer/lib/prompts/editable.js | 136 - node_modules/enquirer/lib/prompts/form.js | 196 - node_modules/enquirer/lib/prompts/index.js | 28 - node_modules/enquirer/lib/prompts/input.js | 55 - .../enquirer/lib/prompts/invisible.js | 11 - node_modules/enquirer/lib/prompts/list.js | 36 - .../enquirer/lib/prompts/multiselect.js | 11 - node_modules/enquirer/lib/prompts/numeral.js | 1 - node_modules/enquirer/lib/prompts/password.js | 18 - node_modules/enquirer/lib/prompts/quiz.js | 37 - node_modules/enquirer/lib/prompts/scale.js | 237 - node_modules/enquirer/lib/prompts/select.js | 139 - node_modules/enquirer/lib/prompts/snippet.js | 185 - node_modules/enquirer/lib/prompts/sort.js | 37 - node_modules/enquirer/lib/prompts/survey.js | 163 - node_modules/enquirer/lib/prompts/text.js | 1 - node_modules/enquirer/lib/prompts/toggle.js | 109 - node_modules/enquirer/lib/render.js | 33 - node_modules/enquirer/lib/roles.js | 46 - node_modules/enquirer/lib/state.js | 69 - node_modules/enquirer/lib/styles.js | 144 - node_modules/enquirer/lib/symbols.js | 66 - node_modules/enquirer/lib/theme.js | 11 - node_modules/enquirer/lib/timer.js | 38 - node_modules/enquirer/lib/types/array.js | 658 - node_modules/enquirer/lib/types/auth.js | 29 - node_modules/enquirer/lib/types/boolean.js | 88 - node_modules/enquirer/lib/types/index.js | 7 - node_modules/enquirer/lib/types/number.js | 86 - node_modules/enquirer/lib/types/string.js | 185 - node_modules/enquirer/lib/utils.js | 268 - node_modules/enquirer/package.json | 148 - .../node_modules/estraverse/.jshintrc | 16 - .../node_modules/estraverse/LICENSE.BSD | 19 - .../node_modules/estraverse/README.md | 153 - .../node_modules/estraverse/estraverse.js | 801 -- .../node_modules/estraverse/gulpfile.js | 70 - .../node_modules/estraverse/package.json | 68 - node_modules/eslint-scope/CHANGELOG.md | 70 - node_modules/eslint-scope/README.md | 38 +- .../eslint-scope/dist/eslint-scope.cjs | 2240 +++ node_modules/eslint-scope/lib/definition.js | 15 +- node_modules/eslint-scope/lib/index.js | 65 +- .../eslint-scope/lib/pattern-visitor.js | 11 +- node_modules/eslint-scope/lib/reference.js | 17 +- node_modules/eslint-scope/lib/referencer.js | 61 +- .../eslint-scope/lib/scope-manager.js | 66 +- node_modules/eslint-scope/lib/scope.js | 82 +- node_modules/eslint-scope/lib/variable.js | 7 +- node_modules/eslint-scope/lib/version.js | 3 + node_modules/eslint-scope/package.json | 115 +- node_modules/eslint-utils/README.md | 38 - node_modules/eslint-utils/index.js.map | 1 - node_modules/eslint-utils/index.mjs.map | 1 - .../eslint-visitor-keys/CHANGELOG.md | 25 - .../eslint-visitor-keys/README.md | 98 - .../eslint-visitor-keys/lib/index.js | 81 - .../eslint-visitor-keys/lib/visitor-keys.json | 284 - .../eslint-visitor-keys/package.json | 71 - node_modules/eslint-utils/package.json | 92 - node_modules/eslint-visitor-keys/CHANGELOG.md | 30 - node_modules/eslint-visitor-keys/README.md | 23 +- .../dist/eslint-visitor-keys.cjs | 384 + .../dist/eslint-visitor-keys.d.cts | 27 + .../eslint-visitor-keys/dist/index.d.ts | 16 + .../dist/visitor-keys.d.ts | 12 + node_modules/eslint-visitor-keys/lib/index.js | 90 +- .../lib/visitor-keys.js} | 241 +- .../eslint-visitor-keys/lib/visitor-keys.json | 284 - node_modules/eslint-visitor-keys/package.json | 122 +- node_modules/eslint/CHANGELOG.md | 6425 --------- node_modules/eslint/LICENSE | 2 +- node_modules/eslint/README.md | 161 +- node_modules/eslint/bin/eslint.js | 75 +- node_modules/eslint/conf/category-list.json | 39 - node_modules/eslint/conf/eslint-all.js | 31 - node_modules/eslint/conf/globals.js | 154 + node_modules/eslint/conf/rule-type-list.json | 28 + node_modules/eslint/lib/api.js | 54 +- .../eslint/lib/cli-engine/cli-engine.js | 165 +- .../eslint/lib/cli-engine/file-enumerator.js | 29 +- .../lib/cli-engine/formatters/codeframe.js | 138 - .../formatters/formatters-meta.json | 46 + .../formatters/html-template-message.html | 8 - .../formatters/html-template-page.html | 115 - .../formatters/html-template-result.html | 6 - .../eslint/lib/cli-engine/formatters/html.js | 231 +- .../eslint/lib/cli-engine/formatters/table.js | 159 - .../eslint/lib/cli-engine/formatters/tap.js | 2 +- node_modules/eslint/lib/cli-engine/hash.js | 4 +- .../lib/cli-engine/lint-result-cache.js | 26 +- .../eslint/lib/cli-engine/xml-escape.js | 2 +- node_modules/eslint/lib/cli.js | 222 +- .../eslint/lib/config/default-config.js | 67 + .../eslint/lib/config/flat-config-array.js | 274 + .../eslint/lib/config/flat-config-helpers.js | 111 + .../eslint/lib/config/flat-config-schema.js | 598 + .../eslint/lib/config/rule-validator.js | 158 + .../eslint/lib/eslint/eslint-helpers.js | 902 ++ node_modules/eslint/lib/eslint/eslint.js | 122 +- node_modules/eslint/lib/eslint/flat-eslint.js | 1155 ++ node_modules/eslint/lib/eslint/index.js | 4 +- node_modules/eslint/lib/init/autoconfig.js | 348 - node_modules/eslint/lib/init/config-file.js | 143 - .../eslint/lib/init/config-initializer.js | 691 - node_modules/eslint/lib/init/config-rule.js | 317 - node_modules/eslint/lib/init/npm-utils.js | 178 - .../eslint/lib/init/source-code-utils.js | 109 - .../lib/linter/apply-disable-directives.js | 424 +- .../code-path-analysis/code-path-analyzer.js | 212 +- .../code-path-analysis/code-path-segment.js | 83 +- .../code-path-analysis/code-path-state.js | 1372 +- .../linter/code-path-analysis/code-path.js | 182 +- .../code-path-analysis/debug-helpers.js | 12 +- .../linter/code-path-analysis/fork-context.js | 246 +- .../linter/code-path-analysis/id-generator.js | 5 +- .../lib/linter/config-comment-parser.js | 58 +- node_modules/eslint/lib/linter/linter.js | 1040 +- .../eslint/lib/linter/node-event-generator.js | 55 +- .../eslint/lib/linter/report-translator.js | 43 +- node_modules/eslint/lib/linter/rules.js | 3 + .../eslint/lib/linter/safe-emitter.js | 4 +- .../eslint/lib/linter/source-code-fixer.js | 4 +- node_modules/eslint/lib/linter/timing.js | 15 +- node_modules/eslint/lib/options.js | 551 +- .../lib/rule-tester/flat-rule-tester.js | 1131 ++ .../eslint/lib/rule-tester/rule-tester.js | 409 +- .../eslint/lib/rules/accessor-pairs.js | 90 +- .../eslint/lib/rules/array-bracket-newline.js | 11 +- .../eslint/lib/rules/array-bracket-spacing.js | 11 +- .../eslint/lib/rules/array-callback-return.js | 212 +- .../eslint/lib/rules/array-element-newline.js | 26 +- .../eslint/lib/rules/arrow-body-style.js | 40 +- node_modules/eslint/lib/rules/arrow-parens.js | 11 +- .../eslint/lib/rules/arrow-spacing.js | 11 +- .../eslint/lib/rules/block-scoped-var.js | 31 +- .../eslint/lib/rules/block-spacing.js | 24 +- node_modules/eslint/lib/rules/brace-style.js | 17 +- .../eslint/lib/rules/callback-return.js | 13 +- node_modules/eslint/lib/rules/camelcase.js | 426 +- .../eslint/lib/rules/capitalized-comments.js | 10 +- .../lib/rules/class-methods-use-this.js | 80 +- node_modules/eslint/lib/rules/comma-dangle.js | 69 +- .../eslint/lib/rules/comma-spacing.js | 87 +- node_modules/eslint/lib/rules/comma-style.js | 16 +- node_modules/eslint/lib/rules/complexity.js | 119 +- .../lib/rules/computed-property-spacing.js | 14 +- .../eslint/lib/rules/consistent-return.js | 55 +- .../eslint/lib/rules/consistent-this.js | 16 +- .../eslint/lib/rules/constructor-super.js | 57 +- node_modules/eslint/lib/rules/curly.js | 21 +- .../eslint/lib/rules/default-case-last.js | 6 +- node_modules/eslint/lib/rules/default-case.js | 12 +- .../eslint/lib/rules/default-param-last.js | 8 +- node_modules/eslint/lib/rules/dot-location.js | 11 +- node_modules/eslint/lib/rules/dot-notation.js | 22 +- node_modules/eslint/lib/rules/eol-last.js | 27 +- node_modules/eslint/lib/rules/eqeqeq.js | 10 +- .../eslint/lib/rules/for-direction.js | 68 +- .../eslint/lib/rules/func-call-spacing.js | 11 +- .../eslint/lib/rules/func-name-matching.js | 24 +- node_modules/eslint/lib/rules/func-names.js | 11 +- node_modules/eslint/lib/rules/func-style.js | 6 +- .../rules/function-call-argument-newline.js | 11 +- .../lib/rules/function-paren-newline.js | 29 +- .../lib/rules/generator-star-spacing.js | 11 +- .../eslint/lib/rules/getter-return.js | 71 +- .../eslint/lib/rules/global-require.js | 20 +- .../lib/rules/grouped-accessor-pairs.js | 83 +- node_modules/eslint/lib/rules/guard-for-in.js | 6 +- .../eslint/lib/rules/handle-callback-err.js | 10 +- node_modules/eslint/lib/rules/id-blacklist.js | 27 +- node_modules/eslint/lib/rules/id-denylist.js | 68 +- node_modules/eslint/lib/rules/id-length.js | 60 +- node_modules/eslint/lib/rules/id-match.js | 99 +- .../lib/rules/implicit-arrow-linebreak.js | 11 +- .../eslint/lib/rules/indent-legacy.js | 21 +- node_modules/eslint/lib/rules/indent.js | 330 +- node_modules/eslint/lib/rules/index.js | 9 +- .../eslint/lib/rules/init-declarations.js | 6 +- node_modules/eslint/lib/rules/jsx-quotes.js | 11 +- node_modules/eslint/lib/rules/key-spacing.js | 141 +- .../eslint/lib/rules/keyword-spacing.js | 83 +- .../eslint/lib/rules/line-comment-position.js | 8 +- .../eslint/lib/rules/linebreak-style.js | 11 +- .../eslint/lib/rules/lines-around-comment.js | 100 +- .../lib/rules/lines-around-directive.js | 10 +- .../lib/rules/lines-between-class-members.js | 162 +- .../lib/rules/logical-assignment-operators.js | 504 + .../eslint/lib/rules/max-classes-per-file.js | 44 +- node_modules/eslint/lib/rules/max-depth.js | 8 +- node_modules/eslint/lib/rules/max-len.js | 43 +- .../lib/rules/max-lines-per-function.js | 15 +- node_modules/eslint/lib/rules/max-lines.js | 35 +- .../eslint/lib/rules/max-nested-callbacks.js | 6 +- node_modules/eslint/lib/rules/max-params.js | 13 +- .../lib/rules/max-statements-per-line.js | 11 +- .../eslint/lib/rules/max-statements.js | 21 +- .../lib/rules/multiline-comment-style.js | 53 +- .../eslint/lib/rules/multiline-ternary.js | 15 +- node_modules/eslint/lib/rules/new-cap.js | 15 +- node_modules/eslint/lib/rules/new-parens.js | 30 +- .../eslint/lib/rules/newline-after-var.js | 18 +- .../eslint/lib/rules/newline-before-return.js | 12 +- .../lib/rules/newline-per-chained-call.js | 13 +- node_modules/eslint/lib/rules/no-alert.js | 10 +- .../eslint/lib/rules/no-array-constructor.js | 97 +- .../lib/rules/no-async-promise-executor.js | 8 +- .../eslint/lib/rules/no-await-in-loop.js | 6 +- node_modules/eslint/lib/rules/no-bitwise.js | 20 +- .../eslint/lib/rules/no-buffer-constructor.js | 7 +- node_modules/eslint/lib/rules/no-caller.js | 6 +- .../eslint/lib/rules/no-case-declarations.js | 6 +- .../eslint/lib/rules/no-catch-shadow.js | 10 +- .../eslint/lib/rules/no-class-assign.js | 10 +- .../eslint/lib/rules/no-compare-neg-zero.js | 6 +- .../eslint/lib/rules/no-cond-assign.js | 8 +- .../eslint/lib/rules/no-confusing-arrow.js | 19 +- node_modules/eslint/lib/rules/no-console.js | 89 +- .../eslint/lib/rules/no-const-assign.js | 10 +- .../rules/no-constant-binary-expression.js | 509 + .../eslint/lib/rules/no-constant-condition.js | 160 +- .../eslint/lib/rules/no-constructor-return.js | 6 +- node_modules/eslint/lib/rules/no-continue.js | 6 +- .../eslint/lib/rules/no-control-regex.js | 56 +- node_modules/eslint/lib/rules/no-debugger.js | 6 +- .../eslint/lib/rules/no-delete-var.js | 6 +- node_modules/eslint/lib/rules/no-div-regex.js | 8 +- node_modules/eslint/lib/rules/no-dupe-args.js | 10 +- .../eslint/lib/rules/no-dupe-class-members.js | 15 +- .../eslint/lib/rules/no-dupe-else-if.js | 8 +- node_modules/eslint/lib/rules/no-dupe-keys.js | 7 +- .../eslint/lib/rules/no-duplicate-case.js | 8 +- .../eslint/lib/rules/no-duplicate-imports.js | 286 +- .../eslint/lib/rules/no-else-return.js | 33 +- .../lib/rules/no-empty-character-class.js | 58 +- .../eslint/lib/rules/no-empty-function.js | 10 +- .../eslint/lib/rules/no-empty-pattern.js | 47 +- .../eslint/lib/rules/no-empty-static-block.js | 47 + node_modules/eslint/lib/rules/no-empty.js | 29 +- node_modules/eslint/lib/rules/no-eq-null.js | 6 +- node_modules/eslint/lib/rules/no-eval.js | 53 +- node_modules/eslint/lib/rules/no-ex-assign.js | 10 +- .../eslint/lib/rules/no-extend-native.js | 11 +- .../eslint/lib/rules/no-extra-bind.js | 8 +- .../eslint/lib/rules/no-extra-boolean-cast.js | 19 +- .../eslint/lib/rules/no-extra-label.js | 8 +- .../eslint/lib/rules/no-extra-parens.js | 148 +- .../eslint/lib/rules/no-extra-semi.js | 55 +- .../eslint/lib/rules/no-fallthrough.js | 110 +- .../eslint/lib/rules/no-floating-decimal.js | 11 +- .../eslint/lib/rules/no-func-assign.js | 10 +- .../eslint/lib/rules/no-global-assign.js | 13 +- .../eslint/lib/rules/no-implicit-coercion.js | 105 +- .../eslint/lib/rules/no-implicit-globals.js | 16 +- .../eslint/lib/rules/no-implied-eval.js | 15 +- .../eslint/lib/rules/no-import-assign.js | 14 +- .../eslint/lib/rules/no-inline-comments.js | 8 +- .../eslint/lib/rules/no-inner-declarations.js | 36 +- .../eslint/lib/rules/no-invalid-regexp.js | 91 +- .../eslint/lib/rules/no-invalid-this.js | 105 +- .../lib/rules/no-irregular-whitespace.js | 33 +- node_modules/eslint/lib/rules/no-iterator.js | 6 +- node_modules/eslint/lib/rules/no-label-var.js | 9 +- node_modules/eslint/lib/rules/no-labels.js | 8 +- .../eslint/lib/rules/no-lone-blocks.js | 32 +- node_modules/eslint/lib/rules/no-lonely-if.js | 13 +- node_modules/eslint/lib/rules/no-loop-func.js | 16 +- .../eslint/lib/rules/no-loss-of-precision.js | 32 +- .../eslint/lib/rules/no-magic-numbers.js | 31 +- .../rules/no-misleading-character-class.js | 182 +- .../eslint/lib/rules/no-mixed-operators.js | 17 +- .../eslint/lib/rules/no-mixed-requires.js | 9 +- .../lib/rules/no-mixed-spaces-and-tabs.js | 11 +- .../eslint/lib/rules/no-multi-assign.js | 40 +- .../eslint/lib/rules/no-multi-spaces.js | 13 +- node_modules/eslint/lib/rules/no-multi-str.js | 6 +- .../lib/rules/no-multiple-empty-lines.js | 11 +- .../eslint/lib/rules/no-native-reassign.js | 13 +- .../eslint/lib/rules/no-negated-condition.js | 6 +- .../eslint/lib/rules/no-negated-in-lhs.js | 6 +- .../eslint/lib/rules/no-nested-ternary.js | 6 +- node_modules/eslint/lib/rules/no-new-func.js | 57 +- .../lib/rules/no-new-native-nonconstructor.js | 66 + .../eslint/lib/rules/no-new-object.js | 20 +- .../eslint/lib/rules/no-new-require.js | 7 +- .../eslint/lib/rules/no-new-symbol.js | 20 +- .../eslint/lib/rules/no-new-wrappers.js | 32 +- node_modules/eslint/lib/rules/no-new.js | 6 +- .../lib/rules/no-nonoctal-decimal-escape.js | 13 +- node_modules/eslint/lib/rules/no-obj-calls.js | 22 +- .../eslint/lib/rules/no-object-constructor.js | 117 + .../eslint/lib/rules/no-octal-escape.js | 6 +- node_modules/eslint/lib/rules/no-octal.js | 10 +- .../eslint/lib/rules/no-param-reassign.js | 9 +- .../eslint/lib/rules/no-path-concat.js | 7 +- node_modules/eslint/lib/rules/no-plusplus.js | 6 +- .../eslint/lib/rules/no-process-env.js | 7 +- .../eslint/lib/rules/no-process-exit.js | 7 +- .../lib/rules/no-promise-executor-return.js | 182 +- node_modules/eslint/lib/rules/no-proto.js | 6 +- .../eslint/lib/rules/no-prototype-builtins.js | 104 +- node_modules/eslint/lib/rules/no-redeclare.js | 16 +- .../eslint/lib/rules/no-regex-spaces.js | 33 +- .../eslint/lib/rules/no-restricted-exports.js | 137 +- .../eslint/lib/rules/no-restricted-globals.js | 14 +- .../eslint/lib/rules/no-restricted-imports.js | 216 +- .../eslint/lib/rules/no-restricted-modules.js | 31 +- .../lib/rules/no-restricted-properties.js | 53 +- .../eslint/lib/rules/no-restricted-syntax.js | 8 +- .../eslint/lib/rules/no-return-assign.js | 8 +- .../eslint/lib/rules/no-return-await.js | 42 +- .../eslint/lib/rules/no-script-url.js | 9 +- .../eslint/lib/rules/no-self-assign.js | 10 +- .../eslint/lib/rules/no-self-compare.js | 8 +- node_modules/eslint/lib/rules/no-sequences.js | 8 +- .../eslint/lib/rules/no-setter-return.js | 12 +- .../lib/rules/no-shadow-restricted-names.js | 9 +- node_modules/eslint/lib/rules/no-shadow.js | 158 +- .../eslint/lib/rules/no-spaced-func.js | 8 +- .../eslint/lib/rules/no-sparse-arrays.js | 8 +- node_modules/eslint/lib/rules/no-sync.js | 9 +- node_modules/eslint/lib/rules/no-tabs.js | 11 +- .../lib/rules/no-template-curly-in-string.js | 6 +- node_modules/eslint/lib/rules/no-ternary.js | 6 +- .../eslint/lib/rules/no-this-before-super.js | 55 +- .../eslint/lib/rules/no-throw-literal.js | 6 +- .../eslint/lib/rules/no-trailing-spaces.js | 11 +- .../eslint/lib/rules/no-undef-init.js | 10 +- node_modules/eslint/lib/rules/no-undef.js | 11 +- node_modules/eslint/lib/rules/no-undefined.js | 12 +- .../eslint/lib/rules/no-underscore-dangle.js | 90 +- .../lib/rules/no-unexpected-multiline.js | 8 +- .../lib/rules/no-unmodified-loop-condition.js | 12 +- .../eslint/lib/rules/no-unneeded-ternary.js | 10 +- .../eslint/lib/rules/no-unreachable-loop.js | 65 +- .../eslint/lib/rules/no-unreachable.js | 103 +- .../eslint/lib/rules/no-unsafe-finally.js | 6 +- .../eslint/lib/rules/no-unsafe-negation.js | 11 +- .../lib/rules/no-unsafe-optional-chaining.js | 8 +- .../eslint/lib/rules/no-unused-expressions.js | 35 +- .../eslint/lib/rules/no-unused-labels.js | 67 +- .../rules/no-unused-private-class-members.js | 195 + .../eslint/lib/rules/no-unused-vars.js | 144 +- .../eslint/lib/rules/no-use-before-define.js | 275 +- .../lib/rules/no-useless-backreference.js | 29 +- .../eslint/lib/rules/no-useless-call.js | 8 +- .../eslint/lib/rules/no-useless-catch.js | 6 +- .../lib/rules/no-useless-computed-key.js | 107 +- .../eslint/lib/rules/no-useless-concat.js | 8 +- .../lib/rules/no-useless-constructor.js | 6 +- .../eslint/lib/rules/no-useless-escape.js | 251 +- .../eslint/lib/rules/no-useless-rename.js | 20 +- .../eslint/lib/rules/no-useless-return.js | 91 +- node_modules/eslint/lib/rules/no-var.js | 16 +- node_modules/eslint/lib/rules/no-void.js | 6 +- .../eslint/lib/rules/no-warning-comments.js | 97 +- .../rules/no-whitespace-before-property.js | 11 +- node_modules/eslint/lib/rules/no-with.js | 6 +- .../rules/nonblock-statement-body-position.js | 11 +- .../eslint/lib/rules/object-curly-newline.js | 34 +- .../eslint/lib/rules/object-curly-spacing.js | 15 +- .../lib/rules/object-property-newline.js | 11 +- .../eslint/lib/rules/object-shorthand.js | 38 +- .../lib/rules/one-var-declaration-per-line.js | 9 +- node_modules/eslint/lib/rules/one-var.js | 16 +- .../eslint/lib/rules/operator-assignment.js | 37 +- .../eslint/lib/rules/operator-linebreak.js | 40 +- .../eslint/lib/rules/padded-blocks.js | 22 +- .../rules/padding-line-between-statements.js | 76 +- .../eslint/lib/rules/prefer-arrow-callback.js | 28 +- node_modules/eslint/lib/rules/prefer-const.js | 28 +- .../eslint/lib/rules/prefer-destructuring.js | 16 +- .../rules/prefer-exponentiation-operator.js | 21 +- .../lib/rules/prefer-named-capture-group.js | 104 +- .../lib/rules/prefer-numeric-literals.js | 8 +- .../eslint/lib/rules/prefer-object-has-own.js | 114 + .../eslint/lib/rules/prefer-object-spread.js | 33 +- .../lib/rules/prefer-promise-reject-errors.js | 9 +- .../eslint/lib/rules/prefer-reflect.js | 10 +- .../eslint/lib/rules/prefer-regex-literals.js | 375 +- .../eslint/lib/rules/prefer-rest-params.js | 15 +- .../eslint/lib/rules/prefer-spread.js | 8 +- .../eslint/lib/rules/prefer-template.js | 10 +- node_modules/eslint/lib/rules/quote-props.js | 31 +- node_modules/eslint/lib/rules/quotes.js | 55 +- node_modules/eslint/lib/rules/radix.js | 47 +- .../lib/rules/require-atomic-updates.js | 127 +- .../eslint/lib/rules/require-await.js | 8 +- .../eslint/lib/rules/require-jsdoc.js | 9 +- .../lib/rules/require-unicode-regexp.js | 84 +- .../eslint/lib/rules/require-yield.js | 7 +- .../eslint/lib/rules/rest-spread-spacing.js | 11 +- node_modules/eslint/lib/rules/semi-spacing.js | 14 +- node_modules/eslint/lib/rules/semi-style.js | 37 +- node_modules/eslint/lib/rules/semi.js | 140 +- node_modules/eslint/lib/rules/sort-imports.js | 8 +- node_modules/eslint/lib/rules/sort-keys.js | 49 +- node_modules/eslint/lib/rules/sort-vars.js | 8 +- .../eslint/lib/rules/space-before-blocks.js | 27 +- .../lib/rules/space-before-function-paren.js | 11 +- .../eslint/lib/rules/space-in-parens.js | 11 +- .../eslint/lib/rules/space-infix-ops.js | 37 +- .../eslint/lib/rules/space-unary-ops.js | 11 +- .../eslint/lib/rules/spaced-comment.js | 17 +- node_modules/eslint/lib/rules/strict.js | 8 +- .../eslint/lib/rules/switch-colon-spacing.js | 25 +- .../eslint/lib/rules/symbol-description.js | 18 +- .../lib/rules/template-curly-spacing.js | 11 +- .../eslint/lib/rules/template-tag-spacing.js | 11 +- node_modules/eslint/lib/rules/unicode-bom.js | 8 +- node_modules/eslint/lib/rules/use-isnan.js | 11 +- .../eslint/lib/rules/utils/ast-utils.js | 555 +- .../lib/rules/utils/lazy-loading-rule-map.js | 6 +- .../lib/rules/utils/regular-expressions.js | 42 + node_modules/eslint/lib/rules/valid-jsdoc.js | 11 +- node_modules/eslint/lib/rules/valid-typeof.js | 64 +- node_modules/eslint/lib/rules/vars-on-top.js | 45 +- node_modules/eslint/lib/rules/wrap-iife.js | 13 +- node_modules/eslint/lib/rules/wrap-regex.js | 16 +- .../eslint/lib/rules/yield-star-spacing.js | 11 +- node_modules/eslint/lib/rules/yoda.js | 25 +- node_modules/eslint/lib/shared/ajv.js | 2 +- .../eslint/lib/shared/config-validator.js | 23 +- .../eslint/lib/shared/deprecation-warnings.js | 24 +- node_modules/eslint/lib/shared/directives.js | 15 + node_modules/eslint/lib/shared/logging.js | 4 +- .../lib/shared/relative-module-resolver.js | 10 +- .../eslint/lib/shared/runtime-info.js | 5 +- node_modules/eslint/lib/shared/severity.js | 49 + .../eslint/lib/shared/string-utils.js | 60 + node_modules/eslint/lib/shared/traverser.js | 4 +- node_modules/eslint/lib/shared/types.js | 76 +- .../eslint/lib/source-code/source-code.js | 495 +- .../lib/source-code/token-store/cursor.js | 4 +- .../lib/source-code/token-store/index.js | 2 +- .../lib/source-code/token-store/utils.js | 67 +- node_modules/eslint/lib/unsupported-api.js | 30 + ...files-ignored.txt => all-files-ignored.js} | 12 +- .../eslint/messages/eslintrc-incompat.js | 98 + .../eslint/messages/eslintrc-plugins.js | 24 + .../eslint/messages/extend-config-missing.js | 13 + .../eslint/messages/extend-config-missing.txt | 5 - .../eslint/messages/failed-to-read-json.js | 11 + .../eslint/messages/failed-to-read-json.txt | 3 - .../eslint/messages/file-not-found.js | 10 + .../eslint/messages/file-not-found.txt | 2 - .../eslint/messages/invalid-rule-options.js | 17 + .../eslint/messages/invalid-rule-severity.js | 13 + .../eslint/messages/no-config-found.js | 15 + .../eslint/messages/no-config-found.txt | 7 - .../eslint/messages/plugin-conflict.js | 22 + .../eslint/messages/plugin-conflict.txt | 7 - .../eslint/messages/plugin-invalid.js | 16 + .../eslint/messages/plugin-invalid.txt | 8 - .../eslint/messages/plugin-missing.js | 19 + .../eslint/messages/plugin-missing.txt | 11 - .../print-config-with-directory-path.js | 8 + .../print-config-with-directory-path.txt | 2 - node_modules/eslint/messages/shared.js | 18 + .../eslint/messages/whitespace-found.js | 11 + .../eslint/messages/whitespace-found.txt | 3 - node_modules/eslint/node_modules/.bin/js-yaml | 1 + .../eslint/node_modules/argparse/CHANGELOG.md | 216 + .../eslint/node_modules/argparse/LICENSE | 254 + .../eslint/node_modules/argparse/README.md | 84 + .../eslint/node_modules/argparse/argparse.js | 3707 +++++ .../eslint/node_modules/argparse/lib/sub.js | 67 + .../node_modules/argparse/lib/textwrap.js | 440 + .../eslint/node_modules/argparse/package.json | 31 + .../escape-string-regexp/index.d.ts | 18 + .../escape-string-regexp/index.js | 13 + .../escape-string-regexp}/license | 0 .../escape-string-regexp/package.json | 38 + .../escape-string-regexp/readme.md | 34 + .../eslint/node_modules/find-up/index.d.ts | 138 + .../eslint/node_modules/find-up/index.js | 89 + .../node_modules/find-up}/license | 1 - .../eslint/node_modules/find-up/package.json | 54 + .../eslint/node_modules/find-up/readme.md | 151 + .../eslint/node_modules/js-yaml/CHANGELOG.md | 616 + .../node_modules/js-yaml}/LICENSE | 4 +- .../eslint/node_modules/js-yaml/README.md | 246 + .../node_modules/js-yaml/bin/js-yaml.js | 126 + .../node_modules/js-yaml/dist/js-yaml.js | 3874 +++++ .../node_modules/js-yaml/dist/js-yaml.min.js | 2 + .../node_modules/js-yaml/dist/js-yaml.mjs | 3851 +++++ .../eslint/node_modules/js-yaml/index.js | 47 + .../eslint/node_modules/js-yaml/lib/common.js | 59 + .../eslint/node_modules/js-yaml/lib/dumper.js | 965 ++ .../node_modules/js-yaml/lib/exception.js | 55 + .../eslint/node_modules/js-yaml/lib/loader.js | 1727 +++ .../eslint/node_modules/js-yaml/lib/schema.js | 121 + .../node_modules/js-yaml/lib/schema/core.js | 11 + .../js-yaml/lib/schema/default.js | 22 + .../js-yaml/lib/schema/failsafe.js | 17 + .../node_modules/js-yaml/lib/schema/json.js | 19 + .../node_modules/js-yaml/lib/snippet.js | 101 + .../eslint/node_modules/js-yaml/lib/type.js | 66 + .../node_modules/js-yaml/lib/type/binary.js | 125 + .../node_modules/js-yaml/lib/type/bool.js | 35 + .../node_modules/js-yaml/lib/type/float.js | 97 + .../node_modules/js-yaml/lib/type/int.js | 156 + .../node_modules/js-yaml/lib/type/map.js | 8 + .../node_modules/js-yaml/lib/type/merge.js | 12 + .../node_modules/js-yaml/lib/type/null.js | 35 + .../node_modules/js-yaml/lib/type/omap.js | 44 + .../node_modules/js-yaml/lib/type/pairs.js | 53 + .../node_modules/js-yaml/lib/type/seq.js | 8 + .../node_modules/js-yaml/lib/type/set.js | 29 + .../node_modules/js-yaml/lib/type/str.js | 8 + .../js-yaml/lib/type/timestamp.js | 88 + .../eslint/node_modules/js-yaml/package.json | 66 + .../node_modules/locate-path/index.d.ts | 83 + .../eslint/node_modules/locate-path/index.js | 68 + .../node_modules/locate-path}/license | 2 +- .../node_modules/locate-path/package.json | 46 + .../eslint/node_modules/locate-path/readme.md | 125 + .../eslint/node_modules/p-limit/index.d.ts | 42 + .../eslint/node_modules/p-limit/index.js | 71 + .../node_modules/p-limit/license} | 17 +- .../eslint/node_modules/p-limit/package.json | 52 + .../eslint/node_modules/p-limit/readme.md | 101 + .../eslint/node_modules/p-locate/index.d.ts | 53 + .../eslint/node_modules/p-locate/index.js | 50 + .../eslint/node_modules/p-locate/license | 9 + .../eslint/node_modules/p-locate/package.json | 54 + .../eslint/node_modules/p-locate/readme.md | 93 + node_modules/eslint/package.json | 260 +- node_modules/espree/CHANGELOG.md | 509 - node_modules/espree/README.md | 49 +- node_modules/espree/dist/espree.cjs | 883 ++ node_modules/espree/espree.js | 54 +- node_modules/espree/lib/ast-node-types.js | 96 - node_modules/espree/lib/espree.js | 155 +- node_modules/espree/lib/features.js | 4 +- node_modules/espree/lib/options.js | 103 +- node_modules/espree/lib/token-translator.js | 20 +- node_modules/espree/lib/version.js | 3 + node_modules/espree/lib/visitor-keys.js | 123 - node_modules/espree/node_modules/.bin/acorn | 1 + .../espree/node_modules/acorn/CHANGELOG.md | 880 ++ .../node_modules/acorn/LICENSE} | 4 +- .../espree/node_modules/acorn/README.md | 283 + .../espree/node_modules/acorn/bin/acorn | 4 + .../node_modules/acorn/dist/acorn.d.mts | 857 ++ .../espree/node_modules/acorn/dist/acorn.d.ts | 857 ++ .../espree/node_modules/acorn/dist/acorn.js | 6002 ++++++++ .../espree/node_modules/acorn/dist/acorn.mjs | 5973 ++++++++ .../espree/node_modules/acorn/dist/bin.js | 90 + .../espree/node_modules/acorn/package.json | 50 + .../eslint-visitor-keys/CHANGELOG.md | 25 - .../eslint-visitor-keys/README.md | 98 - .../eslint-visitor-keys/lib/index.js | 81 - .../eslint-visitor-keys/package.json | 71 - node_modules/espree/package.json | 132 +- node_modules/esquery/dist/esquery.esm.js | 2255 +-- node_modules/esquery/dist/esquery.esm.min.js | 2 +- .../esquery/dist/esquery.esm.min.js.map | 2 +- node_modules/esquery/dist/esquery.js | 2255 +-- node_modules/esquery/dist/esquery.lite.js | 2019 +-- node_modules/esquery/dist/esquery.lite.min.js | 2 +- .../esquery/dist/esquery.lite.min.js.map | 2 +- node_modules/esquery/dist/esquery.min.js | 2 +- node_modules/esquery/dist/esquery.min.js.map | 2 +- .../esquery/node_modules/estraverse/.jshintrc | 16 - .../node_modules/estraverse/LICENSE.BSD | 19 - .../esquery/node_modules/estraverse/README.md | 153 - .../node_modules/estraverse/estraverse.js | 801 -- .../node_modules/estraverse/gulpfile.js | 70 - .../node_modules/estraverse/package.json | 68 - node_modules/esquery/package.json | 124 +- node_modules/esquery/parser.js | 58 +- .../node_modules/estraverse/.jshintrc | 16 - .../node_modules/estraverse/LICENSE.BSD | 19 - .../node_modules/estraverse/README.md | 153 - .../node_modules/estraverse/estraverse.js | 801 -- .../node_modules/estraverse/gulpfile.js | 70 - .../node_modules/estraverse/package.json | 68 - node_modules/estraverse/estraverse.js | 25 +- node_modules/estraverse/package.json | 64 +- node_modules/fastq/.github/dependabot.yml | 11 + node_modules/fastq/.github/workflows/ci.yml | 75 + node_modules/fastq/LICENSE | 13 + node_modules/fastq/README.md | 306 + node_modules/fastq/bench.js | 66 + node_modules/fastq/example.js | 14 + node_modules/fastq/example.mjs | 11 + node_modules/fastq/index.d.ts | 38 + node_modules/fastq/package.json | 53 + node_modules/fastq/queue.js | 311 + node_modules/fastq/test/example.ts | 83 + node_modules/fastq/test/promise.js | 248 + node_modules/fastq/test/test.js | 642 + node_modules/fastq/test/tsconfig.json | 11 + .../functional-red-black-tree/.npmignore | 16 - .../functional-red-black-tree/README.md | 237 - .../functional-red-black-tree/bench/test.js | 11 - .../functional-red-black-tree/package.json | 68 - .../functional-red-black-tree/rbtree.js | 996 -- .../functional-red-black-tree/test/test.js | 479 - node_modules/get-intrinsic/.eslintignore | 1 - node_modules/get-intrinsic/.eslintrc | 43 - .../get-intrinsic/.github/FUNDING.yml | 12 - node_modules/get-intrinsic/.nycrc | 13 - node_modules/get-intrinsic/CHANGELOG.md | 64 - node_modules/get-intrinsic/README.md | 65 - node_modules/get-intrinsic/index.js | 330 - node_modules/get-intrinsic/package.json | 106 - .../get-intrinsic/test/GetIntrinsic.js | 260 - node_modules/glob-parent/CHANGELOG.md | 110 - node_modules/glob-parent/LICENSE | 2 +- node_modules/glob-parent/README.md | 49 +- node_modules/glob-parent/index.js | 45 +- node_modules/glob-parent/package.json | 106 +- node_modules/globals/globals.json | 274 +- node_modules/globals/package.json | 139 +- node_modules/globals/readme.md | 16 +- node_modules/graphemer/CHANGELOG.md | 30 + .../{get-intrinsic => graphemer}/LICENSE | 21 +- node_modules/graphemer/README.md | 132 + node_modules/graphemer/lib/Graphemer.d.ts | 41 + node_modules/graphemer/lib/Graphemer.d.ts.map | 1 + node_modules/graphemer/lib/Graphemer.js | 11959 ++++++++++++++++ .../graphemer/lib/GraphemerHelper.d.ts | 32 + .../graphemer/lib/GraphemerHelper.d.ts.map | 1 + node_modules/graphemer/lib/GraphemerHelper.js | 169 + .../graphemer/lib/GraphemerIterator.d.ts | 22 + .../graphemer/lib/GraphemerIterator.d.ts.map | 1 + .../graphemer/lib/GraphemerIterator.js | 36 + node_modules/graphemer/lib/boundaries.d.ts | 35 + .../graphemer/lib/boundaries.d.ts.map | 1 + node_modules/graphemer/lib/boundaries.js | 38 + node_modules/graphemer/lib/index.d.ts | 3 + node_modules/graphemer/lib/index.d.ts.map | 1 + node_modules/graphemer/lib/index.js | 7 + node_modules/graphemer/package.json | 54 + node_modules/has-symbols/.eslintignore | 1 - node_modules/has-symbols/.eslintrc | 11 - node_modules/has-symbols/.github/FUNDING.yml | 12 - node_modules/has-symbols/.nycrc | 13 - node_modules/has-symbols/CHANGELOG.md | 58 - node_modules/has-symbols/LICENSE | 21 - node_modules/has-symbols/README.md | 40 - node_modules/has-symbols/index.js | 13 - node_modules/has-symbols/package.json | 125 - node_modules/has-symbols/shams.js | 42 - node_modules/has-symbols/test/index.js | 22 - .../has-symbols/test/shams/core-js.js | 28 - .../test/shams/get-own-property-symbols.js | 28 - node_modules/has-symbols/test/tests.js | 56 - node_modules/ignore/CHANGELOG.md | 19 - node_modules/ignore/LICENSE-MIT | 0 node_modules/ignore/README.md | 171 +- node_modules/ignore/index.d.ts | 42 +- node_modules/ignore/index.js | 515 +- node_modules/ignore/legacy.js | 545 +- node_modules/ignore/package.json | 114 +- node_modules/is-boolean-object/.editorconfig | 22 - node_modules/is-boolean-object/.eslintignore | 1 - node_modules/is-boolean-object/.eslintrc | 18 - .../is-boolean-object/.github/FUNDING.yml | 12 - .../.github/workflows/node-4+.yml | 54 - .../.github/workflows/node-harmony.yml | 66 - .../.github/workflows/node-iojs.yml | 58 - .../.github/workflows/node-pretest.yml | 26 - .../.github/workflows/node-zero.yml | 60 - .../.github/workflows/rebase.yml | 15 - .../.github/workflows/require-allow-edits.yml | 12 - node_modules/is-boolean-object/.nycrc | 13 - node_modules/is-boolean-object/CHANGELOG.md | 82 - node_modules/is-boolean-object/README.md | 58 - node_modules/is-boolean-object/index.js | 26 - node_modules/is-boolean-object/package.json | 115 - node_modules/is-boolean-object/test/index.js | 48 - node_modules/is-extglob/package.json | 65 +- node_modules/is-glob/README.md | 2 +- node_modules/is-glob/index.js | 150 +- node_modules/is-glob/package.json | 83 +- node_modules/is-number-object/.eslintrc | 9 - .../is-number-object/.github/FUNDING.yml | 12 - .../.github/workflows/rebase.yml | 15 - node_modules/is-number-object/.travis.yml | 12 - node_modules/is-number-object/CHANGELOG.md | 84 - node_modules/is-number-object/README.md | 52 - node_modules/is-number-object/index.js | 24 - node_modules/is-number-object/package.json | 108 - node_modules/is-number-object/test/index.js | 38 - node_modules/is-path-inside/index.d.ts | 27 + node_modules/is-path-inside/index.js | 12 + .../ansi-styles => is-path-inside}/license | 0 node_modules/is-path-inside/package.json | 36 + node_modules/is-path-inside/readme.md | 63 + node_modules/is-string/.eslintrc | 19 - node_modules/is-string/.github/FUNDING.yml | 12 - .../is-string/.github/workflows/rebase.yml | 15 - node_modules/is-string/.travis.yml | 12 - node_modules/is-string/CHANGELOG.md | 84 - node_modules/is-string/README.md | 57 - node_modules/is-string/index.js | 24 - node_modules/is-string/package.json | 108 - node_modules/is-string/test/index.js | 39 - node_modules/lodash.clonedeep/README.md | 18 - node_modules/lodash.clonedeep/package.json | 69 - node_modules/lodash.flatten/LICENSE | 47 - node_modules/lodash.flatten/README.md | 18 - node_modules/lodash.flatten/index.js | 349 - node_modules/lodash.flatten/package.json | 69 - .../LICENSE | 2 +- node_modules/lodash.merge/README.md | 18 + .../index.js | 1317 +- node_modules/lodash.merge/package.json | 16 + node_modules/lodash.truncate/LICENSE | 47 - node_modules/lodash.truncate/README.md | 18 - node_modules/lodash.truncate/index.js | 632 - node_modules/lodash.truncate/package.json | 69 - node_modules/minimatch/README.md | 23 +- node_modules/minimatch/minimatch.js | 162 +- node_modules/minimatch/package.json | 75 +- node_modules/optionator/README.md | 2 +- node_modules/optionator/lib/help.js | 2 +- node_modules/optionator/lib/index.js | 2 +- node_modules/optionator/package.json | 80 +- node_modules/progress/CHANGELOG.md | 115 - node_modules/progress/LICENSE | 22 - node_modules/progress/Makefile | 8 - node_modules/progress/Readme.md | 146 - node_modules/progress/index.js | 1 - node_modules/progress/lib/node-progress.js | 236 - node_modules/progress/package.json | 70 - node_modules/queue-microtask/LICENSE | 20 + node_modules/queue-microtask/README.md | 90 + node_modules/queue-microtask/index.d.ts | 2 + node_modules/queue-microtask/index.js | 9 + node_modules/queue-microtask/package.json | 55 + node_modules/regexpp/index.d.ts | 247 - node_modules/regexpp/index.js.map | 1 - node_modules/regexpp/index.mjs.map | 1 - node_modules/regexpp/package.json | 112 - node_modules/require-from-string/index.js | 34 - node_modules/require-from-string/package.json | 58 - node_modules/require-from-string/readme.md | 56 - node_modules/reusify/.coveralls.yml | 1 + node_modules/reusify/.travis.yml | 28 + .../{is-number-object => reusify}/LICENSE | 2 +- node_modules/reusify/README.md | 145 + .../benchmarks/createNoCodeFunction.js | 30 + node_modules/reusify/benchmarks/fib.js | 13 + .../reusify/benchmarks/reuseNoCodeFunction.js | 38 + node_modules/reusify/package.json | 45 + node_modules/reusify/reusify.js | 33 + node_modules/reusify/test.js | 66 + node_modules/run-parallel/LICENSE | 20 + node_modules/run-parallel/README.md | 85 + node_modules/run-parallel/index.js | 51 + node_modules/run-parallel/package.json | 58 + node_modules/slice-ansi/index.js | 103 - .../node_modules/ansi-styles/index.d.ts | 345 - .../node_modules/ansi-styles/index.js | 163 - .../node_modules/ansi-styles/package.json | 88 - .../node_modules/ansi-styles/readme.md | 152 - .../node_modules/color-convert/CHANGELOG.md | 54 - .../node_modules/color-convert/LICENSE | 21 - .../node_modules/color-convert/README.md | 68 - .../node_modules/color-convert/conversions.js | 839 -- .../node_modules/color-convert/index.js | 81 - .../node_modules/color-convert/package.json | 83 - .../node_modules/color-convert/route.js | 97 - .../node_modules/color-name/README.md | 11 - .../node_modules/color-name/index.js | 152 - .../node_modules/color-name/package.json | 56 - node_modules/slice-ansi/package.json | 84 - node_modules/slice-ansi/readme.md | 66 - node_modules/strip-ansi/package.json | 141 +- node_modules/table/LICENSE | 24 - node_modules/table/README.md | 734 - node_modules/table/dist/alignString.js | 107 - node_modules/table/dist/alignString.js.flow | 97 - node_modules/table/dist/alignTableData.js | 34 - .../table/dist/alignTableData.js.flow | 21 - .../table/dist/calculateCellHeight.js | 37 - .../table/dist/calculateCellHeight.js.flow | 24 - .../table/dist/calculateCellWidthIndex.js | 27 - .../dist/calculateCellWidthIndex.js.flow | 17 - .../dist/calculateMaximumColumnWidthIndex.js | 36 - .../calculateMaximumColumnWidthIndex.js.flow | 27 - .../table/dist/calculateRowHeightIndex.js | 45 - .../dist/calculateRowHeightIndex.js.flow | 36 - node_modules/table/dist/createStream.js | 124 - node_modules/table/dist/createStream.js.flow | 125 - node_modules/table/dist/drawBorder.js | 109 - node_modules/table/dist/drawBorder.js.flow | 101 - node_modules/table/dist/drawRow.js | 25 - node_modules/table/dist/drawRow.js.flow | 15 - node_modules/table/dist/drawTable.js | 58 - node_modules/table/dist/drawTable.js.flow | 53 - .../table/dist/getBorderCharacters.js | 118 - .../table/dist/getBorderCharacters.js.flow | 120 - node_modules/table/dist/index.js | 31 - node_modules/table/dist/index.js.flow | 9 - node_modules/table/dist/makeConfig.js | 91 - node_modules/table/dist/makeConfig.js.flow | 76 - node_modules/table/dist/makeStreamConfig.js | 97 - .../table/dist/makeStreamConfig.js.flow | 83 - .../table/dist/mapDataUsingRowHeightIndex.js | 41 - .../dist/mapDataUsingRowHeightIndex.js.flow | 34 - node_modules/table/dist/padTableData.js | 23 - node_modules/table/dist/padTableData.js.flow | 14 - node_modules/table/dist/schemas/config.json | 23 - node_modules/table/dist/schemas/shared.json | 98 - .../table/dist/schemas/streamConfig.json | 20 - node_modules/table/dist/stringifyTableData.js | 21 - .../table/dist/stringifyTableData.js.flow | 11 - node_modules/table/dist/table.js | 109 - node_modules/table/dist/table.js.flow | 96 - node_modules/table/dist/truncateTableData.js | 29 - .../table/dist/truncateTableData.js.flow | 17 - node_modules/table/dist/validateConfig.js | 40 - .../table/dist/validateConfig.js.flow | 27 - node_modules/table/dist/validateTableData.js | 54 - .../table/dist/validateTableData.js.flow | 44 - node_modules/table/dist/validators.js | 1493 -- node_modules/table/dist/wrapCell.js | 47 - node_modules/table/dist/wrapCell.js.flow | 35 - node_modules/table/dist/wrapString.js | 39 - node_modules/table/dist/wrapString.js.flow | 29 - node_modules/table/dist/wrapWord.js | 46 - node_modules/table/dist/wrapWord.js.flow | 39 - .../table/node_modules/ajv/.runkit_example.js | 23 - node_modules/table/node_modules/ajv/LICENSE | 22 - node_modules/table/node_modules/ajv/README.md | 181 - .../table/node_modules/ajv/dist/2019.d.ts | 17 - .../table/node_modules/ajv/dist/2019.js | 55 - .../table/node_modules/ajv/dist/2019.js.map | 1 - .../table/node_modules/ajv/dist/2020.d.ts | 17 - .../table/node_modules/ajv/dist/2020.js | 49 - .../table/node_modules/ajv/dist/2020.js.map | 1 - .../table/node_modules/ajv/dist/ajv.d.ts | 16 - .../table/node_modules/ajv/dist/ajv.js | 44 - .../table/node_modules/ajv/dist/ajv.js.map | 1 - .../ajv/dist/compile/codegen/code.d.ts | 39 - .../ajv/dist/compile/codegen/code.js | 147 - .../ajv/dist/compile/codegen/code.js.map | 1 - .../ajv/dist/compile/codegen/index.d.ts | 79 - .../ajv/dist/compile/codegen/index.js | 697 - .../ajv/dist/compile/codegen/index.js.map | 1 - .../ajv/dist/compile/codegen/scope.d.ts | 79 - .../ajv/dist/compile/codegen/scope.js | 143 - .../ajv/dist/compile/codegen/scope.js.map | 1 - .../node_modules/ajv/dist/compile/errors.d.ts | 13 - .../node_modules/ajv/dist/compile/errors.js | 123 - .../ajv/dist/compile/errors.js.map | 1 - .../node_modules/ajv/dist/compile/index.d.ts | 78 - .../node_modules/ajv/dist/compile/index.js | 236 - .../ajv/dist/compile/index.js.map | 1 - .../ajv/dist/compile/jtd/parse.d.ts | 4 - .../ajv/dist/compile/jtd/parse.js | 337 - .../ajv/dist/compile/jtd/parse.js.map | 1 - .../ajv/dist/compile/jtd/serialize.d.ts | 4 - .../ajv/dist/compile/jtd/serialize.js | 218 - .../ajv/dist/compile/jtd/serialize.js.map | 1 - .../ajv/dist/compile/jtd/types.d.ts | 6 - .../ajv/dist/compile/jtd/types.js | 14 - .../ajv/dist/compile/jtd/types.js.map | 1 - .../node_modules/ajv/dist/compile/names.d.ts | 20 - .../node_modules/ajv/dist/compile/names.js | 28 - .../ajv/dist/compile/names.js.map | 1 - .../ajv/dist/compile/ref_error.d.ts | 5 - .../ajv/dist/compile/ref_error.js | 12 - .../ajv/dist/compile/ref_error.js.map | 1 - .../ajv/dist/compile/resolve.d.ts | 12 - .../node_modules/ajv/dist/compile/resolve.js | 152 - .../ajv/dist/compile/resolve.js.map | 1 - .../node_modules/ajv/dist/compile/rules.d.ts | 28 - .../node_modules/ajv/dist/compile/rules.js | 26 - .../ajv/dist/compile/rules.js.map | 1 - .../node_modules/ajv/dist/compile/util.d.ts | 40 - .../node_modules/ajv/dist/compile/util.js | 178 - .../node_modules/ajv/dist/compile/util.js.map | 1 - .../dist/compile/validate/applicability.d.ts | 6 - .../dist/compile/validate/applicability.js | 19 - .../compile/validate/applicability.js.map | 1 - .../ajv/dist/compile/validate/boolSchema.d.ts | 4 - .../ajv/dist/compile/validate/boolSchema.js | 50 - .../dist/compile/validate/boolSchema.js.map | 1 - .../ajv/dist/compile/validate/dataType.d.ts | 17 - .../ajv/dist/compile/validate/dataType.js | 202 - .../ajv/dist/compile/validate/dataType.js.map | 1 - .../ajv/dist/compile/validate/defaults.d.ts | 2 - .../ajv/dist/compile/validate/defaults.js | 35 - .../ajv/dist/compile/validate/defaults.js.map | 1 - .../ajv/dist/compile/validate/index.d.ts | 41 - .../ajv/dist/compile/validate/index.js | 507 - .../ajv/dist/compile/validate/index.js.map | 1 - .../ajv/dist/compile/validate/keyword.d.ts | 8 - .../ajv/dist/compile/validate/keyword.js | 123 - .../ajv/dist/compile/validate/keyword.js.map | 1 - .../ajv/dist/compile/validate/subschema.d.ts | 47 - .../ajv/dist/compile/validate/subschema.js | 81 - .../dist/compile/validate/subschema.js.map | 1 - .../table/node_modules/ajv/dist/core.d.ts | 161 - .../table/node_modules/ajv/dist/core.js | 599 - .../table/node_modules/ajv/dist/core.js.map | 1 - .../table/node_modules/ajv/dist/jtd.d.ts | 45 - .../table/node_modules/ajv/dist/jtd.js | 66 - .../table/node_modules/ajv/dist/jtd.js.map | 1 - .../node_modules/ajv/dist/refs/data.json | 13 - .../dist/refs/json-schema-2019-09/index.d.ts | 2 - .../dist/refs/json-schema-2019-09/index.js | 28 - .../refs/json-schema-2019-09/index.js.map | 1 - .../json-schema-2019-09/meta/applicator.json | 53 - .../json-schema-2019-09/meta/content.json | 17 - .../refs/json-schema-2019-09/meta/core.json | 57 - .../refs/json-schema-2019-09/meta/format.json | 14 - .../json-schema-2019-09/meta/meta-data.json | 37 - .../json-schema-2019-09/meta/validation.json | 90 - .../dist/refs/json-schema-2019-09/schema.json | 39 - .../dist/refs/json-schema-2020-12/index.d.ts | 2 - .../dist/refs/json-schema-2020-12/index.js | 30 - .../refs/json-schema-2020-12/index.js.map | 1 - .../json-schema-2020-12/meta/applicator.json | 48 - .../json-schema-2020-12/meta/content.json | 17 - .../refs/json-schema-2020-12/meta/core.json | 51 - .../meta/format-annotation.json | 14 - .../json-schema-2020-12/meta/meta-data.json | 37 - .../json-schema-2020-12/meta/unevaluated.json | 15 - .../json-schema-2020-12/meta/validation.json | 90 - .../dist/refs/json-schema-2020-12/schema.json | 55 - .../ajv/dist/refs/json-schema-draft-06.json | 137 - .../ajv/dist/refs/json-schema-draft-07.json | 151 - .../ajv/dist/refs/json-schema-secure.json | 88 - .../ajv/dist/refs/jtd-schema.d.ts | 3 - .../node_modules/ajv/dist/refs/jtd-schema.js | 118 - .../ajv/dist/refs/jtd-schema.js.map | 1 - .../node_modules/ajv/dist/runtime/equal.d.ts | 6 - .../node_modules/ajv/dist/runtime/equal.js | 7 - .../ajv/dist/runtime/equal.js.map | 1 - .../ajv/dist/runtime/parseJson.d.ts | 18 - .../ajv/dist/runtime/parseJson.js | 182 - .../ajv/dist/runtime/parseJson.js.map | 1 - .../node_modules/ajv/dist/runtime/quote.d.ts | 5 - .../node_modules/ajv/dist/runtime/quote.js | 29 - .../ajv/dist/runtime/quote.js.map | 1 - .../ajv/dist/runtime/timestamp.d.ts | 5 - .../ajv/dist/runtime/timestamp.js | 30 - .../ajv/dist/runtime/timestamp.js.map | 1 - .../ajv/dist/runtime/ucs2length.d.ts | 5 - .../ajv/dist/runtime/ucs2length.js | 24 - .../ajv/dist/runtime/ucs2length.js.map | 1 - .../ajv/dist/runtime/validation_error.d.ts | 7 - .../ajv/dist/runtime/validation_error.js | 11 - .../ajv/dist/runtime/validation_error.js.map | 1 - .../ajv/dist/standalone/index.d.ts | 5 - .../node_modules/ajv/dist/standalone/index.js | 81 - .../ajv/dist/standalone/index.js.map | 1 - .../ajv/dist/standalone/instance.d.ts | 12 - .../ajv/dist/standalone/instance.js | 35 - .../ajv/dist/standalone/instance.js.map | 1 - .../node_modules/ajv/dist/types/index.d.ts | 168 - .../node_modules/ajv/dist/types/index.js.map | 1 - .../ajv/dist/types/json-schema.d.ts | 116 - .../ajv/dist/types/json-schema.js.map | 1 - .../ajv/dist/types/jtd-schema.d.ts | 136 - .../ajv/dist/types/jtd-schema.js.map | 1 - .../applicator/additionalItems.d.ts | 8 - .../applicator/additionalItems.js | 49 - .../applicator/additionalItems.js.map | 1 - .../applicator/additionalProperties.d.ts | 6 - .../applicator/additionalProperties.js | 106 - .../applicator/additionalProperties.js.map | 1 - .../dist/vocabularies/applicator/allOf.d.ts | 3 - .../ajv/dist/vocabularies/applicator/allOf.js | 23 - .../dist/vocabularies/applicator/allOf.js.map | 1 - .../dist/vocabularies/applicator/anyOf.d.ts | 4 - .../ajv/dist/vocabularies/applicator/anyOf.js | 12 - .../dist/vocabularies/applicator/anyOf.js.map | 1 - .../vocabularies/applicator/contains.d.ts | 7 - .../dist/vocabularies/applicator/contains.js | 87 - .../vocabularies/applicator/contains.js.map | 1 - .../vocabularies/applicator/dependencies.d.ts | 21 - .../vocabularies/applicator/dependencies.js | 85 - .../applicator/dependencies.js.map | 1 - .../applicator/dependentSchemas.d.ts | 3 - .../applicator/dependentSchemas.js | 11 - .../applicator/dependentSchemas.js.map | 1 - .../ajv/dist/vocabularies/applicator/if.d.ts | 6 - .../ajv/dist/vocabularies/applicator/if.js | 66 - .../dist/vocabularies/applicator/if.js.map | 1 - .../dist/vocabularies/applicator/index.d.ts | 13 - .../ajv/dist/vocabularies/applicator/index.js | 44 - .../dist/vocabularies/applicator/index.js.map | 1 - .../dist/vocabularies/applicator/items.d.ts | 5 - .../ajv/dist/vocabularies/applicator/items.js | 52 - .../dist/vocabularies/applicator/items.js.map | 1 - .../vocabularies/applicator/items2020.d.ts | 6 - .../dist/vocabularies/applicator/items2020.js | 30 - .../vocabularies/applicator/items2020.js.map | 1 - .../ajv/dist/vocabularies/applicator/not.d.ts | 4 - .../ajv/dist/vocabularies/applicator/not.js | 26 - .../dist/vocabularies/applicator/not.js.map | 1 - .../dist/vocabularies/applicator/oneOf.d.ts | 6 - .../ajv/dist/vocabularies/applicator/oneOf.js | 60 - .../dist/vocabularies/applicator/oneOf.js.map | 1 - .../applicator/patternProperties.d.ts | 3 - .../applicator/patternProperties.js | 69 - .../applicator/patternProperties.js.map | 1 - .../vocabularies/applicator/prefixItems.d.ts | 3 - .../vocabularies/applicator/prefixItems.js | 12 - .../applicator/prefixItems.js.map | 1 - .../vocabularies/applicator/properties.d.ts | 3 - .../vocabularies/applicator/properties.js | 54 - .../vocabularies/applicator/properties.js.map | 1 - .../applicator/propertyNames.d.ts | 6 - .../vocabularies/applicator/propertyNames.js | 38 - .../applicator/propertyNames.js.map | 1 - .../vocabularies/applicator/thenElse.d.ts | 3 - .../dist/vocabularies/applicator/thenElse.js | 13 - .../vocabularies/applicator/thenElse.js.map | 1 - .../ajv/dist/vocabularies/code.d.ts | 17 - .../ajv/dist/vocabularies/code.js | 126 - .../ajv/dist/vocabularies/code.js.map | 1 - .../ajv/dist/vocabularies/core/id.d.ts | 3 - .../ajv/dist/vocabularies/core/id.js | 10 - .../ajv/dist/vocabularies/core/id.js.map | 1 - .../ajv/dist/vocabularies/core/index.d.ts | 3 - .../ajv/dist/vocabularies/core/index.js | 16 - .../ajv/dist/vocabularies/core/index.js.map | 1 - .../ajv/dist/vocabularies/core/ref.d.ts | 8 - .../ajv/dist/vocabularies/core/ref.js | 122 - .../ajv/dist/vocabularies/core/ref.js.map | 1 - .../vocabularies/discriminator/index.d.ts | 5 - .../dist/vocabularies/discriminator/index.js | 93 - .../vocabularies/discriminator/index.js.map | 1 - .../vocabularies/discriminator/types.d.ts | 10 - .../dist/vocabularies/discriminator/types.js | 9 - .../vocabularies/discriminator/types.js.map | 1 - .../ajv/dist/vocabularies/draft2020.d.ts | 3 - .../ajv/dist/vocabularies/draft2020.js | 23 - .../ajv/dist/vocabularies/draft2020.js.map | 1 - .../ajv/dist/vocabularies/draft7.d.ts | 3 - .../ajv/dist/vocabularies/draft7.js | 17 - .../ajv/dist/vocabularies/draft7.js.map | 1 - .../vocabularies/dynamic/dynamicAnchor.d.ts | 5 - .../vocabularies/dynamic/dynamicAnchor.js | 29 - .../vocabularies/dynamic/dynamicAnchor.js.map | 1 - .../dist/vocabularies/dynamic/dynamicRef.d.ts | 5 - .../dist/vocabularies/dynamic/dynamicRef.js | 51 - .../vocabularies/dynamic/dynamicRef.js.map | 1 - .../ajv/dist/vocabularies/dynamic/index.d.ts | 3 - .../ajv/dist/vocabularies/dynamic/index.js | 9 - .../dist/vocabularies/dynamic/index.js.map | 1 - .../vocabularies/dynamic/recursiveAnchor.d.ts | 3 - .../vocabularies/dynamic/recursiveAnchor.js | 16 - .../dynamic/recursiveAnchor.js.map | 1 - .../vocabularies/dynamic/recursiveRef.d.ts | 3 - .../dist/vocabularies/dynamic/recursiveRef.js | 10 - .../vocabularies/dynamic/recursiveRef.js.map | 1 - .../ajv/dist/vocabularies/errors.d.ts | 9 - .../ajv/dist/vocabularies/errors.js.map | 1 - .../ajv/dist/vocabularies/format/format.d.ts | 8 - .../ajv/dist/vocabularies/format/format.js | 92 - .../dist/vocabularies/format/format.js.map | 1 - .../ajv/dist/vocabularies/format/index.d.ts | 3 - .../ajv/dist/vocabularies/format/index.js | 6 - .../ajv/dist/vocabularies/format/index.js.map | 1 - .../dist/vocabularies/jtd/discriminator.d.ts | 6 - .../dist/vocabularies/jtd/discriminator.js | 71 - .../vocabularies/jtd/discriminator.js.map | 1 - .../ajv/dist/vocabularies/jtd/elements.d.ts | 5 - .../ajv/dist/vocabularies/jtd/elements.js | 24 - .../ajv/dist/vocabularies/jtd/elements.js.map | 1 - .../ajv/dist/vocabularies/jtd/enum.d.ts | 6 - .../ajv/dist/vocabularies/jtd/enum.js | 43 - .../ajv/dist/vocabularies/jtd/enum.js.map | 1 - .../ajv/dist/vocabularies/jtd/error.d.ts | 9 - .../ajv/dist/vocabularies/jtd/error.js | 20 - .../ajv/dist/vocabularies/jtd/error.js.map | 1 - .../ajv/dist/vocabularies/jtd/index.d.ts | 10 - .../ajv/dist/vocabularies/jtd/index.js | 29 - .../ajv/dist/vocabularies/jtd/index.js.map | 1 - .../ajv/dist/vocabularies/jtd/metadata.d.ts | 5 - .../ajv/dist/vocabularies/jtd/metadata.js | 25 - .../ajv/dist/vocabularies/jtd/metadata.js.map | 1 - .../ajv/dist/vocabularies/jtd/nullable.d.ts | 4 - .../ajv/dist/vocabularies/jtd/nullable.js | 22 - .../ajv/dist/vocabularies/jtd/nullable.js.map | 1 - .../vocabularies/jtd/optionalProperties.d.ts | 3 - .../vocabularies/jtd/optionalProperties.js | 15 - .../jtd/optionalProperties.js.map | 1 - .../ajv/dist/vocabularies/jtd/properties.d.ts | 22 - .../ajv/dist/vocabularies/jtd/properties.js | 146 - .../dist/vocabularies/jtd/properties.js.map | 1 - .../ajv/dist/vocabularies/jtd/ref.d.ts | 4 - .../ajv/dist/vocabularies/jtd/ref.js | 66 - .../ajv/dist/vocabularies/jtd/ref.js.map | 1 - .../ajv/dist/vocabularies/jtd/type.d.ts | 10 - .../ajv/dist/vocabularies/jtd/type.js | 52 - .../ajv/dist/vocabularies/jtd/type.js.map | 1 - .../ajv/dist/vocabularies/jtd/union.d.ts | 3 - .../ajv/dist/vocabularies/jtd/union.js | 12 - .../ajv/dist/vocabularies/jtd/union.js.map | 1 - .../ajv/dist/vocabularies/jtd/values.d.ts | 5 - .../ajv/dist/vocabularies/jtd/values.js | 48 - .../ajv/dist/vocabularies/jtd/values.js.map | 1 - .../ajv/dist/vocabularies/metadata.d.ts | 3 - .../ajv/dist/vocabularies/metadata.js | 18 - .../ajv/dist/vocabularies/metadata.js.map | 1 - .../ajv/dist/vocabularies/next.d.ts | 3 - .../ajv/dist/vocabularies/next.js | 8 - .../ajv/dist/vocabularies/next.js.map | 1 - .../dist/vocabularies/unevaluated/index.d.ts | 3 - .../dist/vocabularies/unevaluated/index.js | 7 - .../vocabularies/unevaluated/index.js.map | 1 - .../unevaluated/unevaluatedItems.d.ts | 6 - .../unevaluated/unevaluatedItems.js | 40 - .../unevaluated/unevaluatedItems.js.map | 1 - .../unevaluated/unevaluatedProperties.d.ts | 6 - .../unevaluated/unevaluatedProperties.js | 65 - .../unevaluated/unevaluatedProperties.js.map | 1 - .../dist/vocabularies/validation/const.d.ts | 6 - .../ajv/dist/vocabularies/validation/const.js | 21 - .../dist/vocabularies/validation/const.js.map | 1 - .../validation/dependentRequired.d.ts | 5 - .../validation/dependentRequired.js | 12 - .../validation/dependentRequired.js.map | 1 - .../dist/vocabularies/validation/enum.d.ts | 8 - .../ajv/dist/vocabularies/validation/enum.js | 47 - .../dist/vocabularies/validation/enum.js.map | 1 - .../dist/vocabularies/validation/index.d.ts | 16 - .../ajv/dist/vocabularies/validation/index.js | 33 - .../dist/vocabularies/validation/index.js.map | 1 - .../validation/limitContains.d.ts | 3 - .../vocabularies/validation/limitContains.js | 15 - .../validation/limitContains.js.map | 1 - .../vocabularies/validation/limitItems.d.ts | 3 - .../vocabularies/validation/limitItems.js | 24 - .../vocabularies/validation/limitItems.js.map | 1 - .../vocabularies/validation/limitLength.d.ts | 3 - .../vocabularies/validation/limitLength.js | 27 - .../validation/limitLength.js.map | 1 - .../vocabularies/validation/limitNumber.d.ts | 11 - .../vocabularies/validation/limitNumber.js | 27 - .../validation/limitNumber.js.map | 1 - .../validation/limitProperties.d.ts | 3 - .../validation/limitProperties.js | 24 - .../validation/limitProperties.js.map | 1 - .../vocabularies/validation/multipleOf.d.ts | 8 - .../vocabularies/validation/multipleOf.js | 26 - .../vocabularies/validation/multipleOf.js.map | 1 - .../dist/vocabularies/validation/pattern.d.ts | 8 - .../dist/vocabularies/validation/pattern.js | 22 - .../vocabularies/validation/pattern.js.map | 1 - .../vocabularies/validation/required.d.ts | 8 - .../dist/vocabularies/validation/required.js | 79 - .../vocabularies/validation/required.js.map | 1 - .../vocabularies/validation/uniqueItems.d.ts | 9 - .../vocabularies/validation/uniqueItems.js | 64 - .../validation/uniqueItems.js.map | 1 - .../table/node_modules/ajv/package.json | 150 - .../json-schema-traverse/.eslintrc.yml | 27 - .../json-schema-traverse/.github/FUNDING.yml | 2 - .../.github/workflows/build.yml | 28 - .../.github/workflows/publish.yml | 27 - .../node_modules/json-schema-traverse/LICENSE | 21 - .../json-schema-traverse/README.md | 95 - .../json-schema-traverse/index.d.ts | 40 - .../json-schema-traverse/index.js | 93 - .../json-schema-traverse/package.json | 70 - .../json-schema-traverse/spec/.eslintrc.yml | 6 - .../spec/fixtures/schema.js | 125 - .../json-schema-traverse/spec/index.spec.js | 171 - node_modules/table/package.json | 124 - node_modules/v8-compile-cache/CHANGELOG.md | 53 - node_modules/v8-compile-cache/README.md | 55 - node_modules/v8-compile-cache/package.json | 66 - .../v8-compile-cache/v8-compile-cache.js | 371 - node_modules/yocto-queue/index.d.ts | 56 + node_modules/yocto-queue/index.js | 68 + node_modules/yocto-queue/license | 9 + node_modules/yocto-queue/package.json | 43 + node_modules/yocto-queue/readme.md | 64 + package-lock.json | 1463 +- package.json | 2 +- 1438 files changed, 120880 insertions(+), 65139 deletions(-) create mode 100644 node_modules/.package-lock.json rename node_modules/{functional-red-black-tree => @aashutoshrathi/word-wrap}/LICENSE (96%) create mode 100644 node_modules/@aashutoshrathi/word-wrap/README.md create mode 100644 node_modules/@aashutoshrathi/word-wrap/index.d.ts create mode 100644 node_modules/@aashutoshrathi/word-wrap/index.js create mode 100644 node_modules/@aashutoshrathi/word-wrap/package.json rename node_modules/{ => @eslint-community}/eslint-utils/LICENSE (100%) create mode 100644 node_modules/@eslint-community/eslint-utils/README.md rename node_modules/{ => @eslint-community}/eslint-utils/index.js (84%) create mode 100644 node_modules/@eslint-community/eslint-utils/index.js.map rename node_modules/{ => @eslint-community}/eslint-utils/index.mjs (83%) create mode 100644 node_modules/@eslint-community/eslint-utils/index.mjs.map create mode 100644 node_modules/@eslint-community/eslint-utils/package.json rename node_modules/{ => @eslint-community}/regexpp/LICENSE (100%) rename node_modules/{ => @eslint-community}/regexpp/README.md (77%) create mode 100644 node_modules/@eslint-community/regexpp/index.d.ts rename node_modules/{ => @eslint-community}/regexpp/index.js (55%) create mode 100644 node_modules/@eslint-community/regexpp/index.js.map rename node_modules/{ => @eslint-community}/regexpp/index.mjs (55%) create mode 100644 node_modules/@eslint-community/regexpp/index.mjs.map create mode 100644 node_modules/@eslint-community/regexpp/package.json delete mode 100644 node_modules/@eslint/eslintrc/CHANGELOG.md delete mode 100644 node_modules/@eslint/eslintrc/conf/eslint-all.js delete mode 100644 node_modules/@eslint/eslintrc/conf/eslint-recommended.js create mode 100644 node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs create mode 100644 node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map create mode 100644 node_modules/@eslint/eslintrc/dist/eslintrc.cjs create mode 100644 node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map create mode 100644 node_modules/@eslint/eslintrc/lib/index-universal.js create mode 120000 node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/CHANGELOG.md create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/LICENSE create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/README.md create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/argparse.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/lib/sub.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/lib/textwrap.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/argparse/package.json delete mode 100644 node_modules/@eslint/eslintrc/node_modules/globals/globals.json delete mode 100644 node_modules/@eslint/eslintrc/node_modules/globals/index.d.ts delete mode 100644 node_modules/@eslint/eslintrc/node_modules/globals/index.js delete mode 100644 node_modules/@eslint/eslintrc/node_modules/globals/package.json delete mode 100644 node_modules/@eslint/eslintrc/node_modules/globals/readme.md create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/CHANGELOG.md rename node_modules/{ansi-colors => @eslint/eslintrc/node_modules/js-yaml}/LICENSE (93%) create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/README.md create mode 100755 node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.min.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.mjs create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/index.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/common.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/dumper.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/exception.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/loader.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/core.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/default.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/failsafe.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/json.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/snippet.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/binary.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/bool.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/float.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/int.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/map.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/merge.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/null.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/omap.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/pairs.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/seq.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/set.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/str.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/timestamp.js create mode 100644 node_modules/@eslint/eslintrc/node_modules/js-yaml/package.json create mode 100644 node_modules/@eslint/eslintrc/universal.js create mode 100644 node_modules/@eslint/js/LICENSE create mode 100644 node_modules/@eslint/js/README.md create mode 100644 node_modules/@eslint/js/package.json create mode 100644 node_modules/@eslint/js/src/configs/eslint-all.js rename node_modules/{eslint/conf => @eslint/js/src/configs}/eslint-recommended.js (87%) create mode 100644 node_modules/@eslint/js/src/index.js rename node_modules/{espree/node_modules/eslint-visitor-keys => @humanwhocodes/config-array}/LICENSE (99%) create mode 100644 node_modules/@humanwhocodes/config-array/README.md create mode 100644 node_modules/@humanwhocodes/config-array/api.js create mode 100644 node_modules/@humanwhocodes/config-array/package.json create mode 100644 node_modules/@humanwhocodes/module-importer/CHANGELOG.md rename node_modules/{eslint-utils/node_modules/eslint-visitor-keys => @humanwhocodes/module-importer}/LICENSE (99%) create mode 100644 node_modules/@humanwhocodes/module-importer/README.md create mode 100644 node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs create mode 100644 node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts create mode 100644 node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts create mode 100644 node_modules/@humanwhocodes/module-importer/dist/module-importer.js create mode 100644 node_modules/@humanwhocodes/module-importer/package.json create mode 100644 node_modules/@humanwhocodes/module-importer/src/module-importer.cjs create mode 100644 node_modules/@humanwhocodes/module-importer/src/module-importer.js create mode 100644 node_modules/@humanwhocodes/object-schema/.eslintrc.js create mode 100644 node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml create mode 100644 node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml create mode 100644 node_modules/@humanwhocodes/object-schema/CHANGELOG.md create mode 100644 node_modules/@humanwhocodes/object-schema/LICENSE create mode 100644 node_modules/@humanwhocodes/object-schema/README.md create mode 100644 node_modules/@humanwhocodes/object-schema/package.json create mode 100644 node_modules/@humanwhocodes/object-schema/src/index.js create mode 100644 node_modules/@humanwhocodes/object-schema/src/merge-strategy.js create mode 100644 node_modules/@humanwhocodes/object-schema/src/object-schema.js create mode 100644 node_modules/@humanwhocodes/object-schema/src/validation-strategy.js create mode 100644 node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js create mode 100644 node_modules/@humanwhocodes/object-schema/tests/object-schema.js create mode 100644 node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js rename node_modules/{v8-compile-cache => @nodelib/fs.scandir}/LICENSE (96%) create mode 100644 node_modules/@nodelib/fs.scandir/README.md create mode 100644 node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/adapters/fs.js create mode 100644 node_modules/@nodelib/fs.scandir/out/constants.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/constants.js create mode 100644 node_modules/@nodelib/fs.scandir/out/index.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/index.js create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/async.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/async.js create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/common.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/common.js create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/providers/sync.js create mode 100644 node_modules/@nodelib/fs.scandir/out/settings.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/settings.js create mode 100644 node_modules/@nodelib/fs.scandir/out/types/index.d.ts rename node_modules/{table/node_modules/ajv/dist => @nodelib/fs.scandir/out}/types/index.js (70%) create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/fs.js create mode 100644 node_modules/@nodelib/fs.scandir/out/utils/index.d.ts rename node_modules/{table/node_modules/ajv/dist/types/json-schema.js => @nodelib/fs.scandir/out/utils/index.js} (53%) create mode 100644 node_modules/@nodelib/fs.scandir/package.json rename node_modules/{is-string => @nodelib/fs.stat}/LICENSE (96%) create mode 100644 node_modules/@nodelib/fs.stat/README.md create mode 100644 node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/adapters/fs.js create mode 100644 node_modules/@nodelib/fs.stat/out/index.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/index.js create mode 100644 node_modules/@nodelib/fs.stat/out/providers/async.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/providers/async.js create mode 100644 node_modules/@nodelib/fs.stat/out/providers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/providers/sync.js create mode 100644 node_modules/@nodelib/fs.stat/out/settings.d.ts create mode 100644 node_modules/@nodelib/fs.stat/out/settings.js create mode 100644 node_modules/@nodelib/fs.stat/out/types/index.d.ts rename node_modules/{table/node_modules/ajv/dist/vocabularies/errors.js => @nodelib/fs.stat/out/types/index.js} (69%) create mode 100644 node_modules/@nodelib/fs.stat/package.json rename node_modules/{is-boolean-object => @nodelib/fs.walk}/LICENSE (96%) create mode 100644 node_modules/@nodelib/fs.walk/README.md create mode 100644 node_modules/@nodelib/fs.walk/out/index.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/index.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/async.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/async.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/index.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/index.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/stream.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/stream.js create mode 100644 node_modules/@nodelib/fs.walk/out/providers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/providers/sync.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/async.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/async.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/common.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/common.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/reader.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/reader.js create mode 100644 node_modules/@nodelib/fs.walk/out/readers/sync.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/readers/sync.js create mode 100644 node_modules/@nodelib/fs.walk/out/settings.d.ts create mode 100644 node_modules/@nodelib/fs.walk/out/settings.js create mode 100644 node_modules/@nodelib/fs.walk/out/types/index.d.ts rename node_modules/{table/node_modules/ajv/dist/types/jtd-schema.js => @nodelib/fs.walk/out/types/index.js} (66%) create mode 100644 node_modules/@nodelib/fs.walk/package.json create mode 100644 node_modules/@ungap/structured-clone/.github/workflows/node.js.yml create mode 100644 node_modules/@ungap/structured-clone/LICENSE create mode 100644 node_modules/@ungap/structured-clone/README.md create mode 100644 node_modules/@ungap/structured-clone/cjs/deserialize.js create mode 100644 node_modules/@ungap/structured-clone/cjs/index.js create mode 100644 node_modules/@ungap/structured-clone/cjs/json.js create mode 100644 node_modules/@ungap/structured-clone/cjs/package.json create mode 100644 node_modules/@ungap/structured-clone/cjs/serialize.js create mode 100644 node_modules/@ungap/structured-clone/cjs/types.js create mode 100644 node_modules/@ungap/structured-clone/esm/deserialize.js create mode 100644 node_modules/@ungap/structured-clone/esm/index.js create mode 100644 node_modules/@ungap/structured-clone/esm/json.js create mode 100644 node_modules/@ungap/structured-clone/esm/serialize.js create mode 100644 node_modules/@ungap/structured-clone/esm/types.js create mode 100644 node_modules/@ungap/structured-clone/package.json create mode 100644 node_modules/@ungap/structured-clone/structured-json.js create mode 100644 node_modules/acorn-jsx/index.d.ts delete mode 100644 node_modules/ansi-colors/README.md delete mode 100644 node_modules/ansi-colors/index.js delete mode 100644 node_modules/ansi-colors/package.json delete mode 100644 node_modules/ansi-colors/symbols.js delete mode 100644 node_modules/ansi-colors/types/index.d.ts delete mode 100644 node_modules/astral-regex/index.d.ts delete mode 100644 node_modules/astral-regex/index.js delete mode 100644 node_modules/astral-regex/package.json delete mode 100644 node_modules/astral-regex/readme.md delete mode 100644 node_modules/call-bind/.eslintignore delete mode 100644 node_modules/call-bind/.eslintrc delete mode 100644 node_modules/call-bind/.github/FUNDING.yml delete mode 100644 node_modules/call-bind/.nycrc delete mode 100644 node_modules/call-bind/CHANGELOG.md delete mode 100644 node_modules/call-bind/LICENSE delete mode 100644 node_modules/call-bind/README.md delete mode 100644 node_modules/call-bind/callBound.js delete mode 100644 node_modules/call-bind/index.js delete mode 100644 node_modules/call-bind/package.json delete mode 100644 node_modules/call-bind/test/callBound.js delete mode 100644 node_modules/call-bind/test/index.js delete mode 100644 node_modules/enquirer/CHANGELOG.md delete mode 100644 node_modules/enquirer/README.md delete mode 100644 node_modules/enquirer/index.d.ts delete mode 100644 node_modules/enquirer/index.js delete mode 100644 node_modules/enquirer/lib/ansi.js delete mode 100644 node_modules/enquirer/lib/combos.js delete mode 100644 node_modules/enquirer/lib/completer.js delete mode 100644 node_modules/enquirer/lib/interpolate.js delete mode 100644 node_modules/enquirer/lib/keypress.js delete mode 100644 node_modules/enquirer/lib/placeholder.js delete mode 100644 node_modules/enquirer/lib/prompt.js delete mode 100644 node_modules/enquirer/lib/prompts/autocomplete.js delete mode 100644 node_modules/enquirer/lib/prompts/basicauth.js delete mode 100644 node_modules/enquirer/lib/prompts/confirm.js delete mode 100644 node_modules/enquirer/lib/prompts/editable.js delete mode 100644 node_modules/enquirer/lib/prompts/form.js delete mode 100644 node_modules/enquirer/lib/prompts/index.js delete mode 100644 node_modules/enquirer/lib/prompts/input.js delete mode 100644 node_modules/enquirer/lib/prompts/invisible.js delete mode 100644 node_modules/enquirer/lib/prompts/list.js delete mode 100644 node_modules/enquirer/lib/prompts/multiselect.js delete mode 100644 node_modules/enquirer/lib/prompts/numeral.js delete mode 100644 node_modules/enquirer/lib/prompts/password.js delete mode 100644 node_modules/enquirer/lib/prompts/quiz.js delete mode 100644 node_modules/enquirer/lib/prompts/scale.js delete mode 100644 node_modules/enquirer/lib/prompts/select.js delete mode 100644 node_modules/enquirer/lib/prompts/snippet.js delete mode 100644 node_modules/enquirer/lib/prompts/sort.js delete mode 100644 node_modules/enquirer/lib/prompts/survey.js delete mode 100644 node_modules/enquirer/lib/prompts/text.js delete mode 100644 node_modules/enquirer/lib/prompts/toggle.js delete mode 100644 node_modules/enquirer/lib/render.js delete mode 100644 node_modules/enquirer/lib/roles.js delete mode 100644 node_modules/enquirer/lib/state.js delete mode 100644 node_modules/enquirer/lib/styles.js delete mode 100644 node_modules/enquirer/lib/symbols.js delete mode 100644 node_modules/enquirer/lib/theme.js delete mode 100644 node_modules/enquirer/lib/timer.js delete mode 100644 node_modules/enquirer/lib/types/array.js delete mode 100644 node_modules/enquirer/lib/types/auth.js delete mode 100644 node_modules/enquirer/lib/types/boolean.js delete mode 100644 node_modules/enquirer/lib/types/index.js delete mode 100644 node_modules/enquirer/lib/types/number.js delete mode 100644 node_modules/enquirer/lib/types/string.js delete mode 100644 node_modules/enquirer/lib/utils.js delete mode 100644 node_modules/enquirer/package.json delete mode 100644 node_modules/escodegen/node_modules/estraverse/.jshintrc delete mode 100644 node_modules/escodegen/node_modules/estraverse/LICENSE.BSD delete mode 100644 node_modules/escodegen/node_modules/estraverse/README.md delete mode 100644 node_modules/escodegen/node_modules/estraverse/estraverse.js delete mode 100644 node_modules/escodegen/node_modules/estraverse/gulpfile.js delete mode 100644 node_modules/escodegen/node_modules/estraverse/package.json delete mode 100644 node_modules/eslint-scope/CHANGELOG.md create mode 100644 node_modules/eslint-scope/dist/eslint-scope.cjs create mode 100644 node_modules/eslint-scope/lib/version.js delete mode 100644 node_modules/eslint-utils/README.md delete mode 100644 node_modules/eslint-utils/index.js.map delete mode 100644 node_modules/eslint-utils/index.mjs.map delete mode 100644 node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md delete mode 100644 node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md delete mode 100644 node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js delete mode 100644 node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json delete mode 100644 node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json delete mode 100644 node_modules/eslint-utils/package.json delete mode 100644 node_modules/eslint-visitor-keys/CHANGELOG.md create mode 100644 node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs create mode 100644 node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts create mode 100644 node_modules/eslint-visitor-keys/dist/index.d.ts create mode 100644 node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts rename node_modules/{espree/node_modules/eslint-visitor-keys/lib/visitor-keys.json => eslint-visitor-keys/lib/visitor-keys.js} (52%) delete mode 100644 node_modules/eslint-visitor-keys/lib/visitor-keys.json delete mode 100644 node_modules/eslint/CHANGELOG.md delete mode 100644 node_modules/eslint/conf/category-list.json delete mode 100644 node_modules/eslint/conf/eslint-all.js create mode 100644 node_modules/eslint/conf/globals.js create mode 100644 node_modules/eslint/conf/rule-type-list.json delete mode 100644 node_modules/eslint/lib/cli-engine/formatters/codeframe.js create mode 100644 node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json delete mode 100644 node_modules/eslint/lib/cli-engine/formatters/html-template-message.html delete mode 100644 node_modules/eslint/lib/cli-engine/formatters/html-template-page.html delete mode 100644 node_modules/eslint/lib/cli-engine/formatters/html-template-result.html delete mode 100644 node_modules/eslint/lib/cli-engine/formatters/table.js create mode 100644 node_modules/eslint/lib/config/default-config.js create mode 100644 node_modules/eslint/lib/config/flat-config-array.js create mode 100644 node_modules/eslint/lib/config/flat-config-helpers.js create mode 100644 node_modules/eslint/lib/config/flat-config-schema.js create mode 100644 node_modules/eslint/lib/config/rule-validator.js create mode 100644 node_modules/eslint/lib/eslint/eslint-helpers.js create mode 100644 node_modules/eslint/lib/eslint/flat-eslint.js delete mode 100644 node_modules/eslint/lib/init/autoconfig.js delete mode 100644 node_modules/eslint/lib/init/config-file.js delete mode 100644 node_modules/eslint/lib/init/config-initializer.js delete mode 100644 node_modules/eslint/lib/init/config-rule.js delete mode 100644 node_modules/eslint/lib/init/npm-utils.js delete mode 100644 node_modules/eslint/lib/init/source-code-utils.js create mode 100644 node_modules/eslint/lib/rule-tester/flat-rule-tester.js create mode 100644 node_modules/eslint/lib/rules/logical-assignment-operators.js create mode 100644 node_modules/eslint/lib/rules/no-constant-binary-expression.js create mode 100644 node_modules/eslint/lib/rules/no-empty-static-block.js create mode 100644 node_modules/eslint/lib/rules/no-new-native-nonconstructor.js create mode 100644 node_modules/eslint/lib/rules/no-object-constructor.js create mode 100644 node_modules/eslint/lib/rules/no-unused-private-class-members.js create mode 100644 node_modules/eslint/lib/rules/prefer-object-has-own.js create mode 100644 node_modules/eslint/lib/rules/utils/regular-expressions.js create mode 100644 node_modules/eslint/lib/shared/directives.js create mode 100644 node_modules/eslint/lib/shared/severity.js create mode 100644 node_modules/eslint/lib/shared/string-utils.js create mode 100644 node_modules/eslint/lib/unsupported-api.js rename node_modules/eslint/messages/{all-files-ignored.txt => all-files-ignored.js} (50%) create mode 100644 node_modules/eslint/messages/eslintrc-incompat.js create mode 100644 node_modules/eslint/messages/eslintrc-plugins.js create mode 100644 node_modules/eslint/messages/extend-config-missing.js delete mode 100644 node_modules/eslint/messages/extend-config-missing.txt create mode 100644 node_modules/eslint/messages/failed-to-read-json.js delete mode 100644 node_modules/eslint/messages/failed-to-read-json.txt create mode 100644 node_modules/eslint/messages/file-not-found.js delete mode 100644 node_modules/eslint/messages/file-not-found.txt create mode 100644 node_modules/eslint/messages/invalid-rule-options.js create mode 100644 node_modules/eslint/messages/invalid-rule-severity.js create mode 100644 node_modules/eslint/messages/no-config-found.js delete mode 100644 node_modules/eslint/messages/no-config-found.txt create mode 100644 node_modules/eslint/messages/plugin-conflict.js delete mode 100644 node_modules/eslint/messages/plugin-conflict.txt create mode 100644 node_modules/eslint/messages/plugin-invalid.js delete mode 100644 node_modules/eslint/messages/plugin-invalid.txt create mode 100644 node_modules/eslint/messages/plugin-missing.js delete mode 100644 node_modules/eslint/messages/plugin-missing.txt create mode 100644 node_modules/eslint/messages/print-config-with-directory-path.js delete mode 100644 node_modules/eslint/messages/print-config-with-directory-path.txt create mode 100644 node_modules/eslint/messages/shared.js create mode 100644 node_modules/eslint/messages/whitespace-found.js delete mode 100644 node_modules/eslint/messages/whitespace-found.txt create mode 120000 node_modules/eslint/node_modules/.bin/js-yaml create mode 100644 node_modules/eslint/node_modules/argparse/CHANGELOG.md create mode 100644 node_modules/eslint/node_modules/argparse/LICENSE create mode 100644 node_modules/eslint/node_modules/argparse/README.md create mode 100644 node_modules/eslint/node_modules/argparse/argparse.js create mode 100644 node_modules/eslint/node_modules/argparse/lib/sub.js create mode 100644 node_modules/eslint/node_modules/argparse/lib/textwrap.js create mode 100644 node_modules/eslint/node_modules/argparse/package.json create mode 100644 node_modules/eslint/node_modules/escape-string-regexp/index.d.ts create mode 100644 node_modules/eslint/node_modules/escape-string-regexp/index.js rename node_modules/{@eslint/eslintrc/node_modules/globals => eslint/node_modules/escape-string-regexp}/license (100%) create mode 100644 node_modules/eslint/node_modules/escape-string-regexp/package.json create mode 100644 node_modules/eslint/node_modules/escape-string-regexp/readme.md create mode 100644 node_modules/eslint/node_modules/find-up/index.d.ts create mode 100644 node_modules/eslint/node_modules/find-up/index.js rename node_modules/{slice-ansi => eslint/node_modules/find-up}/license (96%) create mode 100644 node_modules/eslint/node_modules/find-up/package.json create mode 100644 node_modules/eslint/node_modules/find-up/readme.md create mode 100644 node_modules/eslint/node_modules/js-yaml/CHANGELOG.md rename node_modules/{enquirer => eslint/node_modules/js-yaml}/LICENSE (93%) create mode 100644 node_modules/eslint/node_modules/js-yaml/README.md create mode 100755 node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js create mode 100644 node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js create mode 100644 node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js create mode 100644 node_modules/eslint/node_modules/js-yaml/dist/js-yaml.mjs create mode 100644 node_modules/eslint/node_modules/js-yaml/index.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/common.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/dumper.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/exception.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/loader.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/schema.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/schema/core.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/schema/default.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/schema/failsafe.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/schema/json.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/snippet.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/binary.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/bool.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/float.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/int.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/map.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/merge.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/null.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/omap.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/pairs.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/seq.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/set.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/str.js create mode 100644 node_modules/eslint/node_modules/js-yaml/lib/type/timestamp.js create mode 100644 node_modules/eslint/node_modules/js-yaml/package.json create mode 100644 node_modules/eslint/node_modules/locate-path/index.d.ts create mode 100644 node_modules/eslint/node_modules/locate-path/index.js rename node_modules/{astral-regex => eslint/node_modules/locate-path}/license (92%) create mode 100644 node_modules/eslint/node_modules/locate-path/package.json create mode 100644 node_modules/eslint/node_modules/locate-path/readme.md create mode 100644 node_modules/eslint/node_modules/p-limit/index.d.ts create mode 100644 node_modules/eslint/node_modules/p-limit/index.js rename node_modules/{slice-ansi/node_modules/color-name/LICENSE => eslint/node_modules/p-limit/license} (90%) create mode 100644 node_modules/eslint/node_modules/p-limit/package.json create mode 100644 node_modules/eslint/node_modules/p-limit/readme.md create mode 100644 node_modules/eslint/node_modules/p-locate/index.d.ts create mode 100644 node_modules/eslint/node_modules/p-locate/index.js create mode 100644 node_modules/eslint/node_modules/p-locate/license create mode 100644 node_modules/eslint/node_modules/p-locate/package.json create mode 100644 node_modules/eslint/node_modules/p-locate/readme.md delete mode 100644 node_modules/espree/CHANGELOG.md create mode 100644 node_modules/espree/dist/espree.cjs delete mode 100644 node_modules/espree/lib/ast-node-types.js create mode 100644 node_modules/espree/lib/version.js delete mode 100644 node_modules/espree/lib/visitor-keys.js create mode 120000 node_modules/espree/node_modules/.bin/acorn create mode 100644 node_modules/espree/node_modules/acorn/CHANGELOG.md rename node_modules/{require-from-string/license => espree/node_modules/acorn/LICENSE} (90%) create mode 100644 node_modules/espree/node_modules/acorn/README.md create mode 100755 node_modules/espree/node_modules/acorn/bin/acorn create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn.d.mts create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn.d.ts create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn.js create mode 100644 node_modules/espree/node_modules/acorn/dist/acorn.mjs create mode 100644 node_modules/espree/node_modules/acorn/dist/bin.js create mode 100644 node_modules/espree/node_modules/acorn/package.json delete mode 100644 node_modules/espree/node_modules/eslint-visitor-keys/CHANGELOG.md delete mode 100644 node_modules/espree/node_modules/eslint-visitor-keys/README.md delete mode 100644 node_modules/espree/node_modules/eslint-visitor-keys/lib/index.js delete mode 100644 node_modules/espree/node_modules/eslint-visitor-keys/package.json delete mode 100644 node_modules/esquery/node_modules/estraverse/.jshintrc delete mode 100644 node_modules/esquery/node_modules/estraverse/LICENSE.BSD delete mode 100644 node_modules/esquery/node_modules/estraverse/README.md delete mode 100644 node_modules/esquery/node_modules/estraverse/estraverse.js delete mode 100644 node_modules/esquery/node_modules/estraverse/gulpfile.js delete mode 100644 node_modules/esquery/node_modules/estraverse/package.json delete mode 100644 node_modules/esrecurse/node_modules/estraverse/.jshintrc delete mode 100644 node_modules/esrecurse/node_modules/estraverse/LICENSE.BSD delete mode 100644 node_modules/esrecurse/node_modules/estraverse/README.md delete mode 100644 node_modules/esrecurse/node_modules/estraverse/estraverse.js delete mode 100644 node_modules/esrecurse/node_modules/estraverse/gulpfile.js delete mode 100644 node_modules/esrecurse/node_modules/estraverse/package.json create mode 100644 node_modules/fastq/.github/dependabot.yml create mode 100644 node_modules/fastq/.github/workflows/ci.yml create mode 100644 node_modules/fastq/LICENSE create mode 100644 node_modules/fastq/README.md create mode 100644 node_modules/fastq/bench.js create mode 100644 node_modules/fastq/example.js create mode 100644 node_modules/fastq/example.mjs create mode 100644 node_modules/fastq/index.d.ts create mode 100644 node_modules/fastq/package.json create mode 100644 node_modules/fastq/queue.js create mode 100644 node_modules/fastq/test/example.ts create mode 100644 node_modules/fastq/test/promise.js create mode 100644 node_modules/fastq/test/test.js create mode 100644 node_modules/fastq/test/tsconfig.json delete mode 100644 node_modules/functional-red-black-tree/.npmignore delete mode 100644 node_modules/functional-red-black-tree/README.md delete mode 100644 node_modules/functional-red-black-tree/bench/test.js delete mode 100644 node_modules/functional-red-black-tree/package.json delete mode 100644 node_modules/functional-red-black-tree/rbtree.js delete mode 100644 node_modules/functional-red-black-tree/test/test.js delete mode 100644 node_modules/get-intrinsic/.eslintignore delete mode 100644 node_modules/get-intrinsic/.eslintrc delete mode 100644 node_modules/get-intrinsic/.github/FUNDING.yml delete mode 100644 node_modules/get-intrinsic/.nycrc delete mode 100644 node_modules/get-intrinsic/CHANGELOG.md delete mode 100644 node_modules/get-intrinsic/README.md delete mode 100644 node_modules/get-intrinsic/index.js delete mode 100644 node_modules/get-intrinsic/package.json delete mode 100644 node_modules/get-intrinsic/test/GetIntrinsic.js delete mode 100644 node_modules/glob-parent/CHANGELOG.md create mode 100644 node_modules/graphemer/CHANGELOG.md rename node_modules/{get-intrinsic => graphemer}/LICENSE (52%) create mode 100644 node_modules/graphemer/README.md create mode 100644 node_modules/graphemer/lib/Graphemer.d.ts create mode 100644 node_modules/graphemer/lib/Graphemer.d.ts.map create mode 100644 node_modules/graphemer/lib/Graphemer.js create mode 100644 node_modules/graphemer/lib/GraphemerHelper.d.ts create mode 100644 node_modules/graphemer/lib/GraphemerHelper.d.ts.map create mode 100644 node_modules/graphemer/lib/GraphemerHelper.js create mode 100644 node_modules/graphemer/lib/GraphemerIterator.d.ts create mode 100644 node_modules/graphemer/lib/GraphemerIterator.d.ts.map create mode 100644 node_modules/graphemer/lib/GraphemerIterator.js create mode 100644 node_modules/graphemer/lib/boundaries.d.ts create mode 100644 node_modules/graphemer/lib/boundaries.d.ts.map create mode 100644 node_modules/graphemer/lib/boundaries.js create mode 100644 node_modules/graphemer/lib/index.d.ts create mode 100644 node_modules/graphemer/lib/index.d.ts.map create mode 100644 node_modules/graphemer/lib/index.js create mode 100644 node_modules/graphemer/package.json delete mode 100644 node_modules/has-symbols/.eslintignore delete mode 100644 node_modules/has-symbols/.eslintrc delete mode 100644 node_modules/has-symbols/.github/FUNDING.yml delete mode 100644 node_modules/has-symbols/.nycrc delete mode 100644 node_modules/has-symbols/CHANGELOG.md delete mode 100644 node_modules/has-symbols/LICENSE delete mode 100644 node_modules/has-symbols/README.md delete mode 100644 node_modules/has-symbols/index.js delete mode 100644 node_modules/has-symbols/package.json delete mode 100644 node_modules/has-symbols/shams.js delete mode 100644 node_modules/has-symbols/test/index.js delete mode 100644 node_modules/has-symbols/test/shams/core-js.js delete mode 100644 node_modules/has-symbols/test/shams/get-own-property-symbols.js delete mode 100644 node_modules/has-symbols/test/tests.js delete mode 100644 node_modules/ignore/CHANGELOG.md mode change 100755 => 100644 node_modules/ignore/LICENSE-MIT mode change 100755 => 100644 node_modules/ignore/README.md mode change 100755 => 100644 node_modules/ignore/index.js delete mode 100644 node_modules/is-boolean-object/.editorconfig delete mode 100644 node_modules/is-boolean-object/.eslintignore delete mode 100644 node_modules/is-boolean-object/.eslintrc delete mode 100644 node_modules/is-boolean-object/.github/FUNDING.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/node-4+.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/node-harmony.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/node-iojs.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/node-pretest.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/node-zero.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/rebase.yml delete mode 100644 node_modules/is-boolean-object/.github/workflows/require-allow-edits.yml delete mode 100644 node_modules/is-boolean-object/.nycrc delete mode 100644 node_modules/is-boolean-object/CHANGELOG.md delete mode 100644 node_modules/is-boolean-object/README.md delete mode 100644 node_modules/is-boolean-object/index.js delete mode 100644 node_modules/is-boolean-object/package.json delete mode 100644 node_modules/is-boolean-object/test/index.js delete mode 100644 node_modules/is-number-object/.eslintrc delete mode 100644 node_modules/is-number-object/.github/FUNDING.yml delete mode 100644 node_modules/is-number-object/.github/workflows/rebase.yml delete mode 100644 node_modules/is-number-object/.travis.yml delete mode 100644 node_modules/is-number-object/CHANGELOG.md delete mode 100644 node_modules/is-number-object/README.md delete mode 100644 node_modules/is-number-object/index.js delete mode 100644 node_modules/is-number-object/package.json delete mode 100644 node_modules/is-number-object/test/index.js create mode 100644 node_modules/is-path-inside/index.d.ts create mode 100644 node_modules/is-path-inside/index.js rename node_modules/{slice-ansi/node_modules/ansi-styles => is-path-inside}/license (100%) create mode 100644 node_modules/is-path-inside/package.json create mode 100644 node_modules/is-path-inside/readme.md delete mode 100644 node_modules/is-string/.eslintrc delete mode 100644 node_modules/is-string/.github/FUNDING.yml delete mode 100644 node_modules/is-string/.github/workflows/rebase.yml delete mode 100644 node_modules/is-string/.travis.yml delete mode 100644 node_modules/is-string/CHANGELOG.md delete mode 100644 node_modules/is-string/README.md delete mode 100644 node_modules/is-string/index.js delete mode 100644 node_modules/is-string/package.json delete mode 100644 node_modules/is-string/test/index.js delete mode 100644 node_modules/lodash.clonedeep/README.md delete mode 100644 node_modules/lodash.clonedeep/package.json delete mode 100644 node_modules/lodash.flatten/LICENSE delete mode 100644 node_modules/lodash.flatten/README.md delete mode 100644 node_modules/lodash.flatten/index.js delete mode 100644 node_modules/lodash.flatten/package.json rename node_modules/{lodash.clonedeep => lodash.merge}/LICENSE (96%) create mode 100644 node_modules/lodash.merge/README.md rename node_modules/{lodash.clonedeep => lodash.merge}/index.js (55%) create mode 100644 node_modules/lodash.merge/package.json delete mode 100644 node_modules/lodash.truncate/LICENSE delete mode 100644 node_modules/lodash.truncate/README.md delete mode 100644 node_modules/lodash.truncate/index.js delete mode 100644 node_modules/lodash.truncate/package.json delete mode 100644 node_modules/progress/CHANGELOG.md delete mode 100644 node_modules/progress/LICENSE delete mode 100644 node_modules/progress/Makefile delete mode 100644 node_modules/progress/Readme.md delete mode 100644 node_modules/progress/index.js delete mode 100644 node_modules/progress/lib/node-progress.js delete mode 100644 node_modules/progress/package.json create mode 100755 node_modules/queue-microtask/LICENSE create mode 100644 node_modules/queue-microtask/README.md create mode 100644 node_modules/queue-microtask/index.d.ts create mode 100644 node_modules/queue-microtask/index.js create mode 100644 node_modules/queue-microtask/package.json delete mode 100644 node_modules/regexpp/index.d.ts delete mode 100644 node_modules/regexpp/index.js.map delete mode 100644 node_modules/regexpp/index.mjs.map delete mode 100644 node_modules/regexpp/package.json delete mode 100644 node_modules/require-from-string/index.js delete mode 100644 node_modules/require-from-string/package.json delete mode 100644 node_modules/require-from-string/readme.md create mode 100644 node_modules/reusify/.coveralls.yml create mode 100644 node_modules/reusify/.travis.yml rename node_modules/{is-number-object => reusify}/LICENSE (96%) create mode 100644 node_modules/reusify/README.md create mode 100644 node_modules/reusify/benchmarks/createNoCodeFunction.js create mode 100644 node_modules/reusify/benchmarks/fib.js create mode 100644 node_modules/reusify/benchmarks/reuseNoCodeFunction.js create mode 100644 node_modules/reusify/package.json create mode 100644 node_modules/reusify/reusify.js create mode 100644 node_modules/reusify/test.js create mode 100644 node_modules/run-parallel/LICENSE create mode 100644 node_modules/run-parallel/README.md create mode 100644 node_modules/run-parallel/index.js create mode 100644 node_modules/run-parallel/package.json delete mode 100755 node_modules/slice-ansi/index.js delete mode 100644 node_modules/slice-ansi/node_modules/ansi-styles/index.d.ts delete mode 100644 node_modules/slice-ansi/node_modules/ansi-styles/index.js delete mode 100644 node_modules/slice-ansi/node_modules/ansi-styles/package.json delete mode 100644 node_modules/slice-ansi/node_modules/ansi-styles/readme.md delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/CHANGELOG.md delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/LICENSE delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/README.md delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/conversions.js delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/index.js delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/package.json delete mode 100644 node_modules/slice-ansi/node_modules/color-convert/route.js delete mode 100644 node_modules/slice-ansi/node_modules/color-name/README.md delete mode 100644 node_modules/slice-ansi/node_modules/color-name/index.js delete mode 100644 node_modules/slice-ansi/node_modules/color-name/package.json delete mode 100644 node_modules/slice-ansi/package.json delete mode 100644 node_modules/slice-ansi/readme.md delete mode 100644 node_modules/table/LICENSE delete mode 100644 node_modules/table/README.md delete mode 100644 node_modules/table/dist/alignString.js delete mode 100644 node_modules/table/dist/alignString.js.flow delete mode 100644 node_modules/table/dist/alignTableData.js delete mode 100644 node_modules/table/dist/alignTableData.js.flow delete mode 100644 node_modules/table/dist/calculateCellHeight.js delete mode 100644 node_modules/table/dist/calculateCellHeight.js.flow delete mode 100644 node_modules/table/dist/calculateCellWidthIndex.js delete mode 100644 node_modules/table/dist/calculateCellWidthIndex.js.flow delete mode 100644 node_modules/table/dist/calculateMaximumColumnWidthIndex.js delete mode 100644 node_modules/table/dist/calculateMaximumColumnWidthIndex.js.flow delete mode 100644 node_modules/table/dist/calculateRowHeightIndex.js delete mode 100644 node_modules/table/dist/calculateRowHeightIndex.js.flow delete mode 100644 node_modules/table/dist/createStream.js delete mode 100644 node_modules/table/dist/createStream.js.flow delete mode 100644 node_modules/table/dist/drawBorder.js delete mode 100644 node_modules/table/dist/drawBorder.js.flow delete mode 100644 node_modules/table/dist/drawRow.js delete mode 100644 node_modules/table/dist/drawRow.js.flow delete mode 100644 node_modules/table/dist/drawTable.js delete mode 100644 node_modules/table/dist/drawTable.js.flow delete mode 100644 node_modules/table/dist/getBorderCharacters.js delete mode 100644 node_modules/table/dist/getBorderCharacters.js.flow delete mode 100644 node_modules/table/dist/index.js delete mode 100644 node_modules/table/dist/index.js.flow delete mode 100644 node_modules/table/dist/makeConfig.js delete mode 100644 node_modules/table/dist/makeConfig.js.flow delete mode 100644 node_modules/table/dist/makeStreamConfig.js delete mode 100644 node_modules/table/dist/makeStreamConfig.js.flow delete mode 100644 node_modules/table/dist/mapDataUsingRowHeightIndex.js delete mode 100644 node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow delete mode 100644 node_modules/table/dist/padTableData.js delete mode 100644 node_modules/table/dist/padTableData.js.flow delete mode 100644 node_modules/table/dist/schemas/config.json delete mode 100644 node_modules/table/dist/schemas/shared.json delete mode 100644 node_modules/table/dist/schemas/streamConfig.json delete mode 100644 node_modules/table/dist/stringifyTableData.js delete mode 100644 node_modules/table/dist/stringifyTableData.js.flow delete mode 100644 node_modules/table/dist/table.js delete mode 100644 node_modules/table/dist/table.js.flow delete mode 100644 node_modules/table/dist/truncateTableData.js delete mode 100644 node_modules/table/dist/truncateTableData.js.flow delete mode 100644 node_modules/table/dist/validateConfig.js delete mode 100644 node_modules/table/dist/validateConfig.js.flow delete mode 100644 node_modules/table/dist/validateTableData.js delete mode 100644 node_modules/table/dist/validateTableData.js.flow delete mode 100644 node_modules/table/dist/validators.js delete mode 100644 node_modules/table/dist/wrapCell.js delete mode 100644 node_modules/table/dist/wrapCell.js.flow delete mode 100644 node_modules/table/dist/wrapString.js delete mode 100644 node_modules/table/dist/wrapString.js.flow delete mode 100644 node_modules/table/dist/wrapWord.js delete mode 100644 node_modules/table/dist/wrapWord.js.flow delete mode 100644 node_modules/table/node_modules/ajv/.runkit_example.js delete mode 100644 node_modules/table/node_modules/ajv/LICENSE delete mode 100644 node_modules/table/node_modules/ajv/README.md delete mode 100644 node_modules/table/node_modules/ajv/dist/2019.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/2019.js delete mode 100644 node_modules/table/node_modules/ajv/dist/2019.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/2020.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/2020.js delete mode 100644 node_modules/table/node_modules/ajv/dist/2020.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/ajv.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/ajv.js delete mode 100644 node_modules/table/node_modules/ajv/dist/ajv.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/code.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/code.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/code.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/scope.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/errors.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/errors.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/errors.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/parse.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/types.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/types.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/jtd/types.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/names.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/names.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/names.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/ref_error.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/ref_error.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/ref_error.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/resolve.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/resolve.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/resolve.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/rules.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/rules.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/rules.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/util.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/util.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/util.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/applicability.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/dataType.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/defaults.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/keyword.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/subschema.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js delete mode 100644 node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/core.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/core.js delete mode 100644 node_modules/table/node_modules/ajv/dist/core.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/jtd.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/jtd.js delete mode 100644 node_modules/table/node_modules/ajv/dist/jtd.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/data.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-06.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-07.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/json-schema-secure.json delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/jtd-schema.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js delete mode 100644 node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/equal.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/equal.js delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/equal.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/parseJson.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/parseJson.js delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/parseJson.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/quote.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/quote.js delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/quote.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/timestamp.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/timestamp.js delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/timestamp.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/ucs2length.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/validation_error.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/validation_error.js delete mode 100644 node_modules/table/node_modules/ajv/dist/runtime/validation_error.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/standalone/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/standalone/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/standalone/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/standalone/instance.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/standalone/instance.js delete mode 100644 node_modules/table/node_modules/ajv/dist/standalone/instance.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/types/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/types/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/types/json-schema.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/types/json-schema.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/types/jtd-schema.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/types/jtd-schema.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/code.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/code.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/code.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/id.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/draft7.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/errors.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/errors.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/format/format.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/format/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/metadata.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/next.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/next.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/next.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js.map delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js delete mode 100644 node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map delete mode 100644 node_modules/table/node_modules/ajv/package.json delete mode 100644 node_modules/table/node_modules/json-schema-traverse/.eslintrc.yml delete mode 100644 node_modules/table/node_modules/json-schema-traverse/.github/FUNDING.yml delete mode 100644 node_modules/table/node_modules/json-schema-traverse/.github/workflows/build.yml delete mode 100644 node_modules/table/node_modules/json-schema-traverse/.github/workflows/publish.yml delete mode 100644 node_modules/table/node_modules/json-schema-traverse/LICENSE delete mode 100644 node_modules/table/node_modules/json-schema-traverse/README.md delete mode 100644 node_modules/table/node_modules/json-schema-traverse/index.d.ts delete mode 100644 node_modules/table/node_modules/json-schema-traverse/index.js delete mode 100644 node_modules/table/node_modules/json-schema-traverse/package.json delete mode 100644 node_modules/table/node_modules/json-schema-traverse/spec/.eslintrc.yml delete mode 100644 node_modules/table/node_modules/json-schema-traverse/spec/fixtures/schema.js delete mode 100644 node_modules/table/node_modules/json-schema-traverse/spec/index.spec.js delete mode 100644 node_modules/table/package.json delete mode 100644 node_modules/v8-compile-cache/CHANGELOG.md delete mode 100644 node_modules/v8-compile-cache/README.md delete mode 100644 node_modules/v8-compile-cache/package.json delete mode 100644 node_modules/v8-compile-cache/v8-compile-cache.js create mode 100644 node_modules/yocto-queue/index.d.ts create mode 100644 node_modules/yocto-queue/index.js create mode 100644 node_modules/yocto-queue/license create mode 100644 node_modules/yocto-queue/package.json create mode 100644 node_modules/yocto-queue/readme.md diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 000000000..c693cbd92 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,7110 @@ +{ + "name": "github-actions-mobsuccess", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@actions/core": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", + "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" + }, + "node_modules/@actions/github": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz", + "integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==", + "dependencies": { + "@actions/http-client": "^1.0.8", + "@octokit/core": "^3.0.0", + "@octokit/plugin-paginate-rest": "^2.2.3", + "@octokit/plugin-rest-endpoint-methods": "^4.0.0" + } + }, + "node_modules/@actions/http-client": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz", + "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==", + "dependencies": { + "tunnel": "0.0.6" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", + "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==", + "dev": true + }, + "node_modules/@babel/core": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", + "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-compilation-targets": "^7.13.13", + "@babel/helper-module-transforms": "^7.13.14", + "@babel/helpers": "^7.13.10", + "@babel/parser": "^7.13.13", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/core/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", + "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/generator/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", + "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.13.12", + "@babel/helper-validator-option": "^7.12.17", + "browserslist": "^4.14.5", + "semver": "^6.3.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", + "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.12.13", + "@babel/template": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz", + "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz", + "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz", + "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", + "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.13.12", + "@babel/helper-replace-supers": "^7.13.12", + "@babel/helper-simple-access": "^7.13.12", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/helper-validator-identifier": "^7.12.11", + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.13", + "@babel/types": "^7.13.14" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz", + "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", + "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "dev": true, + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.13.12", + "@babel/helper-optimise-call-expression": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.13.12", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz", + "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.13.12" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz", + "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.12.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz", + "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==", + "dev": true + }, + "node_modules/@babel/helpers": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", + "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.12.13", + "@babel/traverse": "^7.13.0", + "@babel/types": "^7.13.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", + "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", + "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", + "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/parser": "^7.12.13", + "@babel/types": "^7.12.13" + } + }, + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse": { + "version": "7.13.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", + "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@babel/generator": "^7.13.9", + "@babel/helper-function-name": "^7.12.13", + "@babel/helper-split-export-declaration": "^7.12.13", + "@babel/parser": "^7.13.13", + "@babel/types": "^7.13.13", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", + "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.12.13" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.13.14", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", + "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", + "dev": true, + "dependencies": { + "exec-sh": "^0.3.2", + "minimist": "^1.2.0" + }, + "bin": { + "watch": "cli.js" + }, + "engines": { + "node": ">=0.1.95" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", + "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.2", + "jest-util": "^26.6.2", + "slash": "^3.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "dev": true, + "dependencies": { + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/globals": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", + "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "dev": true, + "dependencies": { + "@jest/environment": "^26.6.2", + "@jest/types": "^26.6.2", + "expect": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/reporters": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", + "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^7.0.0" + }, + "engines": { + "node": ">= 10.14.2" + }, + "optionalDependencies": { + "node-notifier": "^8.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", + "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/test-result": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", + "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "dev": true, + "dependencies": { + "@jest/console": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", + "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/transform": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", + "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.2", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.2", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@octokit/auth-token": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", + "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", + "dependencies": { + "@octokit/types": "^6.0.3" + } + }, + "node_modules/@octokit/core": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.3.2.tgz", + "integrity": "sha512-Jx83n4tuX/z7QtxnPsAKxXPzH3vANtKmlCB3W3vt18JbkEaBYm+C8dgAlA1FNtqNk3L21pxsKNbWkUQAhiV7ng==", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.4.12", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/endpoint": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", + "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/graphql": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.1.tgz", + "integrity": "sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA==", + "dependencies": { + "@octokit/request": "^5.3.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-6.0.0.tgz", + "integrity": "sha512-CnDdK7ivHkBtJYzWzZm7gEkanA7gKH6a09Eguz7flHw//GacPJLmkHA3f3N++MJmlxD1Fl+mB7B32EEpSCwztQ==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz", + "integrity": "sha512-46lptzM9lTeSmIBt/sVP/FLSTPGx6DCzAdSX3PfeJ3mTf4h9sGC26WpaQzMEq/Z44cOcmx8VsOhO+uEgE3cjYg==", + "dependencies": { + "@octokit/types": "^6.11.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "4.15.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.0.tgz", + "integrity": "sha512-1AF9GM/Ywk8ukUM5seDRj286GdFpdfsHeOrOPBV2rVtRN7MQNzRIcw8W5sb4JPerjQ0WcRRwAwQyufg64BxJkA==", + "dependencies": { + "@octokit/types": "^6.13.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/request": { + "version": "5.4.14", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz", + "integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==", + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.0.0", + "@octokit/types": "^6.7.1", + "deprecation": "^2.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.1", + "once": "^1.4.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/request-error": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz", + "integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "node_modules/@octokit/types": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.13.0.tgz", + "integrity": "sha512-W2J9qlVIU11jMwKHUp5/rbVUeErqelCsO5vW5PKNb7wAXQVUz87Rc+imjlEvpvbH8yUb+KHmv8NEjVZdsdpyxA==", + "dependencies": { + "@octokit/openapi-types": "^6.0.0" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz", + "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.1.14", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", + "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", + "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.3.0" + } + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/node": { + "version": "14.14.37", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz", + "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==", + "dev": true + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "node_modules/@types/prettier": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", + "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", + "dev": true + }, + "node_modules/@types/stack-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", + "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "15.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", + "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", + "dev": true + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true, + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "node_modules/babel-jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", + "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "dev": true, + "dependencies": { + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + }, + "engines": { + "node": ">= 10.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", + "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", + "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^26.6.2", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": ">= 10.14.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/before-after-hook": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.0.tgz", + "integrity": "sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "node_modules/browserslist": { + "version": "4.16.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", + "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001181", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.649", + "escalade": "^3.1.1", + "node-releases": "^1.1.70" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001205", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", + "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==", + "dev": true + }, + "node_modules/capture-exit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "dev": true, + "dependencies": { + "rsvp": "^4.8.4" + }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "node_modules/cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "dev": true + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true + }, + "node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dev": true, + "dependencies": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decimal.js": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", + "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==", + "dev": true + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-property/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, + "dependencies": { + "webidl-conversions": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/domexception/node_modules/webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.3.705", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.705.tgz", + "integrity": "sha512-agtrL5vLSOIK89sE/YSzAgqCw76eZ60gf3J7Tid5RfLbSp5H4nWL28/dIV+H+ZhNNi1JNiaF62jffwYsAyXc0g==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", + "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/exec-sh": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", + "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", + "dev": true + }, + "node_modules/execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "dependencies": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/execa/node_modules/cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "dependencies": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" + } + }, + "node_modules/execa/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/execa/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/execa/node_modules/shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "dependencies": { + "shebang-regex": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/expect": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/expect/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/expect/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/expect/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend-shallow/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true, + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true, + "optional": true + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dev": true, + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "node_modules/html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^1.0.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", + "dev": true, + "optional": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", + "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=", + "dev": true + }, + "node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "optional": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", + "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "dev": true, + "dependencies": { + "@jest/core": "^26.6.3", + "import-local": "^3.0.2", + "jest-cli": "^26.6.3" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-changed-files": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", + "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "execa": "^4.0.0", + "throat": "^5.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-changed-files/node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-changed-files/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-config": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", + "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.3", + "@jest/types": "^26.6.2", + "babel-jest": "^26.6.3", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.2", + "jest-environment-node": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.3", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-docblock": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", + "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-each": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", + "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-environment-jsdom": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", + "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", + "dev": true, + "dependencies": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2", + "jsdom": "^16.4.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-environment-node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", + "dev": true, + "dependencies": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-haste-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", + "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + }, + "engines": { + "node": ">= 10.14.2" + }, + "optionalDependencies": { + "fsevents": "^2.1.2" + } + }, + "node_modules/jest-jasmine2": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", + "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "throat": "^5.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", + "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "dev": true, + "dependencies": { + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-matcher-utils": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-mock": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "@types/node": "*" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "dev": true, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-resolve": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", + "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.2", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", + "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-runner": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", + "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "dev": true, + "dependencies": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.2", + "jest-leak-detector": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-runtime": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", + "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", + "dev": true, + "dependencies": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/globals": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.6.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + }, + "bin": { + "jest-runtime": "bin/jest-runtime.js" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-serializer": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", + "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "dev": true, + "dependencies": { + "@types/node": "*", + "graceful-fs": "^4.2.4" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-snapshot": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", + "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.2", + "semver": "^7.3.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-validate": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", + "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.2" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", + "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "dev": true, + "dependencies": { + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.2", + "string-length": "^4.0.1" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest/node_modules/jest-cli": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", + "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "dev": true, + "dependencies": { + "@jest/core": "^26.6.3", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "is-ci": "^2.0.0", + "jest-config": "^26.6.3", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "prompts": "^2.0.1", + "yargs": "^15.4.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": ">= 10.14.2" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "node_modules/jsdom": { + "version": "16.5.2", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.2.tgz", + "integrity": "sha512-JxNtPt9C1ut85boCbJmffaQ06NBnzkQY/MWO3YxPW8IWS38A26z+B1oBvA9LwKrytewdfymnhi4UNH3/RAgZrg==", + "dev": true, + "dependencies": { + "abab": "^2.0.5", + "acorn": "^8.1.0", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "html-encoding-sniffer": "^2.0.1", + "is-potential-custom-element-name": "^1.0.0", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "request": "^2.88.2", + "request-promise-native": "^1.0.9", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.4", + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/acorn": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz", + "integrity": "sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "dependencies": { + "tmpl": "1.0.x" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "dev": true, + "dependencies": { + "mime-db": "1.47.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node_modules/node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-notifier": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", + "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", + "dev": true, + "optional": true, + "dependencies": { + "growly": "^1.3.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", + "shellwords": "^0.1.1", + "uuid": "^8.3.0", + "which": "^2.0.2" + } + }, + "node_modules/node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "dependencies": { + "path-key": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "dependencies": { + "node-modules-regexp": "^1.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "dependencies": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-format/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/pretty-format/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/prompts": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", + "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "node_modules/repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.19" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "deprecated": "request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142", + "dev": true, + "dependencies": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "engines": { + "node": ">=0.12.0" + }, + "peerDependencies": { + "request": "^2.34" + } + }, + "node_modules/request-promise-native/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/request/node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/request/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "dev": true + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true, + "engines": { + "node": "6.* || >= 7.*" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "node_modules/sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "deprecated": "some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added", + "dev": true, + "dependencies": { + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", + "fb-watchman": "^2.0.0", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5" + }, + "bin": { + "sane": "src/cli.js" + }, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/sane/node_modules/anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "dependencies": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "node_modules/sane/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "dependencies": { + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sane/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true, + "optional": true + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "dev": true + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/throat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "dev": true + }, + "node_modules/tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz", + "integrity": "sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", + "dev": true + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "optional": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-to-istanbul": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz", + "integrity": "sha512-p0BB09E5FRjx0ELN6RgusIPsSPhtgexSRcKETybEs6IGOTXJSZqfwxp7r//55nnu0f1AxltY5VvdVqy2vZf9AA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "dependencies": { + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "dependencies": { + "makeerror": "1.0.x" + } + }, + "node_modules/webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true, + "engines": { + "node": ">=10.4" + } + }, + "node_modules/whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.5.0.tgz", + "integrity": "sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg==", + "dev": true, + "dependencies": { + "lodash": "^4.7.0", + "tr46": "^2.0.2", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.4.tgz", + "integrity": "sha512-Qm8k8ojNQIMx7S+Zp8u/uHOx7Qazv3Yv4q68MiWWWOJhiwG5W3x7iqmRtJo8xxrciZUY4vRxUTJCKuRnF28ZZw==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "node_modules/y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/node_modules/functional-red-black-tree/LICENSE b/node_modules/@aashutoshrathi/word-wrap/LICENSE similarity index 96% rename from node_modules/functional-red-black-tree/LICENSE rename to node_modules/@aashutoshrathi/word-wrap/LICENSE index 8ce206a84..842218cf0 100644 --- a/node_modules/functional-red-black-tree/LICENSE +++ b/node_modules/@aashutoshrathi/word-wrap/LICENSE @@ -1,7 +1,6 @@ - The MIT License (MIT) -Copyright (c) 2013 Mikola Lysenko +Copyright (c) 2014-2016, Jon Schlinkert Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@aashutoshrathi/word-wrap/README.md b/node_modules/@aashutoshrathi/word-wrap/README.md new file mode 100644 index 000000000..3abb88243 --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/README.md @@ -0,0 +1,182 @@ +# word-wrap [![NPM version](https://img.shields.io/npm/v/word-wrap.svg?style=flat)](https://www.npmjs.com/package/word-wrap) [![NPM monthly downloads](https://img.shields.io/npm/dm/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![NPM total downloads](https://img.shields.io/npm/dt/word-wrap.svg?style=flat)](https://npmjs.org/package/word-wrap) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/word-wrap.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/word-wrap) + +> Wrap words to a specified length. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save word-wrap +``` + +## Usage + +```js +var wrap = require('word-wrap'); + +wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'); +``` + +Results in: + +``` + Lorem ipsum dolor sit amet, consectetur adipiscing + elit, sed do eiusmod tempor incididunt ut labore + et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. +``` + +## Options + +![image](https://cloud.githubusercontent.com/assets/383994/6543728/7a381c08-c4f6-11e4-8b7d-b6ba197569c9.png) + +### options.width + +Type: `Number` + +Default: `50` + +The width of the text before wrapping to a new line. + +**Example:** + +```js +wrap(str, {width: 60}); +``` + +### options.indent + +Type: `String` + +Default: `` (none) + +The string to use at the beginning of each line. + +**Example:** + +```js +wrap(str, {indent: ' '}); +``` + +### options.newline + +Type: `String` + +Default: `\n` + +The string to use at the end of each line. + +**Example:** + +```js +wrap(str, {newline: '\n\n'}); +``` + +### options.escape + +Type: `function` + +Default: `function(str){return str;}` + +An escape function to run on each line after splitting them. + +**Example:** + +```js +var xmlescape = require('xml-escape'); +wrap(str, { + escape: function(string){ + return xmlescape(string); + } +}); +``` + +### options.trim + +Type: `Boolean` + +Default: `false` + +Trim trailing whitespace from the returned string. This option is included since `.trim()` would also strip the leading indentation from the first line. + +**Example:** + +```js +wrap(str, {trim: true}); +``` + +### options.cut + +Type: `Boolean` + +Default: `false` + +Break a word between any two letters when the word is longer than the specified width. + +**Example:** + +```js +wrap(str, {cut: true}); +``` + +## About + +### Related projects + +* [common-words](https://www.npmjs.com/package/common-words): Updated list (JSON) of the 100 most common words in the English language. Useful for… [more](https://github.com/jonschlinkert/common-words) | [homepage](https://github.com/jonschlinkert/common-words "Updated list (JSON) of the 100 most common words in the English language. Useful for excluding these words from arrays.") +* [shuffle-words](https://www.npmjs.com/package/shuffle-words): Shuffle the words in a string and optionally the letters in each word using the… [more](https://github.com/jonschlinkert/shuffle-words) | [homepage](https://github.com/jonschlinkert/shuffle-words "Shuffle the words in a string and optionally the letters in each word using the Fisher-Yates algorithm. Useful for creating test fixtures, benchmarking samples, etc.") +* [unique-words](https://www.npmjs.com/package/unique-words): Return the unique words in a string or array. | [homepage](https://github.com/jonschlinkert/unique-words "Return the unique words in a string or array.") +* [wordcount](https://www.npmjs.com/package/wordcount): Count the words in a string. Support for english, CJK and Cyrillic. | [homepage](https://github.com/jonschlinkert/wordcount "Count the words in a string. Support for english, CJK and Cyrillic.") + +### Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 43 | [jonschlinkert](https://github.com/jonschlinkert) | +| 2 | [lordvlad](https://github.com/lordvlad) | +| 2 | [hildjj](https://github.com/hildjj) | +| 1 | [danilosampaio](https://github.com/danilosampaio) | +| 1 | [2fd](https://github.com/2fd) | +| 1 | [toddself](https://github.com/toddself) | +| 1 | [wolfgang42](https://github.com/wolfgang42) | +| 1 | [zachhale](https://github.com/zachhale) | + +### Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +### Running tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +### Author + +**Jon Schlinkert** + +* [github/jonschlinkert](https://github.com/jonschlinkert) +* [twitter/jonschlinkert](https://twitter.com/jonschlinkert) + +### License + +Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on June 02, 2017._ diff --git a/node_modules/@aashutoshrathi/word-wrap/index.d.ts b/node_modules/@aashutoshrathi/word-wrap/index.d.ts new file mode 100644 index 000000000..1acd42564 --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/index.d.ts @@ -0,0 +1,50 @@ +/** + * Wrap words to a specified length. + */ +export = wrap; + +declare function wrap(str: string, options?: wrap.IOptions): string; + +declare namespace wrap { + export interface IOptions { + + /** + * The width of the text before wrapping to a new line. + * @default ´50´ + */ + width?: number; + + /** + * The string to use at the beginning of each line. + * @default ´´ (none) + */ + indent?: string; + + /** + * The string to use at the end of each line. + * @default ´\n´ + */ + newline?: string; + + /** + * An escape function to run on each line after splitting them. + * @default (str: string) => string; + */ + escape?: (str: string) => string; + + /** + * Trim trailing whitespace from the returned string. + * This option is included since .trim() would also strip + * the leading indentation from the first line. + * @default true + */ + trim?: boolean; + + /** + * Break a word between any two letters when the word is longer + * than the specified width. + * @default false + */ + cut?: boolean; + } +} diff --git a/node_modules/@aashutoshrathi/word-wrap/index.js b/node_modules/@aashutoshrathi/word-wrap/index.js new file mode 100644 index 000000000..461a17cdc --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/index.js @@ -0,0 +1,52 @@ +/*! + * word-wrap + * + * Copyright (c) 2014-2023, Jon Schlinkert. + * Released under the MIT License. + */ + +function trimTabAndSpaces(str) { + const lines = str.split('\n'); + const trimmedLines = lines.map((line) => line.trimEnd()); + return trimmedLines.join('\n'); +} + +module.exports = function(str, options) { + options = options || {}; + if (str == null) { + return str; + } + + var width = options.width || 50; + var indent = (typeof options.indent === 'string') + ? options.indent + : ''; + + var newline = options.newline || '\n' + indent; + var escape = typeof options.escape === 'function' + ? options.escape + : identity; + + var regexString = '.{1,' + width + '}'; + if (options.cut !== true) { + regexString += '([\\s\u200B]+|$)|[^\\s\u200B]+?([\\s\u200B]+|$)'; + } + + var re = new RegExp(regexString, 'g'); + var lines = str.match(re) || []; + var result = indent + lines.map(function(line) { + if (line.slice(-1) === '\n') { + line = line.slice(0, line.length - 1); + } + return escape(line); + }).join(newline); + + if (options.trim === true) { + result = trimTabAndSpaces(result); + } + return result; +}; + +function identity(str) { + return str; +} diff --git a/node_modules/@aashutoshrathi/word-wrap/package.json b/node_modules/@aashutoshrathi/word-wrap/package.json new file mode 100644 index 000000000..e33e077cd --- /dev/null +++ b/node_modules/@aashutoshrathi/word-wrap/package.json @@ -0,0 +1,81 @@ +{ + "name": "@aashutoshrathi/word-wrap", + "description": "Wrap words to a specified length.", + "version": "1.2.6", + "homepage": "https://github.com/aashutoshrathi/word-wrap", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Aashutosh Rathi ", + "Danilo Sampaio (localhost:8080)", + "Fede Ramirez (https://2fd.github.io)", + "Joe Hildebrand (https://twitter.com/hildjj)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Todd Kennedy (https://tck.io)", + "Waldemar Reusch (https://github.com/lordvlad)", + "Wolfgang Faust (http://www.linestarve.com)", + "Zach Hale (http://zachhale.com)" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/aashutoshrathi/word-wrap.git" + }, + "bugs": { + "url": "https://github.com/aashutoshrathi/word-wrap/issues" + }, + "license": "MIT", + "files": [ + "index.js", + "index.d.ts" + ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "gulp-format-md": "^0.1.11", + "mocha": "^10.2.0" + }, + "keywords": [ + "break", + "carriage", + "line", + "new-line", + "newline", + "return", + "soft", + "text", + "word", + "word-wrap", + "words", + "wrap" + ], + "typings": "index.d.ts", + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "lint": { + "reflinks": true + }, + "related": { + "list": [ + "common-words", + "shuffle-words", + "unique-words", + "wordcount" + ] + }, + "reflinks": [ + "verb", + "verb-generate-readme" + ] + } +} diff --git a/node_modules/eslint-utils/LICENSE b/node_modules/@eslint-community/eslint-utils/LICENSE similarity index 100% rename from node_modules/eslint-utils/LICENSE rename to node_modules/@eslint-community/eslint-utils/LICENSE diff --git a/node_modules/@eslint-community/eslint-utils/README.md b/node_modules/@eslint-community/eslint-utils/README.md new file mode 100644 index 000000000..90552a94e --- /dev/null +++ b/node_modules/@eslint-community/eslint-utils/README.md @@ -0,0 +1,37 @@ +# @eslint-community/eslint-utils + +[![npm version](https://img.shields.io/npm/v/@eslint-community/eslint-utils.svg)](https://www.npmjs.com/package/@eslint-community/eslint-utils) +[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/eslint-utils.svg)](http://www.npmtrends.com/@eslint-community/eslint-utils) +[![Build Status](https://github.com/eslint-community/eslint-utils/workflows/CI/badge.svg)](https://github.com/eslint-community/eslint-utils/actions) +[![Coverage Status](https://codecov.io/gh/eslint-community/eslint-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/eslint-utils) + +## 🏁 Goal + +This package provides utility functions and classes for make ESLint custom rules. + +For examples: + +- [`getStaticValue`](https://eslint-community.github.io/eslint-utils/api/ast-utils.html#getstaticvalue) evaluates static value on AST. +- [`ReferenceTracker`](https://eslint-community.github.io/eslint-utils/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring. + +## 📖 Usage + +See [documentation](https://eslint-community.github.io/eslint-utils). + +## 📰 Changelog + +See [releases](https://github.com/eslint-community/eslint-utils/releases). + +## ❤️ Contributing + +Welcome contributing! + +Please use GitHub's Issues/PRs. + +### Development Tools + +- `npm test` runs tests and measures coverage. +- `npm run clean` removes the coverage result of `npm test` command. +- `npm run coverage` shows the coverage result of the last `npm test` command. +- `npm run lint` runs ESLint. +- `npm run watch` runs tests on each file change. diff --git a/node_modules/eslint-utils/index.js b/node_modules/@eslint-community/eslint-utils/index.js similarity index 84% rename from node_modules/eslint-utils/index.js rename to node_modules/@eslint-community/eslint-utils/index.js index 3d55509aa..156015e0e 100644 --- a/node_modules/eslint-utils/index.js +++ b/node_modules/@eslint-community/eslint-utils/index.js @@ -1,11 +1,8 @@ -/*! @author Toru Nagashima */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var evk = _interopDefault(require('eslint-visitor-keys')); +var eslintVisitorKeys = require('eslint-visitor-keys'); /** * Get the innermost scope which contains a given location. @@ -80,13 +77,23 @@ function negate(f) { return negate0.bind(f) } +/** + * Checks if the given token is a PunctuatorToken with the given value + * @param {Token} token - The token to check. + * @param {string} value - The value to check. + * @returns {boolean} `true` if the token is a PunctuatorToken with the given value. + */ +function isPunctuatorTokenWithValue(token, value) { + return token.type === "Punctuator" && token.value === value +} + /** * Checks if the given token is an arrow token or not. * @param {Token} token - The token to check. * @returns {boolean} `true` if the token is an arrow token. */ function isArrowToken(token) { - return token.value === "=>" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "=>") } /** @@ -95,7 +102,7 @@ function isArrowToken(token) { * @returns {boolean} `true` if the token is a comma token. */ function isCommaToken(token) { - return token.value === "," && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ",") } /** @@ -104,7 +111,7 @@ function isCommaToken(token) { * @returns {boolean} `true` if the token is a semicolon token. */ function isSemicolonToken(token) { - return token.value === ";" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ";") } /** @@ -113,7 +120,7 @@ function isSemicolonToken(token) { * @returns {boolean} `true` if the token is a colon token. */ function isColonToken(token) { - return token.value === ":" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ":") } /** @@ -122,7 +129,7 @@ function isColonToken(token) { * @returns {boolean} `true` if the token is an opening parenthesis token. */ function isOpeningParenToken(token) { - return token.value === "(" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "(") } /** @@ -131,7 +138,7 @@ function isOpeningParenToken(token) { * @returns {boolean} `true` if the token is a closing parenthesis token. */ function isClosingParenToken(token) { - return token.value === ")" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ")") } /** @@ -140,7 +147,7 @@ function isClosingParenToken(token) { * @returns {boolean} `true` if the token is an opening square bracket token. */ function isOpeningBracketToken(token) { - return token.value === "[" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "[") } /** @@ -149,7 +156,7 @@ function isOpeningBracketToken(token) { * @returns {boolean} `true` if the token is a closing square bracket token. */ function isClosingBracketToken(token) { - return token.value === "]" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "]") } /** @@ -158,7 +165,7 @@ function isClosingBracketToken(token) { * @returns {boolean} `true` if the token is an opening brace token. */ function isOpeningBraceToken(token) { - return token.value === "{" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "{") } /** @@ -167,7 +174,7 @@ function isOpeningBraceToken(token) { * @returns {boolean} `true` if the token is a closing brace token. */ function isClosingBraceToken(token) { - return token.value === "}" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "}") } /** @@ -176,11 +183,7 @@ function isClosingBraceToken(token) { * @returns {boolean} `true` if the token is a comment token. */ function isCommentToken(token) { - return ( - token.type === "Line" || - token.type === "Block" || - token.type === "Shebang" - ) + return ["Block", "Line", "Shebang"].includes(token.type) } const isNotArrowToken = negate(isArrowToken); @@ -225,7 +228,8 @@ function getFunctionHeadLocation(node, sourceCode) { end = arrowToken.loc.end; } else if ( parent.type === "Property" || - parent.type === "MethodDefinition" + parent.type === "MethodDefinition" || + parent.type === "PropertyDefinition" ) { start = parent.loc.start; end = getOpeningParenOfParams(node, sourceCode).loc.start; @@ -235,12 +239,12 @@ function getFunctionHeadLocation(node, sourceCode) { } return { - start: Object.assign({}, start), - end: Object.assign({}, end), + start: { ...start }, + end: { ...end }, } } -/* globals BigInt, globalThis, global, self, window */ +/* globals globalThis, global, self, window */ const globalObject = typeof globalThis !== "undefined" @@ -301,11 +305,29 @@ const builtinNames = Object.freeze( "unescape", "WeakMap", "WeakSet", - ]) + ]), ); const callAllowed = new Set( [ Array.isArray, + Array.of, + Array.prototype.at, + Array.prototype.concat, + Array.prototype.entries, + Array.prototype.every, + Array.prototype.filter, + Array.prototype.find, + Array.prototype.findIndex, + Array.prototype.flat, + Array.prototype.includes, + Array.prototype.indexOf, + Array.prototype.join, + Array.prototype.keys, + Array.prototype.lastIndexOf, + Array.prototype.slice, + Array.prototype.some, + Array.prototype.toString, + Array.prototype.values, typeof BigInt === "function" ? BigInt : undefined, Boolean, Date, @@ -318,14 +340,25 @@ const callAllowed = new Set( isFinite, isNaN, isPrototypeOf, + Map, + Map.prototype.entries, + Map.prototype.get, + Map.prototype.has, + Map.prototype.keys, + Map.prototype.values, ...Object.getOwnPropertyNames(Math) - .map(k => Math[k]) - .filter(f => typeof f === "function"), + .filter((k) => k !== "random") + .map((k) => Math[k]) + .filter((f) => typeof f === "function"), Number, Number.isFinite, Number.isNaN, Number.parseFloat, Number.parseInt, + Number.prototype.toExponential, + Number.prototype.toFixed, + Number.prototype.toPrecision, + Number.prototype.toString, Object, Object.entries, Object.is, @@ -337,15 +370,43 @@ const callAllowed = new Set( parseFloat, parseInt, RegExp, + Set, + Set.prototype.entries, + Set.prototype.has, + Set.prototype.keys, + Set.prototype.values, String, String.fromCharCode, String.fromCodePoint, String.raw, - Symbol, + String.prototype.at, + String.prototype.charAt, + String.prototype.charCodeAt, + String.prototype.codePointAt, + String.prototype.concat, + String.prototype.endsWith, + String.prototype.includes, + String.prototype.indexOf, + String.prototype.lastIndexOf, + String.prototype.normalize, + String.prototype.padEnd, + String.prototype.padStart, + String.prototype.slice, + String.prototype.startsWith, + String.prototype.substr, + String.prototype.substring, + String.prototype.toLowerCase, + String.prototype.toString, + String.prototype.toUpperCase, + String.prototype.trim, + String.prototype.trimEnd, + String.prototype.trimLeft, + String.prototype.trimRight, + String.prototype.trimStart, Symbol.for, Symbol.keyFor, unescape, - ].filter(f => typeof f === "function") + ].filter((f) => typeof f === "function"), ); const callPassThrough = new Set([ Object.freeze, @@ -353,6 +414,26 @@ const callPassThrough = new Set([ Object.seal, ]); +/** @type {ReadonlyArray]>} */ +const getterAllowed = [ + [Map, new Set(["size"])], + [ + RegExp, + new Set([ + "dotAll", + "flags", + "global", + "hasIndices", + "ignoreCase", + "multiline", + "source", + "sticky", + "unicode", + ]), + ], + [Set, new Set(["size"])], +]; + /** * Get the property descriptor. * @param {object} object The object to get. @@ -412,6 +493,23 @@ function getElementValues(nodeList, initialScope) { return valueList } +/** + * Returns whether the given variable is never written to after initialization. + * @param {import("eslint").Scope.Variable} variable + * @returns {boolean} + */ +function isEffectivelyConst(variable) { + const refs = variable.references; + + const inits = refs.filter((r) => r.init).length; + const reads = refs.filter((r) => r.isReadOnly()).length; + if (inits === 1 && reads + inits === refs.length) { + // there is only one init and all other references only read + return true + } + return false +} + const operations = Object.freeze({ ArrayExpression(node, initialScope) { const elements = getElementValues(node.elements, initialScope); @@ -469,7 +567,7 @@ const operations = Object.freeze({ case "%": return { value: left.value % right.value } case "**": - return { value: Math.pow(left.value, right.value) } + return { value: left.value ** right.value } case "|": return { value: left.value | right.value } case "^": @@ -490,6 +588,9 @@ const operations = Object.freeze({ if (args != null) { if (calleeNode.type === "MemberExpression") { + if (calleeNode.property.type === "PrivateIdentifier") { + return null + } const object = getStaticValueR(calleeNode.object, initialScope); if (object != null) { if ( @@ -498,9 +599,10 @@ const operations = Object.freeze({ ) { return { value: undefined, optional: true } } - const property = calleeNode.computed - ? getStaticValueR(calleeNode.property, initialScope) - : { value: calleeNode.property.name }; + const property = getStaticPropertyNameValue( + calleeNode, + initialScope, + ); if (property != null) { const receiver = object.value; @@ -566,7 +668,9 @@ const operations = Object.freeze({ const def = variable.defs[0]; if ( def.parent && - def.parent.kind === "const" && + def.type === "Variable" && + (def.parent.kind === "const" || + isEffectivelyConst(variable)) && // TODO(mysticatea): don't support destructuring here. def.node.id.type === "Identifier" ) { @@ -607,17 +711,29 @@ const operations = Object.freeze({ }, MemberExpression(node, initialScope) { + if (node.property.type === "PrivateIdentifier") { + return null + } const object = getStaticValueR(node.object, initialScope); if (object != null) { if (object.value == null && (object.optional || node.optional)) { return { value: undefined, optional: true } } - const property = node.computed - ? getStaticValueR(node.property, initialScope) - : { value: node.property.name }; + const property = getStaticPropertyNameValue(node, initialScope); - if (property != null && !isGetter(object.value, property.value)) { - return { value: object.value[property.value] } + if (property != null) { + if (!isGetter(object.value, property.value)) { + return { value: object.value[property.value] } + } + + for (const [classFn, allowed] of getterAllowed) { + if ( + object.value instanceof classFn && + allowed.has(property.value) + ) { + return { value: object.value[property.value] } + } + } } } return null @@ -653,9 +769,10 @@ const operations = Object.freeze({ if (propertyNode.kind !== "init") { return null } - const key = propertyNode.computed - ? getStaticValueR(propertyNode.key, initialScope) - : { value: propertyNode.key.name }; + const key = getStaticPropertyNameValue( + propertyNode, + initialScope, + ); const value = getStaticValueR(propertyNode.value, initialScope); if (key == null || value == null) { return null @@ -667,7 +784,7 @@ const operations = Object.freeze({ ) { const argument = getStaticValueR( propertyNode.argument, - initialScope + initialScope, ); if (argument == null) { return null @@ -690,13 +807,13 @@ const operations = Object.freeze({ const tag = getStaticValueR(node.tag, initialScope); const expressions = getElementValues( node.quasi.expressions, - initialScope + initialScope, ); if (tag != null && expressions != null) { const func = tag.value; - const strings = node.quasi.quasis.map(q => q.value.cooked); - strings.raw = node.quasi.quasis.map(q => q.value.raw); + const strings = node.quasi.quasis.map((q) => q.value.cooked); + strings.raw = node.quasi.quasis.map((q) => q.value.raw); if (func === String.raw) { return { value: func(strings, ...expressions) } @@ -763,6 +880,33 @@ function getStaticValueR(node, initialScope) { return null } +/** + * Get the static value of property name from a MemberExpression node or a Property node. + * @param {Node} node The node to get. + * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`. + */ +function getStaticPropertyNameValue(node, initialScope) { + const nameNode = node.type === "Property" ? node.key : node.property; + + if (node.computed) { + return getStaticValueR(nameNode, initialScope) + } + + if (nameNode.type === "Identifier") { + return { value: nameNode.name } + } + + if (nameNode.type === "Literal") { + if (nameNode.bigint) { + return { value: nameNode.bigint } + } + return { value: String(nameNode.value) } + } + + return null +} + /** * Get the value of a given node if it's a static value. * @param {Node} node The node to get. @@ -810,16 +954,23 @@ function getPropertyName(node, initialScope) { if (node.computed) { return getStringIfConstant(node.property, initialScope) } + if (node.property.type === "PrivateIdentifier") { + return null + } return node.property.name case "Property": case "MethodDefinition": + case "PropertyDefinition": if (node.computed) { return getStringIfConstant(node.key, initialScope) } if (node.key.type === "Literal") { return String(node.key.value) } + if (node.key.type === "PrivateIdentifier") { + return null + } return node.key.name // no default @@ -831,14 +982,27 @@ function getPropertyName(node, initialScope) { /** * Get the name and kind of the given function node. * @param {ASTNode} node - The function node to get. + * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys. * @returns {string} The name and kind of the function node. */ -function getFunctionNameWithKind(node) { +// eslint-disable-next-line complexity +function getFunctionNameWithKind(node, sourceCode) { const parent = node.parent; const tokens = []; - - if (parent.type === "MethodDefinition" && parent.static) { - tokens.push("static"); + const isObjectMethod = parent.type === "Property" && parent.value === node; + const isClassMethod = + parent.type === "MethodDefinition" && parent.value === node; + const isClassFieldMethod = + parent.type === "PropertyDefinition" && parent.value === node; + + // Modifiers. + if (isClassMethod || isClassFieldMethod) { + if (parent.static) { + tokens.push("static"); + } + if (parent.key.type === "PrivateIdentifier") { + tokens.push("private"); + } } if (node.async) { tokens.push("async"); @@ -847,12 +1011,8 @@ function getFunctionNameWithKind(node) { tokens.push("generator"); } - if (node.type === "ArrowFunctionExpression") { - tokens.push("arrow", "function"); - } else if ( - parent.type === "Property" || - parent.type === "MethodDefinition" - ) { + // Kinds. + if (isObjectMethod || isClassMethod) { if (parent.kind === "constructor") { return "constructor" } @@ -863,35 +1023,50 @@ function getFunctionNameWithKind(node) { } else { tokens.push("method"); } + } else if (isClassFieldMethod) { + tokens.push("method"); } else { - tokens.push("function"); - } - - if (node.id) { - tokens.push(`'${node.id.name}'`); - } else { - const name = getPropertyName(parent); - - if (name) { - tokens.push(`'${name}'`); + if (node.type === "ArrowFunctionExpression") { + tokens.push("arrow"); } + tokens.push("function"); } - if (node.type === "ArrowFunctionExpression") { - if ( - parent.type === "VariableDeclarator" && - parent.id && - parent.id.type === "Identifier" - ) { - tokens.push(`'${parent.id.name}'`); - } - if ( - parent.type === "AssignmentExpression" && - parent.left && - parent.left.type === "Identifier" - ) { - tokens.push(`'${parent.left.name}'`); + // Names. + if (isObjectMethod || isClassMethod || isClassFieldMethod) { + if (parent.key.type === "PrivateIdentifier") { + tokens.push(`#${parent.key.name}`); + } else { + const name = getPropertyName(parent); + if (name) { + tokens.push(`'${name}'`); + } else if (sourceCode) { + const keyText = sourceCode.getText(parent.key); + if (!keyText.includes("\n")) { + tokens.push(`[${keyText}]`); + } + } } + } else if (node.id) { + tokens.push(`'${node.id.name}'`); + } else if ( + parent.type === "VariableDeclarator" && + parent.id && + parent.id.type === "Identifier" + ) { + tokens.push(`'${parent.id.name}'`); + } else if ( + (parent.type === "AssignmentExpression" || + parent.type === "AssignmentPattern") && + parent.left && + parent.left.type === "Identifier" + ) { + tokens.push(`'${parent.left.name}'`); + } else if ( + parent.type === "ExportDefaultDeclaration" && + parent.declaration === node + ) { + tokens.push("'default'"); } return tokens.join(" ") @@ -917,7 +1092,7 @@ const typeConversionBinaryOps = Object.freeze( "^", "&", "in", - ]) + ]), ); const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); @@ -945,7 +1120,7 @@ const visitor = Object.freeze( $visitChildren(node, options, visitorKeys) { const { type } = node; - for (const key of visitorKeys[type] || evk.getKeys(node)) { + for (const key of visitorKeys[type] || eslintVisitorKeys.getKeys(node)) { const value = node[key]; if (Array.isArray(value)) { @@ -1032,6 +1207,16 @@ const visitor = Object.freeze( } return this.$visitChildren(node, options, visitorKeys) }, + PropertyDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, UnaryExpression(node, options, visitorKeys) { if (node.operator === "delete") { return true @@ -1051,7 +1236,7 @@ const visitor = Object.freeze( YieldExpression() { return true }, - }) + }), ); /** @@ -1061,18 +1246,18 @@ const visitor = Object.freeze( * @param {object} [options] The option object. * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects. * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects. - * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. + * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. * @returns {boolean} `true` if the node has a certain side effect. */ function hasSideEffect( node, sourceCode, - { considerGetters = false, considerImplicitTypeConversion = false } = {} + { considerGetters = false, considerImplicitTypeConversion = false } = {}, ) { return visitor.$visit( node, { considerGetters, considerImplicitTypeConversion }, - sourceCode.visitorKeys || evk.KEYS + sourceCode.visitorKeys || eslintVisitorKeys.KEYS, ) } @@ -1092,7 +1277,7 @@ function getParentSyntaxParen(node, sourceCode) { if (parent.arguments.length === 1 && parent.arguments[0] === node) { return sourceCode.getTokenAfter( parent.callee, - isOpeningParenToken + isOpeningParenToken, ) } return null @@ -1101,7 +1286,7 @@ function getParentSyntaxParen(node, sourceCode) { if (parent.test === node) { return sourceCode.getTokenAfter( parent.body, - isOpeningParenToken + isOpeningParenToken, ) } return null @@ -1152,7 +1337,7 @@ function getParentSyntaxParen(node, sourceCode) { function isParenthesized( timesOrNode, nodeOrSourceCode, - optionalSourceCode + optionalSourceCode, ) { let times, node, sourceCode, maybeLeftParen, maybeRightParen; if (typeof timesOrNode === "number") { @@ -1168,7 +1353,13 @@ function isParenthesized( sourceCode = nodeOrSourceCode; } - if (node == null) { + if ( + node == null || + // `Program` can't be parenthesized + node.parent == null || + // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}` + (node.parent.type === "CatchClause" && node.parent.param === node) + ) { return false } @@ -1368,7 +1559,7 @@ function isModifiedGlobal(variable) { return ( variable == null || variable.defs.length !== 0 || - variable.references.some(r => r.isWrite()) + variable.references.some((r) => r.isWrite()) ) } @@ -1412,7 +1603,7 @@ class ReferenceTracker { { mode = "strict", globalObjectNames = ["global", "globalThis", "self", "window"], - } = {} + } = {}, ) { this.variableStack = []; this.globalScope = globalScope; @@ -1439,7 +1630,7 @@ class ReferenceTracker { variable, path, nextTraceMap, - true + true, ); } @@ -1455,7 +1646,7 @@ class ReferenceTracker { variable, path, traceMap, - false + false, ); } } @@ -1532,11 +1723,8 @@ class ReferenceTracker { esm ? nextTraceMap : this.mode === "legacy" - ? Object.assign( - { default: nextTraceMap }, - nextTraceMap - ) - : { default: nextTraceMap } + ? { default: nextTraceMap, ...nextTraceMap } + : { default: nextTraceMap }, ); if (esm) { @@ -1622,7 +1810,7 @@ class ReferenceTracker { yield* this._iteratePropertyReferences( parent, path, - nextTraceMap + nextTraceMap, ); } return @@ -1679,7 +1867,7 @@ class ReferenceTracker { variable, path, traceMap, - false + false, ); } return @@ -1705,7 +1893,7 @@ class ReferenceTracker { yield* this._iterateLhsReferences( property.value, nextPath, - nextTraceMap + nextTraceMap, ); } return @@ -1748,7 +1936,7 @@ class ReferenceTracker { findVariable(this.globalScope, specifierNode.local), path, nextTraceMap, - false + false, ); return @@ -1759,7 +1947,7 @@ class ReferenceTracker { findVariable(this.globalScope, specifierNode.local), path, traceMap, - false + false, ); return } @@ -1845,7 +2033,7 @@ exports.ESM = ESM; exports.PatternMatcher = PatternMatcher; exports.READ = READ; exports.ReferenceTracker = ReferenceTracker; -exports.default = index; +exports["default"] = index; exports.findVariable = findVariable; exports.getFunctionHeadLocation = getFunctionHeadLocation; exports.getFunctionNameWithKind = getFunctionNameWithKind; diff --git a/node_modules/@eslint-community/eslint-utils/index.js.map b/node_modules/@eslint-community/eslint-utils/index.js.map new file mode 100644 index 000000000..bcadeff9c --- /dev/null +++ b/node_modules/@eslint-community/eslint-utils/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @param {Token} token - The token to check.\n * @param {string} value - The value to check.\n * @returns {boolean} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n ...Object.getOwnPropertyNames(Math)\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {import(\"eslint\").Scope.Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: left.value ** right.value }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n ) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" ||\n isEffectivelyConst(variable)) &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (!isGetter(object.value, property.value)) {\n return { value: object.value[property.value] }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(property.value)\n ) {\n return { value: object.value[property.value] }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (nameNode.bigint) {\n return { value: nameNode.bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = node.parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {},\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {boolean} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = node.parent\n\n switch (parent && parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return parent.expressions[parent.expressions.length - 1] === node\n case \"ChainExpression\":\n return true\n\n default:\n return false\n }\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = {},\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":["getKeys","KEYS"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;AAClC;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAA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;AACT,KAAK;AACL,CAAC;AACD;AACA,gBAAgB,CAAC,IAAI,GAAG,KAAI;AAC5B,gBAAgB,CAAC,IAAI,GAAG,KAAI;AAC5B,gBAAgB,CAAC,SAAS,GAAG,UAAS;AACtC,gBAAgB,CAAC,GAAG,GAAG,IAAG;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE;AACpC,IAAI,OAAO,EAAE,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,SAAS,CAAC;AAC/C;;ACvZA,YAAe;AACf,IAAI,IAAI;AACR,IAAI,SAAS;AACb,IAAI,GAAG;AACP,IAAI,YAAY;AAChB,IAAI,uBAAuB;AAC3B,IAAI,uBAAuB;AAC3B,IAAI,iBAAiB;AACrB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,mBAAmB;AACvB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/eslint-utils/index.mjs b/node_modules/@eslint-community/eslint-utils/index.mjs similarity index 83% rename from node_modules/eslint-utils/index.mjs rename to node_modules/@eslint-community/eslint-utils/index.mjs index 6940337c8..54b25816b 100644 --- a/node_modules/eslint-utils/index.mjs +++ b/node_modules/@eslint-community/eslint-utils/index.mjs @@ -1,5 +1,4 @@ -/*! @author Toru Nagashima */ -import evk from 'eslint-visitor-keys'; +import { getKeys, KEYS } from 'eslint-visitor-keys'; /** * Get the innermost scope which contains a given location. @@ -74,13 +73,23 @@ function negate(f) { return negate0.bind(f) } +/** + * Checks if the given token is a PunctuatorToken with the given value + * @param {Token} token - The token to check. + * @param {string} value - The value to check. + * @returns {boolean} `true` if the token is a PunctuatorToken with the given value. + */ +function isPunctuatorTokenWithValue(token, value) { + return token.type === "Punctuator" && token.value === value +} + /** * Checks if the given token is an arrow token or not. * @param {Token} token - The token to check. * @returns {boolean} `true` if the token is an arrow token. */ function isArrowToken(token) { - return token.value === "=>" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "=>") } /** @@ -89,7 +98,7 @@ function isArrowToken(token) { * @returns {boolean} `true` if the token is a comma token. */ function isCommaToken(token) { - return token.value === "," && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ",") } /** @@ -98,7 +107,7 @@ function isCommaToken(token) { * @returns {boolean} `true` if the token is a semicolon token. */ function isSemicolonToken(token) { - return token.value === ";" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ";") } /** @@ -107,7 +116,7 @@ function isSemicolonToken(token) { * @returns {boolean} `true` if the token is a colon token. */ function isColonToken(token) { - return token.value === ":" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ":") } /** @@ -116,7 +125,7 @@ function isColonToken(token) { * @returns {boolean} `true` if the token is an opening parenthesis token. */ function isOpeningParenToken(token) { - return token.value === "(" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "(") } /** @@ -125,7 +134,7 @@ function isOpeningParenToken(token) { * @returns {boolean} `true` if the token is a closing parenthesis token. */ function isClosingParenToken(token) { - return token.value === ")" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, ")") } /** @@ -134,7 +143,7 @@ function isClosingParenToken(token) { * @returns {boolean} `true` if the token is an opening square bracket token. */ function isOpeningBracketToken(token) { - return token.value === "[" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "[") } /** @@ -143,7 +152,7 @@ function isOpeningBracketToken(token) { * @returns {boolean} `true` if the token is a closing square bracket token. */ function isClosingBracketToken(token) { - return token.value === "]" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "]") } /** @@ -152,7 +161,7 @@ function isClosingBracketToken(token) { * @returns {boolean} `true` if the token is an opening brace token. */ function isOpeningBraceToken(token) { - return token.value === "{" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "{") } /** @@ -161,7 +170,7 @@ function isOpeningBraceToken(token) { * @returns {boolean} `true` if the token is a closing brace token. */ function isClosingBraceToken(token) { - return token.value === "}" && token.type === "Punctuator" + return isPunctuatorTokenWithValue(token, "}") } /** @@ -170,11 +179,7 @@ function isClosingBraceToken(token) { * @returns {boolean} `true` if the token is a comment token. */ function isCommentToken(token) { - return ( - token.type === "Line" || - token.type === "Block" || - token.type === "Shebang" - ) + return ["Block", "Line", "Shebang"].includes(token.type) } const isNotArrowToken = negate(isArrowToken); @@ -219,7 +224,8 @@ function getFunctionHeadLocation(node, sourceCode) { end = arrowToken.loc.end; } else if ( parent.type === "Property" || - parent.type === "MethodDefinition" + parent.type === "MethodDefinition" || + parent.type === "PropertyDefinition" ) { start = parent.loc.start; end = getOpeningParenOfParams(node, sourceCode).loc.start; @@ -229,12 +235,12 @@ function getFunctionHeadLocation(node, sourceCode) { } return { - start: Object.assign({}, start), - end: Object.assign({}, end), + start: { ...start }, + end: { ...end }, } } -/* globals BigInt, globalThis, global, self, window */ +/* globals globalThis, global, self, window */ const globalObject = typeof globalThis !== "undefined" @@ -295,11 +301,29 @@ const builtinNames = Object.freeze( "unescape", "WeakMap", "WeakSet", - ]) + ]), ); const callAllowed = new Set( [ Array.isArray, + Array.of, + Array.prototype.at, + Array.prototype.concat, + Array.prototype.entries, + Array.prototype.every, + Array.prototype.filter, + Array.prototype.find, + Array.prototype.findIndex, + Array.prototype.flat, + Array.prototype.includes, + Array.prototype.indexOf, + Array.prototype.join, + Array.prototype.keys, + Array.prototype.lastIndexOf, + Array.prototype.slice, + Array.prototype.some, + Array.prototype.toString, + Array.prototype.values, typeof BigInt === "function" ? BigInt : undefined, Boolean, Date, @@ -312,14 +336,25 @@ const callAllowed = new Set( isFinite, isNaN, isPrototypeOf, + Map, + Map.prototype.entries, + Map.prototype.get, + Map.prototype.has, + Map.prototype.keys, + Map.prototype.values, ...Object.getOwnPropertyNames(Math) - .map(k => Math[k]) - .filter(f => typeof f === "function"), + .filter((k) => k !== "random") + .map((k) => Math[k]) + .filter((f) => typeof f === "function"), Number, Number.isFinite, Number.isNaN, Number.parseFloat, Number.parseInt, + Number.prototype.toExponential, + Number.prototype.toFixed, + Number.prototype.toPrecision, + Number.prototype.toString, Object, Object.entries, Object.is, @@ -331,15 +366,43 @@ const callAllowed = new Set( parseFloat, parseInt, RegExp, + Set, + Set.prototype.entries, + Set.prototype.has, + Set.prototype.keys, + Set.prototype.values, String, String.fromCharCode, String.fromCodePoint, String.raw, - Symbol, + String.prototype.at, + String.prototype.charAt, + String.prototype.charCodeAt, + String.prototype.codePointAt, + String.prototype.concat, + String.prototype.endsWith, + String.prototype.includes, + String.prototype.indexOf, + String.prototype.lastIndexOf, + String.prototype.normalize, + String.prototype.padEnd, + String.prototype.padStart, + String.prototype.slice, + String.prototype.startsWith, + String.prototype.substr, + String.prototype.substring, + String.prototype.toLowerCase, + String.prototype.toString, + String.prototype.toUpperCase, + String.prototype.trim, + String.prototype.trimEnd, + String.prototype.trimLeft, + String.prototype.trimRight, + String.prototype.trimStart, Symbol.for, Symbol.keyFor, unescape, - ].filter(f => typeof f === "function") + ].filter((f) => typeof f === "function"), ); const callPassThrough = new Set([ Object.freeze, @@ -347,6 +410,26 @@ const callPassThrough = new Set([ Object.seal, ]); +/** @type {ReadonlyArray]>} */ +const getterAllowed = [ + [Map, new Set(["size"])], + [ + RegExp, + new Set([ + "dotAll", + "flags", + "global", + "hasIndices", + "ignoreCase", + "multiline", + "source", + "sticky", + "unicode", + ]), + ], + [Set, new Set(["size"])], +]; + /** * Get the property descriptor. * @param {object} object The object to get. @@ -406,6 +489,23 @@ function getElementValues(nodeList, initialScope) { return valueList } +/** + * Returns whether the given variable is never written to after initialization. + * @param {import("eslint").Scope.Variable} variable + * @returns {boolean} + */ +function isEffectivelyConst(variable) { + const refs = variable.references; + + const inits = refs.filter((r) => r.init).length; + const reads = refs.filter((r) => r.isReadOnly()).length; + if (inits === 1 && reads + inits === refs.length) { + // there is only one init and all other references only read + return true + } + return false +} + const operations = Object.freeze({ ArrayExpression(node, initialScope) { const elements = getElementValues(node.elements, initialScope); @@ -463,7 +563,7 @@ const operations = Object.freeze({ case "%": return { value: left.value % right.value } case "**": - return { value: Math.pow(left.value, right.value) } + return { value: left.value ** right.value } case "|": return { value: left.value | right.value } case "^": @@ -484,6 +584,9 @@ const operations = Object.freeze({ if (args != null) { if (calleeNode.type === "MemberExpression") { + if (calleeNode.property.type === "PrivateIdentifier") { + return null + } const object = getStaticValueR(calleeNode.object, initialScope); if (object != null) { if ( @@ -492,9 +595,10 @@ const operations = Object.freeze({ ) { return { value: undefined, optional: true } } - const property = calleeNode.computed - ? getStaticValueR(calleeNode.property, initialScope) - : { value: calleeNode.property.name }; + const property = getStaticPropertyNameValue( + calleeNode, + initialScope, + ); if (property != null) { const receiver = object.value; @@ -560,7 +664,9 @@ const operations = Object.freeze({ const def = variable.defs[0]; if ( def.parent && - def.parent.kind === "const" && + def.type === "Variable" && + (def.parent.kind === "const" || + isEffectivelyConst(variable)) && // TODO(mysticatea): don't support destructuring here. def.node.id.type === "Identifier" ) { @@ -601,17 +707,29 @@ const operations = Object.freeze({ }, MemberExpression(node, initialScope) { + if (node.property.type === "PrivateIdentifier") { + return null + } const object = getStaticValueR(node.object, initialScope); if (object != null) { if (object.value == null && (object.optional || node.optional)) { return { value: undefined, optional: true } } - const property = node.computed - ? getStaticValueR(node.property, initialScope) - : { value: node.property.name }; + const property = getStaticPropertyNameValue(node, initialScope); - if (property != null && !isGetter(object.value, property.value)) { - return { value: object.value[property.value] } + if (property != null) { + if (!isGetter(object.value, property.value)) { + return { value: object.value[property.value] } + } + + for (const [classFn, allowed] of getterAllowed) { + if ( + object.value instanceof classFn && + allowed.has(property.value) + ) { + return { value: object.value[property.value] } + } + } } } return null @@ -647,9 +765,10 @@ const operations = Object.freeze({ if (propertyNode.kind !== "init") { return null } - const key = propertyNode.computed - ? getStaticValueR(propertyNode.key, initialScope) - : { value: propertyNode.key.name }; + const key = getStaticPropertyNameValue( + propertyNode, + initialScope, + ); const value = getStaticValueR(propertyNode.value, initialScope); if (key == null || value == null) { return null @@ -661,7 +780,7 @@ const operations = Object.freeze({ ) { const argument = getStaticValueR( propertyNode.argument, - initialScope + initialScope, ); if (argument == null) { return null @@ -684,13 +803,13 @@ const operations = Object.freeze({ const tag = getStaticValueR(node.tag, initialScope); const expressions = getElementValues( node.quasi.expressions, - initialScope + initialScope, ); if (tag != null && expressions != null) { const func = tag.value; - const strings = node.quasi.quasis.map(q => q.value.cooked); - strings.raw = node.quasi.quasis.map(q => q.value.raw); + const strings = node.quasi.quasis.map((q) => q.value.cooked); + strings.raw = node.quasi.quasis.map((q) => q.value.raw); if (func === String.raw) { return { value: func(strings, ...expressions) } @@ -757,6 +876,33 @@ function getStaticValueR(node, initialScope) { return null } +/** + * Get the static value of property name from a MemberExpression node or a Property node. + * @param {Node} node The node to get. + * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it. + * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`. + */ +function getStaticPropertyNameValue(node, initialScope) { + const nameNode = node.type === "Property" ? node.key : node.property; + + if (node.computed) { + return getStaticValueR(nameNode, initialScope) + } + + if (nameNode.type === "Identifier") { + return { value: nameNode.name } + } + + if (nameNode.type === "Literal") { + if (nameNode.bigint) { + return { value: nameNode.bigint } + } + return { value: String(nameNode.value) } + } + + return null +} + /** * Get the value of a given node if it's a static value. * @param {Node} node The node to get. @@ -804,16 +950,23 @@ function getPropertyName(node, initialScope) { if (node.computed) { return getStringIfConstant(node.property, initialScope) } + if (node.property.type === "PrivateIdentifier") { + return null + } return node.property.name case "Property": case "MethodDefinition": + case "PropertyDefinition": if (node.computed) { return getStringIfConstant(node.key, initialScope) } if (node.key.type === "Literal") { return String(node.key.value) } + if (node.key.type === "PrivateIdentifier") { + return null + } return node.key.name // no default @@ -825,14 +978,27 @@ function getPropertyName(node, initialScope) { /** * Get the name and kind of the given function node. * @param {ASTNode} node - The function node to get. + * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys. * @returns {string} The name and kind of the function node. */ -function getFunctionNameWithKind(node) { +// eslint-disable-next-line complexity +function getFunctionNameWithKind(node, sourceCode) { const parent = node.parent; const tokens = []; - - if (parent.type === "MethodDefinition" && parent.static) { - tokens.push("static"); + const isObjectMethod = parent.type === "Property" && parent.value === node; + const isClassMethod = + parent.type === "MethodDefinition" && parent.value === node; + const isClassFieldMethod = + parent.type === "PropertyDefinition" && parent.value === node; + + // Modifiers. + if (isClassMethod || isClassFieldMethod) { + if (parent.static) { + tokens.push("static"); + } + if (parent.key.type === "PrivateIdentifier") { + tokens.push("private"); + } } if (node.async) { tokens.push("async"); @@ -841,12 +1007,8 @@ function getFunctionNameWithKind(node) { tokens.push("generator"); } - if (node.type === "ArrowFunctionExpression") { - tokens.push("arrow", "function"); - } else if ( - parent.type === "Property" || - parent.type === "MethodDefinition" - ) { + // Kinds. + if (isObjectMethod || isClassMethod) { if (parent.kind === "constructor") { return "constructor" } @@ -857,35 +1019,50 @@ function getFunctionNameWithKind(node) { } else { tokens.push("method"); } + } else if (isClassFieldMethod) { + tokens.push("method"); } else { - tokens.push("function"); - } - - if (node.id) { - tokens.push(`'${node.id.name}'`); - } else { - const name = getPropertyName(parent); - - if (name) { - tokens.push(`'${name}'`); + if (node.type === "ArrowFunctionExpression") { + tokens.push("arrow"); } + tokens.push("function"); } - if (node.type === "ArrowFunctionExpression") { - if ( - parent.type === "VariableDeclarator" && - parent.id && - parent.id.type === "Identifier" - ) { - tokens.push(`'${parent.id.name}'`); - } - if ( - parent.type === "AssignmentExpression" && - parent.left && - parent.left.type === "Identifier" - ) { - tokens.push(`'${parent.left.name}'`); + // Names. + if (isObjectMethod || isClassMethod || isClassFieldMethod) { + if (parent.key.type === "PrivateIdentifier") { + tokens.push(`#${parent.key.name}`); + } else { + const name = getPropertyName(parent); + if (name) { + tokens.push(`'${name}'`); + } else if (sourceCode) { + const keyText = sourceCode.getText(parent.key); + if (!keyText.includes("\n")) { + tokens.push(`[${keyText}]`); + } + } } + } else if (node.id) { + tokens.push(`'${node.id.name}'`); + } else if ( + parent.type === "VariableDeclarator" && + parent.id && + parent.id.type === "Identifier" + ) { + tokens.push(`'${parent.id.name}'`); + } else if ( + (parent.type === "AssignmentExpression" || + parent.type === "AssignmentPattern") && + parent.left && + parent.left.type === "Identifier" + ) { + tokens.push(`'${parent.left.name}'`); + } else if ( + parent.type === "ExportDefaultDeclaration" && + parent.declaration === node + ) { + tokens.push("'default'"); } return tokens.join(" ") @@ -911,7 +1088,7 @@ const typeConversionBinaryOps = Object.freeze( "^", "&", "in", - ]) + ]), ); const typeConversionUnaryOps = Object.freeze(new Set(["-", "+", "!", "~"])); @@ -939,7 +1116,7 @@ const visitor = Object.freeze( $visitChildren(node, options, visitorKeys) { const { type } = node; - for (const key of visitorKeys[type] || evk.getKeys(node)) { + for (const key of visitorKeys[type] || getKeys(node)) { const value = node[key]; if (Array.isArray(value)) { @@ -1026,6 +1203,16 @@ const visitor = Object.freeze( } return this.$visitChildren(node, options, visitorKeys) }, + PropertyDefinition(node, options, visitorKeys) { + if ( + options.considerImplicitTypeConversion && + node.computed && + node.key.type !== "Literal" + ) { + return true + } + return this.$visitChildren(node, options, visitorKeys) + }, UnaryExpression(node, options, visitorKeys) { if (node.operator === "delete") { return true @@ -1045,7 +1232,7 @@ const visitor = Object.freeze( YieldExpression() { return true }, - }) + }), ); /** @@ -1055,18 +1242,18 @@ const visitor = Object.freeze( * @param {object} [options] The option object. * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects. * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects. - * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. + * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`. * @returns {boolean} `true` if the node has a certain side effect. */ function hasSideEffect( node, sourceCode, - { considerGetters = false, considerImplicitTypeConversion = false } = {} + { considerGetters = false, considerImplicitTypeConversion = false } = {}, ) { return visitor.$visit( node, { considerGetters, considerImplicitTypeConversion }, - sourceCode.visitorKeys || evk.KEYS + sourceCode.visitorKeys || KEYS, ) } @@ -1086,7 +1273,7 @@ function getParentSyntaxParen(node, sourceCode) { if (parent.arguments.length === 1 && parent.arguments[0] === node) { return sourceCode.getTokenAfter( parent.callee, - isOpeningParenToken + isOpeningParenToken, ) } return null @@ -1095,7 +1282,7 @@ function getParentSyntaxParen(node, sourceCode) { if (parent.test === node) { return sourceCode.getTokenAfter( parent.body, - isOpeningParenToken + isOpeningParenToken, ) } return null @@ -1146,7 +1333,7 @@ function getParentSyntaxParen(node, sourceCode) { function isParenthesized( timesOrNode, nodeOrSourceCode, - optionalSourceCode + optionalSourceCode, ) { let times, node, sourceCode, maybeLeftParen, maybeRightParen; if (typeof timesOrNode === "number") { @@ -1162,7 +1349,13 @@ function isParenthesized( sourceCode = nodeOrSourceCode; } - if (node == null) { + if ( + node == null || + // `Program` can't be parenthesized + node.parent == null || + // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}` + (node.parent.type === "CatchClause" && node.parent.param === node) + ) { return false } @@ -1362,7 +1555,7 @@ function isModifiedGlobal(variable) { return ( variable == null || variable.defs.length !== 0 || - variable.references.some(r => r.isWrite()) + variable.references.some((r) => r.isWrite()) ) } @@ -1406,7 +1599,7 @@ class ReferenceTracker { { mode = "strict", globalObjectNames = ["global", "globalThis", "self", "window"], - } = {} + } = {}, ) { this.variableStack = []; this.globalScope = globalScope; @@ -1433,7 +1626,7 @@ class ReferenceTracker { variable, path, nextTraceMap, - true + true, ); } @@ -1449,7 +1642,7 @@ class ReferenceTracker { variable, path, traceMap, - false + false, ); } } @@ -1526,11 +1719,8 @@ class ReferenceTracker { esm ? nextTraceMap : this.mode === "legacy" - ? Object.assign( - { default: nextTraceMap }, - nextTraceMap - ) - : { default: nextTraceMap } + ? { default: nextTraceMap, ...nextTraceMap } + : { default: nextTraceMap }, ); if (esm) { @@ -1616,7 +1806,7 @@ class ReferenceTracker { yield* this._iteratePropertyReferences( parent, path, - nextTraceMap + nextTraceMap, ); } return @@ -1673,7 +1863,7 @@ class ReferenceTracker { variable, path, traceMap, - false + false, ); } return @@ -1699,7 +1889,7 @@ class ReferenceTracker { yield* this._iterateLhsReferences( property.value, nextPath, - nextTraceMap + nextTraceMap, ); } return @@ -1742,7 +1932,7 @@ class ReferenceTracker { findVariable(this.globalScope, specifierNode.local), path, nextTraceMap, - false + false, ); return @@ -1753,7 +1943,7 @@ class ReferenceTracker { findVariable(this.globalScope, specifierNode.local), path, traceMap, - false + false, ); return } @@ -1833,6 +2023,5 @@ var index = { ReferenceTracker, }; -export default index; -export { CALL, CONSTRUCT, ESM, PatternMatcher, READ, ReferenceTracker, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; +export { CALL, CONSTRUCT, ESM, PatternMatcher, READ, ReferenceTracker, index as default, findVariable, getFunctionHeadLocation, getFunctionNameWithKind, getInnermostScope, getPropertyName, getStaticValue, getStringIfConstant, hasSideEffect, isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isParenthesized, isSemicolonToken }; //# sourceMappingURL=index.mjs.map diff --git a/node_modules/@eslint-community/eslint-utils/index.mjs.map b/node_modules/@eslint-community/eslint-utils/index.mjs.map new file mode 100644 index 000000000..24ffb8e88 --- /dev/null +++ b/node_modules/@eslint-community/eslint-utils/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.mjs","src/find-variable.mjs","src/token-predicate.mjs","src/get-function-head-location.mjs","src/get-static-value.mjs","src/get-string-if-constant.mjs","src/get-property-name.mjs","src/get-function-name-with-kind.mjs","src/has-side-effect.mjs","src/is-parenthesized.mjs","src/pattern-matcher.mjs","src/reference-tracker.mjs","src/index.mjs"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope.mjs\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is a PunctuatorToken with the given value\n * @param {Token} token - The token to check.\n * @param {string} value - The value to check.\n * @returns {boolean} `true` if the token is a PunctuatorToken with the given value.\n */\nfunction isPunctuatorTokenWithValue(token, value) {\n return token.type === \"Punctuator\" && token.value === value\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return isPunctuatorTokenWithValue(token, \"=>\")\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return isPunctuatorTokenWithValue(token, \",\")\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return isPunctuatorTokenWithValue(token, \";\")\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return isPunctuatorTokenWithValue(token, \":\")\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return isPunctuatorTokenWithValue(token, \"(\")\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return isPunctuatorTokenWithValue(token, \")\")\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"[\")\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return isPunctuatorTokenWithValue(token, \"]\")\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"{\")\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return isPunctuatorTokenWithValue(token, \"}\")\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return [\"Block\", \"Line\", \"Shebang\"].includes(token.type)\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\" ||\n parent.type === \"PropertyDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: { ...start },\n end: { ...end },\n }\n}\n","/* globals globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable.mjs\"\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ]),\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n Array.of,\n Array.prototype.at,\n Array.prototype.concat,\n Array.prototype.entries,\n Array.prototype.every,\n Array.prototype.filter,\n Array.prototype.find,\n Array.prototype.findIndex,\n Array.prototype.flat,\n Array.prototype.includes,\n Array.prototype.indexOf,\n Array.prototype.join,\n Array.prototype.keys,\n Array.prototype.lastIndexOf,\n Array.prototype.slice,\n Array.prototype.some,\n Array.prototype.toString,\n Array.prototype.values,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n Map,\n Map.prototype.entries,\n Map.prototype.get,\n Map.prototype.has,\n Map.prototype.keys,\n Map.prototype.values,\n ...Object.getOwnPropertyNames(Math)\n .filter((k) => k !== \"random\")\n .map((k) => Math[k])\n .filter((f) => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Number.prototype.toExponential,\n Number.prototype.toFixed,\n Number.prototype.toPrecision,\n Number.prototype.toString,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n Set,\n Set.prototype.entries,\n Set.prototype.has,\n Set.prototype.keys,\n Set.prototype.values,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n String.prototype.at,\n String.prototype.charAt,\n String.prototype.charCodeAt,\n String.prototype.codePointAt,\n String.prototype.concat,\n String.prototype.endsWith,\n String.prototype.includes,\n String.prototype.indexOf,\n String.prototype.lastIndexOf,\n String.prototype.normalize,\n String.prototype.padEnd,\n String.prototype.padStart,\n String.prototype.slice,\n String.prototype.startsWith,\n String.prototype.substr,\n String.prototype.substring,\n String.prototype.toLowerCase,\n String.prototype.toString,\n String.prototype.toUpperCase,\n String.prototype.trim,\n String.prototype.trimEnd,\n String.prototype.trimLeft,\n String.prototype.trimRight,\n String.prototype.trimStart,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter((f) => typeof f === \"function\"),\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/** @type {ReadonlyArray]>} */\nconst getterAllowed = [\n [Map, new Set([\"size\"])],\n [\n RegExp,\n new Set([\n \"dotAll\",\n \"flags\",\n \"global\",\n \"hasIndices\",\n \"ignoreCase\",\n \"multiline\",\n \"source\",\n \"sticky\",\n \"unicode\",\n ]),\n ],\n [Set, new Set([\"size\"])],\n]\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\n/**\n * Returns whether the given variable is never written to after initialization.\n * @param {import(\"eslint\").Scope.Variable} variable\n * @returns {boolean}\n */\nfunction isEffectivelyConst(variable) {\n const refs = variable.references\n\n const inits = refs.filter((r) => r.init).length\n const reads = refs.filter((r) => r.isReadOnly()).length\n if (inits === 1 && reads + inits === refs.length) {\n // there is only one init and all other references only read\n return true\n }\n return false\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: left.value ** right.value }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n if (calleeNode.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(\n calleeNode,\n initialScope,\n )\n\n if (property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n ) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.type === \"Variable\" &&\n (def.parent.kind === \"const\" ||\n isEffectivelyConst(variable)) &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = getStaticPropertyNameValue(node, initialScope)\n\n if (property != null) {\n if (!isGetter(object.value, property.value)) {\n return { value: object.value[property.value] }\n }\n\n for (const [classFn, allowed] of getterAllowed) {\n if (\n object.value instanceof classFn &&\n allowed.has(property.value)\n ) {\n return { value: object.value[property.value] }\n }\n }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = getStaticPropertyNameValue(\n propertyNode,\n initialScope,\n )\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope,\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope,\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map((q) => q.value.cooked)\n strings.raw = node.quasi.quasis.map((q) => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the static value of property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the property name of the node, or `null`.\n */\nfunction getStaticPropertyNameValue(node, initialScope) {\n const nameNode = node.type === \"Property\" ? node.key : node.property\n\n if (node.computed) {\n return getStaticValueR(nameNode, initialScope)\n }\n\n if (nameNode.type === \"Identifier\") {\n return { value: nameNode.name }\n }\n\n if (nameNode.type === \"Literal\") {\n if (nameNode.bigint) {\n return { value: nameNode.bigint }\n }\n return { value: String(nameNode.value) }\n }\n\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value.mjs\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n if (node.property.type === \"PrivateIdentifier\") {\n return null\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n case \"PropertyDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n if (node.key.type === \"PrivateIdentifier\") {\n return null\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name.mjs\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @param {SourceCode} [sourceCode] The source code object to get the code of computed property keys.\n * @returns {string} The name and kind of the function node.\n */\n// eslint-disable-next-line complexity\nexport function getFunctionNameWithKind(node, sourceCode) {\n const parent = node.parent\n const tokens = []\n const isObjectMethod = parent.type === \"Property\" && parent.value === node\n const isClassMethod =\n parent.type === \"MethodDefinition\" && parent.value === node\n const isClassFieldMethod =\n parent.type === \"PropertyDefinition\" && parent.value === node\n\n // Modifiers.\n if (isClassMethod || isClassFieldMethod) {\n if (parent.static) {\n tokens.push(\"static\")\n }\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(\"private\")\n }\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n // Kinds.\n if (isObjectMethod || isClassMethod) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else if (isClassFieldMethod) {\n tokens.push(\"method\")\n } else {\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\")\n }\n tokens.push(\"function\")\n }\n\n // Names.\n if (isObjectMethod || isClassMethod || isClassFieldMethod) {\n if (parent.key.type === \"PrivateIdentifier\") {\n tokens.push(`#${parent.key.name}`)\n } else {\n const name = getPropertyName(parent)\n if (name) {\n tokens.push(`'${name}'`)\n } else if (sourceCode) {\n const keyText = sourceCode.getText(parent.key)\n if (!keyText.includes(\"\\n\")) {\n tokens.push(`[${keyText}]`)\n }\n }\n }\n } else if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n } else if (\n (parent.type === \"AssignmentExpression\" ||\n parent.type === \"AssignmentPattern\") &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n } else if (\n parent.type === \"ExportDefaultDeclaration\" &&\n parent.declaration === node\n ) {\n tokens.push(\"'default'\")\n }\n\n return tokens.join(\" \")\n}\n","import { getKeys, KEYS } from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ]),\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n PropertyDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n }),\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {},\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || KEYS,\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate.mjs\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken,\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode,\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (\n node == null ||\n // `Program` can't be parenthesized\n node.parent == null ||\n // `CatchClause.param` can't be parenthesized, example `try {} catch (error) {}`\n (node.parent.type === \"CatchClause\" && node.parent.param === node)\n ) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some((r) => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {boolean} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = node.parent\n\n switch (parent && parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return parent.expressions[parent.expressions.length - 1] === node\n case \"ChainExpression\":\n return true\n\n default:\n return false\n }\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = {},\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true,\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? { default: nextTraceMap, ...nextTraceMap }\n : { default: nextTraceMap },\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap,\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false,\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap,\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false,\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false,\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable.mjs\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location.mjs\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind.mjs\"\nimport { getInnermostScope } from \"./get-innermost-scope.mjs\"\nimport { getPropertyName } from \"./get-property-name.mjs\"\nimport { getStaticValue } from \"./get-static-value.mjs\"\nimport { getStringIfConstant } from \"./get-string-if-constant.mjs\"\nimport { hasSideEffect } from \"./has-side-effect.mjs\"\nimport { isParenthesized } from \"./is-parenthesized.mjs\"\nimport { PatternMatcher } from \"./pattern-matcher.mjs\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker.mjs\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate.mjs\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;AAClC;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,MAAK;AAChD;AACA,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D,gBAAgB,KAAK,GAAG,WAAU;AAClC,gBAAgB,KAAK,GAAG,KAAI;AAC5B,gBAAgB,KAAK;AACrB,aAAa;AACb,SAAS;AACT,KAAK,QAAQ,KAAK,CAAC;AACnB;AACA,IAAI,OAAO,KAAK;AAChB;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,YAAY,EAAE,UAAU,EAAE;AACvD,IAAI,IAAI,IAAI,GAAG,GAAE;AACjB,IAAI,IAAI,KAAK,GAAG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AAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB;;;;"} \ No newline at end of file diff --git a/node_modules/@eslint-community/eslint-utils/package.json b/node_modules/@eslint-community/eslint-utils/package.json new file mode 100644 index 000000000..c4ee587b7 --- /dev/null +++ b/node_modules/@eslint-community/eslint-utils/package.json @@ -0,0 +1,73 @@ +{ + "name": "@eslint-community/eslint-utils", + "version": "4.4.0", + "description": "Utilities for ESLint plugins.", + "keywords": [ + "eslint" + ], + "homepage": "https://github.com/eslint-community/eslint-utils#readme", + "bugs": { + "url": "https://github.com/eslint-community/eslint-utils/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/eslint-community/eslint-utils" + }, + "license": "MIT", + "author": "Toru Nagashima", + "sideEffects": false, + "exports": { + ".": { + "import": "./index.mjs", + "require": "./index.js" + }, + "./package.json": "./package.json" + }, + "main": "index", + "module": "index.mjs", + "files": [ + "index.*" + ], + "scripts": { + "prebuild": "npm run -s clean", + "build": "rollup -c", + "clean": "rimraf .nyc_output coverage index.*", + "coverage": "opener ./coverage/lcov-report/index.html", + "docs:build": "vitepress build docs", + "docs:watch": "vitepress dev docs", + "format": "npm run -s format:prettier -- --write", + "format:prettier": "prettier .", + "format:check": "npm run -s format:prettier -- --check", + "lint": "eslint .", + "test": "c8 mocha --reporter dot \"test/*.mjs\"", + "preversion": "npm test && npm run -s build", + "postversion": "git push && git push --tags", + "prewatch": "npm run -s clean", + "watch": "warun \"{src,test}/**/*.mjs\" -- npm run -s test:mocha" + }, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "devDependencies": { + "@eslint-community/eslint-plugin-mysticatea": "^15.2.0", + "c8": "^7.12.0", + "dot-prop": "^6.0.1", + "eslint": "^8.28.0", + "mocha": "^9.2.2", + "npm-run-all": "^4.1.5", + "opener": "^1.5.2", + "prettier": "2.8.4", + "rimraf": "^3.0.2", + "rollup": "^2.79.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "semver": "^7.3.8", + "vitepress": "^1.0.0-alpha.40", + "warun": "^1.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } +} diff --git a/node_modules/regexpp/LICENSE b/node_modules/@eslint-community/regexpp/LICENSE similarity index 100% rename from node_modules/regexpp/LICENSE rename to node_modules/@eslint-community/regexpp/LICENSE diff --git a/node_modules/regexpp/README.md b/node_modules/@eslint-community/regexpp/README.md similarity index 77% rename from node_modules/regexpp/README.md rename to node_modules/@eslint-community/regexpp/README.md index a5e2e147f..9728af519 100644 --- a/node_modules/regexpp/README.md +++ b/node_modules/@eslint-community/regexpp/README.md @@ -1,20 +1,19 @@ -# regexpp +# @eslint-community/regexpp -[![npm version](https://img.shields.io/npm/v/regexpp.svg)](https://www.npmjs.com/package/regexpp) -[![Downloads/month](https://img.shields.io/npm/dm/regexpp.svg)](http://www.npmtrends.com/regexpp) -[![Build Status](https://github.com/mysticatea/regexpp/workflows/CI/badge.svg)](https://github.com/mysticatea/regexpp/actions) -[![codecov](https://codecov.io/gh/mysticatea/regexpp/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/regexpp) -[![Dependency Status](https://david-dm.org/mysticatea/regexpp.svg)](https://david-dm.org/mysticatea/regexpp) +[![npm version](https://img.shields.io/npm/v/@eslint-community/regexpp.svg)](https://www.npmjs.com/package/@eslint-community/regexpp) +[![Downloads/month](https://img.shields.io/npm/dm/@eslint-community/regexpp.svg)](http://www.npmtrends.com/@eslint-community/regexpp) +[![Build Status](https://github.com/eslint-community/regexpp/workflows/CI/badge.svg)](https://github.com/eslint-community/regexpp/actions) +[![codecov](https://codecov.io/gh/eslint-community/regexpp/branch/main/graph/badge.svg)](https://codecov.io/gh/eslint-community/regexpp) A regular expression parser for ECMAScript. ## 💿 Installation ```bash -$ npm install regexpp +$ npm install @eslint-community/regexpp ``` -- require Node.js 8 or newer. +- require Node@^12.0.0 || ^14.0.0 || >=16.0.0. ## 📖 Usage @@ -27,7 +26,7 @@ import { parseRegExpLiteral, validateRegExpLiteral, visitRegExpAST -} from "regexpp" +} from "@eslint-community/regexpp" ``` ### parseRegExpLiteral(source, options?) @@ -80,7 +79,7 @@ Parse a regular expression literal. - **Return:** - The AST of the regular expression. -#### parser.parsePattern(source, start?, end?, uFlag?) +#### parser.parsePattern(source, start?, end?, flags?) Parse a regular expression pattern. @@ -88,7 +87,7 @@ Parse a regular expression pattern. - `source` (`string`) The source code to parse. E.g. `"abc"`. - `start?` (`number`) The start index in the source code. Default is `0`. - `end?` (`number`) The end index in the source code. Default is `source.length`. - - `uFlag?` (`boolean`) The flag to enable Unicode mode. + - `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode. - **Return:** - The AST of the regular expression pattern. @@ -119,7 +118,7 @@ Validate a regular expression literal. - `start?` (`number`) The start index in the source code. Default is `0`. - `end?` (`number`) The end index in the source code. Default is `source.length`. -#### validator.validatePattern(source, start, end, uFlag) +#### validator.validatePattern(source, start, end, flags) Validate a regular expression pattern. @@ -127,7 +126,7 @@ Validate a regular expression pattern. - `source` (`string`) The source code to validate. - `start?` (`number`) The start index in the source code. Default is `0`. - `end?` (`number`) The end index in the source code. Default is `source.length`. - - `uFlag?` (`boolean`) The flag to enable Unicode mode. + - `flags?` (`{ unicode?: boolean, unicodeSets?: boolean }`) The flags to enable Unicode mode, and Unicode Set mode. #### validator.validateFlags(source, start, end) @@ -154,7 +153,7 @@ Validate a regular expression literal. ## 📰 Changelog -- [GitHub Releases](https://github.com/mysticatea/regexpp/releases) +- [GitHub Releases](https://github.com/eslint-community/regexpp/releases) ## 🍻 Contributing @@ -173,6 +172,6 @@ Please use GitHub's Issues/PRs. - `npm run watch` runs tests with `--watch` option. [`AST.Node`]: src/ast.ts#L4 -[`RegExpParser.Options`]: src/parser.ts#L539 -[`RegExpValidator.Options`]: src/validator.ts#L127 -[`RegExpVisitor.Handlers`]: src/visitor.ts#L204 +[`RegExpParser.Options`]: src/parser.ts#L743 +[`RegExpValidator.Options`]: src/validator.ts#L220 +[`RegExpVisitor.Handlers`]: src/visitor.ts#L291 diff --git a/node_modules/@eslint-community/regexpp/index.d.ts b/node_modules/@eslint-community/regexpp/index.d.ts new file mode 100644 index 000000000..d553b10b3 --- /dev/null +++ b/node_modules/@eslint-community/regexpp/index.d.ts @@ -0,0 +1,1065 @@ +// Generated by dts-bundle v0.7.3 + +declare module "@eslint-community/regexpp" { + import * as AST from "@eslint-community/regexpp/ast"; + import { RegExpParser } from "@eslint-community/regexpp/parser"; + import { RegExpValidator } from "@eslint-community/regexpp/validator"; + import { RegExpVisitor } from "@eslint-community/regexpp/visitor"; + export { RegExpSyntaxError } from "@eslint-community/regexpp/regexp-syntax-error"; + export { AST, RegExpParser, RegExpValidator }; + /** + * Parse a given regular expression literal then make AST object. + * @param source The source code to parse. + * @param options The options to parse. + * @returns The AST of the regular expression. + */ + export function parseRegExpLiteral( + source: RegExp | string, + options?: RegExpParser.Options + ): AST.RegExpLiteral; + /** + * Validate a given regular expression literal. + * @param source The source code to validate. + * @param options The options to validate. + */ + export function validateRegExpLiteral( + source: string, + options?: RegExpValidator.Options + ): void; + export function visitRegExpAST( + node: AST.Node, + handlers: RegExpVisitor.Handlers + ): void; +} + +declare module "@eslint-community/regexpp/ast" { + /** + * The type which includes all nodes. + */ + export type Node = BranchNode | LeafNode; + /** + * The type which includes all branch nodes. + */ + export type BranchNode = + | Alternative + | CapturingGroup + | CharacterClass + | CharacterClassRange + | ClassIntersection + | ClassStringDisjunction + | ClassSubtraction + | ExpressionCharacterClass + | Group + | LookaroundAssertion + | Pattern + | Quantifier + | RegExpLiteral + | StringAlternative; + /** + * The type which includes all leaf nodes. + */ + export type LeafNode = + | Backreference + | BoundaryAssertion + | Character + | CharacterSet + | Flags; + /** + * The type which includes all atom nodes. + */ + export type Element = Assertion | QuantifiableElement | Quantifier; + /** + * The type which includes all atom nodes that Quantifier node can have as children. + */ + export type QuantifiableElement = + | Backreference + | CapturingGroup + | Character + | CharacterClass + | CharacterSet + | ExpressionCharacterClass + | Group + | LookaheadAssertion; + /** + * The type which includes all character class atom nodes. + */ + export type CharacterClassElement = + | ClassRangesCharacterClassElement + | UnicodeSetsCharacterClassElement; + export type ClassRangesCharacterClassElement = + | Character + | CharacterClassRange + | CharacterUnicodePropertyCharacterSet + | EscapeCharacterSet; + export type UnicodeSetsCharacterClassElement = + | Character + | CharacterClassRange + | ClassStringDisjunction + | EscapeCharacterSet + | ExpressionCharacterClass + | UnicodePropertyCharacterSet + | UnicodeSetsCharacterClass; + /** + * The type which defines common properties for all node types. + */ + export interface NodeBase { + /** The node type. */ + type: Node["type"]; + /** The parent node. */ + parent: Node["parent"]; + /** The 0-based index that this node starts. */ + start: number; + /** The 0-based index that this node ends. */ + end: number; + /** The raw text of this node. */ + raw: string; + } + /** + * The root node. + */ + export interface RegExpLiteral extends NodeBase { + type: "RegExpLiteral"; + parent: null; + pattern: Pattern; + flags: Flags; + } + /** + * The pattern. + */ + export interface Pattern extends NodeBase { + type: "Pattern"; + parent: RegExpLiteral | null; + alternatives: Alternative[]; + } + /** + * The alternative. + * E.g. `a|b` + */ + export interface Alternative extends NodeBase { + type: "Alternative"; + parent: CapturingGroup | Group | LookaroundAssertion | Pattern; + elements: Element[]; + } + /** + * The uncapturing group. + * E.g. `(?:ab)` + */ + export interface Group extends NodeBase { + type: "Group"; + parent: Alternative | Quantifier; + alternatives: Alternative[]; + } + /** + * The capturing group. + * E.g. `(ab)`, `(?ab)` + */ + export interface CapturingGroup extends NodeBase { + type: "CapturingGroup"; + parent: Alternative | Quantifier; + name: string | null; + alternatives: Alternative[]; + references: Backreference[]; + } + /** + * The lookaround assertion. + */ + export type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion; + /** + * The lookahead assertion. + * E.g. `(?=ab)`, `(?!ab)` + */ + export interface LookaheadAssertion extends NodeBase { + type: "Assertion"; + parent: Alternative | Quantifier; + kind: "lookahead"; + negate: boolean; + alternatives: Alternative[]; + } + /** + * The lookbehind assertion. + * E.g. `(?<=ab)`, `(?` + */ + export interface Backreference extends NodeBase { + type: "Backreference"; + parent: Alternative | Quantifier; + ref: number | string; + resolved: CapturingGroup; + } + /** + * The flags. + */ + export interface Flags extends NodeBase { + type: "Flags"; + parent: RegExpLiteral | null; + dotAll: boolean; + global: boolean; + hasIndices: boolean; + ignoreCase: boolean; + multiline: boolean; + sticky: boolean; + unicode: boolean; + unicodeSets: boolean; + } + export {}; +} + +declare module "@eslint-community/regexpp/parser" { + import type { + Flags, + RegExpLiteral, + Pattern, + } from "@eslint-community/regexpp/ast"; + import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions"; + export namespace RegExpParser { + /** + * The options for RegExpParser construction. + */ + interface Options { + /** + * The flag to disable Annex B syntax. Default is `false`. + */ + strict?: boolean; + /** + * ECMAScript version. Default is `2024`. + * - `2015` added `u` and `y` flags. + * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, + * and Unicode Property Escape. + * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes. + * - `2022` added `d` flag. + * - `2023` added more valid Unicode Property Escapes. + * - `2024` added `v` flag. + */ + ecmaVersion?: EcmaVersion; + } + } + export class RegExpParser { + /** + * Initialize this parser. + * @param options The options of parser. + */ + constructor(options?: RegExpParser.Options); + /** + * Parse a regular expression literal. E.g. "/abc/g" + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @returns The AST of the given regular expression. + */ + parseLiteral(source: string, start?: number, end?: number): RegExpLiteral; + /** + * Parse a regular expression flags. E.g. "gim" + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @returns The AST of the given flags. + */ + parseFlags(source: string, start?: number, end?: number): Flags; + /** + * Parse a regular expression pattern. E.g. "abc" + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param flags The flags. + * @returns The AST of the given pattern. + */ + parsePattern( + source: string, + start?: number, + end?: number, + flags?: { + unicode?: boolean; + unicodeSets?: boolean; + } + ): Pattern; + /** + * @deprecated Backward compatibility + * Use object `flags` instead of boolean `uFlag`. + * + * @param source The source code to parse. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param uFlag The flag to set unicode mode. + * @returns The AST of the given pattern. + */ + parsePattern( + source: string, + start?: number, + end?: number, + uFlag?: boolean + ): Pattern; + } +} + +declare module "@eslint-community/regexpp/validator" { + import type { EcmaVersion } from "@eslint-community/regexpp/ecma-versions"; + export type RegExpValidatorSourceContext = { + readonly source: string; + readonly start: number; + readonly end: number; + readonly kind: "flags" | "literal" | "pattern"; + }; + export namespace RegExpValidator { + /** + * The options for RegExpValidator construction. + */ + interface Options { + /** + * The flag to disable Annex B syntax. Default is `false`. + */ + strict?: boolean; + /** + * ECMAScript version. Default is `2024`. + * - `2015` added `u` and `y` flags. + * - `2018` added `s` flag, Named Capturing Group, Lookbehind Assertion, + * and Unicode Property Escape. + * - `2019`, `2020`, and `2021` added more valid Unicode Property Escapes. + * - `2022` added `d` flag. + * - `2023` added more valid Unicode Property Escapes. + * - `2024` added `v` flag. + */ + ecmaVersion?: EcmaVersion; + /** + * A function that is called when the validator entered a RegExp literal. + * @param start The 0-based index of the first character. + */ + onLiteralEnter?: (start: number) => void; + /** + * A function that is called when the validator left a RegExp literal. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onLiteralLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator found flags. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param flags.global `g` flag. + * @param flags.ignoreCase `i` flag. + * @param flags.multiline `m` flag. + * @param flags.unicode `u` flag. + * @param flags.sticky `y` flag. + * @param flags.dotAll `s` flag. + * @param flags.hasIndices `d` flag. + * @param flags.unicodeSets `v` flag. + */ + onRegExpFlags?: ( + start: number, + end: number, + flags: { + global: boolean; + ignoreCase: boolean; + multiline: boolean; + unicode: boolean; + sticky: boolean; + dotAll: boolean; + hasIndices: boolean; + unicodeSets: boolean; + } + ) => void; + /** + * A function that is called when the validator found flags. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param global `g` flag. + * @param ignoreCase `i` flag. + * @param multiline `m` flag. + * @param unicode `u` flag. + * @param sticky `y` flag. + * @param dotAll `s` flag. + * @param hasIndices `d` flag. + * + * @deprecated Use `onRegExpFlags` instead. + */ + onFlags?: ( + start: number, + end: number, + global: boolean, + ignoreCase: boolean, + multiline: boolean, + unicode: boolean, + sticky: boolean, + dotAll: boolean, + hasIndices: boolean + ) => void; + /** + * A function that is called when the validator entered a pattern. + * @param start The 0-based index of the first character. + */ + onPatternEnter?: (start: number) => void; + /** + * A function that is called when the validator left a pattern. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onPatternLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a disjunction. + * @param start The 0-based index of the first character. + */ + onDisjunctionEnter?: (start: number) => void; + /** + * A function that is called when the validator left a disjunction. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onDisjunctionLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered an alternative. + * @param start The 0-based index of the first character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onAlternativeEnter?: (start: number, index: number) => void; + /** + * A function that is called when the validator left an alternative. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onAlternativeLeave?: (start: number, end: number, index: number) => void; + /** + * A function that is called when the validator entered an uncapturing group. + * @param start The 0-based index of the first character. + */ + onGroupEnter?: (start: number) => void; + /** + * A function that is called when the validator left an uncapturing group. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onGroupLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a capturing group. + * @param start The 0-based index of the first character. + * @param name The group name. + */ + onCapturingGroupEnter?: (start: number, name: string | null) => void; + /** + * A function that is called when the validator left a capturing group. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param name The group name. + */ + onCapturingGroupLeave?: ( + start: number, + end: number, + name: string | null + ) => void; + /** + * A function that is called when the validator found a quantifier. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param min The minimum number of repeating. + * @param max The maximum number of repeating. + * @param greedy The flag to choose the longest matching. + */ + onQuantifier?: ( + start: number, + end: number, + min: number, + max: number, + greedy: boolean + ) => void; + /** + * A function that is called when the validator entered a lookahead/lookbehind assertion. + * @param start The 0-based index of the first character. + * @param kind The kind of the assertion. + * @param negate The flag which represents that the assertion is negative. + */ + onLookaroundAssertionEnter?: ( + start: number, + kind: "lookahead" | "lookbehind", + negate: boolean + ) => void; + /** + * A function that is called when the validator left a lookahead/lookbehind assertion. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the assertion. + * @param negate The flag which represents that the assertion is negative. + */ + onLookaroundAssertionLeave?: ( + start: number, + end: number, + kind: "lookahead" | "lookbehind", + negate: boolean + ) => void; + /** + * A function that is called when the validator found an edge boundary assertion. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the assertion. + */ + onEdgeAssertion?: ( + start: number, + end: number, + kind: "end" | "start" + ) => void; + /** + * A function that is called when the validator found a word boundary assertion. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the assertion. + * @param negate The flag which represents that the assertion is negative. + */ + onWordBoundaryAssertion?: ( + start: number, + end: number, + kind: "word", + negate: boolean + ) => void; + /** + * A function that is called when the validator found a dot. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the character set. + */ + onAnyCharacterSet?: (start: number, end: number, kind: "any") => void; + /** + * A function that is called when the validator found a character set escape. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the character set. + * @param negate The flag which represents that the character set is negative. + */ + onEscapeCharacterSet?: ( + start: number, + end: number, + kind: "digit" | "space" | "word", + negate: boolean + ) => void; + /** + * A function that is called when the validator found a Unicode proerty escape. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param kind The kind of the character set. + * @param key The property name. + * @param value The property value. + * @param negate The flag which represents that the character set is negative. + * @param strings If true, the given property is property of strings. + */ + onUnicodePropertyCharacterSet?: ( + start: number, + end: number, + kind: "property", + key: string, + value: string | null, + negate: boolean, + strings: boolean + ) => void; + /** + * A function that is called when the validator found a character. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param value The code point of the character. + */ + onCharacter?: (start: number, end: number, value: number) => void; + /** + * A function that is called when the validator found a backreference. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param ref The key of the referred capturing group. + */ + onBackreference?: ( + start: number, + end: number, + ref: number | string + ) => void; + /** + * A function that is called when the validator entered a character class. + * @param start The 0-based index of the first character. + * @param negate The flag which represents that the character class is negative. + * @param unicodeSets `true` if unicodeSets mode. + */ + onCharacterClassEnter?: ( + start: number, + negate: boolean, + unicodeSets: boolean + ) => void; + /** + * A function that is called when the validator left a character class. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param negate The flag which represents that the character class is negative. + */ + onCharacterClassLeave?: ( + start: number, + end: number, + negate: boolean + ) => void; + /** + * A function that is called when the validator found a character class range. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param min The minimum code point of the range. + * @param max The maximum code point of the range. + */ + onCharacterClassRange?: ( + start: number, + end: number, + min: number, + max: number + ) => void; + /** + * A function that is called when the validator found a class intersection. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onClassIntersection?: (start: number, end: number) => void; + /** + * A function that is called when the validator found a class subtraction. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onClassSubtraction?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a class string disjunction. + * @param start The 0-based index of the first character. + */ + onClassStringDisjunctionEnter?: (start: number) => void; + /** + * A function that is called when the validator left a class string disjunction. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + */ + onClassStringDisjunctionLeave?: (start: number, end: number) => void; + /** + * A function that is called when the validator entered a string alternative. + * @param start The 0-based index of the first character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onStringAlternativeEnter?: (start: number, index: number) => void; + /** + * A function that is called when the validator left a string alternative. + * @param start The 0-based index of the first character. + * @param end The next 0-based index of the last character. + * @param index The 0-based index of alternatives in a disjunction. + */ + onStringAlternativeLeave?: ( + start: number, + end: number, + index: number + ) => void; + } + } + /** + * The regular expression validator. + */ + export class RegExpValidator { + /** + * Initialize this validator. + * @param options The options of validator. + */ + constructor(options?: RegExpValidator.Options); + /** + * Validate a regular expression literal. E.g. "/abc/g" + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + */ + validateLiteral(source: string, start?: number, end?: number): void; + /** + * Validate a regular expression flags. E.g. "gim" + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + */ + validateFlags(source: string, start?: number, end?: number): void; + /** + * Validate a regular expression pattern. E.g. "abc" + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param flags The flags. + */ + validatePattern( + source: string, + start?: number, + end?: number, + flags?: { + unicode?: boolean; + unicodeSets?: boolean; + } + ): void; + /** + * @deprecated Backward compatibility + * Use object `flags` instead of boolean `uFlag`. + * @param source The source code to validate. + * @param start The start index in the source code. + * @param end The end index in the source code. + * @param uFlag The flag to set unicode mode. + */ + validatePattern( + source: string, + start?: number, + end?: number, + uFlag?: boolean + ): void; + } +} + +declare module "@eslint-community/regexpp/visitor" { + import type { + Alternative, + Assertion, + Backreference, + CapturingGroup, + Character, + CharacterClass, + CharacterClassRange, + CharacterSet, + ClassIntersection, + ClassStringDisjunction, + ClassSubtraction, + ExpressionCharacterClass, + Flags, + Group, + Node, + Pattern, + Quantifier, + RegExpLiteral, + StringAlternative, + } from "@eslint-community/regexpp/ast"; + /** + * The visitor to walk on AST. + */ + export class RegExpVisitor { + /** + * Initialize this visitor. + * @param handlers Callbacks for each node. + */ + constructor(handlers: RegExpVisitor.Handlers); + /** + * Visit a given node and descendant nodes. + * @param node The root node to visit tree. + */ + visit(node: Node): void; + } + export namespace RegExpVisitor { + interface Handlers { + onAlternativeEnter?: (node: Alternative) => void; + onAlternativeLeave?: (node: Alternative) => void; + onAssertionEnter?: (node: Assertion) => void; + onAssertionLeave?: (node: Assertion) => void; + onBackreferenceEnter?: (node: Backreference) => void; + onBackreferenceLeave?: (node: Backreference) => void; + onCapturingGroupEnter?: (node: CapturingGroup) => void; + onCapturingGroupLeave?: (node: CapturingGroup) => void; + onCharacterEnter?: (node: Character) => void; + onCharacterLeave?: (node: Character) => void; + onCharacterClassEnter?: (node: CharacterClass) => void; + onCharacterClassLeave?: (node: CharacterClass) => void; + onCharacterClassRangeEnter?: (node: CharacterClassRange) => void; + onCharacterClassRangeLeave?: (node: CharacterClassRange) => void; + onCharacterSetEnter?: (node: CharacterSet) => void; + onCharacterSetLeave?: (node: CharacterSet) => void; + onClassIntersectionEnter?: (node: ClassIntersection) => void; + onClassIntersectionLeave?: (node: ClassIntersection) => void; + onClassStringDisjunctionEnter?: (node: ClassStringDisjunction) => void; + onClassStringDisjunctionLeave?: (node: ClassStringDisjunction) => void; + onClassSubtractionEnter?: (node: ClassSubtraction) => void; + onClassSubtractionLeave?: (node: ClassSubtraction) => void; + onExpressionCharacterClassEnter?: ( + node: ExpressionCharacterClass + ) => void; + onExpressionCharacterClassLeave?: ( + node: ExpressionCharacterClass + ) => void; + onFlagsEnter?: (node: Flags) => void; + onFlagsLeave?: (node: Flags) => void; + onGroupEnter?: (node: Group) => void; + onGroupLeave?: (node: Group) => void; + onPatternEnter?: (node: Pattern) => void; + onPatternLeave?: (node: Pattern) => void; + onQuantifierEnter?: (node: Quantifier) => void; + onQuantifierLeave?: (node: Quantifier) => void; + onRegExpLiteralEnter?: (node: RegExpLiteral) => void; + onRegExpLiteralLeave?: (node: RegExpLiteral) => void; + onStringAlternativeEnter?: (node: StringAlternative) => void; + onStringAlternativeLeave?: (node: StringAlternative) => void; + } + } +} + +declare module "@eslint-community/regexpp/regexp-syntax-error" { + import type { RegExpValidatorSourceContext } from "@eslint-community/regexpp/validator"; + export class RegExpSyntaxError extends SyntaxError { + index: number; + constructor(message: string, index: number); + } + export function newRegExpSyntaxError( + srcCtx: RegExpValidatorSourceContext, + flags: { + unicode: boolean; + unicodeSets: boolean; + }, + index: number, + message: string + ): RegExpSyntaxError; +} + +declare module "@eslint-community/regexpp/ecma-versions" { + export type EcmaVersion = + | 5 + | 2015 + | 2016 + | 2017 + | 2018 + | 2019 + | 2020 + | 2021 + | 2022 + | 2023 + | 2024; + export const latestEcmaVersion = 2024; +} diff --git a/node_modules/regexpp/index.js b/node_modules/@eslint-community/regexpp/index.js similarity index 55% rename from node_modules/regexpp/index.js rename to node_modules/@eslint-community/regexpp/index.js index 12b4a5f40..545dc08ab 100644 --- a/node_modules/regexpp/index.js +++ b/node_modules/@eslint-community/regexpp/index.js @@ -1,14 +1,13 @@ -/*! @author Toru Nagashima */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); - - var ast = /*#__PURE__*/Object.freeze({ - + __proto__: null }); +const latestEcmaVersion = 2024; + let largeIdStartRanges = undefined; let largeIdContinueRanges = undefined; function isIdStart(cp) { @@ -40,17 +39,16 @@ function isIdContinue(cp) { return isLargeIdStart(cp) || isLargeIdContinue(cp); } function isLargeIdStart(cp) { - return isInRange(cp, largeIdStartRanges || (largeIdStartRanges = initLargeIdStartRanges())); + return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges())); } function isLargeIdContinue(cp) { - return isInRange(cp, largeIdContinueRanges || - (largeIdContinueRanges = initLargeIdContinueRanges())); + return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges())); } function initLargeIdStartRanges() { - return restoreRanges("170 0 11 0 5 0 6 22 2 30 2 457 5 11 15 4 8 0 2 0 130 4 2 1 3 3 2 0 7 0 2 2 2 0 2 19 2 82 2 138 9 165 2 37 3 0 7 40 72 26 5 3 46 42 36 1 2 98 2 0 16 1 8 1 11 2 3 0 17 0 2 29 30 88 12 0 25 32 10 1 5 0 6 21 5 0 10 0 4 0 24 24 8 10 54 20 2 17 61 53 4 0 19 0 8 9 16 15 5 7 3 1 3 21 2 6 2 0 4 3 4 0 17 0 14 1 2 2 15 1 11 0 9 5 5 1 3 21 2 6 2 1 2 1 2 1 32 3 2 0 20 2 17 8 2 2 2 21 2 6 2 1 2 4 4 0 19 0 16 1 24 0 12 7 3 1 3 21 2 6 2 1 2 4 4 0 31 1 2 2 16 0 18 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 11 23 0 53 7 2 2 2 22 2 15 4 0 27 2 6 1 31 0 5 7 2 2 2 22 2 9 2 4 4 0 33 0 2 1 16 1 18 8 2 2 2 40 3 0 17 0 6 2 9 2 25 5 6 17 4 23 2 8 2 0 3 6 59 47 2 1 13 6 59 1 2 0 2 4 2 23 2 0 2 9 2 1 10 0 3 4 2 0 22 3 33 0 64 7 2 35 28 4 116 42 21 0 17 5 5 3 4 0 4 1 8 2 5 12 13 0 18 37 2 0 6 0 3 42 2 332 2 3 3 6 2 0 2 3 3 40 2 3 3 32 2 3 3 6 2 0 2 3 3 14 2 56 2 3 3 66 38 15 17 85 3 5 4 619 3 16 2 25 6 74 4 10 8 12 2 3 15 17 15 17 15 12 2 2 16 51 36 0 5 0 68 88 8 40 2 0 6 69 11 30 50 29 3 4 12 43 5 25 55 22 10 52 83 0 94 46 18 6 56 29 14 1 11 43 27 35 42 2 11 35 3 8 8 42 3 2 42 3 2 5 2 1 4 0 6 191 65 277 3 5 3 37 3 5 3 7 2 0 2 0 2 0 2 30 3 52 2 6 2 0 4 2 2 6 4 3 3 5 5 12 6 2 2 6 117 0 14 0 17 12 102 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 15 3 3 6 4 5 0 18 40 2680 46 2 46 2 132 7 3 4 1 13 37 2 0 6 0 3 55 8 0 17 22 10 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 551 2 26 8 8 4 3 4 5 85 5 4 2 89 2 3 6 42 2 93 18 31 49 15 513 6591 65 20988 4 1164 68 45 3 268 4 15 11 1 21 46 17 30 3 79 40 8 3 102 3 52 3 8 43 12 2 2 2 3 2 22 30 51 15 49 63 5 4 0 2 1 12 27 11 22 26 28 8 46 29 0 17 4 2 9 11 4 2 40 24 2 2 7 21 22 4 0 4 49 2 0 4 1 3 4 3 0 2 0 25 2 3 10 8 2 13 5 3 5 3 5 10 6 2 6 2 42 2 13 7 114 30 11171 13 22 5 48 8453 365 3 105 39 6 13 4 6 0 2 9 2 12 2 4 2 0 2 1 2 1 2 107 34 362 19 63 3 53 41 11 117 4 2 134 37 25 7 25 12 88 4 5 3 5 3 5 3 2 36 11 2 25 2 18 2 1 2 14 3 13 35 122 70 52 268 28 4 48 48 31 14 29 6 37 11 29 3 35 5 7 2 4 43 157 19 35 5 35 5 39 9 51 157 310 10 21 11 7 153 5 3 0 2 43 2 1 4 0 3 22 11 22 10 30 66 18 2 1 11 21 11 25 71 55 7 1 65 0 16 3 2 2 2 28 43 28 4 28 36 7 2 27 28 53 11 21 11 18 14 17 111 72 56 50 14 50 14 35 349 41 7 1 79 28 11 0 9 21 107 20 28 22 13 52 76 44 33 24 27 35 30 0 3 0 9 34 4 0 13 47 15 3 22 0 2 0 36 17 2 24 85 6 2 0 2 3 2 14 2 9 8 46 39 7 3 1 3 21 2 6 2 1 2 4 4 0 19 0 13 4 159 52 19 3 21 2 31 47 21 1 2 0 185 46 42 3 37 47 21 0 60 42 14 0 72 26 230 43 117 63 32 7 3 0 3 7 2 1 2 23 16 0 2 0 95 7 3 38 17 0 2 0 29 0 11 39 8 0 22 0 12 45 20 0 35 56 264 8 2 36 18 0 50 29 113 6 2 1 2 37 22 0 26 5 2 1 2 31 15 0 328 18 190 0 80 921 103 110 18 195 2749 1070 4050 582 8634 568 8 30 114 29 19 47 17 3 32 20 6 18 689 63 129 74 6 0 67 12 65 1 2 0 29 6135 9 1237 43 8 8952 286 50 2 18 3 9 395 2309 106 6 12 4 8 8 9 5991 84 2 70 2 1 3 0 3 1 3 3 2 11 2 0 2 6 2 64 2 3 3 7 2 6 2 27 2 3 2 4 2 0 4 6 2 339 3 24 2 24 2 30 2 24 2 30 2 24 2 30 2 24 2 30 2 24 2 7 2357 44 11 6 17 0 370 43 1301 196 60 67 8 0 1205 3 2 26 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 16 6 2 2 4 2 16 4421 42717 35 4148 12 221 3 5761 15 7472 3104 541 1507 4938"); + 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 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f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f"); } function initLargeIdContinueRanges() { - return restoreRanges("183 0 585 111 24 0 252 4 266 44 2 0 2 1 2 1 2 0 73 10 49 30 7 0 102 6 3 5 3 1 2 3 3 9 24 0 31 26 92 10 16 9 34 8 10 0 25 3 2 8 2 2 2 4 44 2 120 14 2 32 55 2 2 17 2 6 11 1 3 9 18 2 57 0 2 6 3 1 3 2 10 0 11 1 3 9 15 0 3 2 57 0 2 4 5 1 3 2 4 0 21 11 4 0 12 2 57 0 2 7 2 2 2 2 21 1 3 9 11 5 2 2 57 0 2 6 3 1 3 2 8 2 11 1 3 9 19 0 60 4 4 2 2 3 10 0 15 9 17 4 58 6 2 2 2 3 8 1 12 1 3 9 18 2 57 0 2 6 2 2 2 3 8 1 12 1 3 9 17 3 56 1 2 6 2 2 2 3 10 0 11 1 3 9 18 2 71 0 5 5 2 0 2 7 7 9 3 1 62 0 3 6 13 7 2 9 88 0 3 8 12 5 3 9 63 1 7 9 12 0 2 0 2 0 5 1 50 19 2 1 6 10 2 35 10 0 101 19 2 9 13 3 5 2 2 2 3 6 4 3 14 11 2 14 704 2 10 8 929 2 30 2 30 1 31 1 65 31 10 0 3 9 34 2 3 9 144 0 119 11 5 11 11 9 129 10 61 4 58 9 2 28 3 10 7 9 23 13 2 1 64 4 48 16 12 9 18 8 13 2 31 12 3 9 45 13 49 19 9 9 7 9 119 2 2 20 5 0 7 0 3 2 199 57 2 4 576 1 20 0 124 12 5 0 4 11 3071 2 142 0 97 31 555 5 106 1 30086 9 70 0 5 9 33 1 81 1 273 0 4 0 5 0 24 4 5 0 84 1 51 17 11 9 7 17 14 10 29 7 26 12 45 3 48 13 16 9 12 0 11 9 48 13 13 0 9 1 3 9 34 2 51 0 2 2 3 1 6 1 2 0 42 4 6 1 237 7 2 1 3 9 20261 0 738 15 17 15 4 1 25 2 193 9 38 0 702 0 227 0 150 4 294 9 1368 2 2 1 6 3 41 2 5 0 166 1 574 3 9 9 370 1 154 10 176 2 54 14 32 9 16 3 46 10 54 9 7 2 37 13 2 9 6 1 45 0 13 2 49 13 9 3 2 11 83 11 7 0 161 11 6 9 7 3 56 1 2 6 3 1 3 2 10 0 11 1 3 6 4 4 193 17 10 9 5 0 82 19 13 9 214 6 3 8 28 1 83 16 16 9 82 12 9 9 84 14 5 9 243 14 166 9 71 5 2 1 3 3 2 0 2 1 13 9 120 6 3 6 4 0 29 9 41 6 2 3 9 0 10 10 47 15 406 7 2 7 17 9 57 21 2 13 123 5 4 0 2 1 2 6 2 0 9 9 49 4 2 1 2 4 9 9 330 3 19306 9 135 4 60 6 26 9 1014 0 2 54 8 3 82 0 12 1 19628 1 5319 4 4 5 9 7 3 6 31 3 149 2 1418 49 513 54 5 49 9 0 15 0 23 4 2 14 1361 6 2 16 3 6 2 1 2 4 262 6 10 9 419 13 1495 6 110 6 6 9 4759 9 787719 239"); + 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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 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"); } function isInRange(cp, ranges) { let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0; @@ -72,30 +70,54 @@ function isInRange(cp, ranges) { } function restoreRanges(data) { let last = 0; - return data.split(" ").map(s => (last += parseInt(s, 10) | 0)); + return data.split(" ").map((s) => (last += parseInt(s, 36) | 0)); } class DataSet { - constructor(raw2018, raw2019, raw2020) { + constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024) { this._raw2018 = raw2018; this._raw2019 = raw2019; this._raw2020 = raw2020; + this._raw2021 = raw2021; + this._raw2022 = raw2022; + this._raw2023 = raw2023; + this._raw2024 = raw2024; } get es2018() { - return (this._set2018 || (this._set2018 = new Set(this._raw2018.split(" ")))); + var _a; + return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" ")))); } get es2019() { - return (this._set2019 || (this._set2019 = new Set(this._raw2019.split(" ")))); + var _a; + return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" ")))); } get es2020() { - return (this._set2020 || (this._set2020 = new Set(this._raw2020.split(" ")))); + var _a; + return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" ")))); + } + get es2021() { + var _a; + return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" ")))); + } + get es2022() { + var _a; + return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" ")))); + } + get es2023() { + var _a; + return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" ")))); + } + get es2024() { + var _a; + return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" ")))); } } const gcNameSet = new Set(["General_Category", "gc"]); const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]); -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", "", ""); -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"); -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", ""); +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", "", "", "", "", "", ""); +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", ""); +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", "", "", ""); +const binPropertyOfStringsSets = new DataSet("", "", "", "", "", "", "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence"); function isValidUnicodeProperty(version, name, value) { if (gcNameSet.has(name)) { return version >= 2018 && gcValueSets.es2018.has(value); @@ -103,114 +125,129 @@ function isValidUnicodeProperty(version, name, value) { if (scNameSet.has(name)) { return ((version >= 2018 && scValueSets.es2018.has(value)) || (version >= 2019 && scValueSets.es2019.has(value)) || - (version >= 2020 && scValueSets.es2020.has(value))); + (version >= 2020 && scValueSets.es2020.has(value)) || + (version >= 2021 && scValueSets.es2021.has(value)) || + (version >= 2022 && scValueSets.es2022.has(value)) || + (version >= 2023 && scValueSets.es2023.has(value))); } return false; } function isValidLoneUnicodeProperty(version, value) { return ((version >= 2018 && binPropertySets.es2018.has(value)) || - (version >= 2019 && binPropertySets.es2019.has(value))); + (version >= 2019 && binPropertySets.es2019.has(value)) || + (version >= 2021 && binPropertySets.es2021.has(value))); +} +function isValidLoneUnicodePropertyOfString(version, value) { + return version >= 2024 && binPropertyOfStringsSets.es2024.has(value); } -const Backspace = 0x08; -const CharacterTabulation = 0x09; -const LineFeed = 0x0a; -const LineTabulation = 0x0b; -const FormFeed = 0x0c; -const CarriageReturn = 0x0d; -const ExclamationMark = 0x21; -const DollarSign = 0x24; -const LeftParenthesis = 0x28; -const RightParenthesis = 0x29; -const Asterisk = 0x2a; -const PlusSign = 0x2b; -const Comma = 0x2c; -const HyphenMinus = 0x2d; -const FullStop = 0x2e; -const Solidus = 0x2f; -const DigitZero = 0x30; -const DigitOne = 0x31; -const DigitSeven = 0x37; -const DigitNine = 0x39; -const Colon = 0x3a; -const LessThanSign = 0x3c; -const EqualsSign = 0x3d; -const GreaterThanSign = 0x3e; -const QuestionMark = 0x3f; -const LatinCapitalLetterA = 0x41; -const LatinCapitalLetterB = 0x42; -const LatinCapitalLetterD = 0x44; -const LatinCapitalLetterF = 0x46; -const LatinCapitalLetterP = 0x50; -const LatinCapitalLetterS = 0x53; -const LatinCapitalLetterW = 0x57; -const LatinCapitalLetterZ = 0x5a; -const LowLine = 0x5f; -const LatinSmallLetterA = 0x61; -const LatinSmallLetterB = 0x62; -const LatinSmallLetterC = 0x63; -const LatinSmallLetterD = 0x64; -const LatinSmallLetterF = 0x66; -const LatinSmallLetterG = 0x67; -const LatinSmallLetterI = 0x69; -const LatinSmallLetterK = 0x6b; -const LatinSmallLetterM = 0x6d; -const LatinSmallLetterN = 0x6e; -const LatinSmallLetterP = 0x70; -const LatinSmallLetterR = 0x72; -const LatinSmallLetterS = 0x73; -const LatinSmallLetterT = 0x74; -const LatinSmallLetterU = 0x75; -const LatinSmallLetterV = 0x76; -const LatinSmallLetterW = 0x77; -const LatinSmallLetterX = 0x78; -const LatinSmallLetterY = 0x79; -const LatinSmallLetterZ = 0x7a; -const LeftSquareBracket = 0x5b; -const ReverseSolidus = 0x5c; -const RightSquareBracket = 0x5d; -const CircumflexAccent = 0x5e; -const LeftCurlyBracket = 0x7b; -const VerticalLine = 0x7c; -const RightCurlyBracket = 0x7d; -const ZeroWidthNonJoiner = 0x200c; -const ZeroWidthJoiner = 0x200d; -const LineSeparator = 0x2028; -const ParagraphSeparator = 0x2029; -const MinCodePoint = 0x00; -const MaxCodePoint = 0x10ffff; +const BACKSPACE = 0x08; +const CHARACTER_TABULATION = 0x09; +const LINE_FEED = 0x0a; +const LINE_TABULATION = 0x0b; +const FORM_FEED = 0x0c; +const CARRIAGE_RETURN = 0x0d; +const EXCLAMATION_MARK = 0x21; +const NUMBER_SIGN = 0x23; +const DOLLAR_SIGN = 0x24; +const PERCENT_SIGN = 0x25; +const AMPERSAND = 0x26; +const LEFT_PARENTHESIS = 0x28; +const RIGHT_PARENTHESIS = 0x29; +const ASTERISK = 0x2a; +const PLUS_SIGN = 0x2b; +const COMMA = 0x2c; +const HYPHEN_MINUS = 0x2d; +const FULL_STOP = 0x2e; +const SOLIDUS = 0x2f; +const DIGIT_ZERO = 0x30; +const DIGIT_ONE = 0x31; +const DIGIT_SEVEN = 0x37; +const DIGIT_NINE = 0x39; +const COLON = 0x3a; +const SEMICOLON = 0x3b; +const LESS_THAN_SIGN = 0x3c; +const EQUALS_SIGN = 0x3d; +const GREATER_THAN_SIGN = 0x3e; +const QUESTION_MARK = 0x3f; +const COMMERCIAL_AT = 0x40; +const LATIN_CAPITAL_LETTER_A = 0x41; +const LATIN_CAPITAL_LETTER_B = 0x42; +const LATIN_CAPITAL_LETTER_D = 0x44; +const LATIN_CAPITAL_LETTER_F = 0x46; +const LATIN_CAPITAL_LETTER_P = 0x50; +const LATIN_CAPITAL_LETTER_S = 0x53; +const LATIN_CAPITAL_LETTER_W = 0x57; +const LATIN_CAPITAL_LETTER_Z = 0x5a; +const LOW_LINE = 0x5f; +const LATIN_SMALL_LETTER_A = 0x61; +const LATIN_SMALL_LETTER_B = 0x62; +const LATIN_SMALL_LETTER_C = 0x63; +const LATIN_SMALL_LETTER_D = 0x64; +const LATIN_SMALL_LETTER_F = 0x66; +const LATIN_SMALL_LETTER_G = 0x67; +const LATIN_SMALL_LETTER_I = 0x69; +const LATIN_SMALL_LETTER_K = 0x6b; +const LATIN_SMALL_LETTER_M = 0x6d; +const LATIN_SMALL_LETTER_N = 0x6e; +const LATIN_SMALL_LETTER_P = 0x70; +const LATIN_SMALL_LETTER_Q = 0x71; +const LATIN_SMALL_LETTER_R = 0x72; +const LATIN_SMALL_LETTER_S = 0x73; +const LATIN_SMALL_LETTER_T = 0x74; +const LATIN_SMALL_LETTER_U = 0x75; +const LATIN_SMALL_LETTER_V = 0x76; +const LATIN_SMALL_LETTER_W = 0x77; +const LATIN_SMALL_LETTER_X = 0x78; +const LATIN_SMALL_LETTER_Y = 0x79; +const LATIN_SMALL_LETTER_Z = 0x7a; +const LEFT_SQUARE_BRACKET = 0x5b; +const REVERSE_SOLIDUS = 0x5c; +const RIGHT_SQUARE_BRACKET = 0x5d; +const CIRCUMFLEX_ACCENT = 0x5e; +const GRAVE_ACCENT = 0x60; +const LEFT_CURLY_BRACKET = 0x7b; +const VERTICAL_LINE = 0x7c; +const RIGHT_CURLY_BRACKET = 0x7d; +const TILDE = 0x7e; +const ZERO_WIDTH_NON_JOINER = 0x200c; +const ZERO_WIDTH_JOINER = 0x200d; +const LINE_SEPARATOR = 0x2028; +const PARAGRAPH_SEPARATOR = 0x2029; +const MIN_CODE_POINT = 0x00; +const MAX_CODE_POINT = 0x10ffff; function isLatinLetter(code) { - return ((code >= LatinCapitalLetterA && code <= LatinCapitalLetterZ) || - (code >= LatinSmallLetterA && code <= LatinSmallLetterZ)); + return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z)); } function isDecimalDigit(code) { - return code >= DigitZero && code <= DigitNine; + return code >= DIGIT_ZERO && code <= DIGIT_NINE; } function isOctalDigit(code) { - return code >= DigitZero && code <= DigitSeven; + return code >= DIGIT_ZERO && code <= DIGIT_SEVEN; } function isHexDigit(code) { - return ((code >= DigitZero && code <= DigitNine) || - (code >= LatinCapitalLetterA && code <= LatinCapitalLetterF) || - (code >= LatinSmallLetterA && code <= LatinSmallLetterF)); + return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) || + (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F)); } function isLineTerminator(code) { - return (code === LineFeed || - code === CarriageReturn || - code === LineSeparator || - code === ParagraphSeparator); + return (code === LINE_FEED || + code === CARRIAGE_RETURN || + code === LINE_SEPARATOR || + code === PARAGRAPH_SEPARATOR); } function isValidUnicode(code) { - return code >= MinCodePoint && code <= MaxCodePoint; + return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT; } function digitToInt(code) { - if (code >= LatinSmallLetterA && code <= LatinSmallLetterF) { - return code - LatinSmallLetterA + 10; + if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) { + return code - LATIN_SMALL_LETTER_A + 10; } - if (code >= LatinCapitalLetterA && code <= LatinCapitalLetterF) { - return code - LatinCapitalLetterA + 10; + if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) { + return code - LATIN_CAPITAL_LETTER_A + 10; } - return code - DigitZero; + return code - DIGIT_ZERO; } function isLeadSurrogate(code) { return code >= 0xd800 && code <= 0xdbff; @@ -327,46 +364,115 @@ class Reader { } class RegExpSyntaxError extends SyntaxError { - constructor(source, uFlag, index, message) { - if (source) { - if (!source.startsWith("/")) { - source = `/${source}/${uFlag ? "u" : ""}`; - } - source = `: ${source}`; - } - super(`Invalid regular expression${source}: ${message}`); + constructor(message, index) { + super(message); this.index = index; } } +function newRegExpSyntaxError(srcCtx, flags, index, message) { + let source = ""; + if (srcCtx.kind === "literal") { + const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end); + if (literal) { + source = `: ${literal}`; + } + } + else if (srcCtx.kind === "pattern") { + const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end); + const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`; + source = `: /${pattern}/${flagsText}`; + } + return new RegExpSyntaxError(`Invalid regular expression${source}: ${message}`, index); +} +const SYNTAX_CHARACTER = new Set([ + CIRCUMFLEX_ACCENT, + DOLLAR_SIGN, + REVERSE_SOLIDUS, + FULL_STOP, + ASTERISK, + PLUS_SIGN, + QUESTION_MARK, + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER = new Set([ + AMPERSAND, + EXCLAMATION_MARK, + NUMBER_SIGN, + DOLLAR_SIGN, + PERCENT_SIGN, + ASTERISK, + PLUS_SIGN, + COMMA, + FULL_STOP, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + QUESTION_MARK, + COMMERCIAL_AT, + CIRCUMFLEX_ACCENT, + GRAVE_ACCENT, + TILDE, +]); +const CLASS_SET_SYNTAX_CHARACTER = new Set([ + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + SOLIDUS, + HYPHEN_MINUS, + REVERSE_SOLIDUS, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_PUNCTUATOR = new Set([ + AMPERSAND, + HYPHEN_MINUS, + EXCLAMATION_MARK, + NUMBER_SIGN, + PERCENT_SIGN, + COMMA, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + COMMERCIAL_AT, + GRAVE_ACCENT, + TILDE, +]); function isSyntaxCharacter(cp) { - return (cp === CircumflexAccent || - cp === DollarSign || - cp === ReverseSolidus || - cp === FullStop || - cp === Asterisk || - cp === PlusSign || - cp === QuestionMark || - cp === LeftParenthesis || - cp === RightParenthesis || - cp === LeftSquareBracket || - cp === RightSquareBracket || - cp === LeftCurlyBracket || - cp === RightCurlyBracket || - cp === VerticalLine); + return SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedDoublePunctuatorCharacter(cp) { + return CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.has(cp); +} +function isClassSetSyntaxCharacter(cp) { + return CLASS_SET_SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedPunctuator(cp) { + return CLASS_SET_RESERVED_PUNCTUATOR.has(cp); } -function isRegExpIdentifierStart(cp) { - return isIdStart(cp) || cp === DollarSign || cp === LowLine; +function isIdentifierStartChar(cp) { + return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE; } -function isRegExpIdentifierPart(cp) { +function isIdentifierPartChar(cp) { return (isIdContinue(cp) || - cp === DollarSign || - cp === LowLine || - cp === ZeroWidthNonJoiner || - cp === ZeroWidthJoiner); + cp === DOLLAR_SIGN || + cp === ZERO_WIDTH_NON_JOINER || + cp === ZERO_WIDTH_JOINER); } function isUnicodePropertyNameCharacter(cp) { - return isLatinLetter(cp) || cp === LowLine; + return isLatinLetter(cp) || cp === LOW_LINE; } function isUnicodePropertyValueCharacter(cp) { return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp); @@ -374,29 +480,36 @@ function isUnicodePropertyValueCharacter(cp) { class RegExpValidator { constructor(options) { this._reader = new Reader(); - this._uFlag = false; + this._unicodeMode = false; + this._unicodeSetsMode = false; this._nFlag = false; this._lastIntValue = 0; - this._lastMinValue = 0; - this._lastMaxValue = 0; + this._lastRange = { + min: 0, + max: Number.POSITIVE_INFINITY, + }; this._lastStrValue = ""; - this._lastKeyValue = ""; - this._lastValValue = ""; this._lastAssertionIsQuantifiable = false; this._numCapturingParens = 0; this._groupNames = new Set(); this._backreferenceNames = new Set(); - this._options = options || {}; + this._srcCtx = null; + this._options = options !== null && options !== void 0 ? options : {}; } validateLiteral(source, start = 0, end = source.length) { - this._uFlag = this._nFlag = false; + this._srcCtx = { source, start, end, kind: "literal" }; + this._unicodeSetsMode = this._unicodeMode = this._nFlag = false; this.reset(source, start, end); this.onLiteralEnter(start); - if (this.eat(Solidus) && this.eatRegExpBody() && this.eat(Solidus)) { + if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) { const flagStart = this.index; - const uFlag = source.includes("u", flagStart); - this.validateFlags(source, flagStart, end); - this.validatePattern(source, start + 1, flagStart - 1, uFlag); + const unicode = source.includes("u", flagStart); + const unicodeSets = source.includes("v", flagStart); + this.validateFlagsInternal(source, flagStart, end); + this.validatePatternInternal(source, start + 1, flagStart - 1, { + unicode, + unicodeSets, + }); } else if (start >= end) { this.raise("Empty"); @@ -408,6 +521,29 @@ class RegExpValidator { this.onLiteralLeave(start, end); } validateFlags(source, start = 0, end = source.length) { + this._srcCtx = { source, start, end, kind: "flags" }; + this.validateFlagsInternal(source, start, end); + } + validatePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + this._srcCtx = { source, start, end, kind: "pattern" }; + this.validatePatternInternal(source, start, end, uFlagOrFlags); + } + validatePatternInternal(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); + this._unicodeMode = mode.unicodeMode; + this._nFlag = mode.nFlag; + this._unicodeSetsMode = mode.unicodeSetsMode; + this.reset(source, start, end); + this.consumePattern(); + if (!this._nFlag && + this.ecmaVersion >= 2018 && + this._groupNames.size > 0) { + this._nFlag = true; + this.rewind(start); + this.consumePattern(); + } + } + validateFlagsInternal(source, start, end) { const existingFlags = new Set(); let global = false; let ignoreCase = false; @@ -415,54 +551,92 @@ class RegExpValidator { let sticky = false; let unicode = false; let dotAll = false; + let hasIndices = false; + let unicodeSets = false; for (let i = start; i < end; ++i) { const flag = source.charCodeAt(i); if (existingFlags.has(flag)) { - this.raise(`Duplicated flag '${source[i]}'`); + this.raise(`Duplicated flag '${source[i]}'`, { index: start }); } existingFlags.add(flag); - if (flag === LatinSmallLetterG) { + if (flag === LATIN_SMALL_LETTER_G) { global = true; } - else if (flag === LatinSmallLetterI) { + else if (flag === LATIN_SMALL_LETTER_I) { ignoreCase = true; } - else if (flag === LatinSmallLetterM) { + else if (flag === LATIN_SMALL_LETTER_M) { multiline = true; } - else if (flag === LatinSmallLetterU && this.ecmaVersion >= 2015) { + else if (flag === LATIN_SMALL_LETTER_U && + this.ecmaVersion >= 2015) { unicode = true; } - else if (flag === LatinSmallLetterY && this.ecmaVersion >= 2015) { + else if (flag === LATIN_SMALL_LETTER_Y && + this.ecmaVersion >= 2015) { sticky = true; } - else if (flag === LatinSmallLetterS && this.ecmaVersion >= 2018) { + else if (flag === LATIN_SMALL_LETTER_S && + this.ecmaVersion >= 2018) { dotAll = true; } + else if (flag === LATIN_SMALL_LETTER_D && + this.ecmaVersion >= 2022) { + hasIndices = true; + } + else if (flag === LATIN_SMALL_LETTER_V && + this.ecmaVersion >= 2024) { + unicodeSets = true; + } else { - this.raise(`Invalid flag '${source[i]}'`); + this.raise(`Invalid flag '${source[i]}'`, { index: start }); } } - this.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll); + this.onRegExpFlags(start, end, { + global, + ignoreCase, + multiline, + unicode, + sticky, + dotAll, + hasIndices, + unicodeSets, + }); } - validatePattern(source, start = 0, end = source.length, uFlag = false) { - this._uFlag = uFlag && this.ecmaVersion >= 2015; - this._nFlag = uFlag && this.ecmaVersion >= 2018; - this.reset(source, start, end); - this.consumePattern(); - if (!this._nFlag && - this.ecmaVersion >= 2018 && - this._groupNames.size > 0) { - this._nFlag = true; - this.rewind(start); - this.consumePattern(); + _parseFlagsOptionToMode(uFlagOrFlags, sourceEnd) { + let unicode = false; + let unicodeSets = false; + if (uFlagOrFlags && this.ecmaVersion >= 2015) { + if (typeof uFlagOrFlags === "object") { + unicode = Boolean(uFlagOrFlags.unicode); + if (this.ecmaVersion >= 2024) { + unicodeSets = Boolean(uFlagOrFlags.unicodeSets); + } + } + else { + unicode = uFlagOrFlags; + } + } + if (unicode && unicodeSets) { + this.raise("Invalid regular expression flags", { + index: sourceEnd + 1, + unicode, + unicodeSets, + }); } + const unicodeMode = unicode || unicodeSets; + const nFlag = (unicode && this.ecmaVersion >= 2018) || + unicodeSets || + Boolean(this._options.strict && this.ecmaVersion >= 2023); + const unicodeSetsMode = unicodeSets; + return { unicodeMode, nFlag, unicodeSetsMode }; } get strict() { - return Boolean(this._options.strict || this._uFlag); + return Boolean(this._options.strict) || this._unicodeMode; } get ecmaVersion() { - return this._options.ecmaVersion || 2020; + var _a; + return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; } onLiteralEnter(start) { if (this._options.onLiteralEnter) { @@ -474,9 +648,12 @@ class RegExpValidator { this._options.onLiteralLeave(start, end); } } - onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll) { + onRegExpFlags(start, end, flags) { + if (this._options.onRegExpFlags) { + this._options.onRegExpFlags(start, end, flags); + } if (this._options.onFlags) { - this._options.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll); + this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices); } } onPatternEnter(start) { @@ -564,9 +741,9 @@ class RegExpValidator { this._options.onEscapeCharacterSet(start, end, kind, negate); } } - onUnicodePropertyCharacterSet(start, end, kind, key, value, negate) { + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { if (this._options.onUnicodePropertyCharacterSet) { - this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate); + this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings); } } onCharacter(start, end, value) { @@ -579,9 +756,9 @@ class RegExpValidator { this._options.onBackreference(start, end, ref); } } - onCharacterClassEnter(start, negate) { + onCharacterClassEnter(start, negate, unicodeSets) { if (this._options.onCharacterClassEnter) { - this._options.onCharacterClassEnter(start, negate); + this._options.onCharacterClassEnter(start, negate, unicodeSets); } } onCharacterClassLeave(start, end, negate) { @@ -594,8 +771,35 @@ class RegExpValidator { this._options.onCharacterClassRange(start, end, min, max); } } - get source() { - return this._reader.source; + onClassIntersection(start, end) { + if (this._options.onClassIntersection) { + this._options.onClassIntersection(start, end); + } + } + onClassSubtraction(start, end) { + if (this._options.onClassSubtraction) { + this._options.onClassSubtraction(start, end); + } + } + onClassStringDisjunctionEnter(start) { + if (this._options.onClassStringDisjunctionEnter) { + this._options.onClassStringDisjunctionEnter(start); + } + } + onClassStringDisjunctionLeave(start, end) { + if (this._options.onClassStringDisjunctionLeave) { + this._options.onClassStringDisjunctionLeave(start, end); + } + } + onStringAlternativeEnter(start, index) { + if (this._options.onStringAlternativeEnter) { + this._options.onStringAlternativeEnter(start, index); + } + } + onStringAlternativeLeave(start, end, index) { + if (this._options.onStringAlternativeLeave) { + this._options.onStringAlternativeLeave(start, end, index); + } } get index() { return this._reader.index; @@ -613,7 +817,7 @@ class RegExpValidator { return this._reader.nextCodePoint3; } reset(source, start, end) { - this._reader.reset(source, start, end, this._uFlag); + this._reader.reset(source, start, end, this._unicodeMode); } rewind(index) { this._reader.rewind(index); @@ -630,8 +834,12 @@ class RegExpValidator { eat3(cp1, cp2, cp3) { return this._reader.eat3(cp1, cp2, cp3); } - raise(message) { - throw new RegExpSyntaxError(this.source, this._uFlag, this.index, message); + raise(message, context) { + var _a, _b, _c; + throw newRegExpSyntaxError(this._srcCtx, { + unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode), + unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode, + }, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message); } eatRegExpBody() { const start = this.index; @@ -646,17 +854,17 @@ class RegExpValidator { if (escaped) { escaped = false; } - else if (cp === ReverseSolidus) { + else if (cp === REVERSE_SOLIDUS) { escaped = true; } - else if (cp === LeftSquareBracket) { + else if (cp === LEFT_SQUARE_BRACKET) { inClass = true; } - else if (cp === RightSquareBracket) { + else if (cp === RIGHT_SQUARE_BRACKET) { inClass = false; } - else if ((cp === Solidus && !inClass) || - (cp === Asterisk && this.index === start)) { + else if ((cp === SOLIDUS && !inClass) || + (cp === ASTERISK && this.index === start)) { break; } this.advance(); @@ -672,13 +880,13 @@ class RegExpValidator { this.consumeDisjunction(); const cp = this.currentCodePoint; if (this.currentCodePoint !== -1) { - if (cp === RightParenthesis) { + if (cp === RIGHT_PARENTHESIS) { this.raise("Unmatched ')'"); } - if (cp === ReverseSolidus) { + if (cp === REVERSE_SOLIDUS) { this.raise("\\ at end of pattern"); } - if (cp === RightSquareBracket || cp === RightCurlyBracket) { + if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) { this.raise("Lone quantifier brackets"); } const c = String.fromCodePoint(cp); @@ -701,21 +909,21 @@ class RegExpValidator { if (escaped) { escaped = false; } - else if (cp === ReverseSolidus) { + else if (cp === REVERSE_SOLIDUS) { escaped = true; } - else if (cp === LeftSquareBracket) { + else if (cp === LEFT_SQUARE_BRACKET) { inClass = true; } - else if (cp === RightSquareBracket) { + else if (cp === RIGHT_SQUARE_BRACKET) { inClass = false; } - else if (cp === LeftParenthesis && + else if (cp === LEFT_PARENTHESIS && !inClass && - (this.nextCodePoint !== QuestionMark || - (this.nextCodePoint2 === LessThanSign && - this.nextCodePoint3 !== EqualsSign && - this.nextCodePoint3 !== ExclamationMark))) { + (this.nextCodePoint !== QUESTION_MARK || + (this.nextCodePoint2 === LESS_THAN_SIGN && + this.nextCodePoint3 !== EQUALS_SIGN && + this.nextCodePoint3 !== EXCLAMATION_MARK))) { count += 1; } this.advance(); @@ -729,11 +937,11 @@ class RegExpValidator { this.onDisjunctionEnter(start); do { this.consumeAlternative(i++); - } while (this.eat(VerticalLine)); + } while (this.eat(VERTICAL_LINE)); if (this.consumeQuantifier(true)) { this.raise("Nothing to repeat"); } - if (this.eat(LeftCurlyBracket)) { + if (this.eat(LEFT_CURLY_BRACKET)) { this.raise("Lone quantifier brackets"); } this.onDisjunctionLeave(start, this.index); @@ -746,7 +954,7 @@ class RegExpValidator { this.onAlternativeLeave(start, this.index, i); } consumeTerm() { - if (this._uFlag || this.strict) { + if (this._unicodeMode || this.strict) { return (this.consumeAssertion() || (this.consumeAtom() && this.consumeOptionalQuantifier())); } @@ -762,30 +970,31 @@ class RegExpValidator { consumeAssertion() { const start = this.index; this._lastAssertionIsQuantifiable = false; - if (this.eat(CircumflexAccent)) { + if (this.eat(CIRCUMFLEX_ACCENT)) { this.onEdgeAssertion(start, this.index, "start"); return true; } - if (this.eat(DollarSign)) { + if (this.eat(DOLLAR_SIGN)) { this.onEdgeAssertion(start, this.index, "end"); return true; } - if (this.eat2(ReverseSolidus, LatinCapitalLetterB)) { + if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) { this.onWordBoundaryAssertion(start, this.index, "word", true); return true; } - if (this.eat2(ReverseSolidus, LatinSmallLetterB)) { + if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) { this.onWordBoundaryAssertion(start, this.index, "word", false); return true; } - if (this.eat2(LeftParenthesis, QuestionMark)) { - const lookbehind = this.ecmaVersion >= 2018 && this.eat(LessThanSign); + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { + const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN); let negate = false; - if (this.eat(EqualsSign) || (negate = this.eat(ExclamationMark))) { + if (this.eat(EQUALS_SIGN) || + (negate = this.eat(EXCLAMATION_MARK))) { const kind = lookbehind ? "lookbehind" : "lookahead"; this.onLookaroundAssertionEnter(start, kind, negate); this.consumeDisjunction(); - if (!this.eat(RightParenthesis)) { + if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group"); } this._lastAssertionIsQuantifiable = !lookbehind && !this.strict; @@ -801,26 +1010,25 @@ class RegExpValidator { let min = 0; let max = 0; let greedy = false; - if (this.eat(Asterisk)) { + if (this.eat(ASTERISK)) { min = 0; max = Number.POSITIVE_INFINITY; } - else if (this.eat(PlusSign)) { + else if (this.eat(PLUS_SIGN)) { min = 1; max = Number.POSITIVE_INFINITY; } - else if (this.eat(QuestionMark)) { + else if (this.eat(QUESTION_MARK)) { min = 0; max = 1; } else if (this.eatBracedQuantifier(noConsume)) { - min = this._lastMinValue; - max = this._lastMaxValue; + ({ min, max } = this._lastRange); } else { return false; } - greedy = !this.eat(QuestionMark); + greedy = !this.eat(QUESTION_MARK); if (!noConsume) { this.onQuantifier(start, this.index, min, max, greedy); } @@ -828,24 +1036,24 @@ class RegExpValidator { } eatBracedQuantifier(noError) { const start = this.index; - if (this.eat(LeftCurlyBracket)) { - this._lastMinValue = 0; - this._lastMaxValue = Number.POSITIVE_INFINITY; + if (this.eat(LEFT_CURLY_BRACKET)) { if (this.eatDecimalDigits()) { - this._lastMinValue = this._lastMaxValue = this._lastIntValue; - if (this.eat(Comma)) { - this._lastMaxValue = this.eatDecimalDigits() + const min = this._lastIntValue; + let max = min; + if (this.eat(COMMA)) { + max = this.eatDecimalDigits() ? this._lastIntValue : Number.POSITIVE_INFINITY; } - if (this.eat(RightCurlyBracket)) { - if (!noError && this._lastMaxValue < this._lastMinValue) { + if (this.eat(RIGHT_CURLY_BRACKET)) { + if (!noError && max < min) { this.raise("numbers out of order in {} quantifier"); } + this._lastRange = { min, max }; return true; } } - if (!noError && (this._uFlag || this.strict)) { + if (!noError && (this._unicodeMode || this.strict)) { this.raise("Incomplete quantifier"); } this.rewind(start); @@ -856,12 +1064,12 @@ class RegExpValidator { return (this.consumePatternCharacter() || this.consumeDot() || this.consumeReverseSolidusAtomEscape() || - this.consumeCharacterClass() || + Boolean(this.consumeCharacterClass()) || this.consumeUncapturingGroup() || this.consumeCapturingGroup()); } consumeDot() { - if (this.eat(FullStop)) { + if (this.eat(FULL_STOP)) { this.onAnyCharacterSet(this.index - 1, this.index, "any"); return true; } @@ -869,7 +1077,7 @@ class RegExpValidator { } consumeReverseSolidusAtomEscape() { const start = this.index; - if (this.eat(ReverseSolidus)) { + if (this.eat(REVERSE_SOLIDUS)) { if (this.consumeAtomEscape()) { return true; } @@ -879,10 +1087,10 @@ class RegExpValidator { } consumeUncapturingGroup() { const start = this.index; - if (this.eat3(LeftParenthesis, QuestionMark, Colon)) { + if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) { this.onGroupEnter(start); this.consumeDisjunction(); - if (!this.eat(RightParenthesis)) { + if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group"); } this.onGroupLeave(start, this.index); @@ -892,19 +1100,19 @@ class RegExpValidator { } consumeCapturingGroup() { const start = this.index; - if (this.eat(LeftParenthesis)) { + if (this.eat(LEFT_PARENTHESIS)) { let name = null; if (this.ecmaVersion >= 2018) { if (this.consumeGroupSpecifier()) { name = this._lastStrValue; } } - else if (this.currentCodePoint === QuestionMark) { + else if (this.currentCodePoint === QUESTION_MARK) { this.raise("Invalid group"); } this.onCapturingGroupEnter(start, name); this.consumeDisjunction(); - if (!this.eat(RightParenthesis)) { + if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group"); } this.onCapturingGroupLeave(start, this.index, name); @@ -916,7 +1124,7 @@ class RegExpValidator { return (this.consumeDot() || this.consumeReverseSolidusAtomEscape() || this.consumeReverseSolidusFollowedByC() || - this.consumeCharacterClass() || + Boolean(this.consumeCharacterClass()) || this.consumeUncapturingGroup() || this.consumeCapturingGroup() || this.consumeInvalidBracedQuantifier() || @@ -924,11 +1132,11 @@ class RegExpValidator { } consumeReverseSolidusFollowedByC() { const start = this.index; - if (this.currentCodePoint === ReverseSolidus && - this.nextCodePoint === LatinSmallLetterC) { + if (this.currentCodePoint === REVERSE_SOLIDUS && + this.nextCodePoint === LATIN_SMALL_LETTER_C) { this._lastIntValue = this.currentCodePoint; this.advance(); - this.onCharacter(start, this.index, ReverseSolidus); + this.onCharacter(start, this.index, REVERSE_SOLIDUS); return true; } return false; @@ -953,17 +1161,17 @@ class RegExpValidator { const start = this.index; const cp = this.currentCodePoint; if (cp !== -1 && - cp !== CircumflexAccent && - cp !== DollarSign && - cp !== ReverseSolidus && - cp !== FullStop && - cp !== Asterisk && - cp !== PlusSign && - cp !== QuestionMark && - cp !== LeftParenthesis && - cp !== RightParenthesis && - cp !== LeftSquareBracket && - cp !== VerticalLine) { + cp !== CIRCUMFLEX_ACCENT && + cp !== DOLLAR_SIGN && + cp !== REVERSE_SOLIDUS && + cp !== FULL_STOP && + cp !== ASTERISK && + cp !== PLUS_SIGN && + cp !== QUESTION_MARK && + cp !== LEFT_PARENTHESIS && + cp !== RIGHT_PARENTHESIS && + cp !== LEFT_SQUARE_BRACKET && + cp !== VERTICAL_LINE) { this.advance(); this.onCharacter(start, this.index, cp); return true; @@ -971,7 +1179,7 @@ class RegExpValidator { return false; } consumeGroupSpecifier() { - if (this.eat(QuestionMark)) { + if (this.eat(QUESTION_MARK)) { if (this.eatGroupName()) { if (!this._groupNames.has(this._lastStrValue)) { this._groupNames.add(this._lastStrValue); @@ -990,7 +1198,7 @@ class RegExpValidator { (this._nFlag && this.consumeKGroupName())) { return true; } - if (this.strict || this._uFlag) { + if (this.strict || this._unicodeMode) { this.raise("Invalid escape"); } return false; @@ -1003,7 +1211,7 @@ class RegExpValidator { this.onBackreference(start - 1, this.index, n); return true; } - if (this.strict || this._uFlag) { + if (this.strict || this._unicodeMode) { this.raise("Invalid escape"); } this.rewind(start); @@ -1011,52 +1219,57 @@ class RegExpValidator { return false; } consumeCharacterClassEscape() { + var _a; const start = this.index; - if (this.eat(LatinSmallLetterD)) { + if (this.eat(LATIN_SMALL_LETTER_D)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "digit", false); - return true; + return {}; } - if (this.eat(LatinCapitalLetterD)) { + if (this.eat(LATIN_CAPITAL_LETTER_D)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "digit", true); - return true; + return {}; } - if (this.eat(LatinSmallLetterS)) { + if (this.eat(LATIN_SMALL_LETTER_S)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "space", false); - return true; + return {}; } - if (this.eat(LatinCapitalLetterS)) { + if (this.eat(LATIN_CAPITAL_LETTER_S)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "space", true); - return true; + return {}; } - if (this.eat(LatinSmallLetterW)) { + if (this.eat(LATIN_SMALL_LETTER_W)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "word", false); - return true; + return {}; } - if (this.eat(LatinCapitalLetterW)) { + if (this.eat(LATIN_CAPITAL_LETTER_W)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "word", true); - return true; + return {}; } let negate = false; - if (this._uFlag && + if (this._unicodeMode && this.ecmaVersion >= 2018 && - (this.eat(LatinSmallLetterP) || - (negate = this.eat(LatinCapitalLetterP)))) { + (this.eat(LATIN_SMALL_LETTER_P) || + (negate = this.eat(LATIN_CAPITAL_LETTER_P)))) { this._lastIntValue = -1; - if (this.eat(LeftCurlyBracket) && - this.eatUnicodePropertyValueExpression() && - this.eat(RightCurlyBracket)) { - this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", this._lastKeyValue, this._lastValValue || null, negate); - return true; + let result = null; + if (this.eat(LEFT_CURLY_BRACKET) && + (result = this.eatUnicodePropertyValueExpression()) && + this.eat(RIGHT_CURLY_BRACKET)) { + if (negate && result.strings) { + this.raise("Invalid property name"); + } + this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", result.key, result.value, negate, (_a = result.strings) !== null && _a !== void 0 ? _a : false); + return { mayContainStrings: result.strings }; } this.raise("Invalid property name"); } - return false; + return null; } consumeCharacterEscape() { const start = this.index; @@ -1066,7 +1279,7 @@ class RegExpValidator { this.eatHexEscapeSequence() || this.eatRegExpUnicodeEscapeSequence() || (!this.strict && - !this._uFlag && + !this._unicodeMode && this.eatLegacyOctalEscapeSequence()) || this.eatIdentityEscape()) { this.onCharacter(start - 1, this.index, this._lastIntValue); @@ -1076,7 +1289,7 @@ class RegExpValidator { } consumeKGroupName() { const start = this.index; - if (this.eat(LatinSmallLetterK)) { + if (this.eat(LATIN_SMALL_LETTER_K)) { if (this.eatGroupName()) { const groupName = this._lastStrValue; this._backreferenceNames.add(groupName); @@ -1089,30 +1302,43 @@ class RegExpValidator { } consumeCharacterClass() { const start = this.index; - if (this.eat(LeftSquareBracket)) { - const negate = this.eat(CircumflexAccent); - this.onCharacterClassEnter(start, negate); - this.consumeClassRanges(); - if (!this.eat(RightSquareBracket)) { - this.raise("Unterminated character class"); + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, this._unicodeSetsMode); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + if (this.currentCodePoint === -1) { + this.raise("Unterminated character class"); + } + this.raise("Invalid character in character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); } this.onCharacterClassLeave(start, this.index, negate); - return true; + return result; } - return false; + return null; } - consumeClassRanges() { - const strict = this.strict || this._uFlag; + consumeClassContents() { + if (this._unicodeSetsMode) { + if (this.currentCodePoint === RIGHT_SQUARE_BRACKET) { + return {}; + } + const result = this.consumeClassSetExpression(); + return result; + } + const strict = this.strict || this._unicodeMode; for (;;) { const rangeStart = this.index; if (!this.consumeClassAtom()) { break; } const min = this._lastIntValue; - if (!this.eat(HyphenMinus)) { + if (!this.eat(HYPHEN_MINUS)) { continue; } - this.onCharacter(this.index - 1, this.index, HyphenMinus); + this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS); if (!this.consumeClassAtom()) { break; } @@ -1128,26 +1354,30 @@ class RegExpValidator { } this.onCharacterClassRange(rangeStart, this.index, min, max); } + return {}; } consumeClassAtom() { const start = this.index; const cp = this.currentCodePoint; - if (cp !== -1 && cp !== ReverseSolidus && cp !== RightSquareBracket) { + if (cp !== -1 && + cp !== REVERSE_SOLIDUS && + cp !== RIGHT_SQUARE_BRACKET) { this.advance(); this._lastIntValue = cp; this.onCharacter(start, this.index, this._lastIntValue); return true; } - if (this.eat(ReverseSolidus)) { + if (this.eat(REVERSE_SOLIDUS)) { if (this.consumeClassEscape()) { return true; } - if (!this.strict && this.currentCodePoint === LatinSmallLetterC) { - this._lastIntValue = ReverseSolidus; + if (!this.strict && + this.currentCodePoint === LATIN_SMALL_LETTER_C) { + this._lastIntValue = REVERSE_SOLIDUS; this.onCharacter(start, this.index, this._lastIntValue); return true; } - if (this.strict || this._uFlag) { + if (this.strict || this._unicodeMode) { this.raise("Invalid escape"); } this.rewind(start); @@ -1156,32 +1386,221 @@ class RegExpValidator { } consumeClassEscape() { const start = this.index; - if (this.eat(LatinSmallLetterB)) { - this._lastIntValue = Backspace; + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; this.onCharacter(start - 1, this.index, this._lastIntValue); return true; } - if (this._uFlag && this.eat(HyphenMinus)) { - this._lastIntValue = HyphenMinus; + if (this._unicodeMode && this.eat(HYPHEN_MINUS)) { + this._lastIntValue = HYPHEN_MINUS; this.onCharacter(start - 1, this.index, this._lastIntValue); return true; } let cp = 0; if (!this.strict && - !this._uFlag && - this.currentCodePoint === LatinSmallLetterC && - (isDecimalDigit((cp = this.nextCodePoint)) || cp === LowLine)) { + !this._unicodeMode && + this.currentCodePoint === LATIN_SMALL_LETTER_C && + (isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) { this.advance(); this.advance(); this._lastIntValue = cp % 0x20; this.onCharacter(start - 1, this.index, this._lastIntValue); return true; } - return (this.consumeCharacterClassEscape() || this.consumeCharacterEscape()); + return (Boolean(this.consumeCharacterClassEscape()) || + this.consumeCharacterEscape()); + } + consumeClassSetExpression() { + const start = this.index; + let mayContainStrings = false; + let result = null; + if (this.consumeClassSetCharacter()) { + if (this.consumeClassSetRangeFromOperator(start)) { + this.consumeClassUnionRight({}); + return {}; + } + mayContainStrings = false; + } + else if ((result = this.consumeClassSetOperand())) { + mayContainStrings = result.mayContainStrings; + } + else { + const cp = this.currentCodePoint; + if (cp === REVERSE_SOLIDUS) { + this.advance(); + this.raise("Invalid escape"); + } + if (cp === this.nextCodePoint && + isClassSetReservedDoublePunctuatorCharacter(cp)) { + this.raise("Invalid set operation in character class"); + } + this.raise("Invalid character in character class"); + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + while (this.currentCodePoint !== AMPERSAND && + (result = this.consumeClassSetOperand())) { + this.onClassIntersection(start, this.index); + if (!result.mayContainStrings) { + mayContainStrings = false; + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + while (this.consumeClassSetOperand()) { + this.onClassSubtraction(start, this.index); + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + return this.consumeClassUnionRight({ mayContainStrings }); + } + consumeClassUnionRight(leftResult) { + let mayContainStrings = leftResult.mayContainStrings; + for (;;) { + const start = this.index; + if (this.consumeClassSetCharacter()) { + this.consumeClassSetRangeFromOperator(start); + continue; + } + const result = this.consumeClassSetOperand(); + if (result) { + if (result.mayContainStrings) { + mayContainStrings = true; + } + continue; + } + break; + } + return { mayContainStrings }; + } + consumeClassSetRangeFromOperator(start) { + const currentStart = this.index; + const min = this._lastIntValue; + if (this.eat(HYPHEN_MINUS)) { + if (this.consumeClassSetCharacter()) { + const max = this._lastIntValue; + if (min === -1 || max === -1) { + this.raise("Invalid character class"); + } + if (min > max) { + this.raise("Range out of order in character class"); + } + this.onCharacterClassRange(start, this.index, min, max); + return true; + } + this.rewind(currentStart); + } + return false; + } + consumeClassSetOperand() { + let result = null; + if ((result = this.consumeNestedClass())) { + return result; + } + if ((result = this.consumeClassStringDisjunction())) { + return result; + } + if (this.consumeClassSetCharacter()) { + return {}; + } + return null; + } + consumeNestedClass() { + const start = this.index; + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, true); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + this.raise("Unterminated character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); + } + this.onCharacterClassLeave(start, this.index, negate); + return result; + } + if (this.eat(REVERSE_SOLIDUS)) { + const result = this.consumeCharacterClassEscape(); + if (result) { + return result; + } + this.rewind(start); + } + return null; + } + consumeClassStringDisjunction() { + const start = this.index; + if (this.eat3(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_Q, LEFT_CURLY_BRACKET)) { + this.onClassStringDisjunctionEnter(start); + let i = 0; + let mayContainStrings = false; + do { + if (this.consumeClassString(i++).mayContainStrings) { + mayContainStrings = true; + } + } while (this.eat(VERTICAL_LINE)); + if (this.eat(RIGHT_CURLY_BRACKET)) { + this.onClassStringDisjunctionLeave(start, this.index); + return { mayContainStrings }; + } + this.raise("Unterminated class string disjunction"); + } + return null; + } + consumeClassString(i) { + const start = this.index; + let count = 0; + this.onStringAlternativeEnter(start, i); + while (this.currentCodePoint !== -1 && + this.consumeClassSetCharacter()) { + count++; + } + this.onStringAlternativeLeave(start, this.index, i); + return { mayContainStrings: count !== 1 }; + } + consumeClassSetCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== this.nextCodePoint || + !isClassSetReservedDoublePunctuatorCharacter(cp)) { + if (cp !== -1 && !isClassSetSyntaxCharacter(cp)) { + this._lastIntValue = cp; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + } + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeCharacterEscape()) { + return true; + } + if (isClassSetReservedPunctuator(this.currentCodePoint)) { + this._lastIntValue = this.currentCodePoint; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + this.rewind(start); + } + return false; } eatGroupName() { - if (this.eat(LessThanSign)) { - if (this.eatRegExpIdentifierName() && this.eat(GreaterThanSign)) { + if (this.eat(LESS_THAN_SIGN)) { + if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) { return true; } this.raise("Invalid capture group name"); @@ -1200,10 +1619,10 @@ class RegExpValidator { } eatRegExpIdentifierStart() { const start = this.index; - const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; let cp = this.currentCodePoint; this.advance(); - if (cp === ReverseSolidus && + if (cp === REVERSE_SOLIDUS && this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { cp = this._lastIntValue; } @@ -1213,7 +1632,7 @@ class RegExpValidator { cp = combineSurrogatePair(cp, this.currentCodePoint); this.advance(); } - if (isRegExpIdentifierStart(cp)) { + if (isIdentifierStartChar(cp)) { this._lastIntValue = cp; return true; } @@ -1224,10 +1643,10 @@ class RegExpValidator { } eatRegExpIdentifierPart() { const start = this.index; - const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; let cp = this.currentCodePoint; this.advance(); - if (cp === ReverseSolidus && + if (cp === REVERSE_SOLIDUS && this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { cp = this._lastIntValue; } @@ -1237,7 +1656,7 @@ class RegExpValidator { cp = combineSurrogatePair(cp, this.currentCodePoint); this.advance(); } - if (isRegExpIdentifierPart(cp)) { + if (isIdentifierPartChar(cp)) { this._lastIntValue = cp; return true; } @@ -1248,7 +1667,7 @@ class RegExpValidator { } eatCControlLetter() { const start = this.index; - if (this.eat(LatinSmallLetterC)) { + if (this.eat(LATIN_SMALL_LETTER_C)) { if (this.eatControlLetter()) { return true; } @@ -1257,7 +1676,7 @@ class RegExpValidator { return false; } eatZero() { - if (this.currentCodePoint === DigitZero && + if (this.currentCodePoint === DIGIT_ZERO && !isDecimalDigit(this.nextCodePoint)) { this._lastIntValue = 0; this.advance(); @@ -1266,24 +1685,24 @@ class RegExpValidator { return false; } eatControlEscape() { - if (this.eat(LatinSmallLetterF)) { - this._lastIntValue = FormFeed; + if (this.eat(LATIN_SMALL_LETTER_F)) { + this._lastIntValue = FORM_FEED; return true; } - if (this.eat(LatinSmallLetterN)) { - this._lastIntValue = LineFeed; + if (this.eat(LATIN_SMALL_LETTER_N)) { + this._lastIntValue = LINE_FEED; return true; } - if (this.eat(LatinSmallLetterR)) { - this._lastIntValue = CarriageReturn; + if (this.eat(LATIN_SMALL_LETTER_R)) { + this._lastIntValue = CARRIAGE_RETURN; return true; } - if (this.eat(LatinSmallLetterT)) { - this._lastIntValue = CharacterTabulation; + if (this.eat(LATIN_SMALL_LETTER_T)) { + this._lastIntValue = CHARACTER_TABULATION; return true; } - if (this.eat(LatinSmallLetterV)) { - this._lastIntValue = LineTabulation; + if (this.eat(LATIN_SMALL_LETTER_V)) { + this._lastIntValue = LINE_TABULATION; return true; } return false; @@ -1299,8 +1718,8 @@ class RegExpValidator { } eatRegExpUnicodeEscapeSequence(forceUFlag = false) { const start = this.index; - const uFlag = forceUFlag || this._uFlag; - if (this.eat(LatinSmallLetterU)) { + const uFlag = forceUFlag || this._unicodeMode; + if (this.eat(LATIN_SMALL_LETTER_U)) { if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) || this.eatFixedHexDigits(4) || (uFlag && this.eatRegExpUnicodeCodePointEscape())) { @@ -1318,8 +1737,8 @@ class RegExpValidator { if (this.eatFixedHexDigits(4)) { const lead = this._lastIntValue; if (isLeadSurrogate(lead) && - this.eat(ReverseSolidus) && - this.eat(LatinSmallLetterU) && + this.eat(REVERSE_SOLIDUS) && + this.eat(LATIN_SMALL_LETTER_U) && this.eatFixedHexDigits(4)) { const trail = this._lastIntValue; if (isTrailSurrogate(trail)) { @@ -1333,9 +1752,9 @@ class RegExpValidator { } eatRegExpUnicodeCodePointEscape() { const start = this.index; - if (this.eat(LeftCurlyBracket) && + if (this.eat(LEFT_CURLY_BRACKET) && this.eatHexDigits() && - this.eat(RightCurlyBracket) && + this.eat(RIGHT_CURLY_BRACKET) && isValidUnicode(this._lastIntValue)) { return true; } @@ -1355,38 +1774,41 @@ class RegExpValidator { if (cp === -1) { return false; } - if (this._uFlag) { - return isSyntaxCharacter(cp) || cp === Solidus; + if (this._unicodeMode) { + return isSyntaxCharacter(cp) || cp === SOLIDUS; } if (this.strict) { return !isIdContinue(cp); } if (this._nFlag) { - return !(cp === LatinSmallLetterC || cp === LatinSmallLetterK); + return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K); } - return cp !== LatinSmallLetterC; + return cp !== LATIN_SMALL_LETTER_C; } eatDecimalEscape() { this._lastIntValue = 0; let cp = this.currentCodePoint; - if (cp >= DigitOne && cp <= DigitNine) { + if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) { do { - this._lastIntValue = 10 * this._lastIntValue + (cp - DigitZero); + this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO); this.advance(); - } while ((cp = this.currentCodePoint) >= DigitZero && - cp <= DigitNine); + } while ((cp = this.currentCodePoint) >= DIGIT_ZERO && + cp <= DIGIT_NINE); return true; } return false; } eatUnicodePropertyValueExpression() { const start = this.index; - if (this.eatUnicodePropertyName() && this.eat(EqualsSign)) { - this._lastKeyValue = this._lastStrValue; + if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) { + const key = this._lastStrValue; if (this.eatUnicodePropertyValue()) { - this._lastValValue = this._lastStrValue; - if (isValidUnicodeProperty(this.ecmaVersion, this._lastKeyValue, this._lastValValue)) { - return true; + const value = this._lastStrValue; + if (isValidUnicodeProperty(this.ecmaVersion, key, value)) { + return { + key, + value: value || null, + }; } this.raise("Invalid property name"); } @@ -1395,18 +1817,28 @@ class RegExpValidator { if (this.eatLoneUnicodePropertyNameOrValue()) { const nameOrValue = this._lastStrValue; if (isValidUnicodeProperty(this.ecmaVersion, "General_Category", nameOrValue)) { - this._lastKeyValue = "General_Category"; - this._lastValValue = nameOrValue; - return true; + return { + key: "General_Category", + value: nameOrValue || null, + }; } if (isValidLoneUnicodeProperty(this.ecmaVersion, nameOrValue)) { - this._lastKeyValue = nameOrValue; - this._lastValValue = ""; - return true; + return { + key: nameOrValue, + value: null, + }; + } + if (this._unicodeSetsMode && + isValidLoneUnicodePropertyOfString(this.ecmaVersion, nameOrValue)) { + return { + key: nameOrValue, + value: null, + strings: true, + }; } this.raise("Invalid property name"); } - return false; + return null; } eatUnicodePropertyName() { this._lastStrValue = ""; @@ -1429,11 +1861,11 @@ class RegExpValidator { } eatHexEscapeSequence() { const start = this.index; - if (this.eat(LatinSmallLetterX)) { + if (this.eat(LATIN_SMALL_LETTER_X)) { if (this.eatFixedHexDigits(2)) { return true; } - if (this._uFlag || this.strict) { + if (this._unicodeMode || this.strict) { this.raise("Invalid escape"); } this.rewind(start); @@ -1483,7 +1915,7 @@ class RegExpValidator { const cp = this.currentCodePoint; if (isOctalDigit(cp)) { this.advance(); - this._lastIntValue = cp - DigitZero; + this._lastIntValue = cp - DIGIT_ZERO; return true; } this._lastIntValue = 0; @@ -1505,18 +1937,27 @@ class RegExpValidator { } } -const DummyPattern = {}; -const DummyFlags = {}; -const DummyCapturingGroup = {}; +const DUMMY_PATTERN = {}; +const DUMMY_FLAGS = {}; +const DUMMY_CAPTURING_GROUP = {}; +function isClassSetOperand(node) { + return (node.type === "Character" || + node.type === "CharacterSet" || + node.type === "CharacterClass" || + node.type === "ExpressionCharacterClass" || + node.type === "ClassStringDisjunction"); +} class RegExpParserState { constructor(options) { - this._node = DummyPattern; - this._flags = DummyFlags; + var _a; + this._node = DUMMY_PATTERN; + this._expressionBufferMap = new Map(); + this._flags = DUMMY_FLAGS; this._backreferences = []; this._capturingGroups = []; this.source = ""; - this.strict = Boolean(options && options.strict); - this.ecmaVersion = (options && options.ecmaVersion) || 2020; + this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict); + this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; } get pattern() { if (this._node.type !== "Pattern") { @@ -1530,7 +1971,7 @@ class RegExpParserState { } return this._flags; } - onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll) { + onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, unicodeSets, }) { this._flags = { type: "Flags", parent: null, @@ -1543,6 +1984,8 @@ class RegExpParserState { unicode, sticky, dotAll, + hasIndices, + unicodeSets, }; } onPatternEnter(start) { @@ -1564,7 +2007,7 @@ class RegExpParserState { const ref = reference.ref; const group = typeof ref === "number" ? this._capturingGroups[ref - 1] - : this._capturingGroups.find(g => g.name === ref); + : this._capturingGroups.find((g) => g.name === ref); reference.resolved = group; group.references.push(reference); } @@ -1757,26 +2200,36 @@ class RegExpParserState { negate, }); } - onUnicodePropertyCharacterSet(start, end, kind, key, value, negate) { + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { const parent = this._node; if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { throw new Error("UnknownError"); } - parent.elements.push({ + const base = { type: "CharacterSet", - parent, start, end, raw: this.source.slice(start, end), kind, key, - value, - negate, - }); + }; + if (strings) { + if ((parent.type === "CharacterClass" && !parent.unicodeSets) || + negate || + value !== null) { + throw new Error("UnknownError"); + } + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } + else { + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } } onCharacter(start, end, value) { const parent = this._node; - if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { + if (parent.type !== "Alternative" && + parent.type !== "CharacterClass" && + parent.type !== "StringAlternative") { throw new Error("UnknownError"); } parent.elements.push({ @@ -1800,36 +2253,73 @@ class RegExpParserState { end, raw: this.source.slice(start, end), ref, - resolved: DummyCapturingGroup, + resolved: DUMMY_CAPTURING_GROUP, }; parent.elements.push(node); this._backreferences.push(node); } - onCharacterClassEnter(start, negate) { + onCharacterClassEnter(start, negate, unicodeSets) { const parent = this._node; - if (parent.type !== "Alternative") { - throw new Error("UnknownError"); - } - this._node = { + const base = { type: "CharacterClass", parent, start, end: start, raw: "", + unicodeSets, negate, elements: [], }; - parent.elements.push(this._node); + if (parent.type === "Alternative") { + const node = Object.assign(Object.assign({}, base), { parent }); + this._node = node; + parent.elements.push(node); + } + else if (parent.type === "CharacterClass" && + parent.unicodeSets && + unicodeSets) { + const node = Object.assign(Object.assign({}, base), { parent, + unicodeSets }); + this._node = node; + parent.elements.push(node); + } + else { + throw new Error("UnknownError"); + } } onCharacterClassLeave(start, end) { const node = this._node; if (node.type !== "CharacterClass" || - node.parent.type !== "Alternative") { + (node.parent.type !== "Alternative" && + node.parent.type !== "CharacterClass")) { throw new Error("UnknownError"); } + const parent = node.parent; node.end = end; node.raw = this.source.slice(start, end); - this._node = node.parent; + this._node = parent; + const expression = this._expressionBufferMap.get(node); + if (!expression) { + return; + } + if (node.elements.length > 0) { + throw new Error("UnknownError"); + } + this._expressionBufferMap.delete(node); + const newNode = { + type: "ExpressionCharacterClass", + parent, + start: node.start, + end: node.end, + raw: node.raw, + negate: node.negate, + expression, + }; + expression.parent = newNode; + if (node !== parent.elements.pop()) { + throw new Error("UnknownError"); + } + parent.elements.push(newNode); } onCharacterClassRange(start, end) { const parent = this._node; @@ -1838,15 +2328,19 @@ class RegExpParserState { } const elements = parent.elements; const max = elements.pop(); - const hyphen = elements.pop(); + if (!max || max.type !== "Character") { + throw new Error("UnknownError"); + } + if (!parent.unicodeSets) { + const hyphen = elements.pop(); + if (!hyphen || + hyphen.type !== "Character" || + hyphen.value !== HYPHEN_MINUS) { + throw new Error("UnknownError"); + } + } const min = elements.pop(); - if (!min || - !max || - !hyphen || - min.type !== "Character" || - max.type !== "Character" || - hyphen.type !== "Character" || - hyphen.value !== HyphenMinus) { + if (!min || min.type !== "Character") { throw new Error("UnknownError"); } const node = { @@ -1862,6 +2356,111 @@ class RegExpParserState { max.parent = node; elements.push(node); } + onClassIntersection(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassSubtraction" || + (left.type !== "ClassIntersection" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassIntersection", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassSubtraction(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassIntersection" || + (left.type !== "ClassSubtraction" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassSubtraction", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassStringDisjunctionEnter(start) { + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + this._node = { + type: "ClassStringDisjunction", + parent, + start, + end: start, + raw: "", + alternatives: [], + }; + parent.elements.push(this._node); + } + onClassStringDisjunctionLeave(start, end) { + const node = this._node; + if (node.type !== "ClassStringDisjunction" || + node.parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onStringAlternativeEnter(start) { + const parent = this._node; + if (parent.type !== "ClassStringDisjunction") { + throw new Error("UnknownError"); + } + this._node = { + type: "StringAlternative", + parent, + start, + end: start, + raw: "", + elements: [], + }; + parent.alternatives.push(this._node); + } + onStringAlternativeLeave(start, end) { + const node = this._node; + if (node.type !== "StringAlternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } } class RegExpParser { constructor(options) { @@ -1891,9 +2490,9 @@ class RegExpParser { this._validator.validateFlags(source, start, end); return this._state.flags; } - parsePattern(source, start = 0, end = source.length, uFlag = false) { + parsePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { this._state.source = source; - this._validator.validatePattern(source, start, end, uFlag); + this._validator.validatePattern(source, start, end, uFlagOrFlags); return this._state.pattern; } } @@ -1928,6 +2527,18 @@ class RegExpVisitor { case "CharacterSet": this.visitCharacterSet(node); break; + case "ClassIntersection": + this.visitClassIntersection(node); + break; + case "ClassStringDisjunction": + this.visitClassStringDisjunction(node); + break; + case "ClassSubtraction": + this.visitClassSubtraction(node); + break; + case "ExpressionCharacterClass": + this.visitExpressionCharacterClass(node); + break; case "Flags": this.visitFlags(node); break; @@ -1943,6 +2554,9 @@ class RegExpVisitor { case "RegExpLiteral": this.visitRegExpLiteral(node); break; + case "StringAlternative": + this.visitStringAlternative(node); + break; default: throw new Error(`Unknown type: ${node.type}`); } @@ -2019,6 +2633,44 @@ class RegExpVisitor { this._handlers.onCharacterSetLeave(node); } } + visitClassIntersection(node) { + if (this._handlers.onClassIntersectionEnter) { + this._handlers.onClassIntersectionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassIntersectionLeave) { + this._handlers.onClassIntersectionLeave(node); + } + } + visitClassStringDisjunction(node) { + if (this._handlers.onClassStringDisjunctionEnter) { + this._handlers.onClassStringDisjunctionEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onClassStringDisjunctionLeave) { + this._handlers.onClassStringDisjunctionLeave(node); + } + } + visitClassSubtraction(node) { + if (this._handlers.onClassSubtractionEnter) { + this._handlers.onClassSubtractionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassSubtractionLeave) { + this._handlers.onClassSubtractionLeave(node); + } + } + visitExpressionCharacterClass(node) { + if (this._handlers.onExpressionCharacterClassEnter) { + this._handlers.onExpressionCharacterClassEnter(node); + } + this.visit(node.expression); + if (this._handlers.onExpressionCharacterClassLeave) { + this._handlers.onExpressionCharacterClassLeave(node); + } + } visitFlags(node) { if (this._handlers.onFlagsEnter) { this._handlers.onFlagsEnter(node); @@ -2064,13 +2716,22 @@ class RegExpVisitor { this._handlers.onRegExpLiteralLeave(node); } } + visitStringAlternative(node) { + if (this._handlers.onStringAlternativeEnter) { + this._handlers.onStringAlternativeEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onStringAlternativeLeave) { + this._handlers.onStringAlternativeLeave(node); + } + } } function parseRegExpLiteral(source, options) { return new RegExpParser(options).parseLiteral(String(source)); } function validateRegExpLiteral(source, options) { - return new RegExpValidator(options).validateLiteral(source); + new RegExpValidator(options).validateLiteral(source); } function visitRegExpAST(node, handlers) { new RegExpVisitor(handlers).visit(node); @@ -2078,6 +2739,7 @@ function visitRegExpAST(node, handlers) { exports.AST = ast; exports.RegExpParser = RegExpParser; +exports.RegExpSyntaxError = RegExpSyntaxError; exports.RegExpValidator = RegExpValidator; exports.parseRegExpLiteral = parseRegExpLiteral; exports.validateRegExpLiteral = validateRegExpLiteral; diff --git a/node_modules/@eslint-community/regexpp/index.js.map b/node_modules/@eslint-community/regexpp/index.js.map new file mode 100644 index 000000000..fbd0e1eec --- /dev/null +++ b/node_modules/@eslint-community/regexpp/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js.map","sources":[".temp/src/ecma-versions.ts",".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;AAYO,MAAM,iBAAiB,GAAG,IAAI;;ACRrC,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAErD,SAAU,SAAS,CAAC,EAAU,EAAA;IAChC,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;AAAE,QAAA,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IA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,CAAC,CAAA;AAC3B,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE;AACrC,YAAA,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;AAC5C,SAAA;KACJ;AAEO,IAAA,sBAAsB,CAAC,IAAuB,EAAA;AAClD,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE;AACzC,YAAA,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAA;AAChD,SAAA;QACD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACvC,QAAA,IAAI,IAAI,CAAC,SAAS,CAAC,wBAAwB,EAAE;AACzC,YAAA,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAA;AAChD,SAAA;KACJ;AACJ;;ACjRe,SAAA,kBAAkB,CAC9B,MAAuB,EACvB,OAA8B,EAAA;AAE9B,IAAA,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;AACjE,CAAC;AAOe,SAAA,qBAAqB,CACjC,MAAc,EACd,OAAiC,EAAA;IAEjC,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;AACxD,CAAC;AAEe,SAAA,cAAc,CAC1B,IAAc,EACd,QAAgC,EAAA;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC3C;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/regexpp/index.mjs b/node_modules/@eslint-community/regexpp/index.mjs similarity index 55% rename from node_modules/regexpp/index.mjs rename to node_modules/@eslint-community/regexpp/index.mjs index d02491f0d..75510d89a 100644 --- a/node_modules/regexpp/index.mjs +++ b/node_modules/@eslint-community/regexpp/index.mjs @@ -1,10 +1,9 @@ -/*! @author Toru Nagashima */ - - var ast = /*#__PURE__*/Object.freeze({ - + __proto__: null }); +const latestEcmaVersion = 2024; + let largeIdStartRanges = undefined; let largeIdContinueRanges = undefined; function isIdStart(cp) { @@ -36,17 +35,16 @@ function isIdContinue(cp) { return isLargeIdStart(cp) || isLargeIdContinue(cp); } function isLargeIdStart(cp) { - return isInRange(cp, largeIdStartRanges || (largeIdStartRanges = initLargeIdStartRanges())); + return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges())); } function isLargeIdContinue(cp) { - return isInRange(cp, largeIdContinueRanges || - (largeIdContinueRanges = initLargeIdContinueRanges())); + return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges())); } function initLargeIdStartRanges() { - return restoreRanges("170 0 11 0 5 0 6 22 2 30 2 457 5 11 15 4 8 0 2 0 130 4 2 1 3 3 2 0 7 0 2 2 2 0 2 19 2 82 2 138 9 165 2 37 3 0 7 40 72 26 5 3 46 42 36 1 2 98 2 0 16 1 8 1 11 2 3 0 17 0 2 29 30 88 12 0 25 32 10 1 5 0 6 21 5 0 10 0 4 0 24 24 8 10 54 20 2 17 61 53 4 0 19 0 8 9 16 15 5 7 3 1 3 21 2 6 2 0 4 3 4 0 17 0 14 1 2 2 15 1 11 0 9 5 5 1 3 21 2 6 2 1 2 1 2 1 32 3 2 0 20 2 17 8 2 2 2 21 2 6 2 1 2 4 4 0 19 0 16 1 24 0 12 7 3 1 3 21 2 6 2 1 2 4 4 0 31 1 2 2 16 0 18 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 11 23 0 53 7 2 2 2 22 2 15 4 0 27 2 6 1 31 0 5 7 2 2 2 22 2 9 2 4 4 0 33 0 2 1 16 1 18 8 2 2 2 40 3 0 17 0 6 2 9 2 25 5 6 17 4 23 2 8 2 0 3 6 59 47 2 1 13 6 59 1 2 0 2 4 2 23 2 0 2 9 2 1 10 0 3 4 2 0 22 3 33 0 64 7 2 35 28 4 116 42 21 0 17 5 5 3 4 0 4 1 8 2 5 12 13 0 18 37 2 0 6 0 3 42 2 332 2 3 3 6 2 0 2 3 3 40 2 3 3 32 2 3 3 6 2 0 2 3 3 14 2 56 2 3 3 66 38 15 17 85 3 5 4 619 3 16 2 25 6 74 4 10 8 12 2 3 15 17 15 17 15 12 2 2 16 51 36 0 5 0 68 88 8 40 2 0 6 69 11 30 50 29 3 4 12 43 5 25 55 22 10 52 83 0 94 46 18 6 56 29 14 1 11 43 27 35 42 2 11 35 3 8 8 42 3 2 42 3 2 5 2 1 4 0 6 191 65 277 3 5 3 37 3 5 3 7 2 0 2 0 2 0 2 30 3 52 2 6 2 0 4 2 2 6 4 3 3 5 5 12 6 2 2 6 117 0 14 0 17 12 102 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 15 3 3 6 4 5 0 18 40 2680 46 2 46 2 132 7 3 4 1 13 37 2 0 6 0 3 55 8 0 17 22 10 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 551 2 26 8 8 4 3 4 5 85 5 4 2 89 2 3 6 42 2 93 18 31 49 15 513 6591 65 20988 4 1164 68 45 3 268 4 15 11 1 21 46 17 30 3 79 40 8 3 102 3 52 3 8 43 12 2 2 2 3 2 22 30 51 15 49 63 5 4 0 2 1 12 27 11 22 26 28 8 46 29 0 17 4 2 9 11 4 2 40 24 2 2 7 21 22 4 0 4 49 2 0 4 1 3 4 3 0 2 0 25 2 3 10 8 2 13 5 3 5 3 5 10 6 2 6 2 42 2 13 7 114 30 11171 13 22 5 48 8453 365 3 105 39 6 13 4 6 0 2 9 2 12 2 4 2 0 2 1 2 1 2 107 34 362 19 63 3 53 41 11 117 4 2 134 37 25 7 25 12 88 4 5 3 5 3 5 3 2 36 11 2 25 2 18 2 1 2 14 3 13 35 122 70 52 268 28 4 48 48 31 14 29 6 37 11 29 3 35 5 7 2 4 43 157 19 35 5 35 5 39 9 51 157 310 10 21 11 7 153 5 3 0 2 43 2 1 4 0 3 22 11 22 10 30 66 18 2 1 11 21 11 25 71 55 7 1 65 0 16 3 2 2 2 28 43 28 4 28 36 7 2 27 28 53 11 21 11 18 14 17 111 72 56 50 14 50 14 35 349 41 7 1 79 28 11 0 9 21 107 20 28 22 13 52 76 44 33 24 27 35 30 0 3 0 9 34 4 0 13 47 15 3 22 0 2 0 36 17 2 24 85 6 2 0 2 3 2 14 2 9 8 46 39 7 3 1 3 21 2 6 2 1 2 4 4 0 19 0 13 4 159 52 19 3 21 2 31 47 21 1 2 0 185 46 42 3 37 47 21 0 60 42 14 0 72 26 230 43 117 63 32 7 3 0 3 7 2 1 2 23 16 0 2 0 95 7 3 38 17 0 2 0 29 0 11 39 8 0 22 0 12 45 20 0 35 56 264 8 2 36 18 0 50 29 113 6 2 1 2 37 22 0 26 5 2 1 2 31 15 0 328 18 190 0 80 921 103 110 18 195 2749 1070 4050 582 8634 568 8 30 114 29 19 47 17 3 32 20 6 18 689 63 129 74 6 0 67 12 65 1 2 0 29 6135 9 1237 43 8 8952 286 50 2 18 3 9 395 2309 106 6 12 4 8 8 9 5991 84 2 70 2 1 3 0 3 1 3 3 2 11 2 0 2 6 2 64 2 3 3 7 2 6 2 27 2 3 2 4 2 0 4 6 2 339 3 24 2 24 2 30 2 24 2 30 2 24 2 30 2 24 2 30 2 24 2 7 2357 44 11 6 17 0 370 43 1301 196 60 67 8 0 1205 3 2 26 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 16 6 2 2 4 2 16 4421 42717 35 4148 12 221 3 5761 15 7472 3104 541 1507 4938"); + 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 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 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f"); } function initLargeIdContinueRanges() { - return restoreRanges("183 0 585 111 24 0 252 4 266 44 2 0 2 1 2 1 2 0 73 10 49 30 7 0 102 6 3 5 3 1 2 3 3 9 24 0 31 26 92 10 16 9 34 8 10 0 25 3 2 8 2 2 2 4 44 2 120 14 2 32 55 2 2 17 2 6 11 1 3 9 18 2 57 0 2 6 3 1 3 2 10 0 11 1 3 9 15 0 3 2 57 0 2 4 5 1 3 2 4 0 21 11 4 0 12 2 57 0 2 7 2 2 2 2 21 1 3 9 11 5 2 2 57 0 2 6 3 1 3 2 8 2 11 1 3 9 19 0 60 4 4 2 2 3 10 0 15 9 17 4 58 6 2 2 2 3 8 1 12 1 3 9 18 2 57 0 2 6 2 2 2 3 8 1 12 1 3 9 17 3 56 1 2 6 2 2 2 3 10 0 11 1 3 9 18 2 71 0 5 5 2 0 2 7 7 9 3 1 62 0 3 6 13 7 2 9 88 0 3 8 12 5 3 9 63 1 7 9 12 0 2 0 2 0 5 1 50 19 2 1 6 10 2 35 10 0 101 19 2 9 13 3 5 2 2 2 3 6 4 3 14 11 2 14 704 2 10 8 929 2 30 2 30 1 31 1 65 31 10 0 3 9 34 2 3 9 144 0 119 11 5 11 11 9 129 10 61 4 58 9 2 28 3 10 7 9 23 13 2 1 64 4 48 16 12 9 18 8 13 2 31 12 3 9 45 13 49 19 9 9 7 9 119 2 2 20 5 0 7 0 3 2 199 57 2 4 576 1 20 0 124 12 5 0 4 11 3071 2 142 0 97 31 555 5 106 1 30086 9 70 0 5 9 33 1 81 1 273 0 4 0 5 0 24 4 5 0 84 1 51 17 11 9 7 17 14 10 29 7 26 12 45 3 48 13 16 9 12 0 11 9 48 13 13 0 9 1 3 9 34 2 51 0 2 2 3 1 6 1 2 0 42 4 6 1 237 7 2 1 3 9 20261 0 738 15 17 15 4 1 25 2 193 9 38 0 702 0 227 0 150 4 294 9 1368 2 2 1 6 3 41 2 5 0 166 1 574 3 9 9 370 1 154 10 176 2 54 14 32 9 16 3 46 10 54 9 7 2 37 13 2 9 6 1 45 0 13 2 49 13 9 3 2 11 83 11 7 0 161 11 6 9 7 3 56 1 2 6 3 1 3 2 10 0 11 1 3 6 4 4 193 17 10 9 5 0 82 19 13 9 214 6 3 8 28 1 83 16 16 9 82 12 9 9 84 14 5 9 243 14 166 9 71 5 2 1 3 3 2 0 2 1 13 9 120 6 3 6 4 0 29 9 41 6 2 3 9 0 10 10 47 15 406 7 2 7 17 9 57 21 2 13 123 5 4 0 2 1 2 6 2 0 9 9 49 4 2 1 2 4 9 9 330 3 19306 9 135 4 60 6 26 9 1014 0 2 54 8 3 82 0 12 1 19628 1 5319 4 4 5 9 7 3 6 31 3 149 2 1418 49 513 54 5 49 9 0 15 0 23 4 2 14 1361 6 2 16 3 6 2 1 2 4 262 6 10 9 419 13 1495 6 110 6 6 9 4759 9 787719 239"); + 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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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"); } function isInRange(cp, ranges) { let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0; @@ -68,30 +66,54 @@ function isInRange(cp, ranges) { } function restoreRanges(data) { let last = 0; - return data.split(" ").map(s => (last += parseInt(s, 10) | 0)); + return data.split(" ").map((s) => (last += parseInt(s, 36) | 0)); } class DataSet { - constructor(raw2018, raw2019, raw2020) { + constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024) { this._raw2018 = raw2018; this._raw2019 = raw2019; this._raw2020 = raw2020; + this._raw2021 = raw2021; + this._raw2022 = raw2022; + this._raw2023 = raw2023; + this._raw2024 = raw2024; } get es2018() { - return (this._set2018 || (this._set2018 = new Set(this._raw2018.split(" ")))); + var _a; + return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" ")))); } get es2019() { - return (this._set2019 || (this._set2019 = new Set(this._raw2019.split(" ")))); + var _a; + return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" ")))); } get es2020() { - return (this._set2020 || (this._set2020 = new Set(this._raw2020.split(" ")))); + var _a; + return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" ")))); + } + get es2021() { + var _a; + return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" ")))); + } + get es2022() { + var _a; + return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" ")))); + } + get es2023() { + var _a; + return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" ")))); + } + get es2024() { + var _a; + return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" ")))); } } const gcNameSet = new Set(["General_Category", "gc"]); const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]); -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", "", ""); -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"); -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", ""); +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", "", "", "", "", "", ""); +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", ""); +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", "", "", ""); +const binPropertyOfStringsSets = new DataSet("", "", "", "", "", "", "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence"); function isValidUnicodeProperty(version, name, value) { if (gcNameSet.has(name)) { return version >= 2018 && gcValueSets.es2018.has(value); @@ -99,114 +121,129 @@ function isValidUnicodeProperty(version, name, value) { if (scNameSet.has(name)) { return ((version >= 2018 && scValueSets.es2018.has(value)) || (version >= 2019 && scValueSets.es2019.has(value)) || - (version >= 2020 && scValueSets.es2020.has(value))); + (version >= 2020 && scValueSets.es2020.has(value)) || + (version >= 2021 && scValueSets.es2021.has(value)) || + (version >= 2022 && scValueSets.es2022.has(value)) || + (version >= 2023 && scValueSets.es2023.has(value))); } return false; } function isValidLoneUnicodeProperty(version, value) { return ((version >= 2018 && binPropertySets.es2018.has(value)) || - (version >= 2019 && binPropertySets.es2019.has(value))); + (version >= 2019 && binPropertySets.es2019.has(value)) || + (version >= 2021 && binPropertySets.es2021.has(value))); +} +function isValidLoneUnicodePropertyOfString(version, value) { + return version >= 2024 && binPropertyOfStringsSets.es2024.has(value); } -const Backspace = 0x08; -const CharacterTabulation = 0x09; -const LineFeed = 0x0a; -const LineTabulation = 0x0b; -const FormFeed = 0x0c; -const CarriageReturn = 0x0d; -const ExclamationMark = 0x21; -const DollarSign = 0x24; -const LeftParenthesis = 0x28; -const RightParenthesis = 0x29; -const Asterisk = 0x2a; -const PlusSign = 0x2b; -const Comma = 0x2c; -const HyphenMinus = 0x2d; -const FullStop = 0x2e; -const Solidus = 0x2f; -const DigitZero = 0x30; -const DigitOne = 0x31; -const DigitSeven = 0x37; -const DigitNine = 0x39; -const Colon = 0x3a; -const LessThanSign = 0x3c; -const EqualsSign = 0x3d; -const GreaterThanSign = 0x3e; -const QuestionMark = 0x3f; -const LatinCapitalLetterA = 0x41; -const LatinCapitalLetterB = 0x42; -const LatinCapitalLetterD = 0x44; -const LatinCapitalLetterF = 0x46; -const LatinCapitalLetterP = 0x50; -const LatinCapitalLetterS = 0x53; -const LatinCapitalLetterW = 0x57; -const LatinCapitalLetterZ = 0x5a; -const LowLine = 0x5f; -const LatinSmallLetterA = 0x61; -const LatinSmallLetterB = 0x62; -const LatinSmallLetterC = 0x63; -const LatinSmallLetterD = 0x64; -const LatinSmallLetterF = 0x66; -const LatinSmallLetterG = 0x67; -const LatinSmallLetterI = 0x69; -const LatinSmallLetterK = 0x6b; -const LatinSmallLetterM = 0x6d; -const LatinSmallLetterN = 0x6e; -const LatinSmallLetterP = 0x70; -const LatinSmallLetterR = 0x72; -const LatinSmallLetterS = 0x73; -const LatinSmallLetterT = 0x74; -const LatinSmallLetterU = 0x75; -const LatinSmallLetterV = 0x76; -const LatinSmallLetterW = 0x77; -const LatinSmallLetterX = 0x78; -const LatinSmallLetterY = 0x79; -const LatinSmallLetterZ = 0x7a; -const LeftSquareBracket = 0x5b; -const ReverseSolidus = 0x5c; -const RightSquareBracket = 0x5d; -const CircumflexAccent = 0x5e; -const LeftCurlyBracket = 0x7b; -const VerticalLine = 0x7c; -const RightCurlyBracket = 0x7d; -const ZeroWidthNonJoiner = 0x200c; -const ZeroWidthJoiner = 0x200d; -const LineSeparator = 0x2028; -const ParagraphSeparator = 0x2029; -const MinCodePoint = 0x00; -const MaxCodePoint = 0x10ffff; +const BACKSPACE = 0x08; +const CHARACTER_TABULATION = 0x09; +const LINE_FEED = 0x0a; +const LINE_TABULATION = 0x0b; +const FORM_FEED = 0x0c; +const CARRIAGE_RETURN = 0x0d; +const EXCLAMATION_MARK = 0x21; +const NUMBER_SIGN = 0x23; +const DOLLAR_SIGN = 0x24; +const PERCENT_SIGN = 0x25; +const AMPERSAND = 0x26; +const LEFT_PARENTHESIS = 0x28; +const RIGHT_PARENTHESIS = 0x29; +const ASTERISK = 0x2a; +const PLUS_SIGN = 0x2b; +const COMMA = 0x2c; +const HYPHEN_MINUS = 0x2d; +const FULL_STOP = 0x2e; +const SOLIDUS = 0x2f; +const DIGIT_ZERO = 0x30; +const DIGIT_ONE = 0x31; +const DIGIT_SEVEN = 0x37; +const DIGIT_NINE = 0x39; +const COLON = 0x3a; +const SEMICOLON = 0x3b; +const LESS_THAN_SIGN = 0x3c; +const EQUALS_SIGN = 0x3d; +const GREATER_THAN_SIGN = 0x3e; +const QUESTION_MARK = 0x3f; +const COMMERCIAL_AT = 0x40; +const LATIN_CAPITAL_LETTER_A = 0x41; +const LATIN_CAPITAL_LETTER_B = 0x42; +const LATIN_CAPITAL_LETTER_D = 0x44; +const LATIN_CAPITAL_LETTER_F = 0x46; +const LATIN_CAPITAL_LETTER_P = 0x50; +const LATIN_CAPITAL_LETTER_S = 0x53; +const LATIN_CAPITAL_LETTER_W = 0x57; +const LATIN_CAPITAL_LETTER_Z = 0x5a; +const LOW_LINE = 0x5f; +const LATIN_SMALL_LETTER_A = 0x61; +const LATIN_SMALL_LETTER_B = 0x62; +const LATIN_SMALL_LETTER_C = 0x63; +const LATIN_SMALL_LETTER_D = 0x64; +const LATIN_SMALL_LETTER_F = 0x66; +const LATIN_SMALL_LETTER_G = 0x67; +const LATIN_SMALL_LETTER_I = 0x69; +const LATIN_SMALL_LETTER_K = 0x6b; +const LATIN_SMALL_LETTER_M = 0x6d; +const LATIN_SMALL_LETTER_N = 0x6e; +const LATIN_SMALL_LETTER_P = 0x70; +const LATIN_SMALL_LETTER_Q = 0x71; +const LATIN_SMALL_LETTER_R = 0x72; +const LATIN_SMALL_LETTER_S = 0x73; +const LATIN_SMALL_LETTER_T = 0x74; +const LATIN_SMALL_LETTER_U = 0x75; +const LATIN_SMALL_LETTER_V = 0x76; +const LATIN_SMALL_LETTER_W = 0x77; +const LATIN_SMALL_LETTER_X = 0x78; +const LATIN_SMALL_LETTER_Y = 0x79; +const LATIN_SMALL_LETTER_Z = 0x7a; +const LEFT_SQUARE_BRACKET = 0x5b; +const REVERSE_SOLIDUS = 0x5c; +const RIGHT_SQUARE_BRACKET = 0x5d; +const CIRCUMFLEX_ACCENT = 0x5e; +const GRAVE_ACCENT = 0x60; +const LEFT_CURLY_BRACKET = 0x7b; +const VERTICAL_LINE = 0x7c; +const RIGHT_CURLY_BRACKET = 0x7d; +const TILDE = 0x7e; +const ZERO_WIDTH_NON_JOINER = 0x200c; +const ZERO_WIDTH_JOINER = 0x200d; +const LINE_SEPARATOR = 0x2028; +const PARAGRAPH_SEPARATOR = 0x2029; +const MIN_CODE_POINT = 0x00; +const MAX_CODE_POINT = 0x10ffff; function isLatinLetter(code) { - return ((code >= LatinCapitalLetterA && code <= LatinCapitalLetterZ) || - (code >= LatinSmallLetterA && code <= LatinSmallLetterZ)); + return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z)); } function isDecimalDigit(code) { - return code >= DigitZero && code <= DigitNine; + return code >= DIGIT_ZERO && code <= DIGIT_NINE; } function isOctalDigit(code) { - return code >= DigitZero && code <= DigitSeven; + return code >= DIGIT_ZERO && code <= DIGIT_SEVEN; } function isHexDigit(code) { - return ((code >= DigitZero && code <= DigitNine) || - (code >= LatinCapitalLetterA && code <= LatinCapitalLetterF) || - (code >= LatinSmallLetterA && code <= LatinSmallLetterF)); + return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) || + (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) || + (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F)); } function isLineTerminator(code) { - return (code === LineFeed || - code === CarriageReturn || - code === LineSeparator || - code === ParagraphSeparator); + return (code === LINE_FEED || + code === CARRIAGE_RETURN || + code === LINE_SEPARATOR || + code === PARAGRAPH_SEPARATOR); } function isValidUnicode(code) { - return code >= MinCodePoint && code <= MaxCodePoint; + return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT; } function digitToInt(code) { - if (code >= LatinSmallLetterA && code <= LatinSmallLetterF) { - return code - LatinSmallLetterA + 10; + if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) { + return code - LATIN_SMALL_LETTER_A + 10; } - if (code >= LatinCapitalLetterA && code <= LatinCapitalLetterF) { - return code - LatinCapitalLetterA + 10; + if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) { + return code - LATIN_CAPITAL_LETTER_A + 10; } - return code - DigitZero; + return code - DIGIT_ZERO; } function isLeadSurrogate(code) { return code >= 0xd800 && code <= 0xdbff; @@ -323,46 +360,115 @@ class Reader { } class RegExpSyntaxError extends SyntaxError { - constructor(source, uFlag, index, message) { - if (source) { - if (!source.startsWith("/")) { - source = `/${source}/${uFlag ? "u" : ""}`; - } - source = `: ${source}`; - } - super(`Invalid regular expression${source}: ${message}`); + constructor(message, index) { + super(message); this.index = index; } } +function newRegExpSyntaxError(srcCtx, flags, index, message) { + let source = ""; + if (srcCtx.kind === "literal") { + const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end); + if (literal) { + source = `: ${literal}`; + } + } + else if (srcCtx.kind === "pattern") { + const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end); + const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`; + source = `: /${pattern}/${flagsText}`; + } + return new RegExpSyntaxError(`Invalid regular expression${source}: ${message}`, index); +} +const SYNTAX_CHARACTER = new Set([ + CIRCUMFLEX_ACCENT, + DOLLAR_SIGN, + REVERSE_SOLIDUS, + FULL_STOP, + ASTERISK, + PLUS_SIGN, + QUESTION_MARK, + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER = new Set([ + AMPERSAND, + EXCLAMATION_MARK, + NUMBER_SIGN, + DOLLAR_SIGN, + PERCENT_SIGN, + ASTERISK, + PLUS_SIGN, + COMMA, + FULL_STOP, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + QUESTION_MARK, + COMMERCIAL_AT, + CIRCUMFLEX_ACCENT, + GRAVE_ACCENT, + TILDE, +]); +const CLASS_SET_SYNTAX_CHARACTER = new Set([ + LEFT_PARENTHESIS, + RIGHT_PARENTHESIS, + LEFT_SQUARE_BRACKET, + RIGHT_SQUARE_BRACKET, + LEFT_CURLY_BRACKET, + RIGHT_CURLY_BRACKET, + SOLIDUS, + HYPHEN_MINUS, + REVERSE_SOLIDUS, + VERTICAL_LINE, +]); +const CLASS_SET_RESERVED_PUNCTUATOR = new Set([ + AMPERSAND, + HYPHEN_MINUS, + EXCLAMATION_MARK, + NUMBER_SIGN, + PERCENT_SIGN, + COMMA, + COLON, + SEMICOLON, + LESS_THAN_SIGN, + EQUALS_SIGN, + GREATER_THAN_SIGN, + COMMERCIAL_AT, + GRAVE_ACCENT, + TILDE, +]); function isSyntaxCharacter(cp) { - return (cp === CircumflexAccent || - cp === DollarSign || - cp === ReverseSolidus || - cp === FullStop || - cp === Asterisk || - cp === PlusSign || - cp === QuestionMark || - cp === LeftParenthesis || - cp === RightParenthesis || - cp === LeftSquareBracket || - cp === RightSquareBracket || - cp === LeftCurlyBracket || - cp === RightCurlyBracket || - cp === VerticalLine); + return SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedDoublePunctuatorCharacter(cp) { + return CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR_CHARACTER.has(cp); +} +function isClassSetSyntaxCharacter(cp) { + return CLASS_SET_SYNTAX_CHARACTER.has(cp); +} +function isClassSetReservedPunctuator(cp) { + return CLASS_SET_RESERVED_PUNCTUATOR.has(cp); } -function isRegExpIdentifierStart(cp) { - return isIdStart(cp) || cp === DollarSign || cp === LowLine; +function isIdentifierStartChar(cp) { + return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE; } -function isRegExpIdentifierPart(cp) { +function isIdentifierPartChar(cp) { return (isIdContinue(cp) || - cp === DollarSign || - cp === LowLine || - cp === ZeroWidthNonJoiner || - cp === ZeroWidthJoiner); + cp === DOLLAR_SIGN || + cp === ZERO_WIDTH_NON_JOINER || + cp === ZERO_WIDTH_JOINER); } function isUnicodePropertyNameCharacter(cp) { - return isLatinLetter(cp) || cp === LowLine; + return isLatinLetter(cp) || cp === LOW_LINE; } function isUnicodePropertyValueCharacter(cp) { return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp); @@ -370,29 +476,36 @@ function isUnicodePropertyValueCharacter(cp) { class RegExpValidator { constructor(options) { this._reader = new Reader(); - this._uFlag = false; + this._unicodeMode = false; + this._unicodeSetsMode = false; this._nFlag = false; this._lastIntValue = 0; - this._lastMinValue = 0; - this._lastMaxValue = 0; + this._lastRange = { + min: 0, + max: Number.POSITIVE_INFINITY, + }; this._lastStrValue = ""; - this._lastKeyValue = ""; - this._lastValValue = ""; this._lastAssertionIsQuantifiable = false; this._numCapturingParens = 0; this._groupNames = new Set(); this._backreferenceNames = new Set(); - this._options = options || {}; + this._srcCtx = null; + this._options = options !== null && options !== void 0 ? options : {}; } validateLiteral(source, start = 0, end = source.length) { - this._uFlag = this._nFlag = false; + this._srcCtx = { source, start, end, kind: "literal" }; + this._unicodeSetsMode = this._unicodeMode = this._nFlag = false; this.reset(source, start, end); this.onLiteralEnter(start); - if (this.eat(Solidus) && this.eatRegExpBody() && this.eat(Solidus)) { + if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) { const flagStart = this.index; - const uFlag = source.includes("u", flagStart); - this.validateFlags(source, flagStart, end); - this.validatePattern(source, start + 1, flagStart - 1, uFlag); + const unicode = source.includes("u", flagStart); + const unicodeSets = source.includes("v", flagStart); + this.validateFlagsInternal(source, flagStart, end); + this.validatePatternInternal(source, start + 1, flagStart - 1, { + unicode, + unicodeSets, + }); } else if (start >= end) { this.raise("Empty"); @@ -404,6 +517,29 @@ class RegExpValidator { this.onLiteralLeave(start, end); } validateFlags(source, start = 0, end = source.length) { + this._srcCtx = { source, start, end, kind: "flags" }; + this.validateFlagsInternal(source, start, end); + } + validatePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + this._srcCtx = { source, start, end, kind: "pattern" }; + this.validatePatternInternal(source, start, end, uFlagOrFlags); + } + validatePatternInternal(source, start = 0, end = source.length, uFlagOrFlags = undefined) { + const mode = this._parseFlagsOptionToMode(uFlagOrFlags, end); + this._unicodeMode = mode.unicodeMode; + this._nFlag = mode.nFlag; + this._unicodeSetsMode = mode.unicodeSetsMode; + this.reset(source, start, end); + this.consumePattern(); + if (!this._nFlag && + this.ecmaVersion >= 2018 && + this._groupNames.size > 0) { + this._nFlag = true; + this.rewind(start); + this.consumePattern(); + } + } + validateFlagsInternal(source, start, end) { const existingFlags = new Set(); let global = false; let ignoreCase = false; @@ -411,54 +547,92 @@ class RegExpValidator { let sticky = false; let unicode = false; let dotAll = false; + let hasIndices = false; + let unicodeSets = false; for (let i = start; i < end; ++i) { const flag = source.charCodeAt(i); if (existingFlags.has(flag)) { - this.raise(`Duplicated flag '${source[i]}'`); + this.raise(`Duplicated flag '${source[i]}'`, { index: start }); } existingFlags.add(flag); - if (flag === LatinSmallLetterG) { + if (flag === LATIN_SMALL_LETTER_G) { global = true; } - else if (flag === LatinSmallLetterI) { + else if (flag === LATIN_SMALL_LETTER_I) { ignoreCase = true; } - else if (flag === LatinSmallLetterM) { + else if (flag === LATIN_SMALL_LETTER_M) { multiline = true; } - else if (flag === LatinSmallLetterU && this.ecmaVersion >= 2015) { + else if (flag === LATIN_SMALL_LETTER_U && + this.ecmaVersion >= 2015) { unicode = true; } - else if (flag === LatinSmallLetterY && this.ecmaVersion >= 2015) { + else if (flag === LATIN_SMALL_LETTER_Y && + this.ecmaVersion >= 2015) { sticky = true; } - else if (flag === LatinSmallLetterS && this.ecmaVersion >= 2018) { + else if (flag === LATIN_SMALL_LETTER_S && + this.ecmaVersion >= 2018) { dotAll = true; } + else if (flag === LATIN_SMALL_LETTER_D && + this.ecmaVersion >= 2022) { + hasIndices = true; + } + else if (flag === LATIN_SMALL_LETTER_V && + this.ecmaVersion >= 2024) { + unicodeSets = true; + } else { - this.raise(`Invalid flag '${source[i]}'`); + this.raise(`Invalid flag '${source[i]}'`, { index: start }); } } - this.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll); + this.onRegExpFlags(start, end, { + global, + ignoreCase, + multiline, + unicode, + sticky, + dotAll, + hasIndices, + unicodeSets, + }); } - validatePattern(source, start = 0, end = source.length, uFlag = false) { - this._uFlag = uFlag && this.ecmaVersion >= 2015; - this._nFlag = uFlag && this.ecmaVersion >= 2018; - this.reset(source, start, end); - this.consumePattern(); - if (!this._nFlag && - this.ecmaVersion >= 2018 && - this._groupNames.size > 0) { - this._nFlag = true; - this.rewind(start); - this.consumePattern(); + _parseFlagsOptionToMode(uFlagOrFlags, sourceEnd) { + let unicode = false; + let unicodeSets = false; + if (uFlagOrFlags && this.ecmaVersion >= 2015) { + if (typeof uFlagOrFlags === "object") { + unicode = Boolean(uFlagOrFlags.unicode); + if (this.ecmaVersion >= 2024) { + unicodeSets = Boolean(uFlagOrFlags.unicodeSets); + } + } + else { + unicode = uFlagOrFlags; + } + } + if (unicode && unicodeSets) { + this.raise("Invalid regular expression flags", { + index: sourceEnd + 1, + unicode, + unicodeSets, + }); } + const unicodeMode = unicode || unicodeSets; + const nFlag = (unicode && this.ecmaVersion >= 2018) || + unicodeSets || + Boolean(this._options.strict && this.ecmaVersion >= 2023); + const unicodeSetsMode = unicodeSets; + return { unicodeMode, nFlag, unicodeSetsMode }; } get strict() { - return Boolean(this._options.strict || this._uFlag); + return Boolean(this._options.strict) || this._unicodeMode; } get ecmaVersion() { - return this._options.ecmaVersion || 2020; + var _a; + return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; } onLiteralEnter(start) { if (this._options.onLiteralEnter) { @@ -470,9 +644,12 @@ class RegExpValidator { this._options.onLiteralLeave(start, end); } } - onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll) { + onRegExpFlags(start, end, flags) { + if (this._options.onRegExpFlags) { + this._options.onRegExpFlags(start, end, flags); + } if (this._options.onFlags) { - this._options.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll); + this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices); } } onPatternEnter(start) { @@ -560,9 +737,9 @@ class RegExpValidator { this._options.onEscapeCharacterSet(start, end, kind, negate); } } - onUnicodePropertyCharacterSet(start, end, kind, key, value, negate) { + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { if (this._options.onUnicodePropertyCharacterSet) { - this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate); + this._options.onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings); } } onCharacter(start, end, value) { @@ -575,9 +752,9 @@ class RegExpValidator { this._options.onBackreference(start, end, ref); } } - onCharacterClassEnter(start, negate) { + onCharacterClassEnter(start, negate, unicodeSets) { if (this._options.onCharacterClassEnter) { - this._options.onCharacterClassEnter(start, negate); + this._options.onCharacterClassEnter(start, negate, unicodeSets); } } onCharacterClassLeave(start, end, negate) { @@ -590,8 +767,35 @@ class RegExpValidator { this._options.onCharacterClassRange(start, end, min, max); } } - get source() { - return this._reader.source; + onClassIntersection(start, end) { + if (this._options.onClassIntersection) { + this._options.onClassIntersection(start, end); + } + } + onClassSubtraction(start, end) { + if (this._options.onClassSubtraction) { + this._options.onClassSubtraction(start, end); + } + } + onClassStringDisjunctionEnter(start) { + if (this._options.onClassStringDisjunctionEnter) { + this._options.onClassStringDisjunctionEnter(start); + } + } + onClassStringDisjunctionLeave(start, end) { + if (this._options.onClassStringDisjunctionLeave) { + this._options.onClassStringDisjunctionLeave(start, end); + } + } + onStringAlternativeEnter(start, index) { + if (this._options.onStringAlternativeEnter) { + this._options.onStringAlternativeEnter(start, index); + } + } + onStringAlternativeLeave(start, end, index) { + if (this._options.onStringAlternativeLeave) { + this._options.onStringAlternativeLeave(start, end, index); + } } get index() { return this._reader.index; @@ -609,7 +813,7 @@ class RegExpValidator { return this._reader.nextCodePoint3; } reset(source, start, end) { - this._reader.reset(source, start, end, this._uFlag); + this._reader.reset(source, start, end, this._unicodeMode); } rewind(index) { this._reader.rewind(index); @@ -626,8 +830,12 @@ class RegExpValidator { eat3(cp1, cp2, cp3) { return this._reader.eat3(cp1, cp2, cp3); } - raise(message) { - throw new RegExpSyntaxError(this.source, this._uFlag, this.index, message); + raise(message, context) { + var _a, _b, _c; + throw newRegExpSyntaxError(this._srcCtx, { + unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode), + unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode, + }, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message); } eatRegExpBody() { const start = this.index; @@ -642,17 +850,17 @@ class RegExpValidator { if (escaped) { escaped = false; } - else if (cp === ReverseSolidus) { + else if (cp === REVERSE_SOLIDUS) { escaped = true; } - else if (cp === LeftSquareBracket) { + else if (cp === LEFT_SQUARE_BRACKET) { inClass = true; } - else if (cp === RightSquareBracket) { + else if (cp === RIGHT_SQUARE_BRACKET) { inClass = false; } - else if ((cp === Solidus && !inClass) || - (cp === Asterisk && this.index === start)) { + else if ((cp === SOLIDUS && !inClass) || + (cp === ASTERISK && this.index === start)) { break; } this.advance(); @@ -668,13 +876,13 @@ class RegExpValidator { this.consumeDisjunction(); const cp = this.currentCodePoint; if (this.currentCodePoint !== -1) { - if (cp === RightParenthesis) { + if (cp === RIGHT_PARENTHESIS) { this.raise("Unmatched ')'"); } - if (cp === ReverseSolidus) { + if (cp === REVERSE_SOLIDUS) { this.raise("\\ at end of pattern"); } - if (cp === RightSquareBracket || cp === RightCurlyBracket) { + if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) { this.raise("Lone quantifier brackets"); } const c = String.fromCodePoint(cp); @@ -697,21 +905,21 @@ class RegExpValidator { if (escaped) { escaped = false; } - else if (cp === ReverseSolidus) { + else if (cp === REVERSE_SOLIDUS) { escaped = true; } - else if (cp === LeftSquareBracket) { + else if (cp === LEFT_SQUARE_BRACKET) { inClass = true; } - else if (cp === RightSquareBracket) { + else if (cp === RIGHT_SQUARE_BRACKET) { inClass = false; } - else if (cp === LeftParenthesis && + else if (cp === LEFT_PARENTHESIS && !inClass && - (this.nextCodePoint !== QuestionMark || - (this.nextCodePoint2 === LessThanSign && - this.nextCodePoint3 !== EqualsSign && - this.nextCodePoint3 !== ExclamationMark))) { + (this.nextCodePoint !== QUESTION_MARK || + (this.nextCodePoint2 === LESS_THAN_SIGN && + this.nextCodePoint3 !== EQUALS_SIGN && + this.nextCodePoint3 !== EXCLAMATION_MARK))) { count += 1; } this.advance(); @@ -725,11 +933,11 @@ class RegExpValidator { this.onDisjunctionEnter(start); do { this.consumeAlternative(i++); - } while (this.eat(VerticalLine)); + } while (this.eat(VERTICAL_LINE)); if (this.consumeQuantifier(true)) { this.raise("Nothing to repeat"); } - if (this.eat(LeftCurlyBracket)) { + if (this.eat(LEFT_CURLY_BRACKET)) { this.raise("Lone quantifier brackets"); } this.onDisjunctionLeave(start, this.index); @@ -742,7 +950,7 @@ class RegExpValidator { this.onAlternativeLeave(start, this.index, i); } consumeTerm() { - if (this._uFlag || this.strict) { + if (this._unicodeMode || this.strict) { return (this.consumeAssertion() || (this.consumeAtom() && this.consumeOptionalQuantifier())); } @@ -758,30 +966,31 @@ class RegExpValidator { consumeAssertion() { const start = this.index; this._lastAssertionIsQuantifiable = false; - if (this.eat(CircumflexAccent)) { + if (this.eat(CIRCUMFLEX_ACCENT)) { this.onEdgeAssertion(start, this.index, "start"); return true; } - if (this.eat(DollarSign)) { + if (this.eat(DOLLAR_SIGN)) { this.onEdgeAssertion(start, this.index, "end"); return true; } - if (this.eat2(ReverseSolidus, LatinCapitalLetterB)) { + if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) { this.onWordBoundaryAssertion(start, this.index, "word", true); return true; } - if (this.eat2(ReverseSolidus, LatinSmallLetterB)) { + if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) { this.onWordBoundaryAssertion(start, this.index, "word", false); return true; } - if (this.eat2(LeftParenthesis, QuestionMark)) { - const lookbehind = this.ecmaVersion >= 2018 && this.eat(LessThanSign); + if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) { + const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN); let negate = false; - if (this.eat(EqualsSign) || (negate = this.eat(ExclamationMark))) { + if (this.eat(EQUALS_SIGN) || + (negate = this.eat(EXCLAMATION_MARK))) { const kind = lookbehind ? "lookbehind" : "lookahead"; this.onLookaroundAssertionEnter(start, kind, negate); this.consumeDisjunction(); - if (!this.eat(RightParenthesis)) { + if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group"); } this._lastAssertionIsQuantifiable = !lookbehind && !this.strict; @@ -797,26 +1006,25 @@ class RegExpValidator { let min = 0; let max = 0; let greedy = false; - if (this.eat(Asterisk)) { + if (this.eat(ASTERISK)) { min = 0; max = Number.POSITIVE_INFINITY; } - else if (this.eat(PlusSign)) { + else if (this.eat(PLUS_SIGN)) { min = 1; max = Number.POSITIVE_INFINITY; } - else if (this.eat(QuestionMark)) { + else if (this.eat(QUESTION_MARK)) { min = 0; max = 1; } else if (this.eatBracedQuantifier(noConsume)) { - min = this._lastMinValue; - max = this._lastMaxValue; + ({ min, max } = this._lastRange); } else { return false; } - greedy = !this.eat(QuestionMark); + greedy = !this.eat(QUESTION_MARK); if (!noConsume) { this.onQuantifier(start, this.index, min, max, greedy); } @@ -824,24 +1032,24 @@ class RegExpValidator { } eatBracedQuantifier(noError) { const start = this.index; - if (this.eat(LeftCurlyBracket)) { - this._lastMinValue = 0; - this._lastMaxValue = Number.POSITIVE_INFINITY; + if (this.eat(LEFT_CURLY_BRACKET)) { if (this.eatDecimalDigits()) { - this._lastMinValue = this._lastMaxValue = this._lastIntValue; - if (this.eat(Comma)) { - this._lastMaxValue = this.eatDecimalDigits() + const min = this._lastIntValue; + let max = min; + if (this.eat(COMMA)) { + max = this.eatDecimalDigits() ? this._lastIntValue : Number.POSITIVE_INFINITY; } - if (this.eat(RightCurlyBracket)) { - if (!noError && this._lastMaxValue < this._lastMinValue) { + if (this.eat(RIGHT_CURLY_BRACKET)) { + if (!noError && max < min) { this.raise("numbers out of order in {} quantifier"); } + this._lastRange = { min, max }; return true; } } - if (!noError && (this._uFlag || this.strict)) { + if (!noError && (this._unicodeMode || this.strict)) { this.raise("Incomplete quantifier"); } this.rewind(start); @@ -852,12 +1060,12 @@ class RegExpValidator { return (this.consumePatternCharacter() || this.consumeDot() || this.consumeReverseSolidusAtomEscape() || - this.consumeCharacterClass() || + Boolean(this.consumeCharacterClass()) || this.consumeUncapturingGroup() || this.consumeCapturingGroup()); } consumeDot() { - if (this.eat(FullStop)) { + if (this.eat(FULL_STOP)) { this.onAnyCharacterSet(this.index - 1, this.index, "any"); return true; } @@ -865,7 +1073,7 @@ class RegExpValidator { } consumeReverseSolidusAtomEscape() { const start = this.index; - if (this.eat(ReverseSolidus)) { + if (this.eat(REVERSE_SOLIDUS)) { if (this.consumeAtomEscape()) { return true; } @@ -875,10 +1083,10 @@ class RegExpValidator { } consumeUncapturingGroup() { const start = this.index; - if (this.eat3(LeftParenthesis, QuestionMark, Colon)) { + if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) { this.onGroupEnter(start); this.consumeDisjunction(); - if (!this.eat(RightParenthesis)) { + if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group"); } this.onGroupLeave(start, this.index); @@ -888,19 +1096,19 @@ class RegExpValidator { } consumeCapturingGroup() { const start = this.index; - if (this.eat(LeftParenthesis)) { + if (this.eat(LEFT_PARENTHESIS)) { let name = null; if (this.ecmaVersion >= 2018) { if (this.consumeGroupSpecifier()) { name = this._lastStrValue; } } - else if (this.currentCodePoint === QuestionMark) { + else if (this.currentCodePoint === QUESTION_MARK) { this.raise("Invalid group"); } this.onCapturingGroupEnter(start, name); this.consumeDisjunction(); - if (!this.eat(RightParenthesis)) { + if (!this.eat(RIGHT_PARENTHESIS)) { this.raise("Unterminated group"); } this.onCapturingGroupLeave(start, this.index, name); @@ -912,7 +1120,7 @@ class RegExpValidator { return (this.consumeDot() || this.consumeReverseSolidusAtomEscape() || this.consumeReverseSolidusFollowedByC() || - this.consumeCharacterClass() || + Boolean(this.consumeCharacterClass()) || this.consumeUncapturingGroup() || this.consumeCapturingGroup() || this.consumeInvalidBracedQuantifier() || @@ -920,11 +1128,11 @@ class RegExpValidator { } consumeReverseSolidusFollowedByC() { const start = this.index; - if (this.currentCodePoint === ReverseSolidus && - this.nextCodePoint === LatinSmallLetterC) { + if (this.currentCodePoint === REVERSE_SOLIDUS && + this.nextCodePoint === LATIN_SMALL_LETTER_C) { this._lastIntValue = this.currentCodePoint; this.advance(); - this.onCharacter(start, this.index, ReverseSolidus); + this.onCharacter(start, this.index, REVERSE_SOLIDUS); return true; } return false; @@ -949,17 +1157,17 @@ class RegExpValidator { const start = this.index; const cp = this.currentCodePoint; if (cp !== -1 && - cp !== CircumflexAccent && - cp !== DollarSign && - cp !== ReverseSolidus && - cp !== FullStop && - cp !== Asterisk && - cp !== PlusSign && - cp !== QuestionMark && - cp !== LeftParenthesis && - cp !== RightParenthesis && - cp !== LeftSquareBracket && - cp !== VerticalLine) { + cp !== CIRCUMFLEX_ACCENT && + cp !== DOLLAR_SIGN && + cp !== REVERSE_SOLIDUS && + cp !== FULL_STOP && + cp !== ASTERISK && + cp !== PLUS_SIGN && + cp !== QUESTION_MARK && + cp !== LEFT_PARENTHESIS && + cp !== RIGHT_PARENTHESIS && + cp !== LEFT_SQUARE_BRACKET && + cp !== VERTICAL_LINE) { this.advance(); this.onCharacter(start, this.index, cp); return true; @@ -967,7 +1175,7 @@ class RegExpValidator { return false; } consumeGroupSpecifier() { - if (this.eat(QuestionMark)) { + if (this.eat(QUESTION_MARK)) { if (this.eatGroupName()) { if (!this._groupNames.has(this._lastStrValue)) { this._groupNames.add(this._lastStrValue); @@ -986,7 +1194,7 @@ class RegExpValidator { (this._nFlag && this.consumeKGroupName())) { return true; } - if (this.strict || this._uFlag) { + if (this.strict || this._unicodeMode) { this.raise("Invalid escape"); } return false; @@ -999,7 +1207,7 @@ class RegExpValidator { this.onBackreference(start - 1, this.index, n); return true; } - if (this.strict || this._uFlag) { + if (this.strict || this._unicodeMode) { this.raise("Invalid escape"); } this.rewind(start); @@ -1007,52 +1215,57 @@ class RegExpValidator { return false; } consumeCharacterClassEscape() { + var _a; const start = this.index; - if (this.eat(LatinSmallLetterD)) { + if (this.eat(LATIN_SMALL_LETTER_D)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "digit", false); - return true; + return {}; } - if (this.eat(LatinCapitalLetterD)) { + if (this.eat(LATIN_CAPITAL_LETTER_D)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "digit", true); - return true; + return {}; } - if (this.eat(LatinSmallLetterS)) { + if (this.eat(LATIN_SMALL_LETTER_S)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "space", false); - return true; + return {}; } - if (this.eat(LatinCapitalLetterS)) { + if (this.eat(LATIN_CAPITAL_LETTER_S)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "space", true); - return true; + return {}; } - if (this.eat(LatinSmallLetterW)) { + if (this.eat(LATIN_SMALL_LETTER_W)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "word", false); - return true; + return {}; } - if (this.eat(LatinCapitalLetterW)) { + if (this.eat(LATIN_CAPITAL_LETTER_W)) { this._lastIntValue = -1; this.onEscapeCharacterSet(start - 1, this.index, "word", true); - return true; + return {}; } let negate = false; - if (this._uFlag && + if (this._unicodeMode && this.ecmaVersion >= 2018 && - (this.eat(LatinSmallLetterP) || - (negate = this.eat(LatinCapitalLetterP)))) { + (this.eat(LATIN_SMALL_LETTER_P) || + (negate = this.eat(LATIN_CAPITAL_LETTER_P)))) { this._lastIntValue = -1; - if (this.eat(LeftCurlyBracket) && - this.eatUnicodePropertyValueExpression() && - this.eat(RightCurlyBracket)) { - this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", this._lastKeyValue, this._lastValValue || null, negate); - return true; + let result = null; + if (this.eat(LEFT_CURLY_BRACKET) && + (result = this.eatUnicodePropertyValueExpression()) && + this.eat(RIGHT_CURLY_BRACKET)) { + if (negate && result.strings) { + this.raise("Invalid property name"); + } + this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", result.key, result.value, negate, (_a = result.strings) !== null && _a !== void 0 ? _a : false); + return { mayContainStrings: result.strings }; } this.raise("Invalid property name"); } - return false; + return null; } consumeCharacterEscape() { const start = this.index; @@ -1062,7 +1275,7 @@ class RegExpValidator { this.eatHexEscapeSequence() || this.eatRegExpUnicodeEscapeSequence() || (!this.strict && - !this._uFlag && + !this._unicodeMode && this.eatLegacyOctalEscapeSequence()) || this.eatIdentityEscape()) { this.onCharacter(start - 1, this.index, this._lastIntValue); @@ -1072,7 +1285,7 @@ class RegExpValidator { } consumeKGroupName() { const start = this.index; - if (this.eat(LatinSmallLetterK)) { + if (this.eat(LATIN_SMALL_LETTER_K)) { if (this.eatGroupName()) { const groupName = this._lastStrValue; this._backreferenceNames.add(groupName); @@ -1085,30 +1298,43 @@ class RegExpValidator { } consumeCharacterClass() { const start = this.index; - if (this.eat(LeftSquareBracket)) { - const negate = this.eat(CircumflexAccent); - this.onCharacterClassEnter(start, negate); - this.consumeClassRanges(); - if (!this.eat(RightSquareBracket)) { - this.raise("Unterminated character class"); + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, this._unicodeSetsMode); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + if (this.currentCodePoint === -1) { + this.raise("Unterminated character class"); + } + this.raise("Invalid character in character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); } this.onCharacterClassLeave(start, this.index, negate); - return true; + return result; } - return false; + return null; } - consumeClassRanges() { - const strict = this.strict || this._uFlag; + consumeClassContents() { + if (this._unicodeSetsMode) { + if (this.currentCodePoint === RIGHT_SQUARE_BRACKET) { + return {}; + } + const result = this.consumeClassSetExpression(); + return result; + } + const strict = this.strict || this._unicodeMode; for (;;) { const rangeStart = this.index; if (!this.consumeClassAtom()) { break; } const min = this._lastIntValue; - if (!this.eat(HyphenMinus)) { + if (!this.eat(HYPHEN_MINUS)) { continue; } - this.onCharacter(this.index - 1, this.index, HyphenMinus); + this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS); if (!this.consumeClassAtom()) { break; } @@ -1124,26 +1350,30 @@ class RegExpValidator { } this.onCharacterClassRange(rangeStart, this.index, min, max); } + return {}; } consumeClassAtom() { const start = this.index; const cp = this.currentCodePoint; - if (cp !== -1 && cp !== ReverseSolidus && cp !== RightSquareBracket) { + if (cp !== -1 && + cp !== REVERSE_SOLIDUS && + cp !== RIGHT_SQUARE_BRACKET) { this.advance(); this._lastIntValue = cp; this.onCharacter(start, this.index, this._lastIntValue); return true; } - if (this.eat(ReverseSolidus)) { + if (this.eat(REVERSE_SOLIDUS)) { if (this.consumeClassEscape()) { return true; } - if (!this.strict && this.currentCodePoint === LatinSmallLetterC) { - this._lastIntValue = ReverseSolidus; + if (!this.strict && + this.currentCodePoint === LATIN_SMALL_LETTER_C) { + this._lastIntValue = REVERSE_SOLIDUS; this.onCharacter(start, this.index, this._lastIntValue); return true; } - if (this.strict || this._uFlag) { + if (this.strict || this._unicodeMode) { this.raise("Invalid escape"); } this.rewind(start); @@ -1152,32 +1382,221 @@ class RegExpValidator { } consumeClassEscape() { const start = this.index; - if (this.eat(LatinSmallLetterB)) { - this._lastIntValue = Backspace; + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; this.onCharacter(start - 1, this.index, this._lastIntValue); return true; } - if (this._uFlag && this.eat(HyphenMinus)) { - this._lastIntValue = HyphenMinus; + if (this._unicodeMode && this.eat(HYPHEN_MINUS)) { + this._lastIntValue = HYPHEN_MINUS; this.onCharacter(start - 1, this.index, this._lastIntValue); return true; } let cp = 0; if (!this.strict && - !this._uFlag && - this.currentCodePoint === LatinSmallLetterC && - (isDecimalDigit((cp = this.nextCodePoint)) || cp === LowLine)) { + !this._unicodeMode && + this.currentCodePoint === LATIN_SMALL_LETTER_C && + (isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) { this.advance(); this.advance(); this._lastIntValue = cp % 0x20; this.onCharacter(start - 1, this.index, this._lastIntValue); return true; } - return (this.consumeCharacterClassEscape() || this.consumeCharacterEscape()); + return (Boolean(this.consumeCharacterClassEscape()) || + this.consumeCharacterEscape()); + } + consumeClassSetExpression() { + const start = this.index; + let mayContainStrings = false; + let result = null; + if (this.consumeClassSetCharacter()) { + if (this.consumeClassSetRangeFromOperator(start)) { + this.consumeClassUnionRight({}); + return {}; + } + mayContainStrings = false; + } + else if ((result = this.consumeClassSetOperand())) { + mayContainStrings = result.mayContainStrings; + } + else { + const cp = this.currentCodePoint; + if (cp === REVERSE_SOLIDUS) { + this.advance(); + this.raise("Invalid escape"); + } + if (cp === this.nextCodePoint && + isClassSetReservedDoublePunctuatorCharacter(cp)) { + this.raise("Invalid set operation in character class"); + } + this.raise("Invalid character in character class"); + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + while (this.currentCodePoint !== AMPERSAND && + (result = this.consumeClassSetOperand())) { + this.onClassIntersection(start, this.index); + if (!result.mayContainStrings) { + mayContainStrings = false; + } + if (this.eat2(AMPERSAND, AMPERSAND)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + while (this.consumeClassSetOperand()) { + this.onClassSubtraction(start, this.index); + if (this.eat2(HYPHEN_MINUS, HYPHEN_MINUS)) { + continue; + } + return { mayContainStrings }; + } + this.raise("Invalid character in character class"); + } + return this.consumeClassUnionRight({ mayContainStrings }); + } + consumeClassUnionRight(leftResult) { + let mayContainStrings = leftResult.mayContainStrings; + for (;;) { + const start = this.index; + if (this.consumeClassSetCharacter()) { + this.consumeClassSetRangeFromOperator(start); + continue; + } + const result = this.consumeClassSetOperand(); + if (result) { + if (result.mayContainStrings) { + mayContainStrings = true; + } + continue; + } + break; + } + return { mayContainStrings }; + } + consumeClassSetRangeFromOperator(start) { + const currentStart = this.index; + const min = this._lastIntValue; + if (this.eat(HYPHEN_MINUS)) { + if (this.consumeClassSetCharacter()) { + const max = this._lastIntValue; + if (min === -1 || max === -1) { + this.raise("Invalid character class"); + } + if (min > max) { + this.raise("Range out of order in character class"); + } + this.onCharacterClassRange(start, this.index, min, max); + return true; + } + this.rewind(currentStart); + } + return false; + } + consumeClassSetOperand() { + let result = null; + if ((result = this.consumeNestedClass())) { + return result; + } + if ((result = this.consumeClassStringDisjunction())) { + return result; + } + if (this.consumeClassSetCharacter()) { + return {}; + } + return null; + } + consumeNestedClass() { + const start = this.index; + if (this.eat(LEFT_SQUARE_BRACKET)) { + const negate = this.eat(CIRCUMFLEX_ACCENT); + this.onCharacterClassEnter(start, negate, true); + const result = this.consumeClassContents(); + if (!this.eat(RIGHT_SQUARE_BRACKET)) { + this.raise("Unterminated character class"); + } + if (negate && result.mayContainStrings) { + this.raise("Negated character class may contain strings"); + } + this.onCharacterClassLeave(start, this.index, negate); + return result; + } + if (this.eat(REVERSE_SOLIDUS)) { + const result = this.consumeCharacterClassEscape(); + if (result) { + return result; + } + this.rewind(start); + } + return null; + } + consumeClassStringDisjunction() { + const start = this.index; + if (this.eat3(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_Q, LEFT_CURLY_BRACKET)) { + this.onClassStringDisjunctionEnter(start); + let i = 0; + let mayContainStrings = false; + do { + if (this.consumeClassString(i++).mayContainStrings) { + mayContainStrings = true; + } + } while (this.eat(VERTICAL_LINE)); + if (this.eat(RIGHT_CURLY_BRACKET)) { + this.onClassStringDisjunctionLeave(start, this.index); + return { mayContainStrings }; + } + this.raise("Unterminated class string disjunction"); + } + return null; + } + consumeClassString(i) { + const start = this.index; + let count = 0; + this.onStringAlternativeEnter(start, i); + while (this.currentCodePoint !== -1 && + this.consumeClassSetCharacter()) { + count++; + } + this.onStringAlternativeLeave(start, this.index, i); + return { mayContainStrings: count !== 1 }; + } + consumeClassSetCharacter() { + const start = this.index; + const cp = this.currentCodePoint; + if (cp !== this.nextCodePoint || + !isClassSetReservedDoublePunctuatorCharacter(cp)) { + if (cp !== -1 && !isClassSetSyntaxCharacter(cp)) { + this._lastIntValue = cp; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + } + if (this.eat(REVERSE_SOLIDUS)) { + if (this.consumeCharacterEscape()) { + return true; + } + if (isClassSetReservedPunctuator(this.currentCodePoint)) { + this._lastIntValue = this.currentCodePoint; + this.advance(); + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + if (this.eat(LATIN_SMALL_LETTER_B)) { + this._lastIntValue = BACKSPACE; + this.onCharacter(start, this.index, this._lastIntValue); + return true; + } + this.rewind(start); + } + return false; } eatGroupName() { - if (this.eat(LessThanSign)) { - if (this.eatRegExpIdentifierName() && this.eat(GreaterThanSign)) { + if (this.eat(LESS_THAN_SIGN)) { + if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) { return true; } this.raise("Invalid capture group name"); @@ -1196,10 +1615,10 @@ class RegExpValidator { } eatRegExpIdentifierStart() { const start = this.index; - const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; let cp = this.currentCodePoint; this.advance(); - if (cp === ReverseSolidus && + if (cp === REVERSE_SOLIDUS && this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { cp = this._lastIntValue; } @@ -1209,7 +1628,7 @@ class RegExpValidator { cp = combineSurrogatePair(cp, this.currentCodePoint); this.advance(); } - if (isRegExpIdentifierStart(cp)) { + if (isIdentifierStartChar(cp)) { this._lastIntValue = cp; return true; } @@ -1220,10 +1639,10 @@ class RegExpValidator { } eatRegExpIdentifierPart() { const start = this.index; - const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020; + const forceUFlag = !this._unicodeMode && this.ecmaVersion >= 2020; let cp = this.currentCodePoint; this.advance(); - if (cp === ReverseSolidus && + if (cp === REVERSE_SOLIDUS && this.eatRegExpUnicodeEscapeSequence(forceUFlag)) { cp = this._lastIntValue; } @@ -1233,7 +1652,7 @@ class RegExpValidator { cp = combineSurrogatePair(cp, this.currentCodePoint); this.advance(); } - if (isRegExpIdentifierPart(cp)) { + if (isIdentifierPartChar(cp)) { this._lastIntValue = cp; return true; } @@ -1244,7 +1663,7 @@ class RegExpValidator { } eatCControlLetter() { const start = this.index; - if (this.eat(LatinSmallLetterC)) { + if (this.eat(LATIN_SMALL_LETTER_C)) { if (this.eatControlLetter()) { return true; } @@ -1253,7 +1672,7 @@ class RegExpValidator { return false; } eatZero() { - if (this.currentCodePoint === DigitZero && + if (this.currentCodePoint === DIGIT_ZERO && !isDecimalDigit(this.nextCodePoint)) { this._lastIntValue = 0; this.advance(); @@ -1262,24 +1681,24 @@ class RegExpValidator { return false; } eatControlEscape() { - if (this.eat(LatinSmallLetterF)) { - this._lastIntValue = FormFeed; + if (this.eat(LATIN_SMALL_LETTER_F)) { + this._lastIntValue = FORM_FEED; return true; } - if (this.eat(LatinSmallLetterN)) { - this._lastIntValue = LineFeed; + if (this.eat(LATIN_SMALL_LETTER_N)) { + this._lastIntValue = LINE_FEED; return true; } - if (this.eat(LatinSmallLetterR)) { - this._lastIntValue = CarriageReturn; + if (this.eat(LATIN_SMALL_LETTER_R)) { + this._lastIntValue = CARRIAGE_RETURN; return true; } - if (this.eat(LatinSmallLetterT)) { - this._lastIntValue = CharacterTabulation; + if (this.eat(LATIN_SMALL_LETTER_T)) { + this._lastIntValue = CHARACTER_TABULATION; return true; } - if (this.eat(LatinSmallLetterV)) { - this._lastIntValue = LineTabulation; + if (this.eat(LATIN_SMALL_LETTER_V)) { + this._lastIntValue = LINE_TABULATION; return true; } return false; @@ -1295,8 +1714,8 @@ class RegExpValidator { } eatRegExpUnicodeEscapeSequence(forceUFlag = false) { const start = this.index; - const uFlag = forceUFlag || this._uFlag; - if (this.eat(LatinSmallLetterU)) { + const uFlag = forceUFlag || this._unicodeMode; + if (this.eat(LATIN_SMALL_LETTER_U)) { if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) || this.eatFixedHexDigits(4) || (uFlag && this.eatRegExpUnicodeCodePointEscape())) { @@ -1314,8 +1733,8 @@ class RegExpValidator { if (this.eatFixedHexDigits(4)) { const lead = this._lastIntValue; if (isLeadSurrogate(lead) && - this.eat(ReverseSolidus) && - this.eat(LatinSmallLetterU) && + this.eat(REVERSE_SOLIDUS) && + this.eat(LATIN_SMALL_LETTER_U) && this.eatFixedHexDigits(4)) { const trail = this._lastIntValue; if (isTrailSurrogate(trail)) { @@ -1329,9 +1748,9 @@ class RegExpValidator { } eatRegExpUnicodeCodePointEscape() { const start = this.index; - if (this.eat(LeftCurlyBracket) && + if (this.eat(LEFT_CURLY_BRACKET) && this.eatHexDigits() && - this.eat(RightCurlyBracket) && + this.eat(RIGHT_CURLY_BRACKET) && isValidUnicode(this._lastIntValue)) { return true; } @@ -1351,38 +1770,41 @@ class RegExpValidator { if (cp === -1) { return false; } - if (this._uFlag) { - return isSyntaxCharacter(cp) || cp === Solidus; + if (this._unicodeMode) { + return isSyntaxCharacter(cp) || cp === SOLIDUS; } if (this.strict) { return !isIdContinue(cp); } if (this._nFlag) { - return !(cp === LatinSmallLetterC || cp === LatinSmallLetterK); + return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K); } - return cp !== LatinSmallLetterC; + return cp !== LATIN_SMALL_LETTER_C; } eatDecimalEscape() { this._lastIntValue = 0; let cp = this.currentCodePoint; - if (cp >= DigitOne && cp <= DigitNine) { + if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) { do { - this._lastIntValue = 10 * this._lastIntValue + (cp - DigitZero); + this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO); this.advance(); - } while ((cp = this.currentCodePoint) >= DigitZero && - cp <= DigitNine); + } while ((cp = this.currentCodePoint) >= DIGIT_ZERO && + cp <= DIGIT_NINE); return true; } return false; } eatUnicodePropertyValueExpression() { const start = this.index; - if (this.eatUnicodePropertyName() && this.eat(EqualsSign)) { - this._lastKeyValue = this._lastStrValue; + if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) { + const key = this._lastStrValue; if (this.eatUnicodePropertyValue()) { - this._lastValValue = this._lastStrValue; - if (isValidUnicodeProperty(this.ecmaVersion, this._lastKeyValue, this._lastValValue)) { - return true; + const value = this._lastStrValue; + if (isValidUnicodeProperty(this.ecmaVersion, key, value)) { + return { + key, + value: value || null, + }; } this.raise("Invalid property name"); } @@ -1391,18 +1813,28 @@ class RegExpValidator { if (this.eatLoneUnicodePropertyNameOrValue()) { const nameOrValue = this._lastStrValue; if (isValidUnicodeProperty(this.ecmaVersion, "General_Category", nameOrValue)) { - this._lastKeyValue = "General_Category"; - this._lastValValue = nameOrValue; - return true; + return { + key: "General_Category", + value: nameOrValue || null, + }; } if (isValidLoneUnicodeProperty(this.ecmaVersion, nameOrValue)) { - this._lastKeyValue = nameOrValue; - this._lastValValue = ""; - return true; + return { + key: nameOrValue, + value: null, + }; + } + if (this._unicodeSetsMode && + isValidLoneUnicodePropertyOfString(this.ecmaVersion, nameOrValue)) { + return { + key: nameOrValue, + value: null, + strings: true, + }; } this.raise("Invalid property name"); } - return false; + return null; } eatUnicodePropertyName() { this._lastStrValue = ""; @@ -1425,11 +1857,11 @@ class RegExpValidator { } eatHexEscapeSequence() { const start = this.index; - if (this.eat(LatinSmallLetterX)) { + if (this.eat(LATIN_SMALL_LETTER_X)) { if (this.eatFixedHexDigits(2)) { return true; } - if (this._uFlag || this.strict) { + if (this._unicodeMode || this.strict) { this.raise("Invalid escape"); } this.rewind(start); @@ -1479,7 +1911,7 @@ class RegExpValidator { const cp = this.currentCodePoint; if (isOctalDigit(cp)) { this.advance(); - this._lastIntValue = cp - DigitZero; + this._lastIntValue = cp - DIGIT_ZERO; return true; } this._lastIntValue = 0; @@ -1501,18 +1933,27 @@ class RegExpValidator { } } -const DummyPattern = {}; -const DummyFlags = {}; -const DummyCapturingGroup = {}; +const DUMMY_PATTERN = {}; +const DUMMY_FLAGS = {}; +const DUMMY_CAPTURING_GROUP = {}; +function isClassSetOperand(node) { + return (node.type === "Character" || + node.type === "CharacterSet" || + node.type === "CharacterClass" || + node.type === "ExpressionCharacterClass" || + node.type === "ClassStringDisjunction"); +} class RegExpParserState { constructor(options) { - this._node = DummyPattern; - this._flags = DummyFlags; + var _a; + this._node = DUMMY_PATTERN; + this._expressionBufferMap = new Map(); + this._flags = DUMMY_FLAGS; this._backreferences = []; this._capturingGroups = []; this.source = ""; - this.strict = Boolean(options && options.strict); - this.ecmaVersion = (options && options.ecmaVersion) || 2020; + this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict); + this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : latestEcmaVersion; } get pattern() { if (this._node.type !== "Pattern") { @@ -1526,7 +1967,7 @@ class RegExpParserState { } return this._flags; } - onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll) { + onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, unicodeSets, }) { this._flags = { type: "Flags", parent: null, @@ -1539,6 +1980,8 @@ class RegExpParserState { unicode, sticky, dotAll, + hasIndices, + unicodeSets, }; } onPatternEnter(start) { @@ -1560,7 +2003,7 @@ class RegExpParserState { const ref = reference.ref; const group = typeof ref === "number" ? this._capturingGroups[ref - 1] - : this._capturingGroups.find(g => g.name === ref); + : this._capturingGroups.find((g) => g.name === ref); reference.resolved = group; group.references.push(reference); } @@ -1753,26 +2196,36 @@ class RegExpParserState { negate, }); } - onUnicodePropertyCharacterSet(start, end, kind, key, value, negate) { + onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) { const parent = this._node; if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { throw new Error("UnknownError"); } - parent.elements.push({ + const base = { type: "CharacterSet", - parent, start, end, raw: this.source.slice(start, end), kind, key, - value, - negate, - }); + }; + if (strings) { + if ((parent.type === "CharacterClass" && !parent.unicodeSets) || + negate || + value !== null) { + throw new Error("UnknownError"); + } + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } + else { + parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate })); + } } onCharacter(start, end, value) { const parent = this._node; - if (parent.type !== "Alternative" && parent.type !== "CharacterClass") { + if (parent.type !== "Alternative" && + parent.type !== "CharacterClass" && + parent.type !== "StringAlternative") { throw new Error("UnknownError"); } parent.elements.push({ @@ -1796,36 +2249,73 @@ class RegExpParserState { end, raw: this.source.slice(start, end), ref, - resolved: DummyCapturingGroup, + resolved: DUMMY_CAPTURING_GROUP, }; parent.elements.push(node); this._backreferences.push(node); } - onCharacterClassEnter(start, negate) { + onCharacterClassEnter(start, negate, unicodeSets) { const parent = this._node; - if (parent.type !== "Alternative") { - throw new Error("UnknownError"); - } - this._node = { + const base = { type: "CharacterClass", parent, start, end: start, raw: "", + unicodeSets, negate, elements: [], }; - parent.elements.push(this._node); + if (parent.type === "Alternative") { + const node = Object.assign(Object.assign({}, base), { parent }); + this._node = node; + parent.elements.push(node); + } + else if (parent.type === "CharacterClass" && + parent.unicodeSets && + unicodeSets) { + const node = Object.assign(Object.assign({}, base), { parent, + unicodeSets }); + this._node = node; + parent.elements.push(node); + } + else { + throw new Error("UnknownError"); + } } onCharacterClassLeave(start, end) { const node = this._node; if (node.type !== "CharacterClass" || - node.parent.type !== "Alternative") { + (node.parent.type !== "Alternative" && + node.parent.type !== "CharacterClass")) { throw new Error("UnknownError"); } + const parent = node.parent; node.end = end; node.raw = this.source.slice(start, end); - this._node = node.parent; + this._node = parent; + const expression = this._expressionBufferMap.get(node); + if (!expression) { + return; + } + if (node.elements.length > 0) { + throw new Error("UnknownError"); + } + this._expressionBufferMap.delete(node); + const newNode = { + type: "ExpressionCharacterClass", + parent, + start: node.start, + end: node.end, + raw: node.raw, + negate: node.negate, + expression, + }; + expression.parent = newNode; + if (node !== parent.elements.pop()) { + throw new Error("UnknownError"); + } + parent.elements.push(newNode); } onCharacterClassRange(start, end) { const parent = this._node; @@ -1834,15 +2324,19 @@ class RegExpParserState { } const elements = parent.elements; const max = elements.pop(); - const hyphen = elements.pop(); + if (!max || max.type !== "Character") { + throw new Error("UnknownError"); + } + if (!parent.unicodeSets) { + const hyphen = elements.pop(); + if (!hyphen || + hyphen.type !== "Character" || + hyphen.value !== HYPHEN_MINUS) { + throw new Error("UnknownError"); + } + } const min = elements.pop(); - if (!min || - !max || - !hyphen || - min.type !== "Character" || - max.type !== "Character" || - hyphen.type !== "Character" || - hyphen.value !== HyphenMinus) { + if (!min || min.type !== "Character") { throw new Error("UnknownError"); } const node = { @@ -1858,6 +2352,111 @@ class RegExpParserState { max.parent = node; elements.push(node); } + onClassIntersection(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassSubtraction" || + (left.type !== "ClassIntersection" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassIntersection", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassSubtraction(start, end) { + var _a; + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + const right = parent.elements.pop(); + const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop(); + if (!left || + !right || + left.type === "ClassIntersection" || + (left.type !== "ClassSubtraction" && !isClassSetOperand(left)) || + !isClassSetOperand(right)) { + throw new Error("UnknownError"); + } + const node = { + type: "ClassSubtraction", + parent: parent, + start, + end, + raw: this.source.slice(start, end), + left, + right, + }; + left.parent = node; + right.parent = node; + this._expressionBufferMap.set(parent, node); + } + onClassStringDisjunctionEnter(start) { + const parent = this._node; + if (parent.type !== "CharacterClass" || !parent.unicodeSets) { + throw new Error("UnknownError"); + } + this._node = { + type: "ClassStringDisjunction", + parent, + start, + end: start, + raw: "", + alternatives: [], + }; + parent.elements.push(this._node); + } + onClassStringDisjunctionLeave(start, end) { + const node = this._node; + if (node.type !== "ClassStringDisjunction" || + node.parent.type !== "CharacterClass") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } + onStringAlternativeEnter(start) { + const parent = this._node; + if (parent.type !== "ClassStringDisjunction") { + throw new Error("UnknownError"); + } + this._node = { + type: "StringAlternative", + parent, + start, + end: start, + raw: "", + elements: [], + }; + parent.alternatives.push(this._node); + } + onStringAlternativeLeave(start, end) { + const node = this._node; + if (node.type !== "StringAlternative") { + throw new Error("UnknownError"); + } + node.end = end; + node.raw = this.source.slice(start, end); + this._node = node.parent; + } } class RegExpParser { constructor(options) { @@ -1887,9 +2486,9 @@ class RegExpParser { this._validator.validateFlags(source, start, end); return this._state.flags; } - parsePattern(source, start = 0, end = source.length, uFlag = false) { + parsePattern(source, start = 0, end = source.length, uFlagOrFlags = undefined) { this._state.source = source; - this._validator.validatePattern(source, start, end, uFlag); + this._validator.validatePattern(source, start, end, uFlagOrFlags); return this._state.pattern; } } @@ -1924,6 +2523,18 @@ class RegExpVisitor { case "CharacterSet": this.visitCharacterSet(node); break; + case "ClassIntersection": + this.visitClassIntersection(node); + break; + case "ClassStringDisjunction": + this.visitClassStringDisjunction(node); + break; + case "ClassSubtraction": + this.visitClassSubtraction(node); + break; + case "ExpressionCharacterClass": + this.visitExpressionCharacterClass(node); + break; case "Flags": this.visitFlags(node); break; @@ -1939,6 +2550,9 @@ class RegExpVisitor { case "RegExpLiteral": this.visitRegExpLiteral(node); break; + case "StringAlternative": + this.visitStringAlternative(node); + break; default: throw new Error(`Unknown type: ${node.type}`); } @@ -2015,6 +2629,44 @@ class RegExpVisitor { this._handlers.onCharacterSetLeave(node); } } + visitClassIntersection(node) { + if (this._handlers.onClassIntersectionEnter) { + this._handlers.onClassIntersectionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassIntersectionLeave) { + this._handlers.onClassIntersectionLeave(node); + } + } + visitClassStringDisjunction(node) { + if (this._handlers.onClassStringDisjunctionEnter) { + this._handlers.onClassStringDisjunctionEnter(node); + } + node.alternatives.forEach(this.visit, this); + if (this._handlers.onClassStringDisjunctionLeave) { + this._handlers.onClassStringDisjunctionLeave(node); + } + } + visitClassSubtraction(node) { + if (this._handlers.onClassSubtractionEnter) { + this._handlers.onClassSubtractionEnter(node); + } + this.visit(node.left); + this.visit(node.right); + if (this._handlers.onClassSubtractionLeave) { + this._handlers.onClassSubtractionLeave(node); + } + } + visitExpressionCharacterClass(node) { + if (this._handlers.onExpressionCharacterClassEnter) { + this._handlers.onExpressionCharacterClassEnter(node); + } + this.visit(node.expression); + if (this._handlers.onExpressionCharacterClassLeave) { + this._handlers.onExpressionCharacterClassLeave(node); + } + } visitFlags(node) { if (this._handlers.onFlagsEnter) { this._handlers.onFlagsEnter(node); @@ -2060,17 +2712,26 @@ class RegExpVisitor { this._handlers.onRegExpLiteralLeave(node); } } + visitStringAlternative(node) { + if (this._handlers.onStringAlternativeEnter) { + this._handlers.onStringAlternativeEnter(node); + } + node.elements.forEach(this.visit, this); + if (this._handlers.onStringAlternativeLeave) { + this._handlers.onStringAlternativeLeave(node); + } + } } function parseRegExpLiteral(source, options) { return new RegExpParser(options).parseLiteral(String(source)); } function validateRegExpLiteral(source, options) { - return new RegExpValidator(options).validateLiteral(source); + new RegExpValidator(options).validateLiteral(source); } function visitRegExpAST(node, handlers) { new RegExpVisitor(handlers).visit(node); } -export { ast as AST, RegExpParser, RegExpValidator, parseRegExpLiteral, validateRegExpLiteral, visitRegExpAST }; +export { ast as AST, RegExpParser, RegExpSyntaxError, RegExpValidator, parseRegExpLiteral, validateRegExpLiteral, visitRegExpAST }; //# sourceMappingURL=index.mjs.map diff --git a/node_modules/@eslint-community/regexpp/index.mjs.map b/node_modules/@eslint-community/regexpp/index.mjs.map new file mode 100644 index 000000000..70b5c379d --- /dev/null +++ b/node_modules/@eslint-community/regexpp/index.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"index.mjs.map","sources":[".temp/src/ecma-versions.ts",".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;AAYO,MAAM,iBAAiB,GAAG,IAAI;;ACRrC,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAErD,SAAU,SAAS,CAAC,EAA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expp/package.json new file mode 100644 index 000000000..4544508aa --- /dev/null +++ b/node_modules/@eslint-community/regexpp/package.json @@ -0,0 +1,93 @@ +{ + "name": "@eslint-community/regexpp", + "version": "4.10.0", + "description": "Regular expression parser for ECMAScript.", + "keywords": [ + "regexp", + "regular", + "expression", + "parser", + "validator", + "ast", + "abstract", + "syntax", + "tree", + "ecmascript", + "es2015", + "es2016", + "es2017", + "es2018", + "es2019", + "es2020", + "es2021", + "annexB" + ], + "homepage": "https://github.com/eslint-community/regexpp#readme", + "bugs": { + "url": "https://github.com/eslint-community/regexpp/issues" + }, + "repository": { + "type": "git", + "url": "https://github.com/eslint-community/regexpp" + }, + "license": "MIT", + "author": "Toru Nagashima", + "exports": { + ".": { + "types": "./index.d.ts", + "import": "./index.mjs", + "default": "./index.js" + }, + "./package.json": "./package.json" + }, + "main": "index", + "files": [ + "index.*" + ], + "scripts": { + "prebuild": "npm run -s clean", + "build": "run-s build:*", + "build:tsc": "tsc --module es2015", + "build:rollup": "rollup -c", + "build:dts": "npm run -s build:tsc -- --removeComments false && dts-bundle --name @eslint-community/regexpp --main .temp/index.d.ts --out ../index.d.ts && prettier --write index.d.ts", + "clean": "rimraf .temp index.*", + "lint": "eslint . --ext .ts", + "test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000", + "debug": "mocha --require ts-node/register/transpile-only \"test/*.ts\" --reporter dot --timeout 10000", + "update:test": "ts-node scripts/update-fixtures.ts", + "update:unicode": "run-s update:unicode:*", + "update:unicode:ids": "ts-node scripts/update-unicode-ids.ts", + "update:unicode:props": "ts-node scripts/update-unicode-properties.ts", + "update:test262:extract": "ts-node -T scripts/extract-test262.ts", + "preversion": "npm test && npm run -s build", + "postversion": "git push && git push --tags", + "prewatch": "npm run -s clean", + "watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl" + }, + "dependencies": {}, + "devDependencies": { + "@eslint-community/eslint-plugin-mysticatea": "^15.5.1", + "@rollup/plugin-node-resolve": "^14.1.0", + "@types/eslint": "^8.44.3", + "@types/jsdom": "^16.2.15", + "@types/mocha": "^9.1.1", + "@types/node": "^12.20.55", + "dts-bundle": "^0.7.3", + "eslint": "^8.50.0", + "js-tokens": "^8.0.2", + "jsdom": "^19.0.0", + "mocha": "^9.2.2", + "npm-run-all": "^4.1.5", + "nyc": "^14.1.1", + "rimraf": "^3.0.2", + "rollup": "^2.79.1", + "rollup-plugin-sourcemaps": "^0.6.3", + "test262": "git+https://github.com/tc39/test262.git", + "test262-stream": "^1.4.0", + "ts-node": "^10.9.1", + "typescript": "~5.0.2" + }, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } +} diff --git a/node_modules/@eslint/eslintrc/CHANGELOG.md b/node_modules/@eslint/eslintrc/CHANGELOG.md deleted file mode 100644 index a15ce7c39..000000000 --- a/node_modules/@eslint/eslintrc/CHANGELOG.md +++ /dev/null @@ -1,32 +0,0 @@ -v0.4.0 - February 27, 2021 - -* [`d9a527b`](https://github.com/eslint/eslintrc/commit/d9a527bdb16af46a28d37fa9022131149970a438) New: Implement DotCompat class (#20) (Nicholas C. Zakas) -* [`dac76c0`](https://github.com/eslint/eslintrc/commit/dac76c035a9ab9d315050f688867373966aab288) Chore: Replace usage of lodash with cache set (#29) (Tim van der Lippe) -* [`3ae2d77`](https://github.com/eslint/eslintrc/commit/3ae2d770cb810c026de817e6861e25dac111da9f) Update: add AggregateError global to es2021 environment (#28) (Milos Djermanovic) - -v0.3.0 - January 15, 2021 - -* [`5184490`](https://github.com/eslint/eslintrc/commit/51844902bc4132f264f05a0614f2cdeb89290f68) Upgrade: lodash@4.17.20 (#24) (Milos Djermanovic) -* [`f1179c5`](https://github.com/eslint/eslintrc/commit/f1179c587ae09fabb5c3402598363cfcec2494f7) Update: Implement missing functionality from ESLint port (fixes #12) (#23) (Nicholas C. Zakas) - -v0.2.2 - December 5, 2020 - -* [`1746840`](https://github.com/eslint/eslintrc/commit/17468407c1baf05747cb261c91f7f7b7c2a82422) Fix: include loadRules in internalSlotsMap cache (#19) (Henry Q. Dineen) -* [`f30bb49`](https://github.com/eslint/eslintrc/commit/f30bb4935aaf3f4c1b268490da495a59647e58d8) Chore: Test fixes for CascadingConfigArrayFactory (#17) (Nicholas C. Zakas) -* [`4440df8`](https://github.com/eslint/eslintrc/commit/4440df8237a127e15cbde5c697353e1224f12ec1) Chore: Fix config-array tests (#16) (Nicholas C. Zakas) -* [`7890e02`](https://github.com/eslint/eslintrc/commit/7890e027df530a0fb53bcf5751c8c7a008b2a494) Chore: Test fixes for config-array-factory.js (#13) (Nicholas C. Zakas) - -v0.2.1 - October 26, 2020 - -* [`8b202ff`](https://github.com/eslint/eslintrc/commit/8b202ff866a39efdaad6394fde9f88372afbfca8) Fix: validate schema for built-in rules (#14) (Milos Djermanovic) -* [`04f3cae`](https://github.com/eslint/eslintrc/commit/04f3cae17fe07b2fd0b74fd3e88482b3094e75e3) Fix: cache compiled config schema (#9) (Milos Djermanovic) - -v0.2.0 - October 16, 2020 - -* [`cb12255`](https://github.com/eslint/eslintrc/commit/cb12255b85390e932e1942e479c2c97310149390) Update: Allow eslint:all and eslint:recommended paths to be passed in (#11) (Nicholas C. Zakas) -* [`a75bacd`](https://github.com/eslint/eslintrc/commit/a75bacd9a743a7bbcdb8c59e5d4f9de3dc8b0f20) Chore: use GitHub Actions (#10) (Milos Djermanovic) - -v0.1.3 - September 1, 2020 - -* [`8647a61`](https://github.com/eslint/eslintrc/commit/8647a61991fe121f923d33e96232475209b78210) Fix: version number and eslint-release version (refs #6) (Nicholas C. Zakas) - diff --git a/node_modules/@eslint/eslintrc/LICENSE b/node_modules/@eslint/eslintrc/LICENSE index f9556ee61..b607bb36e 100644 --- a/node_modules/@eslint/eslintrc/LICENSE +++ b/node_modules/@eslint/eslintrc/LICENSE @@ -1,6 +1,4 @@ -MIT License - -Copyright (c) 2020 ESLint +Copyright OpenJS Foundation and other contributors, Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +7,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@eslint/eslintrc/README.md b/node_modules/@eslint/eslintrc/README.md index 11ff46ec0..7641c7416 100644 --- a/node_modules/@eslint/eslintrc/README.md +++ b/node_modules/@eslint/eslintrc/README.md @@ -1,8 +1,8 @@ # ESLintRC Library -This repository contains the legacy ESLintRC configuration file format for ESLint. +This repository contains the legacy ESLintRC configuration file format for ESLint. This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs. -**Note:** This package is not intended for use outside of the ESLint ecosystem. It is ESLint-specific and not intended for use in other programs. +**Note:** This package is frozen except for critical bug fixes as ESLint moves to a new config system. ## Installation @@ -16,33 +16,87 @@ npm install @eslint/eslintrc --save-dev yarn add @eslint/eslintrc -D ``` -## Future Usage - -**Note:** This package is not intended for public use at this time. The following is an example of how it will be used in the future. +## Usage (ESM) The primary class in this package is `FlatCompat`, which is a utility to translate ESLintRC-style configs into flat configs. Here's how you use it inside of your `eslint.config.js` file: ```js import { FlatCompat } from "@eslint/eslintrc"; +import js from "@eslint/js"; +import path from "path"; +import { fileURLToPath } from "url"; + +// mimic CommonJS variables -- not needed if using CommonJS +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); -const compat = new FlatCompat(); +const compat = new FlatCompat({ + baseDirectory: __dirname, // optional; default: process.cwd() + resolvePluginsRelativeTo: __dirname, // optional + recommendedConfig: js.configs.recommended, // optional + allConfig: js.configs.all, // optional +}); export default [ // mimic ESLintRC-style extends - compat.extends("standard", "example"), + ...compat.extends("standard", "example"), + + // mimic environments + ...compat.env({ + es2020: true, + node: true + }), + + // mimic plugins + ...compat.plugins("airbnb", "react"), + + // translate an entire config + ...compat.config({ + plugins: ["airbnb", "react"], + extends: "standard", + env: { + es2020: true, + node: true + }, + rules: { + semi: "error" + } + }) +]; +``` + +## Usage (CommonJS) + +Using `FlatCompat` in CommonJS files is similar to ESM, but you'll use `require()` and `module.exports` instead of `import` and `export`. Here's how you use it inside of your `eslint.config.js` CommonJS file: + +```js +const { FlatCompat } = require("@eslint/eslintrc"); +const js = require("@eslint/js"); + +const compat = new FlatCompat({ + baseDirectory: __dirname, // optional; default: process.cwd() + resolvePluginsRelativeTo: __dirname, // optional + recommendedConfig: js.configs.recommended, // optional + allConfig: js.configs.all, // optional +}); + +module.exports = [ + + // mimic ESLintRC-style extends + ...compat.extends("standard", "example"), // mimic environments - compat.env({ + ...compat.env({ es2020: true, node: true }), // mimic plugins - compat.plugins("airbnb", "react"), + ...compat.plugins("airbnb", "react"), // translate an entire config - compat.config({ + ...compat.config({ plugins: ["airbnb", "react"], extends: "standard", env: { diff --git a/node_modules/@eslint/eslintrc/conf/config-schema.js b/node_modules/@eslint/eslintrc/conf/config-schema.js index 712fc4235..ada90e135 100644 --- a/node_modules/@eslint/eslintrc/conf/config-schema.js +++ b/node_modules/@eslint/eslintrc/conf/config-schema.js @@ -3,8 +3,6 @@ * @author Sylvan Mably */ -"use strict"; - const baseConfigProperties = { $schema: { type: "string" }, env: { type: "object" }, @@ -78,4 +76,4 @@ const configSchema = { $ref: "#/definitions/objectConfig" }; -module.exports = configSchema; +export default configSchema; diff --git a/node_modules/@eslint/eslintrc/conf/environments.js b/node_modules/@eslint/eslintrc/conf/environments.js index 757c9fe69..50d1b1d10 100644 --- a/node_modules/@eslint/eslintrc/conf/environments.js +++ b/node_modules/@eslint/eslintrc/conf/environments.js @@ -2,13 +2,12 @@ * @fileoverview Defines environment settings and globals. * @author Elan Shanker */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const globals = require("globals"); +import globals from "globals"; //------------------------------------------------------------------------------ // Helpers @@ -55,7 +54,7 @@ const newGlobals2021 = { //------------------------------------------------------------------------------ /** @type {Map} */ -module.exports = new Map(Object.entries({ +export default new Map(Object.entries({ // Language builtin: { @@ -73,12 +72,30 @@ module.exports = new Map(Object.entries({ ecmaVersion: 6 } }, + es2016: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 7 + } + }, es2017: { globals: { ...newGlobals2015, ...newGlobals2017 }, parserOptions: { ecmaVersion: 8 } }, + es2018: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 9 + } + }, + es2019: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 10 + } + }, es2020: { globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 }, parserOptions: { @@ -91,6 +108,24 @@ module.exports = new Map(Object.entries({ ecmaVersion: 12 } }, + es2022: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 13 + } + }, + es2023: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 14 + } + }, + es2024: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 15 + } + }, // Platforms browser: { diff --git a/node_modules/@eslint/eslintrc/conf/eslint-all.js b/node_modules/@eslint/eslintrc/conf/eslint-all.js deleted file mode 100644 index 859811c8d..000000000 --- a/node_modules/@eslint/eslintrc/conf/eslint-all.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @fileoverview Stub eslint:all config - * @author Nicholas C. Zakas - */ - -"use strict"; - -module.exports = { - settings: { - "eslint:all": true - } -}; diff --git a/node_modules/@eslint/eslintrc/conf/eslint-recommended.js b/node_modules/@eslint/eslintrc/conf/eslint-recommended.js deleted file mode 100644 index 96300919a..000000000 --- a/node_modules/@eslint/eslintrc/conf/eslint-recommended.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @fileoverview Stub eslint:recommended config - * @author Nicholas C. Zakas - */ - -"use strict"; - -module.exports = { - settings: { - "eslint:recommended": true - } -}; diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs b/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs new file mode 100644 index 000000000..64e66666d --- /dev/null +++ b/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs @@ -0,0 +1,1104 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var util = require('util'); +var path = require('path'); +var Ajv = require('ajv'); +var globals = require('globals'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var util__default = /*#__PURE__*/_interopDefaultLegacy(util); +var path__default = /*#__PURE__*/_interopDefaultLegacy(path); +var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv); +var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals); + +/** + * @fileoverview Config file operations. This file must be usable in the browser, + * so no Node-specific code can be here. + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const RULE_SEVERITY_STRINGS = ["off", "warn", "error"], + RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => { + map[value] = index; + return map; + }, {}), + VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"]; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Normalizes the severity value of a rule's configuration to a number + * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally + * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), + * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array + * whose first element is one of the above values. Strings are matched case-insensitively. + * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. + */ +function getRuleSeverity(ruleConfig) { + const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (severityValue === 0 || severityValue === 1 || severityValue === 2) { + return severityValue; + } + + if (typeof severityValue === "string") { + return RULE_SEVERITY[severityValue.toLowerCase()] || 0; + } + + return 0; +} + +/** + * Converts old-style severity settings (0, 1, 2) into new-style + * severity settings (off, warn, error) for all rules. Assumption is that severity + * values have already been validated as correct. + * @param {Object} config The config object to normalize. + * @returns {void} + */ +function normalizeToStrings(config) { + + if (config.rules) { + Object.keys(config.rules).forEach(ruleId => { + const ruleConfig = config.rules[ruleId]; + + if (typeof ruleConfig === "number") { + config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; + } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { + ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; + } + }); + } +} + +/** + * Determines if the severity for the given rule configuration represents an error. + * @param {int|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} True if the rule represents an error, false if not. + */ +function isErrorSeverity(ruleConfig) { + return getRuleSeverity(ruleConfig) === 2; +} + +/** + * Checks whether a given config has valid severity or not. + * @param {number|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isValidSeverity(ruleConfig) { + let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (typeof severity === "string") { + severity = severity.toLowerCase(); + } + return VALID_SEVERITIES.indexOf(severity) !== -1; +} + +/** + * Checks whether every rule of a given config has valid severity or not. + * @param {Object} config The configuration for rules. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isEverySeverityValid(config) { + return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId])); +} + +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); + } +} + +var ConfigOps = { + __proto__: null, + getRuleSeverity: getRuleSeverity, + normalizeToStrings: normalizeToStrings, + isErrorSeverity: isErrorSeverity, + isValidSeverity: isValidSeverity, + isEverySeverityValid: isEverySeverityValid, + normalizeConfigGlobal: normalizeConfigGlobal +}; + +/** + * @fileoverview Provide the function that emits deprecation warnings. + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +// Defitions for deprecation warnings. +const deprecationWarningMessages = { + ESLINT_LEGACY_ECMAFEATURES: + "The 'ecmaFeatures' config file property is deprecated and has no effect.", + ESLINT_PERSONAL_CONFIG_LOAD: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please use a config file per project or the '--config' option.", + ESLINT_PERSONAL_CONFIG_SUPPRESS: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please remove it or add 'root:true' to the config files in your " + + "projects in order to avoid loading '~/.eslintrc.*' accidentally." +}; + +const sourceFileErrorCache = new Set(); + +/** + * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted + * for each unique file path, but repeated invocations with the same file path have no effect. + * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active. + * @param {string} source The name of the configuration source to report the warning for. + * @param {string} errorCode The warning message to show. + * @returns {void} + */ +function emitDeprecationWarning(source, errorCode) { + const cacheKey = JSON.stringify({ source, errorCode }); + + if (sourceFileErrorCache.has(cacheKey)) { + return; + } + sourceFileErrorCache.add(cacheKey); + + const rel = path__default["default"].relative(process.cwd(), source); + const message = deprecationWarningMessages[errorCode]; + + process.emitWarning( + `${message} (found in "${rel}")`, + "DeprecationWarning", + errorCode + ); +} + +/** + * @fileoverview The instance of Ajv validator. + * @author Evgeny Poberezkin + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/* + * Copied from ajv/lib/refs/json-schema-draft-04.json + * The MIT License (MIT) + * Copyright (c) 2015-2017 Evgeny Poberezkin + */ +const metaSchema = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string" + }, + $schema: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: { }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + items: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/schemaArray" } + ], + default: { } + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/stringArray" } + ] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: { } +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +var ajvOrig = (additionalOptions = {}) => { + const ajv = new Ajv__default["default"]({ + meta: false, + useDefaults: true, + validateSchema: false, + missingRefs: "ignore", + verbose: true, + schemaId: "auto", + ...additionalOptions + }); + + ajv.addMetaSchema(metaSchema); + // eslint-disable-next-line no-underscore-dangle + ajv._opts.defaultMeta = metaSchema.id; + + return ajv; +}; + +/** + * @fileoverview Defines a schema for configs. + * @author Sylvan Mably + */ + +const baseConfigProperties = { + $schema: { type: "string" }, + env: { type: "object" }, + extends: { $ref: "#/definitions/stringOrStrings" }, + globals: { type: "object" }, + overrides: { + type: "array", + items: { $ref: "#/definitions/overrideConfig" }, + additionalItems: false + }, + parser: { type: ["string", "null"] }, + parserOptions: { type: "object" }, + plugins: { type: "array" }, + processor: { type: "string" }, + rules: { type: "object" }, + settings: { type: "object" }, + noInlineConfig: { type: "boolean" }, + reportUnusedDisableDirectives: { type: "boolean" }, + + ecmaFeatures: { type: "object" } // deprecated; logs a warning when used +}; + +const configSchema = { + definitions: { + stringOrStrings: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false + } + ] + }, + stringOrStringsRequired: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false, + minItems: 1 + } + ] + }, + + // Config at top-level. + objectConfig: { + type: "object", + properties: { + root: { type: "boolean" }, + ignorePatterns: { $ref: "#/definitions/stringOrStrings" }, + ...baseConfigProperties + }, + additionalProperties: false + }, + + // Config in `overrides`. + overrideConfig: { + type: "object", + properties: { + excludedFiles: { $ref: "#/definitions/stringOrStrings" }, + files: { $ref: "#/definitions/stringOrStringsRequired" }, + ...baseConfigProperties + }, + required: ["files"], + additionalProperties: false + } + }, + + $ref: "#/definitions/objectConfig" +}; + +/** + * @fileoverview Defines environment settings and globals. + * @author Elan Shanker + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the object that has difference. + * @param {Record} current The newer object. + * @param {Record} prev The older object. + * @returns {Record} The difference object. + */ +function getDiff(current, prev) { + const retv = {}; + + for (const [key, value] of Object.entries(current)) { + if (!Object.hasOwnProperty.call(prev, key)) { + retv[key] = value; + } + } + + return retv; +} + +const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ... +const newGlobals2017 = { + Atomics: false, + SharedArrayBuffer: false +}; +const newGlobals2020 = { + BigInt: false, + BigInt64Array: false, + BigUint64Array: false, + globalThis: false +}; + +const newGlobals2021 = { + AggregateError: false, + FinalizationRegistry: false, + WeakRef: false +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** @type {Map} */ +var environments = new Map(Object.entries({ + + // Language + builtin: { + globals: globals__default["default"].es5 + }, + es6: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2015: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2016: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 7 + } + }, + es2017: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 8 + } + }, + es2018: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 9 + } + }, + es2019: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 10 + } + }, + es2020: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 }, + parserOptions: { + ecmaVersion: 11 + } + }, + es2021: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 12 + } + }, + es2022: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 13 + } + }, + es2023: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 14 + } + }, + es2024: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 15 + } + }, + + // Platforms + browser: { + globals: globals__default["default"].browser + }, + node: { + globals: globals__default["default"].node, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + "shared-node-browser": { + globals: globals__default["default"]["shared-node-browser"] + }, + worker: { + globals: globals__default["default"].worker + }, + serviceworker: { + globals: globals__default["default"].serviceworker + }, + + // Frameworks + commonjs: { + globals: globals__default["default"].commonjs, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + amd: { + globals: globals__default["default"].amd + }, + mocha: { + globals: globals__default["default"].mocha + }, + jasmine: { + globals: globals__default["default"].jasmine + }, + jest: { + globals: globals__default["default"].jest + }, + phantomjs: { + globals: globals__default["default"].phantomjs + }, + jquery: { + globals: globals__default["default"].jquery + }, + qunit: { + globals: globals__default["default"].qunit + }, + prototypejs: { + globals: globals__default["default"].prototypejs + }, + shelljs: { + globals: globals__default["default"].shelljs + }, + meteor: { + globals: globals__default["default"].meteor + }, + mongo: { + globals: globals__default["default"].mongo + }, + protractor: { + globals: globals__default["default"].protractor + }, + applescript: { + globals: globals__default["default"].applescript + }, + nashorn: { + globals: globals__default["default"].nashorn + }, + atomtest: { + globals: globals__default["default"].atomtest + }, + embertest: { + globals: globals__default["default"].embertest + }, + webextensions: { + globals: globals__default["default"].webextensions + }, + greasemonkey: { + globals: globals__default["default"].greasemonkey + } +})); + +/** + * @fileoverview Validates configs. + * @author Brandon Mills + */ + +const ajv = ajvOrig(); + +const ruleValidators = new WeakMap(); +const noop = Function.prototype; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ +let validateSchema; +const severityMap = { + error: 2, + warn: 1, + off: 0 +}; + +const validated = new WeakSet(); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +class ConfigValidator { + constructor({ builtInRules = new Map() } = {}) { + this.builtInRules = builtInRules; + } + + /** + * Gets a complete options schema for a rule. + * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object + * @returns {Object} JSON Schema for the rule's options. + */ + getRuleOptionsSchema(rule) { + if (!rule) { + return null; + } + + const schema = rule.schema || rule.meta && rule.meta.schema; + + // Given a tuple of schemas, insert warning level at the beginning + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + return { + type: "array", + minItems: 0, + maxItems: 0 + }; + + } + + // Given a full schema, leave it alone + return schema || null; + } + + /** + * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid. + * @param {options} options The given options for the rule. + * @returns {number|string} The rule's severity value + */ + validateRuleSeverity(options) { + const severity = Array.isArray(options) ? options[0] : options; + const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity; + + if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) { + return normSeverity; + } + + throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`); + + } + + /** + * Validates the non-severity options passed to a rule, based on its schema. + * @param {{create: Function}} rule The rule to validate + * @param {Array} localOptions The options for the rule, excluding severity + * @returns {void} + */ + validateRuleSchema(rule, localOptions) { + if (!ruleValidators.has(rule)) { + const schema = this.getRuleOptionsSchema(rule); + + if (schema) { + ruleValidators.set(rule, ajv.compile(schema)); + } + } + + const validateRule = ruleValidators.get(rule); + + if (validateRule) { + validateRule(localOptions); + if (validateRule.errors) { + throw new Error(validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("")); + } + } + } + + /** + * Validates a rule's options against its schema. + * @param {{create: Function}|null} rule The rule that the config is being validated for + * @param {string} ruleId The rule's unique name. + * @param {Array|number} options The given options for the rule. + * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined, + * no source is prepended to the message. + * @returns {void} + */ + validateRuleOptions(rule, ruleId, options, source = null) { + try { + const severity = this.validateRuleSeverity(options); + + if (severity !== 0) { + this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []); + } + } catch (err) { + const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`; + + if (typeof source === "string") { + throw new Error(`${source}:\n\t${enhancedMessage}`); + } else { + throw new Error(enhancedMessage); + } + } + } + + /** + * Validates an environment object + * @param {Object} environment The environment config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments. + * @returns {void} + */ + validateEnvironment( + environment, + source, + getAdditionalEnv = noop + ) { + + // not having an environment is ok + if (!environment) { + return; + } + + Object.keys(environment).forEach(id => { + const env = getAdditionalEnv(id) || environments.get(id) || null; + + if (!env) { + const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`; + + throw new Error(message); + } + }); + } + + /** + * Validates a rules config object + * @param {Object} rulesConfig The rules config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules + * @returns {void} + */ + validateRules( + rulesConfig, + source, + getAdditionalRule = noop + ) { + if (!rulesConfig) { + return; + } + + Object.keys(rulesConfig).forEach(id => { + const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null; + + this.validateRuleOptions(rule, id, rulesConfig[id], source); + }); + } + + /** + * Validates a `globals` section of a config file + * @param {Object} globalsConfig The `globals` section + * @param {string|null} source The name of the configuration source to report in the event of an error. + * @returns {void} + */ + validateGlobals(globalsConfig, source = null) { + if (!globalsConfig) { + return; + } + + Object.entries(globalsConfig) + .forEach(([configuredGlobal, configuredValue]) => { + try { + normalizeConfigGlobal(configuredValue); + } catch (err) { + throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`); + } + }); + } + + /** + * Validate `processor` configuration. + * @param {string|undefined} processorName The processor name. + * @param {string} source The name of config file. + * @param {function(id:string): Processor} getProcessor The getter of defined processors. + * @returns {void} + */ + validateProcessor(processorName, source, getProcessor) { + if (processorName && !getProcessor(processorName)) { + throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`); + } + } + + /** + * Formats an array of schema validation errors. + * @param {Array} errors An array of error messages to format. + * @returns {string} Formatted error message + */ + formatErrors(errors) { + return errors.map(error => { + if (error.keyword === "additionalProperties") { + const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty; + + return `Unexpected top-level property "${formattedPropertyPath}"`; + } + if (error.keyword === "type") { + const formattedField = error.dataPath.slice(1); + const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema; + const formattedValue = JSON.stringify(error.data); + + return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`; + } + + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`; + }).map(message => `\t- ${message}.\n`).join(""); + } + + /** + * Validates the top level properties of the config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @returns {void} + */ + validateConfigSchema(config, source = null) { + validateSchema = validateSchema || ajv.compile(configSchema); + + if (!validateSchema(config)) { + throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`); + } + + if (Object.hasOwnProperty.call(config, "ecmaFeatures")) { + emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES"); + } + } + + /** + * Validates an entire config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules. + * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs. + * @returns {void} + */ + validate(config, source, getAdditionalRule, getAdditionalEnv) { + this.validateConfigSchema(config, source); + this.validateRules(config.rules, source, getAdditionalRule); + this.validateEnvironment(config.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + + for (const override of config.overrides || []) { + this.validateRules(override.rules, source, getAdditionalRule); + this.validateEnvironment(override.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + } + } + + /** + * Validate config array object. + * @param {ConfigArray} configArray The config array to validate. + * @returns {void} + */ + validateConfigArray(configArray) { + const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments); + const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors); + const getPluginRule = Map.prototype.get.bind(configArray.pluginRules); + + // Validate. + for (const element of configArray) { + if (validated.has(element)) { + continue; + } + validated.add(element); + + this.validateEnvironment(element.env, element.name, getPluginEnv); + this.validateGlobals(element.globals, element.name); + this.validateProcessor(element.processor, element.name, getPluginProcessor); + this.validateRules(element.rules, element.name, getPluginRule); + } + } + +} + +/** + * @fileoverview Common helpers for naming of plugins, formatters and configs + */ + +const NAMESPACE_REGEX = /^@.*\//iu; + +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" + * @returns {string} Normalized name of the package + * @private + */ +function normalizePackageName(name, prefix) { + let normalizedName = name; + + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (normalizedName.includes("\\")) { + normalizedName = normalizedName.replace(/\\/gu, "/"); + } + + if (normalizedName.charAt(0) === "@") { + + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"), + scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u"); + + if (scopedPackageShortcutRegex.test(normalizedName)) { + normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { + + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`); + } + } else if (!normalizedName.startsWith(`${prefix}-`)) { + normalizedName = `${prefix}-${normalizedName}`; + } + + return normalizedName; +} + +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @param {string} prefix The prefix to remove. + * @returns {string} The term without prefix. + */ +function getShorthandName(fullname, prefix) { + if (fullname[0] === "@") { + let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname); + + if (matchResult) { + return matchResult[1]; + } + + matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname); + if (matchResult) { + return `${matchResult[1]}/${matchResult[2]}`; + } + } else if (fullname.startsWith(`${prefix}-`)) { + return fullname.slice(prefix.length + 1); + } + + return fullname; +} + +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +function getNamespaceFromTerm(term) { + const match = term.match(NAMESPACE_REGEX); + + return match ? match[0] : ""; +} + +var naming = { + __proto__: null, + normalizePackageName: normalizePackageName, + getShorthandName: getShorthandName, + getNamespaceFromTerm: getNamespaceFromTerm +}; + +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + environments, + + // shared + ConfigOps, + ConfigValidator, + naming +}; + +exports.Legacy = Legacy; +//# sourceMappingURL=eslintrc-universal.cjs.map diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map b/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map new file mode 100644 index 000000000..12895a6c7 --- /dev/null +++ b/node_modules/@eslint/eslintrc/dist/eslintrc-universal.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"eslintrc-universal.cjs","sources":["../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/index-universal.js"],"sourcesContent":["/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = [0, 1, 2, \"off\", \"warn\", \"error\"];\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.indexOf(severity) !== -1;\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwnProperty.call(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object\n * @returns {Object} JSON Schema for the rule's options.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n const schema = rule.schema || rule.meta && rule.meta.schema;\n\n // Given a tuple of schemas, insert warning level at the beginning\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n return {\n type: \"array\",\n minItems: 0,\n maxItems: 0\n };\n\n }\n\n // Given a full schema, leave it alone\n return schema || null;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n validateRule(localOptions);\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n const enhancedMessage = `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n throw new Error(`${source}:\\n\\t${enhancedMessage}`);\n } else {\n throw new Error(enhancedMessage);\n }\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {function(id:string): Processor} getProcessor The getter of defined processors.\n * @returns {void}\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwnProperty.call(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n environments,\n\n // shared\n ConfigOps,\n ConfigValidator,\n naming\n};\n\nexport {\n Legacy\n};\n"],"names":["path","Ajv","globals","util","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal"],"mappings":";;;;;;;;;;;;;;;;AAAA;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nB,IAAI,MAAM;AACV;;;;"} \ No newline at end of file diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc.cjs b/node_modules/@eslint/eslintrc/dist/eslintrc.cjs new file mode 100644 index 000000000..eb2ed8d37 --- /dev/null +++ b/node_modules/@eslint/eslintrc/dist/eslintrc.cjs @@ -0,0 +1,4344 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var debugOrig = require('debug'); +var fs = require('fs'); +var importFresh = require('import-fresh'); +var Module = require('module'); +var path = require('path'); +var stripComments = require('strip-json-comments'); +var assert = require('assert'); +var ignore = require('ignore'); +var util = require('util'); +var minimatch = require('minimatch'); +var Ajv = require('ajv'); +var globals = require('globals'); +var os = require('os'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var debugOrig__default = /*#__PURE__*/_interopDefaultLegacy(debugOrig); +var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); +var importFresh__default = /*#__PURE__*/_interopDefaultLegacy(importFresh); +var Module__default = /*#__PURE__*/_interopDefaultLegacy(Module); +var path__default = /*#__PURE__*/_interopDefaultLegacy(path); +var stripComments__default = /*#__PURE__*/_interopDefaultLegacy(stripComments); +var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert); +var ignore__default = /*#__PURE__*/_interopDefaultLegacy(ignore); +var util__default = /*#__PURE__*/_interopDefaultLegacy(util); +var minimatch__default = /*#__PURE__*/_interopDefaultLegacy(minimatch); +var Ajv__default = /*#__PURE__*/_interopDefaultLegacy(Ajv); +var globals__default = /*#__PURE__*/_interopDefaultLegacy(globals); +var os__default = /*#__PURE__*/_interopDefaultLegacy(os); + +/** + * @fileoverview `IgnorePattern` class. + * + * `IgnorePattern` class has the set of glob patterns and the base path. + * + * It provides two static methods. + * + * - `IgnorePattern.createDefaultIgnore(cwd)` + * Create the default predicate function. + * - `IgnorePattern.createIgnore(ignorePatterns)` + * Create the predicate function from multiple `IgnorePattern` objects. + * + * It provides two properties and a method. + * + * - `patterns` + * The glob patterns that ignore to lint. + * - `basePath` + * The base path of the glob patterns. If absolute paths existed in the + * glob patterns, those are handled as relative paths to the base path. + * - `getPatternsRelativeTo(basePath)` + * Get `patterns` as modified for a given base path. It modifies the + * absolute paths in the patterns as prepending the difference of two base + * paths. + * + * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes + * `ignorePatterns` properties. + * + * @author Toru Nagashima + */ + +const debug$3 = debugOrig__default["default"]("eslintrc:ignore-pattern"); + +/** @typedef {ReturnType} Ignore */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the path to the common ancestor directory of given paths. + * @param {string[]} sourcePaths The paths to calculate the common ancestor. + * @returns {string} The path to the common ancestor directory. + */ +function getCommonAncestorPath(sourcePaths) { + let result = sourcePaths[0]; + + for (let i = 1; i < sourcePaths.length; ++i) { + const a = result; + const b = sourcePaths[i]; + + // Set the shorter one (it's the common ancestor if one includes the other). + result = a.length < b.length ? a : b; + + // Set the common ancestor. + for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) { + if (a[j] !== b[j]) { + result = a.slice(0, lastSepPos); + break; + } + if (a[j] === path__default["default"].sep) { + lastSepPos = j; + } + } + } + + let resolvedResult = result || path__default["default"].sep; + + // if Windows common ancestor is root of drive must have trailing slash to be absolute. + if (resolvedResult && resolvedResult.endsWith(":") && process.platform === "win32") { + resolvedResult += path__default["default"].sep; + } + return resolvedResult; +} + +/** + * Make relative path. + * @param {string} from The source path to get relative path. + * @param {string} to The destination path to get relative path. + * @returns {string} The relative path. + */ +function relative(from, to) { + const relPath = path__default["default"].relative(from, to); + + if (path__default["default"].sep === "/") { + return relPath; + } + return relPath.split(path__default["default"].sep).join("/"); +} + +/** + * Get the trailing slash if existed. + * @param {string} filePath The path to check. + * @returns {string} The trailing slash if existed. + */ +function dirSuffix(filePath) { + const isDir = ( + filePath.endsWith(path__default["default"].sep) || + (process.platform === "win32" && filePath.endsWith("/")) + ); + + return isDir ? "/" : ""; +} + +const DefaultPatterns = Object.freeze(["/**/node_modules/*"]); +const DotPatterns = Object.freeze([".*", "!.eslintrc.*", "!../"]); + +//------------------------------------------------------------------------------ +// Public +//------------------------------------------------------------------------------ + +class IgnorePattern { + + /** + * The default patterns. + * @type {string[]} + */ + static get DefaultPatterns() { + return DefaultPatterns; + } + + /** + * Create the default predicate function. + * @param {string} cwd The current working directory. + * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}} + * The preficate function. + * The first argument is an absolute path that is checked. + * The second argument is the flag to not ignore dotfiles. + * If the predicate function returned `true`, it means the path should be ignored. + */ + static createDefaultIgnore(cwd) { + return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]); + } + + /** + * Create the predicate function from multiple `IgnorePattern` objects. + * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns. + * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}} + * The preficate function. + * The first argument is an absolute path that is checked. + * The second argument is the flag to not ignore dotfiles. + * If the predicate function returned `true`, it means the path should be ignored. + */ + static createIgnore(ignorePatterns) { + debug$3("Create with: %o", ignorePatterns); + + const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath)); + const patterns = [].concat( + ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath)) + ); + const ig = ignore__default["default"]({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]); + const dotIg = ignore__default["default"]({ allowRelativePaths: true }).add(patterns); + + debug$3(" processed: %o", { basePath, patterns }); + + return Object.assign( + (filePath, dot = false) => { + assert__default["default"](path__default["default"].isAbsolute(filePath), "'filePath' should be an absolute path."); + const relPathRaw = relative(basePath, filePath); + const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath)); + const adoptedIg = dot ? dotIg : ig; + const result = relPath !== "" && adoptedIg.ignores(relPath); + + debug$3("Check", { filePath, dot, relativePath: relPath, result }); + return result; + }, + { basePath, patterns } + ); + } + + /** + * Initialize a new `IgnorePattern` instance. + * @param {string[]} patterns The glob patterns that ignore to lint. + * @param {string} basePath The base path of `patterns`. + */ + constructor(patterns, basePath) { + assert__default["default"](path__default["default"].isAbsolute(basePath), "'basePath' should be an absolute path."); + + /** + * The glob patterns that ignore to lint. + * @type {string[]} + */ + this.patterns = patterns; + + /** + * The base path of `patterns`. + * @type {string} + */ + this.basePath = basePath; + + /** + * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`. + * + * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility. + * It's `false` as-is for `ignorePatterns` property in config files. + * @type {boolean} + */ + this.loose = false; + } + + /** + * Get `patterns` as modified for a given base path. It modifies the + * absolute paths in the patterns as prepending the difference of two base + * paths. + * @param {string} newBasePath The base path. + * @returns {string[]} Modifired patterns. + */ + getPatternsRelativeTo(newBasePath) { + assert__default["default"](path__default["default"].isAbsolute(newBasePath), "'newBasePath' should be an absolute path."); + const { basePath, loose, patterns } = this; + + if (newBasePath === basePath) { + return patterns; + } + const prefix = `/${relative(newBasePath, basePath)}`; + + return patterns.map(pattern => { + const negative = pattern.startsWith("!"); + const head = negative ? "!" : ""; + const body = negative ? pattern.slice(1) : pattern; + + if (body.startsWith("/") || body.startsWith("../")) { + return `${head}${prefix}${body}`; + } + return loose ? pattern : `${head}${prefix}/**/${body}`; + }); + } +} + +/** + * @fileoverview `ExtractedConfig` class. + * + * `ExtractedConfig` class expresses a final configuration for a specific file. + * + * It provides one method. + * + * - `toCompatibleObjectAsConfigFileContent()` + * Convert this configuration to the compatible object as the content of + * config files. It converts the loaded parser and plugins to strings. + * `CLIEngine#getConfigForFile(filePath)` method uses this method. + * + * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance. + * + * @author Toru Nagashima + */ + +// For VSCode intellisense +/** @typedef {import("../../shared/types").ConfigData} ConfigData */ +/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ +/** @typedef {import("../../shared/types").SeverityConf} SeverityConf */ +/** @typedef {import("./config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ + +/** + * Check if `xs` starts with `ys`. + * @template T + * @param {T[]} xs The array to check. + * @param {T[]} ys The array that may be the first part of `xs`. + * @returns {boolean} `true` if `xs` starts with `ys`. + */ +function startsWith(xs, ys) { + return xs.length >= ys.length && ys.every((y, i) => y === xs[i]); +} + +/** + * The class for extracted config data. + */ +class ExtractedConfig { + constructor() { + + /** + * The config name what `noInlineConfig` setting came from. + * @type {string} + */ + this.configNameOfNoInlineConfig = ""; + + /** + * Environments. + * @type {Record} + */ + this.env = {}; + + /** + * Global variables. + * @type {Record} + */ + this.globals = {}; + + /** + * The glob patterns that ignore to lint. + * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined} + */ + this.ignores = void 0; + + /** + * The flag that disables directive comments. + * @type {boolean|undefined} + */ + this.noInlineConfig = void 0; + + /** + * Parser definition. + * @type {DependentParser|null} + */ + this.parser = null; + + /** + * Options for the parser. + * @type {Object} + */ + this.parserOptions = {}; + + /** + * Plugin definitions. + * @type {Record} + */ + this.plugins = {}; + + /** + * Processor ID. + * @type {string|null} + */ + this.processor = null; + + /** + * The flag that reports unused `eslint-disable` directive comments. + * @type {boolean|undefined} + */ + this.reportUnusedDisableDirectives = void 0; + + /** + * Rule settings. + * @type {Record} + */ + this.rules = {}; + + /** + * Shared settings. + * @type {Object} + */ + this.settings = {}; + } + + /** + * Convert this config to the compatible object as a config file content. + * @returns {ConfigData} The converted object. + */ + toCompatibleObjectAsConfigFileContent() { + const { + /* eslint-disable no-unused-vars */ + configNameOfNoInlineConfig: _ignore1, + processor: _ignore2, + /* eslint-enable no-unused-vars */ + ignores, + ...config + } = this; + + config.parser = config.parser && config.parser.filePath; + config.plugins = Object.keys(config.plugins).filter(Boolean).reverse(); + config.ignorePatterns = ignores ? ignores.patterns : []; + + // Strip the default patterns from `ignorePatterns`. + if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) { + config.ignorePatterns = + config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length); + } + + return config; + } +} + +/** + * @fileoverview `ConfigArray` class. + * + * `ConfigArray` class expresses the full of a configuration. It has the entry + * config file, base config files that were extended, loaded parsers, and loaded + * plugins. + * + * `ConfigArray` class provides three properties and two methods. + * + * - `pluginEnvironments` + * - `pluginProcessors` + * - `pluginRules` + * The `Map` objects that contain the members of all plugins that this + * config array contains. Those map objects don't have mutation methods. + * Those keys are the member ID such as `pluginId/memberName`. + * - `isRoot()` + * If `true` then this configuration has `root:true` property. + * - `extractConfig(filePath)` + * Extract the final configuration for a given file. This means merging + * every config array element which that `criteria` property matched. The + * `filePath` argument must be an absolute path. + * + * `ConfigArrayFactory` provides the loading logic of config files. + * + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Define types for VSCode IntelliSense. +/** @typedef {import("../../shared/types").Environment} Environment */ +/** @typedef {import("../../shared/types").GlobalConf} GlobalConf */ +/** @typedef {import("../../shared/types").RuleConf} RuleConf */ +/** @typedef {import("../../shared/types").Rule} Rule */ +/** @typedef {import("../../shared/types").Plugin} Plugin */ +/** @typedef {import("../../shared/types").Processor} Processor */ +/** @typedef {import("./config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-dependency").DependentPlugin} DependentPlugin */ +/** @typedef {import("./override-tester")["OverrideTester"]} OverrideTester */ + +/** + * @typedef {Object} ConfigArrayElement + * @property {string} name The name of this config element. + * @property {string} filePath The path to the source file of this config element. + * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element. + * @property {Record|undefined} env The environment settings. + * @property {Record|undefined} globals The global variable settings. + * @property {IgnorePattern|undefined} ignorePattern The ignore patterns. + * @property {boolean|undefined} noInlineConfig The flag that disables directive comments. + * @property {DependentParser|undefined} parser The parser loader. + * @property {Object|undefined} parserOptions The parser options. + * @property {Record|undefined} plugins The plugin loaders. + * @property {string|undefined} processor The processor name to refer plugin's processor. + * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments. + * @property {boolean|undefined} root The flag to express root. + * @property {Record|undefined} rules The rule settings + * @property {Object|undefined} settings The shared settings. + * @property {"config" | "ignore" | "implicit-processor"} type The element type. + */ + +/** + * @typedef {Object} ConfigArrayInternalSlots + * @property {Map} cache The cache to extract configs. + * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition. + * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition. + * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition. + */ + +/** @type {WeakMap} */ +const internalSlotsMap$2 = new class extends WeakMap { + get(key) { + let value = super.get(key); + + if (!value) { + value = { + cache: new Map(), + envMap: null, + processorMap: null, + ruleMap: null + }; + super.set(key, value); + } + + return value; + } +}(); + +/** + * Get the indices which are matched to a given file. + * @param {ConfigArrayElement[]} elements The elements. + * @param {string} filePath The path to a target file. + * @returns {number[]} The indices. + */ +function getMatchedIndices(elements, filePath) { + const indices = []; + + for (let i = elements.length - 1; i >= 0; --i) { + const element = elements[i]; + + if (!element.criteria || (filePath && element.criteria.test(filePath))) { + indices.push(i); + } + } + + return indices; +} + +/** + * Check if a value is a non-null object. + * @param {any} x The value to check. + * @returns {boolean} `true` if the value is a non-null object. + */ +function isNonNullObject(x) { + return typeof x === "object" && x !== null; +} + +/** + * Merge two objects. + * + * Assign every property values of `y` to `x` if `x` doesn't have the property. + * If `x`'s property value is an object, it does recursive. + * @param {Object} target The destination to merge + * @param {Object|undefined} source The source to merge. + * @returns {void} + */ +function mergeWithoutOverwrite(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + + if (isNonNullObject(target[key])) { + mergeWithoutOverwrite(target[key], source[key]); + } else if (target[key] === void 0) { + if (isNonNullObject(source[key])) { + target[key] = Array.isArray(source[key]) ? [] : {}; + mergeWithoutOverwrite(target[key], source[key]); + } else if (source[key] !== void 0) { + target[key] = source[key]; + } + } + } +} + +/** + * The error for plugin conflicts. + */ +class PluginConflictError extends Error { + + /** + * Initialize this error object. + * @param {string} pluginId The plugin ID. + * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins. + */ + constructor(pluginId, plugins) { + super(`Plugin "${pluginId}" was conflicted between ${plugins.map(p => `"${p.importerName}"`).join(" and ")}.`); + this.messageTemplate = "plugin-conflict"; + this.messageData = { pluginId, plugins }; + } +} + +/** + * Merge plugins. + * `target`'s definition is prior to `source`'s. + * @param {Record} target The destination to merge + * @param {Record|undefined} source The source to merge. + * @returns {void} + */ +function mergePlugins(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + const targetValue = target[key]; + const sourceValue = source[key]; + + // Adopt the plugin which was found at first. + if (targetValue === void 0) { + if (sourceValue.error) { + throw sourceValue.error; + } + target[key] = sourceValue; + } else if (sourceValue.filePath !== targetValue.filePath) { + throw new PluginConflictError(key, [ + { + filePath: targetValue.filePath, + importerName: targetValue.importerName + }, + { + filePath: sourceValue.filePath, + importerName: sourceValue.importerName + } + ]); + } + } +} + +/** + * Merge rule configs. + * `target`'s definition is prior to `source`'s. + * @param {Record} target The destination to merge + * @param {Record|undefined} source The source to merge. + * @returns {void} + */ +function mergeRuleConfigs(target, source) { + if (!isNonNullObject(source)) { + return; + } + + for (const key of Object.keys(source)) { + if (key === "__proto__") { + continue; + } + const targetDef = target[key]; + const sourceDef = source[key]; + + // Adopt the rule config which was found at first. + if (targetDef === void 0) { + if (Array.isArray(sourceDef)) { + target[key] = [...sourceDef]; + } else { + target[key] = [sourceDef]; + } + + /* + * If the first found rule config is severity only and the current rule + * config has options, merge the severity and the options. + */ + } else if ( + targetDef.length === 1 && + Array.isArray(sourceDef) && + sourceDef.length >= 2 + ) { + targetDef.push(...sourceDef.slice(1)); + } + } +} + +/** + * Create the extracted config. + * @param {ConfigArray} instance The config elements. + * @param {number[]} indices The indices to use. + * @returns {ExtractedConfig} The extracted config. + */ +function createConfig(instance, indices) { + const config = new ExtractedConfig(); + const ignorePatterns = []; + + // Merge elements. + for (const index of indices) { + const element = instance[index]; + + // Adopt the parser which was found at first. + if (!config.parser && element.parser) { + if (element.parser.error) { + throw element.parser.error; + } + config.parser = element.parser; + } + + // Adopt the processor which was found at first. + if (!config.processor && element.processor) { + config.processor = element.processor; + } + + // Adopt the noInlineConfig which was found at first. + if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) { + config.noInlineConfig = element.noInlineConfig; + config.configNameOfNoInlineConfig = element.name; + } + + // Adopt the reportUnusedDisableDirectives which was found at first. + if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) { + config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives; + } + + // Collect ignorePatterns + if (element.ignorePattern) { + ignorePatterns.push(element.ignorePattern); + } + + // Merge others. + mergeWithoutOverwrite(config.env, element.env); + mergeWithoutOverwrite(config.globals, element.globals); + mergeWithoutOverwrite(config.parserOptions, element.parserOptions); + mergeWithoutOverwrite(config.settings, element.settings); + mergePlugins(config.plugins, element.plugins); + mergeRuleConfigs(config.rules, element.rules); + } + + // Create the predicate function for ignore patterns. + if (ignorePatterns.length > 0) { + config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse()); + } + + return config; +} + +/** + * Collect definitions. + * @template T, U + * @param {string} pluginId The plugin ID for prefix. + * @param {Record} defs The definitions to collect. + * @param {Map} map The map to output. + * @param {function(T): U} [normalize] The normalize function for each value. + * @returns {void} + */ +function collect(pluginId, defs, map, normalize) { + if (defs) { + const prefix = pluginId && `${pluginId}/`; + + for (const [key, value] of Object.entries(defs)) { + map.set( + `${prefix}${key}`, + normalize ? normalize(value) : value + ); + } + } +} + +/** + * Normalize a rule definition. + * @param {Function|Rule} rule The rule definition to normalize. + * @returns {Rule} The normalized rule definition. + */ +function normalizePluginRule(rule) { + return typeof rule === "function" ? { create: rule } : rule; +} + +/** + * Delete the mutation methods from a given map. + * @param {Map} map The map object to delete. + * @returns {void} + */ +function deleteMutationMethods(map) { + Object.defineProperties(map, { + clear: { configurable: true, value: void 0 }, + delete: { configurable: true, value: void 0 }, + set: { configurable: true, value: void 0 } + }); +} + +/** + * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. + * @param {ConfigArrayElement[]} elements The config elements. + * @param {ConfigArrayInternalSlots} slots The internal slots. + * @returns {void} + */ +function initPluginMemberMaps(elements, slots) { + const processed = new Set(); + + slots.envMap = new Map(); + slots.processorMap = new Map(); + slots.ruleMap = new Map(); + + for (const element of elements) { + if (!element.plugins) { + continue; + } + + for (const [pluginId, value] of Object.entries(element.plugins)) { + const plugin = value.definition; + + if (!plugin || processed.has(pluginId)) { + continue; + } + processed.add(pluginId); + + collect(pluginId, plugin.environments, slots.envMap); + collect(pluginId, plugin.processors, slots.processorMap); + collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule); + } + } + + deleteMutationMethods(slots.envMap); + deleteMutationMethods(slots.processorMap); + deleteMutationMethods(slots.ruleMap); +} + +/** + * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array. + * @param {ConfigArray} instance The config elements. + * @returns {ConfigArrayInternalSlots} The extracted config. + */ +function ensurePluginMemberMaps(instance) { + const slots = internalSlotsMap$2.get(instance); + + if (!slots.ruleMap) { + initPluginMemberMaps(instance, slots); + } + + return slots; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The Config Array. + * + * `ConfigArray` instance contains all settings, parsers, and plugins. + * You need to call `ConfigArray#extractConfig(filePath)` method in order to + * extract, merge and get only the config data which is related to an arbitrary + * file. + * @extends {Array} + */ +class ConfigArray extends Array { + + /** + * Get the plugin environments. + * The returned map cannot be mutated. + * @type {ReadonlyMap} The plugin environments. + */ + get pluginEnvironments() { + return ensurePluginMemberMaps(this).envMap; + } + + /** + * Get the plugin processors. + * The returned map cannot be mutated. + * @type {ReadonlyMap} The plugin processors. + */ + get pluginProcessors() { + return ensurePluginMemberMaps(this).processorMap; + } + + /** + * Get the plugin rules. + * The returned map cannot be mutated. + * @returns {ReadonlyMap} The plugin rules. + */ + get pluginRules() { + return ensurePluginMemberMaps(this).ruleMap; + } + + /** + * Check if this config has `root` flag. + * @returns {boolean} `true` if this config array is root. + */ + isRoot() { + for (let i = this.length - 1; i >= 0; --i) { + const root = this[i].root; + + if (typeof root === "boolean") { + return root; + } + } + return false; + } + + /** + * Extract the config data which is related to a given file. + * @param {string} filePath The absolute path to the target file. + * @returns {ExtractedConfig} The extracted config data. + */ + extractConfig(filePath) { + const { cache } = internalSlotsMap$2.get(this); + const indices = getMatchedIndices(this, filePath); + const cacheKey = indices.join(","); + + if (!cache.has(cacheKey)) { + cache.set(cacheKey, createConfig(this, indices)); + } + + return cache.get(cacheKey); + } + + /** + * Check if a given path is an additional lint target. + * @param {string} filePath The absolute path to the target file. + * @returns {boolean} `true` if the file is an additional lint target. + */ + isAdditionalTargetPath(filePath) { + for (const { criteria, type } of this) { + if ( + type === "config" && + criteria && + !criteria.endsWithWildcard && + criteria.test(filePath) + ) { + return true; + } + } + return false; + } +} + +/** + * Get the used extracted configs. + * CLIEngine will use this method to collect used deprecated rules. + * @param {ConfigArray} instance The config array object to get. + * @returns {ExtractedConfig[]} The used extracted configs. + * @private + */ +function getUsedExtractedConfigs(instance) { + const { cache } = internalSlotsMap$2.get(instance); + + return Array.from(cache.values()); +} + +/** + * @fileoverview `ConfigDependency` class. + * + * `ConfigDependency` class expresses a loaded parser or plugin. + * + * If the parser or plugin was loaded successfully, it has `definition` property + * and `filePath` property. Otherwise, it has `error` property. + * + * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it + * omits `definition` property. + * + * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers + * or plugins. + * + * @author Toru Nagashima + */ + +/** + * The class is to store parsers or plugins. + * This class hides the loaded object from `JSON.stringify()` and `console.log`. + * @template T + */ +class ConfigDependency { + + /** + * Initialize this instance. + * @param {Object} data The dependency data. + * @param {T} [data.definition] The dependency if the loading succeeded. + * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded. + * @param {Error} [data.error] The error object if the loading failed. + * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. + * @param {string} data.id The ID of this dependency. + * @param {string} data.importerName The name of the config file which loads this dependency. + * @param {string} data.importerPath The path to the config file which loads this dependency. + */ + constructor({ + definition = null, + original = null, + error = null, + filePath = null, + id, + importerName, + importerPath + }) { + + /** + * The loaded dependency if the loading succeeded. + * @type {T|null} + */ + this.definition = definition; + + /** + * The original dependency as loaded directly from disk if the loading succeeded. + * @type {T|null} + */ + this.original = original; + + /** + * The error object if the loading failed. + * @type {Error|null} + */ + this.error = error; + + /** + * The loaded dependency if the loading succeeded. + * @type {string|null} + */ + this.filePath = filePath; + + /** + * The ID of this dependency. + * @type {string} + */ + this.id = id; + + /** + * The name of the config file which loads this dependency. + * @type {string} + */ + this.importerName = importerName; + + /** + * The path to the config file which loads this dependency. + * @type {string} + */ + this.importerPath = importerPath; + } + + // eslint-disable-next-line jsdoc/require-description + /** + * @returns {Object} a JSON compatible object. + */ + toJSON() { + const obj = this[util__default["default"].inspect.custom](); + + // Display `error.message` (`Error#message` is unenumerable). + if (obj.error instanceof Error) { + obj.error = { ...obj.error, message: obj.error.message }; + } + + return obj; + } + + // eslint-disable-next-line jsdoc/require-description + /** + * @returns {Object} an object to display by `console.log()`. + */ + [util__default["default"].inspect.custom]() { + const { + definition: _ignore1, // eslint-disable-line no-unused-vars + original: _ignore2, // eslint-disable-line no-unused-vars + ...obj + } = this; + + return obj; + } +} + +/** + * @fileoverview `OverrideTester` class. + * + * `OverrideTester` class handles `files` property and `excludedFiles` property + * of `overrides` config. + * + * It provides one method. + * + * - `test(filePath)` + * Test if a file path matches the pair of `files` property and + * `excludedFiles` property. The `filePath` argument must be an absolute + * path. + * + * `ConfigArrayFactory` creates `OverrideTester` objects when it processes + * `overrides` properties. + * + * @author Toru Nagashima + */ + +const { Minimatch } = minimatch__default["default"]; + +const minimatchOpts = { dot: true, matchBase: true }; + +/** + * @typedef {Object} Pattern + * @property {InstanceType[] | null} includes The positive matchers. + * @property {InstanceType[] | null} excludes The negative matchers. + */ + +/** + * Normalize a given pattern to an array. + * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns. + * @returns {string[]|null} Normalized patterns. + * @private + */ +function normalizePatterns(patterns) { + if (Array.isArray(patterns)) { + return patterns.filter(Boolean); + } + if (typeof patterns === "string" && patterns) { + return [patterns]; + } + return []; +} + +/** + * Create the matchers of given patterns. + * @param {string[]} patterns The patterns. + * @returns {InstanceType[] | null} The matchers. + */ +function toMatcher(patterns) { + if (patterns.length === 0) { + return null; + } + return patterns.map(pattern => { + if (/^\.[/\\]/u.test(pattern)) { + return new Minimatch( + pattern.slice(2), + + // `./*.js` should not match with `subdir/foo.js` + { ...minimatchOpts, matchBase: false } + ); + } + return new Minimatch(pattern, minimatchOpts); + }); +} + +/** + * Convert a given matcher to string. + * @param {Pattern} matchers The matchers. + * @returns {string} The string expression of the matcher. + */ +function patternToJson({ includes, excludes }) { + return { + includes: includes && includes.map(m => m.pattern), + excludes: excludes && excludes.map(m => m.pattern) + }; +} + +/** + * The class to test given paths are matched by the patterns. + */ +class OverrideTester { + + /** + * Create a tester with given criteria. + * If there are no criteria, returns `null`. + * @param {string|string[]} files The glob patterns for included files. + * @param {string|string[]} excludedFiles The glob patterns for excluded files. + * @param {string} basePath The path to the base directory to test paths. + * @returns {OverrideTester|null} The created instance or `null`. + */ + static create(files, excludedFiles, basePath) { + const includePatterns = normalizePatterns(files); + const excludePatterns = normalizePatterns(excludedFiles); + let endsWithWildcard = false; + + if (includePatterns.length === 0) { + return null; + } + + // Rejects absolute paths or relative paths to parents. + for (const pattern of includePatterns) { + if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) { + throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); + } + if (pattern.endsWith("*")) { + endsWithWildcard = true; + } + } + for (const pattern of excludePatterns) { + if (path__default["default"].isAbsolute(pattern) || pattern.includes("..")) { + throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`); + } + } + + const includes = toMatcher(includePatterns); + const excludes = toMatcher(excludePatterns); + + return new OverrideTester( + [{ includes, excludes }], + basePath, + endsWithWildcard + ); + } + + /** + * Combine two testers by logical and. + * If either of the testers was `null`, returns the other tester. + * The `basePath` property of the two must be the same value. + * @param {OverrideTester|null} a A tester. + * @param {OverrideTester|null} b Another tester. + * @returns {OverrideTester|null} Combined tester. + */ + static and(a, b) { + if (!b) { + return a && new OverrideTester( + a.patterns, + a.basePath, + a.endsWithWildcard + ); + } + if (!a) { + return new OverrideTester( + b.patterns, + b.basePath, + b.endsWithWildcard + ); + } + + assert__default["default"].strictEqual(a.basePath, b.basePath); + return new OverrideTester( + a.patterns.concat(b.patterns), + a.basePath, + a.endsWithWildcard || b.endsWithWildcard + ); + } + + /** + * Initialize this instance. + * @param {Pattern[]} patterns The matchers. + * @param {string} basePath The base path. + * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`. + */ + constructor(patterns, basePath, endsWithWildcard = false) { + + /** @type {Pattern[]} */ + this.patterns = patterns; + + /** @type {string} */ + this.basePath = basePath; + + /** @type {boolean} */ + this.endsWithWildcard = endsWithWildcard; + } + + /** + * Test if a given path is matched or not. + * @param {string} filePath The absolute path to the target file. + * @returns {boolean} `true` if the path was matched. + */ + test(filePath) { + if (typeof filePath !== "string" || !path__default["default"].isAbsolute(filePath)) { + throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`); + } + const relativePath = path__default["default"].relative(this.basePath, filePath); + + return this.patterns.every(({ includes, excludes }) => ( + (!includes || includes.some(m => m.match(relativePath))) && + (!excludes || !excludes.some(m => m.match(relativePath))) + )); + } + + // eslint-disable-next-line jsdoc/require-description + /** + * @returns {Object} a JSON compatible object. + */ + toJSON() { + if (this.patterns.length === 1) { + return { + ...patternToJson(this.patterns[0]), + basePath: this.basePath + }; + } + return { + AND: this.patterns.map(patternToJson), + basePath: this.basePath + }; + } + + // eslint-disable-next-line jsdoc/require-description + /** + * @returns {Object} an object to display by `console.log()`. + */ + [util__default["default"].inspect.custom]() { + return this.toJSON(); + } +} + +/** + * @fileoverview `ConfigArray` class. + * @author Toru Nagashima + */ + +/** + * @fileoverview Config file operations. This file must be usable in the browser, + * so no Node-specific code can be here. + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +const RULE_SEVERITY_STRINGS = ["off", "warn", "error"], + RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => { + map[value] = index; + return map; + }, {}), + VALID_SEVERITIES = [0, 1, 2, "off", "warn", "error"]; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Normalizes the severity value of a rule's configuration to a number + * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally + * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), + * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array + * whose first element is one of the above values. Strings are matched case-insensitively. + * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. + */ +function getRuleSeverity(ruleConfig) { + const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (severityValue === 0 || severityValue === 1 || severityValue === 2) { + return severityValue; + } + + if (typeof severityValue === "string") { + return RULE_SEVERITY[severityValue.toLowerCase()] || 0; + } + + return 0; +} + +/** + * Converts old-style severity settings (0, 1, 2) into new-style + * severity settings (off, warn, error) for all rules. Assumption is that severity + * values have already been validated as correct. + * @param {Object} config The config object to normalize. + * @returns {void} + */ +function normalizeToStrings(config) { + + if (config.rules) { + Object.keys(config.rules).forEach(ruleId => { + const ruleConfig = config.rules[ruleId]; + + if (typeof ruleConfig === "number") { + config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; + } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { + ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; + } + }); + } +} + +/** + * Determines if the severity for the given rule configuration represents an error. + * @param {int|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} True if the rule represents an error, false if not. + */ +function isErrorSeverity(ruleConfig) { + return getRuleSeverity(ruleConfig) === 2; +} + +/** + * Checks whether a given config has valid severity or not. + * @param {number|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isValidSeverity(ruleConfig) { + let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (typeof severity === "string") { + severity = severity.toLowerCase(); + } + return VALID_SEVERITIES.indexOf(severity) !== -1; +} + +/** + * Checks whether every rule of a given config has valid severity or not. + * @param {Object} config The configuration for rules. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isEverySeverityValid(config) { + return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId])); +} + +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); + } +} + +var ConfigOps = { + __proto__: null, + getRuleSeverity: getRuleSeverity, + normalizeToStrings: normalizeToStrings, + isErrorSeverity: isErrorSeverity, + isValidSeverity: isValidSeverity, + isEverySeverityValid: isEverySeverityValid, + normalizeConfigGlobal: normalizeConfigGlobal +}; + +/** + * @fileoverview Provide the function that emits deprecation warnings. + * @author Toru Nagashima + */ + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + +// Defitions for deprecation warnings. +const deprecationWarningMessages = { + ESLINT_LEGACY_ECMAFEATURES: + "The 'ecmaFeatures' config file property is deprecated and has no effect.", + ESLINT_PERSONAL_CONFIG_LOAD: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please use a config file per project or the '--config' option.", + ESLINT_PERSONAL_CONFIG_SUPPRESS: + "'~/.eslintrc.*' config files have been deprecated. " + + "Please remove it or add 'root:true' to the config files in your " + + "projects in order to avoid loading '~/.eslintrc.*' accidentally." +}; + +const sourceFileErrorCache = new Set(); + +/** + * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted + * for each unique file path, but repeated invocations with the same file path have no effect. + * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active. + * @param {string} source The name of the configuration source to report the warning for. + * @param {string} errorCode The warning message to show. + * @returns {void} + */ +function emitDeprecationWarning(source, errorCode) { + const cacheKey = JSON.stringify({ source, errorCode }); + + if (sourceFileErrorCache.has(cacheKey)) { + return; + } + sourceFileErrorCache.add(cacheKey); + + const rel = path__default["default"].relative(process.cwd(), source); + const message = deprecationWarningMessages[errorCode]; + + process.emitWarning( + `${message} (found in "${rel}")`, + "DeprecationWarning", + errorCode + ); +} + +/** + * @fileoverview The instance of Ajv validator. + * @author Evgeny Poberezkin + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/* + * Copied from ajv/lib/refs/json-schema-draft-04.json + * The MIT License (MIT) + * Copyright (c) 2015-2017 Evgeny Poberezkin + */ +const metaSchema = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string" + }, + $schema: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: { }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + items: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/schemaArray" } + ], + default: { } + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/stringArray" } + ] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: { } +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +var ajvOrig = (additionalOptions = {}) => { + const ajv = new Ajv__default["default"]({ + meta: false, + useDefaults: true, + validateSchema: false, + missingRefs: "ignore", + verbose: true, + schemaId: "auto", + ...additionalOptions + }); + + ajv.addMetaSchema(metaSchema); + // eslint-disable-next-line no-underscore-dangle + ajv._opts.defaultMeta = metaSchema.id; + + return ajv; +}; + +/** + * @fileoverview Defines a schema for configs. + * @author Sylvan Mably + */ + +const baseConfigProperties = { + $schema: { type: "string" }, + env: { type: "object" }, + extends: { $ref: "#/definitions/stringOrStrings" }, + globals: { type: "object" }, + overrides: { + type: "array", + items: { $ref: "#/definitions/overrideConfig" }, + additionalItems: false + }, + parser: { type: ["string", "null"] }, + parserOptions: { type: "object" }, + plugins: { type: "array" }, + processor: { type: "string" }, + rules: { type: "object" }, + settings: { type: "object" }, + noInlineConfig: { type: "boolean" }, + reportUnusedDisableDirectives: { type: "boolean" }, + + ecmaFeatures: { type: "object" } // deprecated; logs a warning when used +}; + +const configSchema = { + definitions: { + stringOrStrings: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false + } + ] + }, + stringOrStringsRequired: { + oneOf: [ + { type: "string" }, + { + type: "array", + items: { type: "string" }, + additionalItems: false, + minItems: 1 + } + ] + }, + + // Config at top-level. + objectConfig: { + type: "object", + properties: { + root: { type: "boolean" }, + ignorePatterns: { $ref: "#/definitions/stringOrStrings" }, + ...baseConfigProperties + }, + additionalProperties: false + }, + + // Config in `overrides`. + overrideConfig: { + type: "object", + properties: { + excludedFiles: { $ref: "#/definitions/stringOrStrings" }, + files: { $ref: "#/definitions/stringOrStringsRequired" }, + ...baseConfigProperties + }, + required: ["files"], + additionalProperties: false + } + }, + + $ref: "#/definitions/objectConfig" +}; + +/** + * @fileoverview Defines environment settings and globals. + * @author Elan Shanker + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Get the object that has difference. + * @param {Record} current The newer object. + * @param {Record} prev The older object. + * @returns {Record} The difference object. + */ +function getDiff(current, prev) { + const retv = {}; + + for (const [key, value] of Object.entries(current)) { + if (!Object.hasOwnProperty.call(prev, key)) { + retv[key] = value; + } + } + + return retv; +} + +const newGlobals2015 = getDiff(globals__default["default"].es2015, globals__default["default"].es5); // 19 variables such as Promise, Map, ... +const newGlobals2017 = { + Atomics: false, + SharedArrayBuffer: false +}; +const newGlobals2020 = { + BigInt: false, + BigInt64Array: false, + BigUint64Array: false, + globalThis: false +}; + +const newGlobals2021 = { + AggregateError: false, + FinalizationRegistry: false, + WeakRef: false +}; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** @type {Map} */ +var environments = new Map(Object.entries({ + + // Language + builtin: { + globals: globals__default["default"].es5 + }, + es6: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2015: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 6 + } + }, + es2016: { + globals: newGlobals2015, + parserOptions: { + ecmaVersion: 7 + } + }, + es2017: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 8 + } + }, + es2018: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 9 + } + }, + es2019: { + globals: { ...newGlobals2015, ...newGlobals2017 }, + parserOptions: { + ecmaVersion: 10 + } + }, + es2020: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 }, + parserOptions: { + ecmaVersion: 11 + } + }, + es2021: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 12 + } + }, + es2022: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 13 + } + }, + es2023: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 14 + } + }, + es2024: { + globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 }, + parserOptions: { + ecmaVersion: 15 + } + }, + + // Platforms + browser: { + globals: globals__default["default"].browser + }, + node: { + globals: globals__default["default"].node, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + "shared-node-browser": { + globals: globals__default["default"]["shared-node-browser"] + }, + worker: { + globals: globals__default["default"].worker + }, + serviceworker: { + globals: globals__default["default"].serviceworker + }, + + // Frameworks + commonjs: { + globals: globals__default["default"].commonjs, + parserOptions: { + ecmaFeatures: { + globalReturn: true + } + } + }, + amd: { + globals: globals__default["default"].amd + }, + mocha: { + globals: globals__default["default"].mocha + }, + jasmine: { + globals: globals__default["default"].jasmine + }, + jest: { + globals: globals__default["default"].jest + }, + phantomjs: { + globals: globals__default["default"].phantomjs + }, + jquery: { + globals: globals__default["default"].jquery + }, + qunit: { + globals: globals__default["default"].qunit + }, + prototypejs: { + globals: globals__default["default"].prototypejs + }, + shelljs: { + globals: globals__default["default"].shelljs + }, + meteor: { + globals: globals__default["default"].meteor + }, + mongo: { + globals: globals__default["default"].mongo + }, + protractor: { + globals: globals__default["default"].protractor + }, + applescript: { + globals: globals__default["default"].applescript + }, + nashorn: { + globals: globals__default["default"].nashorn + }, + atomtest: { + globals: globals__default["default"].atomtest + }, + embertest: { + globals: globals__default["default"].embertest + }, + webextensions: { + globals: globals__default["default"].webextensions + }, + greasemonkey: { + globals: globals__default["default"].greasemonkey + } +})); + +/** + * @fileoverview Validates configs. + * @author Brandon Mills + */ + +const ajv = ajvOrig(); + +const ruleValidators = new WeakMap(); +const noop = Function.prototype; + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ +let validateSchema; +const severityMap = { + error: 2, + warn: 1, + off: 0 +}; + +const validated = new WeakSet(); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +class ConfigValidator { + constructor({ builtInRules = new Map() } = {}) { + this.builtInRules = builtInRules; + } + + /** + * Gets a complete options schema for a rule. + * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object + * @returns {Object} JSON Schema for the rule's options. + */ + getRuleOptionsSchema(rule) { + if (!rule) { + return null; + } + + const schema = rule.schema || rule.meta && rule.meta.schema; + + // Given a tuple of schemas, insert warning level at the beginning + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + return { + type: "array", + minItems: 0, + maxItems: 0 + }; + + } + + // Given a full schema, leave it alone + return schema || null; + } + + /** + * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid. + * @param {options} options The given options for the rule. + * @returns {number|string} The rule's severity value + */ + validateRuleSeverity(options) { + const severity = Array.isArray(options) ? options[0] : options; + const normSeverity = typeof severity === "string" ? severityMap[severity.toLowerCase()] : severity; + + if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) { + return normSeverity; + } + + throw new Error(`\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util__default["default"].inspect(severity).replace(/'/gu, "\"").replace(/\n/gu, "")}').\n`); + + } + + /** + * Validates the non-severity options passed to a rule, based on its schema. + * @param {{create: Function}} rule The rule to validate + * @param {Array} localOptions The options for the rule, excluding severity + * @returns {void} + */ + validateRuleSchema(rule, localOptions) { + if (!ruleValidators.has(rule)) { + const schema = this.getRuleOptionsSchema(rule); + + if (schema) { + ruleValidators.set(rule, ajv.compile(schema)); + } + } + + const validateRule = ruleValidators.get(rule); + + if (validateRule) { + validateRule(localOptions); + if (validateRule.errors) { + throw new Error(validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("")); + } + } + } + + /** + * Validates a rule's options against its schema. + * @param {{create: Function}|null} rule The rule that the config is being validated for + * @param {string} ruleId The rule's unique name. + * @param {Array|number} options The given options for the rule. + * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined, + * no source is prepended to the message. + * @returns {void} + */ + validateRuleOptions(rule, ruleId, options, source = null) { + try { + const severity = this.validateRuleSeverity(options); + + if (severity !== 0) { + this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []); + } + } catch (err) { + const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`; + + if (typeof source === "string") { + throw new Error(`${source}:\n\t${enhancedMessage}`); + } else { + throw new Error(enhancedMessage); + } + } + } + + /** + * Validates an environment object + * @param {Object} environment The environment config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments. + * @returns {void} + */ + validateEnvironment( + environment, + source, + getAdditionalEnv = noop + ) { + + // not having an environment is ok + if (!environment) { + return; + } + + Object.keys(environment).forEach(id => { + const env = getAdditionalEnv(id) || environments.get(id) || null; + + if (!env) { + const message = `${source}:\n\tEnvironment key "${id}" is unknown\n`; + + throw new Error(message); + } + }); + } + + /** + * Validates a rules config object + * @param {Object} rulesConfig The rules config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules + * @returns {void} + */ + validateRules( + rulesConfig, + source, + getAdditionalRule = noop + ) { + if (!rulesConfig) { + return; + } + + Object.keys(rulesConfig).forEach(id => { + const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null; + + this.validateRuleOptions(rule, id, rulesConfig[id], source); + }); + } + + /** + * Validates a `globals` section of a config file + * @param {Object} globalsConfig The `globals` section + * @param {string|null} source The name of the configuration source to report in the event of an error. + * @returns {void} + */ + validateGlobals(globalsConfig, source = null) { + if (!globalsConfig) { + return; + } + + Object.entries(globalsConfig) + .forEach(([configuredGlobal, configuredValue]) => { + try { + normalizeConfigGlobal(configuredValue); + } catch (err) { + throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\n${err.message}`); + } + }); + } + + /** + * Validate `processor` configuration. + * @param {string|undefined} processorName The processor name. + * @param {string} source The name of config file. + * @param {function(id:string): Processor} getProcessor The getter of defined processors. + * @returns {void} + */ + validateProcessor(processorName, source, getProcessor) { + if (processorName && !getProcessor(processorName)) { + throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`); + } + } + + /** + * Formats an array of schema validation errors. + * @param {Array} errors An array of error messages to format. + * @returns {string} Formatted error message + */ + formatErrors(errors) { + return errors.map(error => { + if (error.keyword === "additionalProperties") { + const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty; + + return `Unexpected top-level property "${formattedPropertyPath}"`; + } + if (error.keyword === "type") { + const formattedField = error.dataPath.slice(1); + const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join("/") : error.schema; + const formattedValue = JSON.stringify(error.data); + + return `Property "${formattedField}" is the wrong type (expected ${formattedExpectedType} but got \`${formattedValue}\`)`; + } + + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `"${field}" ${error.message}. Value: ${JSON.stringify(error.data)}`; + }).map(message => `\t- ${message}.\n`).join(""); + } + + /** + * Validates the top level properties of the config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @returns {void} + */ + validateConfigSchema(config, source = null) { + validateSchema = validateSchema || ajv.compile(configSchema); + + if (!validateSchema(config)) { + throw new Error(`ESLint configuration in ${source} is invalid:\n${this.formatErrors(validateSchema.errors)}`); + } + + if (Object.hasOwnProperty.call(config, "ecmaFeatures")) { + emitDeprecationWarning(source, "ESLINT_LEGACY_ECMAFEATURES"); + } + } + + /** + * Validates an entire config object. + * @param {Object} config The config object to validate. + * @param {string} source The name of the configuration source to report in any errors. + * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules. + * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs. + * @returns {void} + */ + validate(config, source, getAdditionalRule, getAdditionalEnv) { + this.validateConfigSchema(config, source); + this.validateRules(config.rules, source, getAdditionalRule); + this.validateEnvironment(config.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + + for (const override of config.overrides || []) { + this.validateRules(override.rules, source, getAdditionalRule); + this.validateEnvironment(override.env, source, getAdditionalEnv); + this.validateGlobals(config.globals, source); + } + } + + /** + * Validate config array object. + * @param {ConfigArray} configArray The config array to validate. + * @returns {void} + */ + validateConfigArray(configArray) { + const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments); + const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors); + const getPluginRule = Map.prototype.get.bind(configArray.pluginRules); + + // Validate. + for (const element of configArray) { + if (validated.has(element)) { + continue; + } + validated.add(element); + + this.validateEnvironment(element.env, element.name, getPluginEnv); + this.validateGlobals(element.globals, element.name); + this.validateProcessor(element.processor, element.name, getPluginProcessor); + this.validateRules(element.rules, element.name, getPluginRule); + } + } + +} + +/** + * @fileoverview Common helpers for naming of plugins, formatters and configs + */ + +const NAMESPACE_REGEX = /^@.*\//iu; + +/** + * Brings package name to correct format based on prefix + * @param {string} name The name of the package. + * @param {string} prefix Can be either "eslint-plugin", "eslint-config" or "eslint-formatter" + * @returns {string} Normalized name of the package + * @private + */ +function normalizePackageName(name, prefix) { + let normalizedName = name; + + /** + * On Windows, name can come in with Windows slashes instead of Unix slashes. + * Normalize to Unix first to avoid errors later on. + * https://github.com/eslint/eslint/issues/5644 + */ + if (normalizedName.includes("\\")) { + normalizedName = normalizedName.replace(/\\/gu, "/"); + } + + if (normalizedName.charAt(0) === "@") { + + /** + * it's a scoped package + * package name is the prefix, or just a username + */ + const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, "u"), + scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, "u"); + + if (scopedPackageShortcutRegex.test(normalizedName)) { + normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`); + } else if (!scopedPackageNameRegex.test(normalizedName.split("/")[1])) { + + /** + * for scoped packages, insert the prefix after the first / unless + * the path is already @scope/eslint or @scope/eslint-xxx-yyy + */ + normalizedName = normalizedName.replace(/^@([^/]+)\/(.*)$/u, `@$1/${prefix}-$2`); + } + } else if (!normalizedName.startsWith(`${prefix}-`)) { + normalizedName = `${prefix}-${normalizedName}`; + } + + return normalizedName; +} + +/** + * Removes the prefix from a fullname. + * @param {string} fullname The term which may have the prefix. + * @param {string} prefix The prefix to remove. + * @returns {string} The term without prefix. + */ +function getShorthandName(fullname, prefix) { + if (fullname[0] === "@") { + let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname); + + if (matchResult) { + return matchResult[1]; + } + + matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname); + if (matchResult) { + return `${matchResult[1]}/${matchResult[2]}`; + } + } else if (fullname.startsWith(`${prefix}-`)) { + return fullname.slice(prefix.length + 1); + } + + return fullname; +} + +/** + * Gets the scope (namespace) of a term. + * @param {string} term The term which may have the namespace. + * @returns {string} The namespace of the term if it has one. + */ +function getNamespaceFromTerm(term) { + const match = term.match(NAMESPACE_REGEX); + + return match ? match[0] : ""; +} + +var naming = { + __proto__: null, + normalizePackageName: normalizePackageName, + getShorthandName: getShorthandName, + getNamespaceFromTerm: getNamespaceFromTerm +}; + +/** + * Utility for resolving a module relative to another module + * @author Teddy Katz + */ + +/* + * `Module.createRequire` is added in v12.2.0. It supports URL as well. + * We only support the case where the argument is a filepath, not a URL. + */ +const createRequire = Module__default["default"].createRequire; + +/** + * Resolves a Node module relative to another module + * @param {string} moduleName The name of a Node module, or a path to a Node module. + * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be + * a file rather than a directory, but the file need not actually exist. + * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath` + */ +function resolve(moduleName, relativeToPath) { + try { + return createRequire(relativeToPath).resolve(moduleName); + } catch (error) { + + // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future. + if ( + typeof error === "object" && + error !== null && + error.code === "MODULE_NOT_FOUND" && + !error.requireStack && + error.message.includes(moduleName) + ) { + error.message += `\nRequire stack:\n- ${relativeToPath}`; + } + throw error; + } +} + +var ModuleResolver = { + __proto__: null, + resolve: resolve +}; + +/** + * @fileoverview The factory of `ConfigArray` objects. + * + * This class provides methods to create `ConfigArray` instance. + * + * - `create(configData, options)` + * Create a `ConfigArray` instance from a config data. This is to handle CLI + * options except `--config`. + * - `loadFile(filePath, options)` + * Create a `ConfigArray` instance from a config file. This is to handle + * `--config` option. If the file was not found, throws the following error: + * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error. + * - If the filename was `package.json`, an IO error or an + * `ESLINT_CONFIG_FIELD_NOT_FOUND` error. + * - Otherwise, an IO error such as `ENOENT`. + * - `loadInDirectory(directoryPath, options)` + * Create a `ConfigArray` instance from a config file which is on a given + * directory. This tries to load `.eslintrc.*` or `package.json`. If not + * found, returns an empty `ConfigArray`. + * - `loadESLintIgnore(filePath)` + * Create a `ConfigArray` instance from a config file that is `.eslintignore` + * format. This is to handle `--ignore-path` option. + * - `loadDefaultESLintIgnore()` + * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in + * the current working directory. + * + * `ConfigArrayFactory` class has the responsibility that loads configuration + * files, including loading `extends`, `parser`, and `plugins`. The created + * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`. + * + * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class + * handles cascading and hierarchy. + * + * @author Toru Nagashima + */ + +const require$1 = Module.createRequire(require('url').pathToFileURL(__filename).toString()); + +const debug$2 = debugOrig__default["default"]("eslintrc:config-array-factory"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const configFilenames = [ + ".eslintrc.js", + ".eslintrc.cjs", + ".eslintrc.yaml", + ".eslintrc.yml", + ".eslintrc.json", + ".eslintrc", + "package.json" +]; + +// Define types for VSCode IntelliSense. +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").OverrideConfigData} OverrideConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ +/** @typedef {import("./config-array/config-dependency").DependentParser} DependentParser */ +/** @typedef {import("./config-array/config-dependency").DependentPlugin} DependentPlugin */ +/** @typedef {ConfigArray[0]} ConfigArrayElement */ + +/** + * @typedef {Object} ConfigArrayFactoryOptions + * @property {Map} [additionalPluginPool] The map for additional plugins. + * @property {string} [cwd] The path to the current working directory. + * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} ConfigArrayFactoryInternalSlots + * @property {Map} additionalPluginPool The map for additional plugins. + * @property {string} cwd The path to the current working directory. + * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} ConfigArrayFactoryLoadingContext + * @property {string} filePath The path to the current configuration. + * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @property {string} name The name of the current configuration. + * @property {string} pluginBasePath The base path to resolve plugins. + * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. + */ + +/** + * @typedef {Object} ConfigArrayFactoryLoadingContext + * @property {string} filePath The path to the current configuration. + * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @property {string} name The name of the current configuration. + * @property {"config" | "ignore" | "implicit-processor"} type The type of the current configuration. This is `"config"` in normal. This is `"ignore"` if it came from `.eslintignore`. This is `"implicit-processor"` if it came from legacy file-extension processors. + */ + +/** @type {WeakMap} */ +const internalSlotsMap$1 = new WeakMap(); + +/** @type {WeakMap} */ +const normalizedPlugins = new WeakMap(); + +/** + * Check if a given string is a file path. + * @param {string} nameOrPath A module name or file path. + * @returns {boolean} `true` if the `nameOrPath` is a file path. + */ +function isFilePath(nameOrPath) { + return ( + /^\.{1,2}[/\\]/u.test(nameOrPath) || + path__default["default"].isAbsolute(nameOrPath) + ); +} + +/** + * Convenience wrapper for synchronously reading file contents. + * @param {string} filePath The filename to read. + * @returns {string} The file contents, with the BOM removed. + * @private + */ +function readFile(filePath) { + return fs__default["default"].readFileSync(filePath, "utf8").replace(/^\ufeff/u, ""); +} + +/** + * Loads a YAML configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadYAMLConfigFile(filePath) { + debug$2(`Loading YAML config file: ${filePath}`); + + // lazy load YAML to improve performance when not used + const yaml = require$1("js-yaml"); + + try { + + // empty YAML file can be null, so always use + return yaml.load(readFile(filePath)) || {}; + } catch (e) { + debug$2(`Error reading YAML file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a JSON configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSONConfigFile(filePath) { + debug$2(`Loading JSON config file: ${filePath}`); + + try { + return JSON.parse(stripComments__default["default"](readFile(filePath))); + } catch (e) { + debug$2(`Error reading JSON file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + e.messageTemplate = "failed-to-read-json"; + e.messageData = { + path: filePath, + message: e.message + }; + throw e; + } +} + +/** + * Loads a legacy (.eslintrc) configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadLegacyConfigFile(filePath) { + debug$2(`Loading legacy config file: ${filePath}`); + + // lazy load YAML to improve performance when not used + const yaml = require$1("js-yaml"); + + try { + return yaml.load(stripComments__default["default"](readFile(filePath))) || /* istanbul ignore next */ {}; + } catch (e) { + debug$2("Error reading YAML file: %s\n%o", filePath, e); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a JavaScript configuration from a file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadJSConfigFile(filePath) { + debug$2(`Loading JS config file: ${filePath}`); + try { + return importFresh__default["default"](filePath); + } catch (e) { + debug$2(`Error reading JavaScript file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a configuration from a package.json file. + * @param {string} filePath The filename to load. + * @returns {ConfigData} The configuration object from the file. + * @throws {Error} If the file cannot be read. + * @private + */ +function loadPackageJSONConfigFile(filePath) { + debug$2(`Loading package.json config file: ${filePath}`); + try { + const packageData = loadJSONConfigFile(filePath); + + if (!Object.hasOwnProperty.call(packageData, "eslintConfig")) { + throw Object.assign( + new Error("package.json file doesn't have 'eslintConfig' field."), + { code: "ESLINT_CONFIG_FIELD_NOT_FOUND" } + ); + } + + return packageData.eslintConfig; + } catch (e) { + debug$2(`Error reading package.json file: ${filePath}`); + e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Loads a `.eslintignore` from a file. + * @param {string} filePath The filename to load. + * @returns {string[]} The ignore patterns from the file. + * @private + */ +function loadESLintIgnoreFile(filePath) { + debug$2(`Loading .eslintignore file: ${filePath}`); + + try { + return readFile(filePath) + .split(/\r?\n/gu) + .filter(line => line.trim() !== "" && !line.startsWith("#")); + } catch (e) { + debug$2(`Error reading .eslintignore file: ${filePath}`); + e.message = `Cannot read .eslintignore file: ${filePath}\nError: ${e.message}`; + throw e; + } +} + +/** + * Creates an error to notify about a missing config to extend from. + * @param {string} configName The name of the missing config. + * @param {string} importerName The name of the config that imported the missing config + * @param {string} messageTemplate The text template to source error strings from. + * @returns {Error} The error object to throw + * @private + */ +function configInvalidError(configName, importerName, messageTemplate) { + return Object.assign( + new Error(`Failed to load config "${configName}" to extend from.`), + { + messageTemplate, + messageData: { configName, importerName } + } + ); +} + +/** + * Loads a configuration file regardless of the source. Inspects the file path + * to determine the correctly way to load the config file. + * @param {string} filePath The path to the configuration. + * @returns {ConfigData|null} The configuration information. + * @private + */ +function loadConfigFile(filePath) { + switch (path__default["default"].extname(filePath)) { + case ".js": + case ".cjs": + return loadJSConfigFile(filePath); + + case ".json": + if (path__default["default"].basename(filePath) === "package.json") { + return loadPackageJSONConfigFile(filePath); + } + return loadJSONConfigFile(filePath); + + case ".yaml": + case ".yml": + return loadYAMLConfigFile(filePath); + + default: + return loadLegacyConfigFile(filePath); + } +} + +/** + * Write debug log. + * @param {string} request The requested module name. + * @param {string} relativeTo The file path to resolve the request relative to. + * @param {string} filePath The resolved file path. + * @returns {void} + */ +function writeDebugLogForLoading(request, relativeTo, filePath) { + /* istanbul ignore next */ + if (debug$2.enabled) { + let nameAndVersion = null; + + try { + const packageJsonPath = resolve( + `${request}/package.json`, + relativeTo + ); + const { version = "unknown" } = require$1(packageJsonPath); + + nameAndVersion = `${request}@${version}`; + } catch (error) { + debug$2("package.json was not found:", error.message); + nameAndVersion = request; + } + + debug$2("Loaded: %s (%s)", nameAndVersion, filePath); + } +} + +/** + * Create a new context with default values. + * @param {ConfigArrayFactoryInternalSlots} slots The internal slots. + * @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`. + * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`. + * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string. + * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`. + * @returns {ConfigArrayFactoryLoadingContext} The created context. + */ +function createContext( + { cwd, resolvePluginsRelativeTo }, + providedType, + providedName, + providedFilePath, + providedMatchBasePath +) { + const filePath = providedFilePath + ? path__default["default"].resolve(cwd, providedFilePath) + : ""; + const matchBasePath = + (providedMatchBasePath && path__default["default"].resolve(cwd, providedMatchBasePath)) || + (filePath && path__default["default"].dirname(filePath)) || + cwd; + const name = + providedName || + (filePath && path__default["default"].relative(cwd, filePath)) || + ""; + const pluginBasePath = + resolvePluginsRelativeTo || + (filePath && path__default["default"].dirname(filePath)) || + cwd; + const type = providedType || "config"; + + return { filePath, matchBasePath, name, pluginBasePath, type }; +} + +/** + * Normalize a given plugin. + * - Ensure the object to have four properties: configs, environments, processors, and rules. + * - Ensure the object to not have other properties. + * @param {Plugin} plugin The plugin to normalize. + * @returns {Plugin} The normalized plugin. + */ +function normalizePlugin(plugin) { + + // first check the cache + let normalizedPlugin = normalizedPlugins.get(plugin); + + if (normalizedPlugin) { + return normalizedPlugin; + } + + normalizedPlugin = { + configs: plugin.configs || {}, + environments: plugin.environments || {}, + processors: plugin.processors || {}, + rules: plugin.rules || {} + }; + + // save the reference for later + normalizedPlugins.set(plugin, normalizedPlugin); + + return normalizedPlugin; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * The factory of `ConfigArray` objects. + */ +class ConfigArrayFactory { + + /** + * Initialize this instance. + * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins. + */ + constructor({ + additionalPluginPool = new Map(), + cwd = process.cwd(), + resolvePluginsRelativeTo, + builtInRules, + resolver = ModuleResolver, + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = {}) { + internalSlotsMap$1.set(this, { + additionalPluginPool, + cwd, + resolvePluginsRelativeTo: + resolvePluginsRelativeTo && + path__default["default"].resolve(cwd, resolvePluginsRelativeTo), + builtInRules, + resolver, + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + }); + } + + /** + * Create `ConfigArray` instance from a config data. + * @param {ConfigData|null} configData The config data to create. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.filePath] The path to this config data. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. + */ + create(configData, { basePath, filePath, name } = {}) { + if (!configData) { + return new ConfigArray(); + } + + const slots = internalSlotsMap$1.get(this); + const ctx = createContext(slots, "config", name, filePath, basePath); + const elements = this._normalizeConfigData(configData, ctx); + + return new ConfigArray(...elements); + } + + /** + * Load a config file. + * @param {string} filePath The path to a config file. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. + */ + loadFile(filePath, { basePath, name } = {}) { + const slots = internalSlotsMap$1.get(this); + const ctx = createContext(slots, "config", name, filePath, basePath); + + return new ConfigArray(...this._loadConfigData(ctx)); + } + + /** + * Load the config file on a given directory if exists. + * @param {string} directoryPath The path to a directory. + * @param {Object} [options] The options. + * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`. + * @param {string} [options.name] The config name. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadInDirectory(directoryPath, { basePath, name } = {}) { + const slots = internalSlotsMap$1.get(this); + + for (const filename of configFilenames) { + const ctx = createContext( + slots, + "config", + name, + path__default["default"].join(directoryPath, filename), + basePath + ); + + if (fs__default["default"].existsSync(ctx.filePath) && fs__default["default"].statSync(ctx.filePath).isFile()) { + let configData; + + try { + configData = loadConfigFile(ctx.filePath); + } catch (error) { + if (!error || error.code !== "ESLINT_CONFIG_FIELD_NOT_FOUND") { + throw error; + } + } + + if (configData) { + debug$2(`Config file found: ${ctx.filePath}`); + return new ConfigArray( + ...this._normalizeConfigData(configData, ctx) + ); + } + } + } + + debug$2(`Config file not found on ${directoryPath}`); + return new ConfigArray(); + } + + /** + * Check if a config file on a given directory exists or not. + * @param {string} directoryPath The path to a directory. + * @returns {string | null} The path to the found config file. If not found then null. + */ + static getPathToConfigFileInDirectory(directoryPath) { + for (const filename of configFilenames) { + const filePath = path__default["default"].join(directoryPath, filename); + + if (fs__default["default"].existsSync(filePath)) { + if (filename === "package.json") { + try { + loadPackageJSONConfigFile(filePath); + return filePath; + } catch { /* ignore */ } + } else { + return filePath; + } + } + } + return null; + } + + /** + * Load `.eslintignore` file. + * @param {string} filePath The path to a `.eslintignore` file to load. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadESLintIgnore(filePath) { + const slots = internalSlotsMap$1.get(this); + const ctx = createContext( + slots, + "ignore", + void 0, + filePath, + slots.cwd + ); + const ignorePatterns = loadESLintIgnoreFile(ctx.filePath); + + return new ConfigArray( + ...this._normalizeESLintIgnoreData(ignorePatterns, ctx) + ); + } + + /** + * Load `.eslintignore` file in the current working directory. + * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist. + */ + loadDefaultESLintIgnore() { + const slots = internalSlotsMap$1.get(this); + const eslintIgnorePath = path__default["default"].resolve(slots.cwd, ".eslintignore"); + const packageJsonPath = path__default["default"].resolve(slots.cwd, "package.json"); + + if (fs__default["default"].existsSync(eslintIgnorePath)) { + return this.loadESLintIgnore(eslintIgnorePath); + } + if (fs__default["default"].existsSync(packageJsonPath)) { + const data = loadJSONConfigFile(packageJsonPath); + + if (Object.hasOwnProperty.call(data, "eslintIgnore")) { + if (!Array.isArray(data.eslintIgnore)) { + throw new Error("Package.json eslintIgnore property requires an array of paths"); + } + const ctx = createContext( + slots, + "ignore", + "eslintIgnore in package.json", + packageJsonPath, + slots.cwd + ); + + return new ConfigArray( + ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx) + ); + } + } + + return new ConfigArray(); + } + + /** + * Load a given config file. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} Loaded config. + * @private + */ + _loadConfigData(ctx) { + return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx); + } + + /** + * Normalize a given `.eslintignore` data to config array elements. + * @param {string[]} ignorePatterns The patterns to ignore files. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeESLintIgnoreData(ignorePatterns, ctx) { + const elements = this._normalizeObjectConfigData( + { ignorePatterns }, + ctx + ); + + // Set `ignorePattern.loose` flag for backward compatibility. + for (const element of elements) { + if (element.ignorePattern) { + element.ignorePattern.loose = true; + } + yield element; + } + } + + /** + * Normalize a given config to an array. + * @param {ConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _normalizeConfigData(configData, ctx) { + const validator = new ConfigValidator(); + + validator.validateConfigSchema(configData, ctx.name || ctx.filePath); + return this._normalizeObjectConfigData(configData, ctx); + } + + /** + * Normalize a given config to an array. + * @param {ConfigData|OverrideConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeObjectConfigData(configData, ctx) { + const { files, excludedFiles, ...configBody } = configData; + const criteria = OverrideTester.create( + files, + excludedFiles, + ctx.matchBasePath + ); + const elements = this._normalizeObjectConfigDataBody(configBody, ctx); + + // Apply the criteria to every element. + for (const element of elements) { + + /* + * Merge the criteria. + * This is for the `overrides` entries that came from the + * configurations of `overrides[].extends`. + */ + element.criteria = OverrideTester.and(criteria, element.criteria); + + /* + * Remove `root` property to ignore `root` settings which came from + * `extends` in `overrides`. + */ + if (element.criteria) { + element.root = void 0; + } + + yield element; + } + } + + /** + * Normalize a given config to an array. + * @param {ConfigData} configData The config data to normalize. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + *_normalizeObjectConfigDataBody( + { + env, + extends: extend, + globals, + ignorePatterns, + noInlineConfig, + parser: parserName, + parserOptions, + plugins: pluginList, + processor, + reportUnusedDisableDirectives, + root, + rules, + settings, + overrides: overrideList = [] + }, + ctx + ) { + const extendList = Array.isArray(extend) ? extend : [extend]; + const ignorePattern = ignorePatterns && new IgnorePattern( + Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns], + ctx.matchBasePath + ); + + // Flatten `extends`. + for (const extendName of extendList.filter(Boolean)) { + yield* this._loadExtends(extendName, ctx); + } + + // Load parser & plugins. + const parser = parserName && this._loadParser(parserName, ctx); + const plugins = pluginList && this._loadPlugins(pluginList, ctx); + + // Yield pseudo config data for file extension processors. + if (plugins) { + yield* this._takeFileExtensionProcessors(plugins, ctx); + } + + // Yield the config data except `extends` and `overrides`. + yield { + + // Debug information. + type: ctx.type, + name: ctx.name, + filePath: ctx.filePath, + + // Config data. + criteria: null, + env, + globals, + ignorePattern, + noInlineConfig, + parser, + parserOptions, + plugins, + processor, + reportUnusedDisableDirectives, + root, + rules, + settings + }; + + // Flatten `overries`. + for (let i = 0; i < overrideList.length; ++i) { + yield* this._normalizeObjectConfigData( + overrideList[i], + { ...ctx, name: `${ctx.name}#overrides[${i}]` } + ); + } + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _loadExtends(extendName, ctx) { + debug$2("Loading {extends:%j} relative to %s", extendName, ctx.filePath); + try { + if (extendName.startsWith("eslint:")) { + return this._loadExtendedBuiltInConfig(extendName, ctx); + } + if (extendName.startsWith("plugin:")) { + return this._loadExtendedPluginConfig(extendName, ctx); + } + return this._loadExtendedShareableConfig(extendName, ctx); + } catch (error) { + error.message += `\nReferenced from: ${ctx.filePath || ctx.name}`; + throw error; + } + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _loadExtendedBuiltInConfig(extendName, ctx) { + const { + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = internalSlotsMap$1.get(this); + + if (extendName === "eslint:recommended") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintRecommendedConfig) { + if (typeof getEslintRecommendedConfig !== "function") { + throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`); + } + return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" }); + } + return this._loadConfigData({ + ...ctx, + name, + filePath: eslintRecommendedPath + }); + } + if (extendName === "eslint:all") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintAllConfig) { + if (typeof getEslintAllConfig !== "function") { + throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`); + } + return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" }); + } + return this._loadConfigData({ + ...ctx, + name, + filePath: eslintAllPath + }); + } + + throw configInvalidError(extendName, ctx.name, "extend-config-missing"); + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _loadExtendedPluginConfig(extendName, ctx) { + const slashIndex = extendName.lastIndexOf("/"); + + if (slashIndex === -1) { + throw configInvalidError(extendName, ctx.filePath, "plugin-invalid"); + } + + const pluginName = extendName.slice("plugin:".length, slashIndex); + const configName = extendName.slice(slashIndex + 1); + + if (isFilePath(pluginName)) { + throw new Error("'extends' cannot use a file path for plugins."); + } + + const plugin = this._loadPlugin(pluginName, ctx); + const configData = + plugin.definition && + plugin.definition.configs[configName]; + + if (configData) { + return this._normalizeConfigData(configData, { + ...ctx, + filePath: plugin.filePath || ctx.filePath, + name: `${ctx.name} » plugin:${plugin.id}/${configName}` + }); + } + + throw plugin.error || configInvalidError(extendName, ctx.filePath, "extend-config-missing"); + } + + /** + * Load configs of an element in `extends`. + * @param {string} extendName The name of a base config. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The normalized config. + * @private + */ + _loadExtendedShareableConfig(extendName, ctx) { + const { cwd, resolver } = internalSlotsMap$1.get(this); + const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js"); + let request; + + if (isFilePath(extendName)) { + request = extendName; + } else if (extendName.startsWith(".")) { + request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior. + } else { + request = normalizePackageName( + extendName, + "eslint-config" + ); + } + + let filePath; + + try { + filePath = resolver.resolve(request, relativeTo); + } catch (error) { + /* istanbul ignore else */ + if (error && error.code === "MODULE_NOT_FOUND") { + throw configInvalidError(extendName, ctx.filePath, "extend-config-missing"); + } + throw error; + } + + writeDebugLogForLoading(request, relativeTo, filePath); + return this._loadConfigData({ + ...ctx, + filePath, + name: `${ctx.name} » ${request}` + }); + } + + /** + * Load given plugins. + * @param {string[]} names The plugin names to load. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {Record} The loaded parser. + * @private + */ + _loadPlugins(names, ctx) { + return names.reduce((map, name) => { + if (isFilePath(name)) { + throw new Error("Plugins array cannot includes file paths."); + } + const plugin = this._loadPlugin(name, ctx); + + map[plugin.id] = plugin; + + return map; + }, {}); + } + + /** + * Load a given parser. + * @param {string} nameOrPath The package name or the path to a parser file. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {DependentParser} The loaded parser. + */ + _loadParser(nameOrPath, ctx) { + debug$2("Loading parser %j from %s", nameOrPath, ctx.filePath); + + const { cwd, resolver } = internalSlotsMap$1.get(this); + const relativeTo = ctx.filePath || path__default["default"].join(cwd, "__placeholder__.js"); + + try { + const filePath = resolver.resolve(nameOrPath, relativeTo); + + writeDebugLogForLoading(nameOrPath, relativeTo, filePath); + + return new ConfigDependency({ + definition: require$1(filePath), + filePath, + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } catch (error) { + + // If the parser name is "espree", load the espree of ESLint. + if (nameOrPath === "espree") { + debug$2("Fallback espree."); + return new ConfigDependency({ + definition: require$1("espree"), + filePath: require$1.resolve("espree"), + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + debug$2("Failed to load parser '%s' declared in '%s'.", nameOrPath, ctx.name); + error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`; + + return new ConfigDependency({ + error, + id: nameOrPath, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + } + + /** + * Load a given plugin. + * @param {string} name The plugin name to load. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {DependentPlugin} The loaded plugin. + * @private + */ + _loadPlugin(name, ctx) { + debug$2("Loading plugin %j from %s", name, ctx.filePath); + + const { additionalPluginPool, resolver } = internalSlotsMap$1.get(this); + const request = normalizePackageName(name, "eslint-plugin"); + const id = getShorthandName(request, "eslint-plugin"); + const relativeTo = path__default["default"].join(ctx.pluginBasePath, "__placeholder__.js"); + + if (name.match(/\s+/u)) { + const error = Object.assign( + new Error(`Whitespace found in plugin name '${name}'`), + { + messageTemplate: "whitespace-found", + messageData: { pluginName: request } + } + ); + + return new ConfigDependency({ + error, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + // Check for additional pool. + const plugin = + additionalPluginPool.get(request) || + additionalPluginPool.get(id); + + if (plugin) { + return new ConfigDependency({ + definition: normalizePlugin(plugin), + original: plugin, + filePath: "", // It's unknown where the plugin came from. + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + let filePath; + let error; + + try { + filePath = resolver.resolve(request, relativeTo); + } catch (resolveError) { + error = resolveError; + /* istanbul ignore else */ + if (error && error.code === "MODULE_NOT_FOUND") { + error.messageTemplate = "plugin-missing"; + error.messageData = { + pluginName: request, + resolvePluginsRelativeTo: ctx.pluginBasePath, + importerName: ctx.name + }; + } + } + + if (filePath) { + try { + writeDebugLogForLoading(request, relativeTo, filePath); + + const startTime = Date.now(); + const pluginDefinition = require$1(filePath); + + debug$2(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`); + + return new ConfigDependency({ + definition: normalizePlugin(pluginDefinition), + original: pluginDefinition, + filePath, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } catch (loadError) { + error = loadError; + } + } + + debug$2("Failed to load plugin '%s' declared in '%s'.", name, ctx.name); + error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`; + return new ConfigDependency({ + error, + id, + importerName: ctx.name, + importerPath: ctx.filePath + }); + } + + /** + * Take file expression processors as config array elements. + * @param {Record} plugins The plugin definitions. + * @param {ConfigArrayFactoryLoadingContext} ctx The loading context. + * @returns {IterableIterator} The config array elements of file expression processors. + * @private + */ + *_takeFileExtensionProcessors(plugins, ctx) { + for (const pluginId of Object.keys(plugins)) { + const processors = + plugins[pluginId] && + plugins[pluginId].definition && + plugins[pluginId].definition.processors; + + if (!processors) { + continue; + } + + for (const processorId of Object.keys(processors)) { + if (processorId.startsWith(".")) { + yield* this._normalizeObjectConfigData( + { + files: [`*${processorId}`], + processor: `${pluginId}/${processorId}` + }, + { + ...ctx, + type: "implicit-processor", + name: `${ctx.name}#processors["${pluginId}/${processorId}"]` + } + ); + } + } + } + } +} + +/** + * @fileoverview `CascadingConfigArrayFactory` class. + * + * `CascadingConfigArrayFactory` class has a responsibility: + * + * 1. Handles cascading of config files. + * + * It provides two methods: + * + * - `getConfigArrayForFile(filePath)` + * Get the corresponded configuration of a given file. This method doesn't + * throw even if the given file didn't exist. + * - `clearCache()` + * Clear the internal cache. You have to call this method when + * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends + * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.) + * + * @author Toru Nagashima + */ + +const debug$1 = debugOrig__default["default"]("eslintrc:cascading-config-array-factory"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// Define types for VSCode IntelliSense. +/** @typedef {import("./shared/types").ConfigData} ConfigData */ +/** @typedef {import("./shared/types").Parser} Parser */ +/** @typedef {import("./shared/types").Plugin} Plugin */ +/** @typedef {import("./shared/types").Rule} Rule */ +/** @typedef {ReturnType} ConfigArray */ + +/** + * @typedef {Object} CascadingConfigArrayFactoryOptions + * @property {Map} [additionalPluginPool] The map for additional plugins. + * @property {ConfigData} [baseConfig] The config by `baseConfig` option. + * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files. + * @property {string} [cwd] The base directory to start lookup. + * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. + * @property {string[]} [rulePaths] The value of `--rulesdir` option. + * @property {string} [specificConfigPath] The value of `--config` option. + * @property {boolean} [useEslintrc] if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** + * @typedef {Object} CascadingConfigArrayFactoryInternalSlots + * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option. + * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`. + * @property {ConfigArray} cliConfigArray The config array of CLI options. + * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`. + * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays. + * @property {Map} configCache The cache from directory paths to config arrays. + * @property {string} cwd The base directory to start lookup. + * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays. + * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`. + * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`. + * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`. + * @property {boolean} useEslintrc if `false` then it doesn't load config files. + * @property {Function} loadRules The function to use to load rules. + * @property {Map} builtInRules The rules that are built in to ESLint. + * @property {Object} [resolver=ModuleResolver] The module resolver object. + * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. + * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. + */ + +/** @type {WeakMap} */ +const internalSlotsMap = new WeakMap(); + +/** + * Create the config array from `baseConfig` and `rulePaths`. + * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. + * @returns {ConfigArray} The config array of the base configs. + */ +function createBaseConfigArray({ + configArrayFactory, + baseConfigData, + rulePaths, + cwd, + loadRules +}) { + const baseConfigArray = configArrayFactory.create( + baseConfigData, + { name: "BaseConfig" } + ); + + /* + * Create the config array element for the default ignore patterns. + * This element has `ignorePattern` property that ignores the default + * patterns in the current working directory. + */ + baseConfigArray.unshift(configArrayFactory.create( + { ignorePatterns: IgnorePattern.DefaultPatterns }, + { name: "DefaultIgnorePattern" } + )[0]); + + /* + * Load rules `--rulesdir` option as a pseudo plugin. + * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate + * the rule's options with only information in the config array. + */ + if (rulePaths && rulePaths.length > 0) { + baseConfigArray.push({ + type: "config", + name: "--rulesdir", + filePath: "", + plugins: { + "": new ConfigDependency({ + definition: { + rules: rulePaths.reduce( + (map, rulesPath) => Object.assign( + map, + loadRules(rulesPath, cwd) + ), + {} + ) + }, + filePath: "", + id: "", + importerName: "--rulesdir", + importerPath: "" + }) + } + }); + } + + return baseConfigArray; +} + +/** + * Create the config array from CLI options. + * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots. + * @returns {ConfigArray} The config array of the base configs. + */ +function createCLIConfigArray({ + cliConfigData, + configArrayFactory, + cwd, + ignorePath, + specificConfigPath +}) { + const cliConfigArray = configArrayFactory.create( + cliConfigData, + { name: "CLIOptions" } + ); + + cliConfigArray.unshift( + ...(ignorePath + ? configArrayFactory.loadESLintIgnore(ignorePath) + : configArrayFactory.loadDefaultESLintIgnore()) + ); + + if (specificConfigPath) { + cliConfigArray.unshift( + ...configArrayFactory.loadFile( + specificConfigPath, + { name: "--config", basePath: cwd } + ) + ); + } + + return cliConfigArray; +} + +/** + * The error type when there are files matched by a glob, but all of them have been ignored. + */ +class ConfigurationNotFoundError extends Error { + + // eslint-disable-next-line jsdoc/require-description + /** + * @param {string} directoryPath The directory path. + */ + constructor(directoryPath) { + super(`No ESLint configuration found in ${directoryPath}.`); + this.messageTemplate = "no-config-found"; + this.messageData = { directoryPath }; + } +} + +/** + * This class provides the functionality that enumerates every file which is + * matched by given glob patterns and that configuration. + */ +class CascadingConfigArrayFactory { + + /** + * Initialize this enumerator. + * @param {CascadingConfigArrayFactoryOptions} options The options. + */ + constructor({ + additionalPluginPool = new Map(), + baseConfig: baseConfigData = null, + cliConfig: cliConfigData = null, + cwd = process.cwd(), + ignorePath, + resolvePluginsRelativeTo, + rulePaths = [], + specificConfigPath = null, + useEslintrc = true, + builtInRules = new Map(), + loadRules, + resolver, + eslintRecommendedPath, + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig + } = {}) { + const configArrayFactory = new ConfigArrayFactory({ + additionalPluginPool, + cwd, + resolvePluginsRelativeTo, + builtInRules, + resolver, + eslintRecommendedPath, + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig + }); + + internalSlotsMap.set(this, { + baseConfigArray: createBaseConfigArray({ + baseConfigData, + configArrayFactory, + cwd, + rulePaths, + loadRules + }), + baseConfigData, + cliConfigArray: createCLIConfigArray({ + cliConfigData, + configArrayFactory, + cwd, + ignorePath, + specificConfigPath + }), + cliConfigData, + configArrayFactory, + configCache: new Map(), + cwd, + finalizeCache: new WeakMap(), + ignorePath, + rulePaths, + specificConfigPath, + useEslintrc, + builtInRules, + loadRules + }); + } + + /** + * The path to the current working directory. + * This is used by tests. + * @type {string} + */ + get cwd() { + const { cwd } = internalSlotsMap.get(this); + + return cwd; + } + + /** + * Get the config array of a given file. + * If `filePath` was not given, it returns the config which contains only + * `baseConfigData` and `cliConfigData`. + * @param {string} [filePath] The file path to a file. + * @param {Object} [options] The options. + * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`. + * @returns {ConfigArray} The config array of the file. + */ + getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) { + const { + baseConfigArray, + cliConfigArray, + cwd + } = internalSlotsMap.get(this); + + if (!filePath) { + return new ConfigArray(...baseConfigArray, ...cliConfigArray); + } + + const directoryPath = path__default["default"].dirname(path__default["default"].resolve(cwd, filePath)); + + debug$1(`Load config files for ${directoryPath}.`); + + return this._finalizeConfigArray( + this._loadConfigInAncestors(directoryPath), + directoryPath, + ignoreNotFoundError + ); + } + + /** + * Set the config data to override all configs. + * Require to call `clearCache()` method after this method is called. + * @param {ConfigData} configData The config data to override all configs. + * @returns {void} + */ + setOverrideConfig(configData) { + const slots = internalSlotsMap.get(this); + + slots.cliConfigData = configData; + } + + /** + * Clear config cache. + * @returns {void} + */ + clearCache() { + const slots = internalSlotsMap.get(this); + + slots.baseConfigArray = createBaseConfigArray(slots); + slots.cliConfigArray = createCLIConfigArray(slots); + slots.configCache.clear(); + } + + /** + * Load and normalize config files from the ancestor directories. + * @param {string} directoryPath The path to a leaf directory. + * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories. + * @returns {ConfigArray} The loaded config. + * @private + */ + _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) { + const { + baseConfigArray, + configArrayFactory, + configCache, + cwd, + useEslintrc + } = internalSlotsMap.get(this); + + if (!useEslintrc) { + return baseConfigArray; + } + + let configArray = configCache.get(directoryPath); + + // Hit cache. + if (configArray) { + debug$1(`Cache hit: ${directoryPath}.`); + return configArray; + } + debug$1(`No cache found: ${directoryPath}.`); + + const homePath = os__default["default"].homedir(); + + // Consider this is root. + if (directoryPath === homePath && cwd !== homePath) { + debug$1("Stop traversing because of considered root."); + if (configsExistInSubdirs) { + const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath); + + if (filePath) { + emitDeprecationWarning( + filePath, + "ESLINT_PERSONAL_CONFIG_SUPPRESS" + ); + } + } + return this._cacheConfig(directoryPath, baseConfigArray); + } + + // Load the config on this directory. + try { + configArray = configArrayFactory.loadInDirectory(directoryPath); + } catch (error) { + /* istanbul ignore next */ + if (error.code === "EACCES") { + debug$1("Stop traversing because of 'EACCES' error."); + return this._cacheConfig(directoryPath, baseConfigArray); + } + throw error; + } + + if (configArray.length > 0 && configArray.isRoot()) { + debug$1("Stop traversing because of 'root:true'."); + configArray.unshift(...baseConfigArray); + return this._cacheConfig(directoryPath, configArray); + } + + // Load from the ancestors and merge it. + const parentPath = path__default["default"].dirname(directoryPath); + const parentConfigArray = parentPath && parentPath !== directoryPath + ? this._loadConfigInAncestors( + parentPath, + configsExistInSubdirs || configArray.length > 0 + ) + : baseConfigArray; + + if (configArray.length > 0) { + configArray.unshift(...parentConfigArray); + } else { + configArray = parentConfigArray; + } + + // Cache and return. + return this._cacheConfig(directoryPath, configArray); + } + + /** + * Freeze and cache a given config. + * @param {string} directoryPath The path to a directory as a cache key. + * @param {ConfigArray} configArray The config array as a cache value. + * @returns {ConfigArray} The `configArray` (frozen). + */ + _cacheConfig(directoryPath, configArray) { + const { configCache } = internalSlotsMap.get(this); + + Object.freeze(configArray); + configCache.set(directoryPath, configArray); + + return configArray; + } + + /** + * Finalize a given config array. + * Concatenate `--config` and other CLI options. + * @param {ConfigArray} configArray The parent config array. + * @param {string} directoryPath The path to the leaf directory to find config files. + * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`. + * @returns {ConfigArray} The loaded config. + * @private + */ + _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) { + const { + cliConfigArray, + configArrayFactory, + finalizeCache, + useEslintrc, + builtInRules + } = internalSlotsMap.get(this); + + let finalConfigArray = finalizeCache.get(configArray); + + if (!finalConfigArray) { + finalConfigArray = configArray; + + // Load the personal config if there are no regular config files. + if ( + useEslintrc && + configArray.every(c => !c.filePath) && + cliConfigArray.every(c => !c.filePath) // `--config` option can be a file. + ) { + const homePath = os__default["default"].homedir(); + + debug$1("Loading the config file of the home directory:", homePath); + + const personalConfigArray = configArrayFactory.loadInDirectory( + homePath, + { name: "PersonalConfig" } + ); + + if ( + personalConfigArray.length > 0 && + !directoryPath.startsWith(homePath) + ) { + const lastElement = + personalConfigArray[personalConfigArray.length - 1]; + + emitDeprecationWarning( + lastElement.filePath, + "ESLINT_PERSONAL_CONFIG_LOAD" + ); + } + + finalConfigArray = finalConfigArray.concat(personalConfigArray); + } + + // Apply CLI options. + if (cliConfigArray.length > 0) { + finalConfigArray = finalConfigArray.concat(cliConfigArray); + } + + // Validate rule settings and environments. + const validator = new ConfigValidator({ + builtInRules + }); + + validator.validateConfigArray(finalConfigArray); + + // Cache it. + Object.freeze(finalConfigArray); + finalizeCache.set(configArray, finalConfigArray); + + debug$1( + "Configuration was determined: %o on %s", + finalConfigArray, + directoryPath + ); + } + + // At least one element (the default ignore patterns) exists. + if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) { + throw new ConfigurationNotFoundError(directoryPath); + } + + return finalConfigArray; + } +} + +/** + * @fileoverview Compatibility class for flat config. + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** @typedef {import("../../shared/types").Environment} Environment */ +/** @typedef {import("../../shared/types").Processor} Processor */ + +const debug = debugOrig__default["default"]("eslintrc:flat-compat"); +const cafactory = Symbol("cafactory"); + +/** + * Translates an ESLintRC-style config object into a flag-config-style config + * object. + * @param {Object} eslintrcConfig An ESLintRC-style config object. + * @param {Object} options Options to help translate the config. + * @param {string} options.resolveConfigRelativeTo To the directory to resolve + * configs from. + * @param {string} options.resolvePluginsRelativeTo The directory to resolve + * plugins from. + * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment + * names to objects. + * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor + * names to objects. + * @returns {Object} A flag-config-style config object. + */ +function translateESLintRC(eslintrcConfig, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo, + pluginEnvironments, + pluginProcessors +}) { + + const flatConfig = {}; + const configs = []; + const languageOptions = {}; + const linterOptions = {}; + const keysToCopy = ["settings", "rules", "processor"]; + const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"]; + const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"]; + + // copy over simple translations + for (const key of keysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + flatConfig[key] = eslintrcConfig[key]; + } + } + + // copy over languageOptions + for (const key of languageOptionsKeysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + + // create the languageOptions key in the flat config + flatConfig.languageOptions = languageOptions; + + if (key === "parser") { + debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`); + + if (eslintrcConfig[key].error) { + throw eslintrcConfig[key].error; + } + + languageOptions[key] = eslintrcConfig[key].definition; + continue; + } + + // clone any object values that are in the eslintrc config + if (eslintrcConfig[key] && typeof eslintrcConfig[key] === "object") { + languageOptions[key] = { + ...eslintrcConfig[key] + }; + } else { + languageOptions[key] = eslintrcConfig[key]; + } + } + } + + // copy over linterOptions + for (const key of linterOptionsKeysToCopy) { + if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { + flatConfig.linterOptions = linterOptions; + linterOptions[key] = eslintrcConfig[key]; + } + } + + // move ecmaVersion a level up + if (languageOptions.parserOptions) { + + if ("ecmaVersion" in languageOptions.parserOptions) { + languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion; + delete languageOptions.parserOptions.ecmaVersion; + } + + if ("sourceType" in languageOptions.parserOptions) { + languageOptions.sourceType = languageOptions.parserOptions.sourceType; + delete languageOptions.parserOptions.sourceType; + } + + // check to see if we even need parserOptions anymore and remove it if not + if (Object.keys(languageOptions.parserOptions).length === 0) { + delete languageOptions.parserOptions; + } + } + + // overrides + if (eslintrcConfig.criteria) { + flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)]; + } + + // translate plugins + if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === "object") { + debug(`Translating plugins: ${eslintrcConfig.plugins}`); + + flatConfig.plugins = {}; + + for (const pluginName of Object.keys(eslintrcConfig.plugins)) { + + debug(`Translating plugin: ${pluginName}`); + debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`); + + const { original: plugin, error } = eslintrcConfig.plugins[pluginName]; + + if (error) { + throw error; + } + + flatConfig.plugins[pluginName] = plugin; + + // create a config for any processors + if (plugin.processors) { + for (const processorName of Object.keys(plugin.processors)) { + if (processorName.startsWith(".")) { + debug(`Assigning processor: ${pluginName}/${processorName}`); + + configs.unshift({ + files: [`**/*${processorName}`], + processor: pluginProcessors.get(`${pluginName}/${processorName}`) + }); + } + + } + } + } + } + + // translate env - must come after plugins + if (eslintrcConfig.env && typeof eslintrcConfig.env === "object") { + for (const envName of Object.keys(eslintrcConfig.env)) { + + // only add environments that are true + if (eslintrcConfig.env[envName]) { + debug(`Translating environment: ${envName}`); + + if (environments.has(envName)) { + + // built-in environments should be defined first + configs.unshift(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...environments.get(envName) + }, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo + })); + } else if (pluginEnvironments.has(envName)) { + + // if the environment comes from a plugin, it should come after the plugin config + configs.push(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...pluginEnvironments.get(envName) + }, { + resolveConfigRelativeTo, + resolvePluginsRelativeTo + })); + } + } + } + } + + // only add if there are actually keys in the config + if (Object.keys(flatConfig).length > 0) { + configs.push(flatConfig); + } + + return configs; +} + + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * A compatibility class for working with configs. + */ +class FlatCompat { + + constructor({ + baseDirectory = process.cwd(), + resolvePluginsRelativeTo = baseDirectory, + recommendedConfig, + allConfig + } = {}) { + this.baseDirectory = baseDirectory; + this.resolvePluginsRelativeTo = resolvePluginsRelativeTo; + this[cafactory] = new ConfigArrayFactory({ + cwd: baseDirectory, + resolvePluginsRelativeTo, + getEslintAllConfig: () => { + + if (!allConfig) { + throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor."); + } + + return allConfig; + }, + getEslintRecommendedConfig: () => { + + if (!recommendedConfig) { + throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor."); + } + + return recommendedConfig; + } + }); + } + + /** + * Translates an ESLintRC-style config into a flag-config-style config. + * @param {Object} eslintrcConfig The ESLintRC-style config object. + * @returns {Object} A flag-config-style config object. + */ + config(eslintrcConfig) { + const eslintrcArray = this[cafactory].create(eslintrcConfig, { + basePath: this.baseDirectory + }); + + const flatArray = []; + let hasIgnorePatterns = false; + + eslintrcArray.forEach(configData => { + if (configData.type === "config") { + hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern; + flatArray.push(...translateESLintRC(configData, { + resolveConfigRelativeTo: path__default["default"].join(this.baseDirectory, "__placeholder.js"), + resolvePluginsRelativeTo: path__default["default"].join(this.resolvePluginsRelativeTo, "__placeholder.js"), + pluginEnvironments: eslintrcArray.pluginEnvironments, + pluginProcessors: eslintrcArray.pluginProcessors + })); + } + }); + + // combine ignorePatterns to emulate ESLintRC behavior better + if (hasIgnorePatterns) { + flatArray.unshift({ + ignores: [filePath => { + + // Compute the final config for this file. + // This filters config array elements by `files`/`excludedFiles` then merges the elements. + const finalConfig = eslintrcArray.extractConfig(filePath); + + // Test the `ignorePattern` properties of the final config. + return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath); + }] + }); + } + + return flatArray; + } + + /** + * Translates the `env` section of an ESLintRC-style config. + * @param {Object} envConfig The `env` section of an ESLintRC config. + * @returns {Object[]} An array of flag-config objects representing the environments. + */ + env(envConfig) { + return this.config({ + env: envConfig + }); + } + + /** + * Translates the `extends` section of an ESLintRC-style config. + * @param {...string} configsToExtend The names of the configs to load. + * @returns {Object[]} An array of flag-config objects representing the config. + */ + extends(...configsToExtend) { + return this.config({ + extends: configsToExtend + }); + } + + /** + * Translates the `plugins` section of an ESLintRC-style config. + * @param {...string} plugins The names of the plugins to load. + * @returns {Object[]} An array of flag-config objects representing the plugins. + */ + plugins(...plugins) { + return this.config({ + plugins + }); + } +} + +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + ConfigArray, + createConfigArrayFactoryContext: createContext, + CascadingConfigArrayFactory, + ConfigArrayFactory, + ConfigDependency, + ExtractedConfig, + IgnorePattern, + OverrideTester, + getUsedExtractedConfigs, + environments, + + // shared + ConfigOps, + ConfigValidator, + ModuleResolver, + naming +}; + +exports.FlatCompat = FlatCompat; +exports.Legacy = Legacy; +//# sourceMappingURL=eslintrc.cjs.map diff --git a/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map b/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map new file mode 100644 index 000000000..c4f4fced9 --- /dev/null +++ b/node_modules/@eslint/eslintrc/dist/eslintrc.cjs.map @@ -0,0 +1 @@ +{"version":3,"file":"eslintrc.cjs","sources":["../lib/config-array/ignore-pattern.js","../lib/config-array/extracted-config.js","../lib/config-array/config-array.js","../lib/config-array/config-dependency.js","../lib/config-array/override-tester.js","../lib/config-array/index.js","../lib/shared/config-ops.js","../lib/shared/deprecation-warnings.js","../lib/shared/ajv.js","../conf/config-schema.js","../conf/environments.js","../lib/shared/config-validator.js","../lib/shared/naming.js","../lib/shared/relative-module-resolver.js","../lib/config-array-factory.js","../lib/cascading-config-array-factory.js","../lib/flat-compat.js","../lib/index.js"],"sourcesContent":["/**\n * @fileoverview `IgnorePattern` class.\n *\n * `IgnorePattern` class has the set of glob patterns and the base path.\n *\n * It provides two static methods.\n *\n * - `IgnorePattern.createDefaultIgnore(cwd)`\n * Create the default predicate function.\n * - `IgnorePattern.createIgnore(ignorePatterns)`\n * Create the predicate function from multiple `IgnorePattern` objects.\n *\n * It provides two properties and a method.\n *\n * - `patterns`\n * The glob patterns that ignore to lint.\n * - `basePath`\n * The base path of the glob patterns. If absolute paths existed in the\n * glob patterns, those are handled as relative paths to the base path.\n * - `getPatternsRelativeTo(basePath)`\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n *\n * `ConfigArrayFactory` creates `IgnorePattern` objects when it processes\n * `ignorePatterns` properties.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport assert from \"assert\";\nimport path from \"path\";\nimport ignore from \"ignore\";\nimport debugOrig from \"debug\";\n\nconst debug = debugOrig(\"eslintrc:ignore-pattern\");\n\n/** @typedef {ReturnType} Ignore */\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the path to the common ancestor directory of given paths.\n * @param {string[]} sourcePaths The paths to calculate the common ancestor.\n * @returns {string} The path to the common ancestor directory.\n */\nfunction getCommonAncestorPath(sourcePaths) {\n let result = sourcePaths[0];\n\n for (let i = 1; i < sourcePaths.length; ++i) {\n const a = result;\n const b = sourcePaths[i];\n\n // Set the shorter one (it's the common ancestor if one includes the other).\n result = a.length < b.length ? a : b;\n\n // Set the common ancestor.\n for (let j = 0, lastSepPos = 0; j < a.length && j < b.length; ++j) {\n if (a[j] !== b[j]) {\n result = a.slice(0, lastSepPos);\n break;\n }\n if (a[j] === path.sep) {\n lastSepPos = j;\n }\n }\n }\n\n let resolvedResult = result || path.sep;\n\n // if Windows common ancestor is root of drive must have trailing slash to be absolute.\n if (resolvedResult && resolvedResult.endsWith(\":\") && process.platform === \"win32\") {\n resolvedResult += path.sep;\n }\n return resolvedResult;\n}\n\n/**\n * Make relative path.\n * @param {string} from The source path to get relative path.\n * @param {string} to The destination path to get relative path.\n * @returns {string} The relative path.\n */\nfunction relative(from, to) {\n const relPath = path.relative(from, to);\n\n if (path.sep === \"/\") {\n return relPath;\n }\n return relPath.split(path.sep).join(\"/\");\n}\n\n/**\n * Get the trailing slash if existed.\n * @param {string} filePath The path to check.\n * @returns {string} The trailing slash if existed.\n */\nfunction dirSuffix(filePath) {\n const isDir = (\n filePath.endsWith(path.sep) ||\n (process.platform === \"win32\" && filePath.endsWith(\"/\"))\n );\n\n return isDir ? \"/\" : \"\";\n}\n\nconst DefaultPatterns = Object.freeze([\"/**/node_modules/*\"]);\nconst DotPatterns = Object.freeze([\".*\", \"!.eslintrc.*\", \"!../\"]);\n\n//------------------------------------------------------------------------------\n// Public\n//------------------------------------------------------------------------------\n\nclass IgnorePattern {\n\n /**\n * The default patterns.\n * @type {string[]}\n */\n static get DefaultPatterns() {\n return DefaultPatterns;\n }\n\n /**\n * Create the default predicate function.\n * @param {string} cwd The current working directory.\n * @returns {((filePath:string, dot:boolean) => boolean) & {basePath:string; patterns:string[]}}\n * The preficate function.\n * The first argument is an absolute path that is checked.\n * The second argument is the flag to not ignore dotfiles.\n * If the predicate function returned `true`, it means the path should be ignored.\n */\n static createDefaultIgnore(cwd) {\n return this.createIgnore([new IgnorePattern(DefaultPatterns, cwd)]);\n }\n\n /**\n * Create the predicate function from multiple `IgnorePattern` objects.\n * @param {IgnorePattern[]} ignorePatterns The list of ignore patterns.\n * @returns {((filePath:string, dot?:boolean) => boolean) & {basePath:string; patterns:string[]}}\n * The preficate function.\n * The first argument is an absolute path that is checked.\n * The second argument is the flag to not ignore dotfiles.\n * If the predicate function returned `true`, it means the path should be ignored.\n */\n static createIgnore(ignorePatterns) {\n debug(\"Create with: %o\", ignorePatterns);\n\n const basePath = getCommonAncestorPath(ignorePatterns.map(p => p.basePath));\n const patterns = [].concat(\n ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath))\n );\n const ig = ignore({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]);\n const dotIg = ignore({ allowRelativePaths: true }).add(patterns);\n\n debug(\" processed: %o\", { basePath, patterns });\n\n return Object.assign(\n (filePath, dot = false) => {\n assert(path.isAbsolute(filePath), \"'filePath' should be an absolute path.\");\n const relPathRaw = relative(basePath, filePath);\n const relPath = relPathRaw && (relPathRaw + dirSuffix(filePath));\n const adoptedIg = dot ? dotIg : ig;\n const result = relPath !== \"\" && adoptedIg.ignores(relPath);\n\n debug(\"Check\", { filePath, dot, relativePath: relPath, result });\n return result;\n },\n { basePath, patterns }\n );\n }\n\n /**\n * Initialize a new `IgnorePattern` instance.\n * @param {string[]} patterns The glob patterns that ignore to lint.\n * @param {string} basePath The base path of `patterns`.\n */\n constructor(patterns, basePath) {\n assert(path.isAbsolute(basePath), \"'basePath' should be an absolute path.\");\n\n /**\n * The glob patterns that ignore to lint.\n * @type {string[]}\n */\n this.patterns = patterns;\n\n /**\n * The base path of `patterns`.\n * @type {string}\n */\n this.basePath = basePath;\n\n /**\n * If `true` then patterns which don't start with `/` will match the paths to the outside of `basePath`. Defaults to `false`.\n *\n * It's set `true` for `.eslintignore`, `package.json`, and `--ignore-path` for backward compatibility.\n * It's `false` as-is for `ignorePatterns` property in config files.\n * @type {boolean}\n */\n this.loose = false;\n }\n\n /**\n * Get `patterns` as modified for a given base path. It modifies the\n * absolute paths in the patterns as prepending the difference of two base\n * paths.\n * @param {string} newBasePath The base path.\n * @returns {string[]} Modifired patterns.\n */\n getPatternsRelativeTo(newBasePath) {\n assert(path.isAbsolute(newBasePath), \"'newBasePath' should be an absolute path.\");\n const { basePath, loose, patterns } = this;\n\n if (newBasePath === basePath) {\n return patterns;\n }\n const prefix = `/${relative(newBasePath, basePath)}`;\n\n return patterns.map(pattern => {\n const negative = pattern.startsWith(\"!\");\n const head = negative ? \"!\" : \"\";\n const body = negative ? pattern.slice(1) : pattern;\n\n if (body.startsWith(\"/\") || body.startsWith(\"../\")) {\n return `${head}${prefix}${body}`;\n }\n return loose ? pattern : `${head}${prefix}/**/${body}`;\n });\n }\n}\n\nexport { IgnorePattern };\n","/**\n * @fileoverview `ExtractedConfig` class.\n *\n * `ExtractedConfig` class expresses a final configuration for a specific file.\n *\n * It provides one method.\n *\n * - `toCompatibleObjectAsConfigFileContent()`\n * Convert this configuration to the compatible object as the content of\n * config files. It converts the loaded parser and plugins to strings.\n * `CLIEngine#getConfigForFile(filePath)` method uses this method.\n *\n * `ConfigArray#extractConfig(filePath)` creates a `ExtractedConfig` instance.\n *\n * @author Toru Nagashima \n */\n\nimport { IgnorePattern } from \"./ignore-pattern.js\";\n\n// For VSCode intellisense\n/** @typedef {import(\"../../shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"../../shared/types\").GlobalConf} GlobalConf */\n/** @typedef {import(\"../../shared/types\").SeverityConf} SeverityConf */\n/** @typedef {import(\"./config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-dependency\").DependentPlugin} DependentPlugin */\n\n/**\n * Check if `xs` starts with `ys`.\n * @template T\n * @param {T[]} xs The array to check.\n * @param {T[]} ys The array that may be the first part of `xs`.\n * @returns {boolean} `true` if `xs` starts with `ys`.\n */\nfunction startsWith(xs, ys) {\n return xs.length >= ys.length && ys.every((y, i) => y === xs[i]);\n}\n\n/**\n * The class for extracted config data.\n */\nclass ExtractedConfig {\n constructor() {\n\n /**\n * The config name what `noInlineConfig` setting came from.\n * @type {string}\n */\n this.configNameOfNoInlineConfig = \"\";\n\n /**\n * Environments.\n * @type {Record}\n */\n this.env = {};\n\n /**\n * Global variables.\n * @type {Record}\n */\n this.globals = {};\n\n /**\n * The glob patterns that ignore to lint.\n * @type {(((filePath:string, dot?:boolean) => boolean) & { basePath:string; patterns:string[] }) | undefined}\n */\n this.ignores = void 0;\n\n /**\n * The flag that disables directive comments.\n * @type {boolean|undefined}\n */\n this.noInlineConfig = void 0;\n\n /**\n * Parser definition.\n * @type {DependentParser|null}\n */\n this.parser = null;\n\n /**\n * Options for the parser.\n * @type {Object}\n */\n this.parserOptions = {};\n\n /**\n * Plugin definitions.\n * @type {Record}\n */\n this.plugins = {};\n\n /**\n * Processor ID.\n * @type {string|null}\n */\n this.processor = null;\n\n /**\n * The flag that reports unused `eslint-disable` directive comments.\n * @type {boolean|undefined}\n */\n this.reportUnusedDisableDirectives = void 0;\n\n /**\n * Rule settings.\n * @type {Record}\n */\n this.rules = {};\n\n /**\n * Shared settings.\n * @type {Object}\n */\n this.settings = {};\n }\n\n /**\n * Convert this config to the compatible object as a config file content.\n * @returns {ConfigData} The converted object.\n */\n toCompatibleObjectAsConfigFileContent() {\n const {\n /* eslint-disable no-unused-vars */\n configNameOfNoInlineConfig: _ignore1,\n processor: _ignore2,\n /* eslint-enable no-unused-vars */\n ignores,\n ...config\n } = this;\n\n config.parser = config.parser && config.parser.filePath;\n config.plugins = Object.keys(config.plugins).filter(Boolean).reverse();\n config.ignorePatterns = ignores ? ignores.patterns : [];\n\n // Strip the default patterns from `ignorePatterns`.\n if (startsWith(config.ignorePatterns, IgnorePattern.DefaultPatterns)) {\n config.ignorePatterns =\n config.ignorePatterns.slice(IgnorePattern.DefaultPatterns.length);\n }\n\n return config;\n }\n}\n\nexport { ExtractedConfig };\n","/**\n * @fileoverview `ConfigArray` class.\n *\n * `ConfigArray` class expresses the full of a configuration. It has the entry\n * config file, base config files that were extended, loaded parsers, and loaded\n * plugins.\n *\n * `ConfigArray` class provides three properties and two methods.\n *\n * - `pluginEnvironments`\n * - `pluginProcessors`\n * - `pluginRules`\n * The `Map` objects that contain the members of all plugins that this\n * config array contains. Those map objects don't have mutation methods.\n * Those keys are the member ID such as `pluginId/memberName`.\n * - `isRoot()`\n * If `true` then this configuration has `root:true` property.\n * - `extractConfig(filePath)`\n * Extract the final configuration for a given file. This means merging\n * every config array element which that `criteria` property matched. The\n * `filePath` argument must be an absolute path.\n *\n * `ConfigArrayFactory` provides the loading logic of config files.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport { ExtractedConfig } from \"./extracted-config.js\";\nimport { IgnorePattern } from \"./ignore-pattern.js\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"../../shared/types\").Environment} Environment */\n/** @typedef {import(\"../../shared/types\").GlobalConf} GlobalConf */\n/** @typedef {import(\"../../shared/types\").RuleConf} RuleConf */\n/** @typedef {import(\"../../shared/types\").Rule} Rule */\n/** @typedef {import(\"../../shared/types\").Plugin} Plugin */\n/** @typedef {import(\"../../shared/types\").Processor} Processor */\n/** @typedef {import(\"./config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-dependency\").DependentPlugin} DependentPlugin */\n/** @typedef {import(\"./override-tester\")[\"OverrideTester\"]} OverrideTester */\n\n/**\n * @typedef {Object} ConfigArrayElement\n * @property {string} name The name of this config element.\n * @property {string} filePath The path to the source file of this config element.\n * @property {InstanceType|null} criteria The tester for the `files` and `excludedFiles` of this config element.\n * @property {Record|undefined} env The environment settings.\n * @property {Record|undefined} globals The global variable settings.\n * @property {IgnorePattern|undefined} ignorePattern The ignore patterns.\n * @property {boolean|undefined} noInlineConfig The flag that disables directive comments.\n * @property {DependentParser|undefined} parser The parser loader.\n * @property {Object|undefined} parserOptions The parser options.\n * @property {Record|undefined} plugins The plugin loaders.\n * @property {string|undefined} processor The processor name to refer plugin's processor.\n * @property {boolean|undefined} reportUnusedDisableDirectives The flag to report unused `eslint-disable` comments.\n * @property {boolean|undefined} root The flag to express root.\n * @property {Record|undefined} rules The rule settings\n * @property {Object|undefined} settings The shared settings.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The element type.\n */\n\n/**\n * @typedef {Object} ConfigArrayInternalSlots\n * @property {Map} cache The cache to extract configs.\n * @property {ReadonlyMap|null} envMap The map from environment ID to environment definition.\n * @property {ReadonlyMap|null} processorMap The map from processor ID to environment definition.\n * @property {ReadonlyMap|null} ruleMap The map from rule ID to rule definition.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new class extends WeakMap {\n get(key) {\n let value = super.get(key);\n\n if (!value) {\n value = {\n cache: new Map(),\n envMap: null,\n processorMap: null,\n ruleMap: null\n };\n super.set(key, value);\n }\n\n return value;\n }\n}();\n\n/**\n * Get the indices which are matched to a given file.\n * @param {ConfigArrayElement[]} elements The elements.\n * @param {string} filePath The path to a target file.\n * @returns {number[]} The indices.\n */\nfunction getMatchedIndices(elements, filePath) {\n const indices = [];\n\n for (let i = elements.length - 1; i >= 0; --i) {\n const element = elements[i];\n\n if (!element.criteria || (filePath && element.criteria.test(filePath))) {\n indices.push(i);\n }\n }\n\n return indices;\n}\n\n/**\n * Check if a value is a non-null object.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is a non-null object.\n */\nfunction isNonNullObject(x) {\n return typeof x === \"object\" && x !== null;\n}\n\n/**\n * Merge two objects.\n *\n * Assign every property values of `y` to `x` if `x` doesn't have the property.\n * If `x`'s property value is an object, it does recursive.\n * @param {Object} target The destination to merge\n * @param {Object|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergeWithoutOverwrite(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n\n if (isNonNullObject(target[key])) {\n mergeWithoutOverwrite(target[key], source[key]);\n } else if (target[key] === void 0) {\n if (isNonNullObject(source[key])) {\n target[key] = Array.isArray(source[key]) ? [] : {};\n mergeWithoutOverwrite(target[key], source[key]);\n } else if (source[key] !== void 0) {\n target[key] = source[key];\n }\n }\n }\n}\n\n/**\n * The error for plugin conflicts.\n */\nclass PluginConflictError extends Error {\n\n /**\n * Initialize this error object.\n * @param {string} pluginId The plugin ID.\n * @param {{filePath:string, importerName:string}[]} plugins The resolved plugins.\n */\n constructor(pluginId, plugins) {\n super(`Plugin \"${pluginId}\" was conflicted between ${plugins.map(p => `\"${p.importerName}\"`).join(\" and \")}.`);\n this.messageTemplate = \"plugin-conflict\";\n this.messageData = { pluginId, plugins };\n }\n}\n\n/**\n * Merge plugins.\n * `target`'s definition is prior to `source`'s.\n * @param {Record} target The destination to merge\n * @param {Record|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergePlugins(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n const targetValue = target[key];\n const sourceValue = source[key];\n\n // Adopt the plugin which was found at first.\n if (targetValue === void 0) {\n if (sourceValue.error) {\n throw sourceValue.error;\n }\n target[key] = sourceValue;\n } else if (sourceValue.filePath !== targetValue.filePath) {\n throw new PluginConflictError(key, [\n {\n filePath: targetValue.filePath,\n importerName: targetValue.importerName\n },\n {\n filePath: sourceValue.filePath,\n importerName: sourceValue.importerName\n }\n ]);\n }\n }\n}\n\n/**\n * Merge rule configs.\n * `target`'s definition is prior to `source`'s.\n * @param {Record} target The destination to merge\n * @param {Record|undefined} source The source to merge.\n * @returns {void}\n */\nfunction mergeRuleConfigs(target, source) {\n if (!isNonNullObject(source)) {\n return;\n }\n\n for (const key of Object.keys(source)) {\n if (key === \"__proto__\") {\n continue;\n }\n const targetDef = target[key];\n const sourceDef = source[key];\n\n // Adopt the rule config which was found at first.\n if (targetDef === void 0) {\n if (Array.isArray(sourceDef)) {\n target[key] = [...sourceDef];\n } else {\n target[key] = [sourceDef];\n }\n\n /*\n * If the first found rule config is severity only and the current rule\n * config has options, merge the severity and the options.\n */\n } else if (\n targetDef.length === 1 &&\n Array.isArray(sourceDef) &&\n sourceDef.length >= 2\n ) {\n targetDef.push(...sourceDef.slice(1));\n }\n }\n}\n\n/**\n * Create the extracted config.\n * @param {ConfigArray} instance The config elements.\n * @param {number[]} indices The indices to use.\n * @returns {ExtractedConfig} The extracted config.\n */\nfunction createConfig(instance, indices) {\n const config = new ExtractedConfig();\n const ignorePatterns = [];\n\n // Merge elements.\n for (const index of indices) {\n const element = instance[index];\n\n // Adopt the parser which was found at first.\n if (!config.parser && element.parser) {\n if (element.parser.error) {\n throw element.parser.error;\n }\n config.parser = element.parser;\n }\n\n // Adopt the processor which was found at first.\n if (!config.processor && element.processor) {\n config.processor = element.processor;\n }\n\n // Adopt the noInlineConfig which was found at first.\n if (config.noInlineConfig === void 0 && element.noInlineConfig !== void 0) {\n config.noInlineConfig = element.noInlineConfig;\n config.configNameOfNoInlineConfig = element.name;\n }\n\n // Adopt the reportUnusedDisableDirectives which was found at first.\n if (config.reportUnusedDisableDirectives === void 0 && element.reportUnusedDisableDirectives !== void 0) {\n config.reportUnusedDisableDirectives = element.reportUnusedDisableDirectives;\n }\n\n // Collect ignorePatterns\n if (element.ignorePattern) {\n ignorePatterns.push(element.ignorePattern);\n }\n\n // Merge others.\n mergeWithoutOverwrite(config.env, element.env);\n mergeWithoutOverwrite(config.globals, element.globals);\n mergeWithoutOverwrite(config.parserOptions, element.parserOptions);\n mergeWithoutOverwrite(config.settings, element.settings);\n mergePlugins(config.plugins, element.plugins);\n mergeRuleConfigs(config.rules, element.rules);\n }\n\n // Create the predicate function for ignore patterns.\n if (ignorePatterns.length > 0) {\n config.ignores = IgnorePattern.createIgnore(ignorePatterns.reverse());\n }\n\n return config;\n}\n\n/**\n * Collect definitions.\n * @template T, U\n * @param {string} pluginId The plugin ID for prefix.\n * @param {Record} defs The definitions to collect.\n * @param {Map} map The map to output.\n * @param {function(T): U} [normalize] The normalize function for each value.\n * @returns {void}\n */\nfunction collect(pluginId, defs, map, normalize) {\n if (defs) {\n const prefix = pluginId && `${pluginId}/`;\n\n for (const [key, value] of Object.entries(defs)) {\n map.set(\n `${prefix}${key}`,\n normalize ? normalize(value) : value\n );\n }\n }\n}\n\n/**\n * Normalize a rule definition.\n * @param {Function|Rule} rule The rule definition to normalize.\n * @returns {Rule} The normalized rule definition.\n */\nfunction normalizePluginRule(rule) {\n return typeof rule === \"function\" ? { create: rule } : rule;\n}\n\n/**\n * Delete the mutation methods from a given map.\n * @param {Map} map The map object to delete.\n * @returns {void}\n */\nfunction deleteMutationMethods(map) {\n Object.defineProperties(map, {\n clear: { configurable: true, value: void 0 },\n delete: { configurable: true, value: void 0 },\n set: { configurable: true, value: void 0 }\n });\n}\n\n/**\n * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.\n * @param {ConfigArrayElement[]} elements The config elements.\n * @param {ConfigArrayInternalSlots} slots The internal slots.\n * @returns {void}\n */\nfunction initPluginMemberMaps(elements, slots) {\n const processed = new Set();\n\n slots.envMap = new Map();\n slots.processorMap = new Map();\n slots.ruleMap = new Map();\n\n for (const element of elements) {\n if (!element.plugins) {\n continue;\n }\n\n for (const [pluginId, value] of Object.entries(element.plugins)) {\n const plugin = value.definition;\n\n if (!plugin || processed.has(pluginId)) {\n continue;\n }\n processed.add(pluginId);\n\n collect(pluginId, plugin.environments, slots.envMap);\n collect(pluginId, plugin.processors, slots.processorMap);\n collect(pluginId, plugin.rules, slots.ruleMap, normalizePluginRule);\n }\n }\n\n deleteMutationMethods(slots.envMap);\n deleteMutationMethods(slots.processorMap);\n deleteMutationMethods(slots.ruleMap);\n}\n\n/**\n * Create `envMap`, `processorMap`, `ruleMap` with the plugins in the config array.\n * @param {ConfigArray} instance The config elements.\n * @returns {ConfigArrayInternalSlots} The extracted config.\n */\nfunction ensurePluginMemberMaps(instance) {\n const slots = internalSlotsMap.get(instance);\n\n if (!slots.ruleMap) {\n initPluginMemberMaps(instance, slots);\n }\n\n return slots;\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * The Config Array.\n *\n * `ConfigArray` instance contains all settings, parsers, and plugins.\n * You need to call `ConfigArray#extractConfig(filePath)` method in order to\n * extract, merge and get only the config data which is related to an arbitrary\n * file.\n * @extends {Array}\n */\nclass ConfigArray extends Array {\n\n /**\n * Get the plugin environments.\n * The returned map cannot be mutated.\n * @type {ReadonlyMap} The plugin environments.\n */\n get pluginEnvironments() {\n return ensurePluginMemberMaps(this).envMap;\n }\n\n /**\n * Get the plugin processors.\n * The returned map cannot be mutated.\n * @type {ReadonlyMap} The plugin processors.\n */\n get pluginProcessors() {\n return ensurePluginMemberMaps(this).processorMap;\n }\n\n /**\n * Get the plugin rules.\n * The returned map cannot be mutated.\n * @returns {ReadonlyMap} The plugin rules.\n */\n get pluginRules() {\n return ensurePluginMemberMaps(this).ruleMap;\n }\n\n /**\n * Check if this config has `root` flag.\n * @returns {boolean} `true` if this config array is root.\n */\n isRoot() {\n for (let i = this.length - 1; i >= 0; --i) {\n const root = this[i].root;\n\n if (typeof root === \"boolean\") {\n return root;\n }\n }\n return false;\n }\n\n /**\n * Extract the config data which is related to a given file.\n * @param {string} filePath The absolute path to the target file.\n * @returns {ExtractedConfig} The extracted config data.\n */\n extractConfig(filePath) {\n const { cache } = internalSlotsMap.get(this);\n const indices = getMatchedIndices(this, filePath);\n const cacheKey = indices.join(\",\");\n\n if (!cache.has(cacheKey)) {\n cache.set(cacheKey, createConfig(this, indices));\n }\n\n return cache.get(cacheKey);\n }\n\n /**\n * Check if a given path is an additional lint target.\n * @param {string} filePath The absolute path to the target file.\n * @returns {boolean} `true` if the file is an additional lint target.\n */\n isAdditionalTargetPath(filePath) {\n for (const { criteria, type } of this) {\n if (\n type === \"config\" &&\n criteria &&\n !criteria.endsWithWildcard &&\n criteria.test(filePath)\n ) {\n return true;\n }\n }\n return false;\n }\n}\n\n/**\n * Get the used extracted configs.\n * CLIEngine will use this method to collect used deprecated rules.\n * @param {ConfigArray} instance The config array object to get.\n * @returns {ExtractedConfig[]} The used extracted configs.\n * @private\n */\nfunction getUsedExtractedConfigs(instance) {\n const { cache } = internalSlotsMap.get(instance);\n\n return Array.from(cache.values());\n}\n\n\nexport {\n ConfigArray,\n getUsedExtractedConfigs\n};\n","/**\n * @fileoverview `ConfigDependency` class.\n *\n * `ConfigDependency` class expresses a loaded parser or plugin.\n *\n * If the parser or plugin was loaded successfully, it has `definition` property\n * and `filePath` property. Otherwise, it has `error` property.\n *\n * When `JSON.stringify()` converted a `ConfigDependency` object to a JSON, it\n * omits `definition` property.\n *\n * `ConfigArrayFactory` creates `ConfigDependency` objects when it loads parsers\n * or plugins.\n *\n * @author Toru Nagashima \n */\n\nimport util from \"util\";\n\n/**\n * The class is to store parsers or plugins.\n * This class hides the loaded object from `JSON.stringify()` and `console.log`.\n * @template T\n */\nclass ConfigDependency {\n\n /**\n * Initialize this instance.\n * @param {Object} data The dependency data.\n * @param {T} [data.definition] The dependency if the loading succeeded.\n * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded.\n * @param {Error} [data.error] The error object if the loading failed.\n * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded.\n * @param {string} data.id The ID of this dependency.\n * @param {string} data.importerName The name of the config file which loads this dependency.\n * @param {string} data.importerPath The path to the config file which loads this dependency.\n */\n constructor({\n definition = null,\n original = null,\n error = null,\n filePath = null,\n id,\n importerName,\n importerPath\n }) {\n\n /**\n * The loaded dependency if the loading succeeded.\n * @type {T|null}\n */\n this.definition = definition;\n\n /**\n * The original dependency as loaded directly from disk if the loading succeeded.\n * @type {T|null}\n */\n this.original = original;\n\n /**\n * The error object if the loading failed.\n * @type {Error|null}\n */\n this.error = error;\n\n /**\n * The loaded dependency if the loading succeeded.\n * @type {string|null}\n */\n this.filePath = filePath;\n\n /**\n * The ID of this dependency.\n * @type {string}\n */\n this.id = id;\n\n /**\n * The name of the config file which loads this dependency.\n * @type {string}\n */\n this.importerName = importerName;\n\n /**\n * The path to the config file which loads this dependency.\n * @type {string}\n */\n this.importerPath = importerPath;\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} a JSON compatible object.\n */\n toJSON() {\n const obj = this[util.inspect.custom]();\n\n // Display `error.message` (`Error#message` is unenumerable).\n if (obj.error instanceof Error) {\n obj.error = { ...obj.error, message: obj.error.message };\n }\n\n return obj;\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} an object to display by `console.log()`.\n */\n [util.inspect.custom]() {\n const {\n definition: _ignore1, // eslint-disable-line no-unused-vars\n original: _ignore2, // eslint-disable-line no-unused-vars\n ...obj\n } = this;\n\n return obj;\n }\n}\n\n/** @typedef {ConfigDependency} DependentParser */\n/** @typedef {ConfigDependency} DependentPlugin */\n\nexport { ConfigDependency };\n","/**\n * @fileoverview `OverrideTester` class.\n *\n * `OverrideTester` class handles `files` property and `excludedFiles` property\n * of `overrides` config.\n *\n * It provides one method.\n *\n * - `test(filePath)`\n * Test if a file path matches the pair of `files` property and\n * `excludedFiles` property. The `filePath` argument must be an absolute\n * path.\n *\n * `ConfigArrayFactory` creates `OverrideTester` objects when it processes\n * `overrides` properties.\n *\n * @author Toru Nagashima \n */\n\nimport assert from \"assert\";\nimport path from \"path\";\nimport util from \"util\";\nimport minimatch from \"minimatch\";\n\nconst { Minimatch } = minimatch;\n\nconst minimatchOpts = { dot: true, matchBase: true };\n\n/**\n * @typedef {Object} Pattern\n * @property {InstanceType[] | null} includes The positive matchers.\n * @property {InstanceType[] | null} excludes The negative matchers.\n */\n\n/**\n * Normalize a given pattern to an array.\n * @param {string|string[]|undefined} patterns A glob pattern or an array of glob patterns.\n * @returns {string[]|null} Normalized patterns.\n * @private\n */\nfunction normalizePatterns(patterns) {\n if (Array.isArray(patterns)) {\n return patterns.filter(Boolean);\n }\n if (typeof patterns === \"string\" && patterns) {\n return [patterns];\n }\n return [];\n}\n\n/**\n * Create the matchers of given patterns.\n * @param {string[]} patterns The patterns.\n * @returns {InstanceType[] | null} The matchers.\n */\nfunction toMatcher(patterns) {\n if (patterns.length === 0) {\n return null;\n }\n return patterns.map(pattern => {\n if (/^\\.[/\\\\]/u.test(pattern)) {\n return new Minimatch(\n pattern.slice(2),\n\n // `./*.js` should not match with `subdir/foo.js`\n { ...minimatchOpts, matchBase: false }\n );\n }\n return new Minimatch(pattern, minimatchOpts);\n });\n}\n\n/**\n * Convert a given matcher to string.\n * @param {Pattern} matchers The matchers.\n * @returns {string} The string expression of the matcher.\n */\nfunction patternToJson({ includes, excludes }) {\n return {\n includes: includes && includes.map(m => m.pattern),\n excludes: excludes && excludes.map(m => m.pattern)\n };\n}\n\n/**\n * The class to test given paths are matched by the patterns.\n */\nclass OverrideTester {\n\n /**\n * Create a tester with given criteria.\n * If there are no criteria, returns `null`.\n * @param {string|string[]} files The glob patterns for included files.\n * @param {string|string[]} excludedFiles The glob patterns for excluded files.\n * @param {string} basePath The path to the base directory to test paths.\n * @returns {OverrideTester|null} The created instance or `null`.\n */\n static create(files, excludedFiles, basePath) {\n const includePatterns = normalizePatterns(files);\n const excludePatterns = normalizePatterns(excludedFiles);\n let endsWithWildcard = false;\n\n if (includePatterns.length === 0) {\n return null;\n }\n\n // Rejects absolute paths or relative paths to parents.\n for (const pattern of includePatterns) {\n if (path.isAbsolute(pattern) || pattern.includes(\"..\")) {\n throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);\n }\n if (pattern.endsWith(\"*\")) {\n endsWithWildcard = true;\n }\n }\n for (const pattern of excludePatterns) {\n if (path.isAbsolute(pattern) || pattern.includes(\"..\")) {\n throw new Error(`Invalid override pattern (expected relative path not containing '..'): ${pattern}`);\n }\n }\n\n const includes = toMatcher(includePatterns);\n const excludes = toMatcher(excludePatterns);\n\n return new OverrideTester(\n [{ includes, excludes }],\n basePath,\n endsWithWildcard\n );\n }\n\n /**\n * Combine two testers by logical and.\n * If either of the testers was `null`, returns the other tester.\n * The `basePath` property of the two must be the same value.\n * @param {OverrideTester|null} a A tester.\n * @param {OverrideTester|null} b Another tester.\n * @returns {OverrideTester|null} Combined tester.\n */\n static and(a, b) {\n if (!b) {\n return a && new OverrideTester(\n a.patterns,\n a.basePath,\n a.endsWithWildcard\n );\n }\n if (!a) {\n return new OverrideTester(\n b.patterns,\n b.basePath,\n b.endsWithWildcard\n );\n }\n\n assert.strictEqual(a.basePath, b.basePath);\n return new OverrideTester(\n a.patterns.concat(b.patterns),\n a.basePath,\n a.endsWithWildcard || b.endsWithWildcard\n );\n }\n\n /**\n * Initialize this instance.\n * @param {Pattern[]} patterns The matchers.\n * @param {string} basePath The base path.\n * @param {boolean} endsWithWildcard If `true` then a pattern ends with `*`.\n */\n constructor(patterns, basePath, endsWithWildcard = false) {\n\n /** @type {Pattern[]} */\n this.patterns = patterns;\n\n /** @type {string} */\n this.basePath = basePath;\n\n /** @type {boolean} */\n this.endsWithWildcard = endsWithWildcard;\n }\n\n /**\n * Test if a given path is matched or not.\n * @param {string} filePath The absolute path to the target file.\n * @returns {boolean} `true` if the path was matched.\n */\n test(filePath) {\n if (typeof filePath !== \"string\" || !path.isAbsolute(filePath)) {\n throw new Error(`'filePath' should be an absolute path, but got ${filePath}.`);\n }\n const relativePath = path.relative(this.basePath, filePath);\n\n return this.patterns.every(({ includes, excludes }) => (\n (!includes || includes.some(m => m.match(relativePath))) &&\n (!excludes || !excludes.some(m => m.match(relativePath)))\n ));\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} a JSON compatible object.\n */\n toJSON() {\n if (this.patterns.length === 1) {\n return {\n ...patternToJson(this.patterns[0]),\n basePath: this.basePath\n };\n }\n return {\n AND: this.patterns.map(patternToJson),\n basePath: this.basePath\n };\n }\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @returns {Object} an object to display by `console.log()`.\n */\n [util.inspect.custom]() {\n return this.toJSON();\n }\n}\n\nexport { OverrideTester };\n","/**\n * @fileoverview `ConfigArray` class.\n * @author Toru Nagashima \n */\n\nimport { ConfigArray, getUsedExtractedConfigs } from \"./config-array.js\";\nimport { ConfigDependency } from \"./config-dependency.js\";\nimport { ExtractedConfig } from \"./extracted-config.js\";\nimport { IgnorePattern } from \"./ignore-pattern.js\";\nimport { OverrideTester } from \"./override-tester.js\";\n\nexport {\n ConfigArray,\n ConfigDependency,\n ExtractedConfig,\n IgnorePattern,\n OverrideTester,\n getUsedExtractedConfigs\n};\n","/**\n * @fileoverview Config file operations. This file must be usable in the browser,\n * so no Node-specific code can be here.\n * @author Nicholas C. Zakas\n */\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\nconst RULE_SEVERITY_STRINGS = [\"off\", \"warn\", \"error\"],\n RULE_SEVERITY = RULE_SEVERITY_STRINGS.reduce((map, value, index) => {\n map[value] = index;\n return map;\n }, {}),\n VALID_SEVERITIES = [0, 1, 2, \"off\", \"warn\", \"error\"];\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * Normalizes the severity value of a rule's configuration to a number\n * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally\n * received from the user. A valid config value is either 0, 1, 2, the string \"off\" (treated the same as 0),\n * the string \"warn\" (treated the same as 1), the string \"error\" (treated the same as 2), or an array\n * whose first element is one of the above values. Strings are matched case-insensitively.\n * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0.\n */\nfunction getRuleSeverity(ruleConfig) {\n const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (severityValue === 0 || severityValue === 1 || severityValue === 2) {\n return severityValue;\n }\n\n if (typeof severityValue === \"string\") {\n return RULE_SEVERITY[severityValue.toLowerCase()] || 0;\n }\n\n return 0;\n}\n\n/**\n * Converts old-style severity settings (0, 1, 2) into new-style\n * severity settings (off, warn, error) for all rules. Assumption is that severity\n * values have already been validated as correct.\n * @param {Object} config The config object to normalize.\n * @returns {void}\n */\nfunction normalizeToStrings(config) {\n\n if (config.rules) {\n Object.keys(config.rules).forEach(ruleId => {\n const ruleConfig = config.rules[ruleId];\n\n if (typeof ruleConfig === \"number\") {\n config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0];\n } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === \"number\") {\n ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0];\n }\n });\n }\n}\n\n/**\n * Determines if the severity for the given rule configuration represents an error.\n * @param {int|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} True if the rule represents an error, false if not.\n */\nfunction isErrorSeverity(ruleConfig) {\n return getRuleSeverity(ruleConfig) === 2;\n}\n\n/**\n * Checks whether a given config has valid severity or not.\n * @param {number|string|Array} ruleConfig The configuration for an individual rule.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isValidSeverity(ruleConfig) {\n let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig;\n\n if (typeof severity === \"string\") {\n severity = severity.toLowerCase();\n }\n return VALID_SEVERITIES.indexOf(severity) !== -1;\n}\n\n/**\n * Checks whether every rule of a given config has valid severity or not.\n * @param {Object} config The configuration for rules.\n * @returns {boolean} `true` if the configuration has valid severity.\n */\nfunction isEverySeverityValid(config) {\n return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId]));\n}\n\n/**\n * Normalizes a value for a global in a config\n * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in\n * a global directive comment\n * @returns {(\"readable\"|\"writeable\"|\"off\")} The value normalized as a string\n * @throws Error if global value is invalid\n */\nfunction normalizeConfigGlobal(configuredValue) {\n switch (configuredValue) {\n case \"off\":\n return \"off\";\n\n case true:\n case \"true\":\n case \"writeable\":\n case \"writable\":\n return \"writable\";\n\n case null:\n case false:\n case \"false\":\n case \"readable\":\n case \"readonly\":\n return \"readonly\";\n\n default:\n throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`);\n }\n}\n\nexport {\n getRuleSeverity,\n normalizeToStrings,\n isErrorSeverity,\n isValidSeverity,\n isEverySeverityValid,\n normalizeConfigGlobal\n};\n","/**\n * @fileoverview Provide the function that emits deprecation warnings.\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport path from \"path\";\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\n\n// Defitions for deprecation warnings.\nconst deprecationWarningMessages = {\n ESLINT_LEGACY_ECMAFEATURES:\n \"The 'ecmaFeatures' config file property is deprecated and has no effect.\",\n ESLINT_PERSONAL_CONFIG_LOAD:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please use a config file per project or the '--config' option.\",\n ESLINT_PERSONAL_CONFIG_SUPPRESS:\n \"'~/.eslintrc.*' config files have been deprecated. \" +\n \"Please remove it or add 'root:true' to the config files in your \" +\n \"projects in order to avoid loading '~/.eslintrc.*' accidentally.\"\n};\n\nconst sourceFileErrorCache = new Set();\n\n/**\n * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted\n * for each unique file path, but repeated invocations with the same file path have no effect.\n * No warnings are emitted if the `--no-deprecation` or `--no-warnings` Node runtime flags are active.\n * @param {string} source The name of the configuration source to report the warning for.\n * @param {string} errorCode The warning message to show.\n * @returns {void}\n */\nfunction emitDeprecationWarning(source, errorCode) {\n const cacheKey = JSON.stringify({ source, errorCode });\n\n if (sourceFileErrorCache.has(cacheKey)) {\n return;\n }\n sourceFileErrorCache.add(cacheKey);\n\n const rel = path.relative(process.cwd(), source);\n const message = deprecationWarningMessages[errorCode];\n\n process.emitWarning(\n `${message} (found in \"${rel}\")`,\n \"DeprecationWarning\",\n errorCode\n );\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n emitDeprecationWarning\n};\n","/**\n * @fileoverview The instance of Ajv validator.\n * @author Evgeny Poberezkin\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport Ajv from \"ajv\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/*\n * Copied from ajv/lib/refs/json-schema-draft-04.json\n * The MIT License (MIT)\n * Copyright (c) 2015-2017 Evgeny Poberezkin\n */\nconst metaSchema = {\n id: \"http://json-schema.org/draft-04/schema#\",\n $schema: \"http://json-schema.org/draft-04/schema#\",\n description: \"Core schema meta-schema\",\n definitions: {\n schemaArray: {\n type: \"array\",\n minItems: 1,\n items: { $ref: \"#\" }\n },\n positiveInteger: {\n type: \"integer\",\n minimum: 0\n },\n positiveIntegerDefault0: {\n allOf: [{ $ref: \"#/definitions/positiveInteger\" }, { default: 0 }]\n },\n simpleTypes: {\n enum: [\"array\", \"boolean\", \"integer\", \"null\", \"number\", \"object\", \"string\"]\n },\n stringArray: {\n type: \"array\",\n items: { type: \"string\" },\n minItems: 1,\n uniqueItems: true\n }\n },\n type: \"object\",\n properties: {\n id: {\n type: \"string\"\n },\n $schema: {\n type: \"string\"\n },\n title: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n default: { },\n multipleOf: {\n type: \"number\",\n minimum: 0,\n exclusiveMinimum: true\n },\n maximum: {\n type: \"number\"\n },\n exclusiveMaximum: {\n type: \"boolean\",\n default: false\n },\n minimum: {\n type: \"number\"\n },\n exclusiveMinimum: {\n type: \"boolean\",\n default: false\n },\n maxLength: { $ref: \"#/definitions/positiveInteger\" },\n minLength: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n pattern: {\n type: \"string\",\n format: \"regex\"\n },\n additionalItems: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n items: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/schemaArray\" }\n ],\n default: { }\n },\n maxItems: { $ref: \"#/definitions/positiveInteger\" },\n minItems: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n uniqueItems: {\n type: \"boolean\",\n default: false\n },\n maxProperties: { $ref: \"#/definitions/positiveInteger\" },\n minProperties: { $ref: \"#/definitions/positiveIntegerDefault0\" },\n required: { $ref: \"#/definitions/stringArray\" },\n additionalProperties: {\n anyOf: [\n { type: \"boolean\" },\n { $ref: \"#\" }\n ],\n default: { }\n },\n definitions: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n properties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n patternProperties: {\n type: \"object\",\n additionalProperties: { $ref: \"#\" },\n default: { }\n },\n dependencies: {\n type: \"object\",\n additionalProperties: {\n anyOf: [\n { $ref: \"#\" },\n { $ref: \"#/definitions/stringArray\" }\n ]\n }\n },\n enum: {\n type: \"array\",\n minItems: 1,\n uniqueItems: true\n },\n type: {\n anyOf: [\n { $ref: \"#/definitions/simpleTypes\" },\n {\n type: \"array\",\n items: { $ref: \"#/definitions/simpleTypes\" },\n minItems: 1,\n uniqueItems: true\n }\n ]\n },\n format: { type: \"string\" },\n allOf: { $ref: \"#/definitions/schemaArray\" },\n anyOf: { $ref: \"#/definitions/schemaArray\" },\n oneOf: { $ref: \"#/definitions/schemaArray\" },\n not: { $ref: \"#\" }\n },\n dependencies: {\n exclusiveMaximum: [\"maximum\"],\n exclusiveMinimum: [\"minimum\"]\n },\n default: { }\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport default (additionalOptions = {}) => {\n const ajv = new Ajv({\n meta: false,\n useDefaults: true,\n validateSchema: false,\n missingRefs: \"ignore\",\n verbose: true,\n schemaId: \"auto\",\n ...additionalOptions\n });\n\n ajv.addMetaSchema(metaSchema);\n // eslint-disable-next-line no-underscore-dangle\n ajv._opts.defaultMeta = metaSchema.id;\n\n return ajv;\n};\n","/**\n * @fileoverview Defines a schema for configs.\n * @author Sylvan Mably\n */\n\nconst baseConfigProperties = {\n $schema: { type: \"string\" },\n env: { type: \"object\" },\n extends: { $ref: \"#/definitions/stringOrStrings\" },\n globals: { type: \"object\" },\n overrides: {\n type: \"array\",\n items: { $ref: \"#/definitions/overrideConfig\" },\n additionalItems: false\n },\n parser: { type: [\"string\", \"null\"] },\n parserOptions: { type: \"object\" },\n plugins: { type: \"array\" },\n processor: { type: \"string\" },\n rules: { type: \"object\" },\n settings: { type: \"object\" },\n noInlineConfig: { type: \"boolean\" },\n reportUnusedDisableDirectives: { type: \"boolean\" },\n\n ecmaFeatures: { type: \"object\" } // deprecated; logs a warning when used\n};\n\nconst configSchema = {\n definitions: {\n stringOrStrings: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false\n }\n ]\n },\n stringOrStringsRequired: {\n oneOf: [\n { type: \"string\" },\n {\n type: \"array\",\n items: { type: \"string\" },\n additionalItems: false,\n minItems: 1\n }\n ]\n },\n\n // Config at top-level.\n objectConfig: {\n type: \"object\",\n properties: {\n root: { type: \"boolean\" },\n ignorePatterns: { $ref: \"#/definitions/stringOrStrings\" },\n ...baseConfigProperties\n },\n additionalProperties: false\n },\n\n // Config in `overrides`.\n overrideConfig: {\n type: \"object\",\n properties: {\n excludedFiles: { $ref: \"#/definitions/stringOrStrings\" },\n files: { $ref: \"#/definitions/stringOrStringsRequired\" },\n ...baseConfigProperties\n },\n required: [\"files\"],\n additionalProperties: false\n }\n },\n\n $ref: \"#/definitions/objectConfig\"\n};\n\nexport default configSchema;\n","/**\n * @fileoverview Defines environment settings and globals.\n * @author Elan Shanker\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport globals from \"globals\";\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n/**\n * Get the object that has difference.\n * @param {Record} current The newer object.\n * @param {Record} prev The older object.\n * @returns {Record} The difference object.\n */\nfunction getDiff(current, prev) {\n const retv = {};\n\n for (const [key, value] of Object.entries(current)) {\n if (!Object.hasOwnProperty.call(prev, key)) {\n retv[key] = value;\n }\n }\n\n return retv;\n}\n\nconst newGlobals2015 = getDiff(globals.es2015, globals.es5); // 19 variables such as Promise, Map, ...\nconst newGlobals2017 = {\n Atomics: false,\n SharedArrayBuffer: false\n};\nconst newGlobals2020 = {\n BigInt: false,\n BigInt64Array: false,\n BigUint64Array: false,\n globalThis: false\n};\n\nconst newGlobals2021 = {\n AggregateError: false,\n FinalizationRegistry: false,\n WeakRef: false\n};\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/** @type {Map} */\nexport default new Map(Object.entries({\n\n // Language\n builtin: {\n globals: globals.es5\n },\n es6: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2015: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 6\n }\n },\n es2016: {\n globals: newGlobals2015,\n parserOptions: {\n ecmaVersion: 7\n }\n },\n es2017: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 8\n }\n },\n es2018: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 9\n }\n },\n es2019: {\n globals: { ...newGlobals2015, ...newGlobals2017 },\n parserOptions: {\n ecmaVersion: 10\n }\n },\n es2020: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020 },\n parserOptions: {\n ecmaVersion: 11\n }\n },\n es2021: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 12\n }\n },\n es2022: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 13\n }\n },\n es2023: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 14\n }\n },\n es2024: {\n globals: { ...newGlobals2015, ...newGlobals2017, ...newGlobals2020, ...newGlobals2021 },\n parserOptions: {\n ecmaVersion: 15\n }\n },\n\n // Platforms\n browser: {\n globals: globals.browser\n },\n node: {\n globals: globals.node,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n \"shared-node-browser\": {\n globals: globals[\"shared-node-browser\"]\n },\n worker: {\n globals: globals.worker\n },\n serviceworker: {\n globals: globals.serviceworker\n },\n\n // Frameworks\n commonjs: {\n globals: globals.commonjs,\n parserOptions: {\n ecmaFeatures: {\n globalReturn: true\n }\n }\n },\n amd: {\n globals: globals.amd\n },\n mocha: {\n globals: globals.mocha\n },\n jasmine: {\n globals: globals.jasmine\n },\n jest: {\n globals: globals.jest\n },\n phantomjs: {\n globals: globals.phantomjs\n },\n jquery: {\n globals: globals.jquery\n },\n qunit: {\n globals: globals.qunit\n },\n prototypejs: {\n globals: globals.prototypejs\n },\n shelljs: {\n globals: globals.shelljs\n },\n meteor: {\n globals: globals.meteor\n },\n mongo: {\n globals: globals.mongo\n },\n protractor: {\n globals: globals.protractor\n },\n applescript: {\n globals: globals.applescript\n },\n nashorn: {\n globals: globals.nashorn\n },\n atomtest: {\n globals: globals.atomtest\n },\n embertest: {\n globals: globals.embertest\n },\n webextensions: {\n globals: globals.webextensions\n },\n greasemonkey: {\n globals: globals.greasemonkey\n }\n}));\n","/**\n * @fileoverview Validates configs.\n * @author Brandon Mills\n */\n\n/* eslint class-methods-use-this: \"off\" */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport util from \"util\";\nimport * as ConfigOps from \"./config-ops.js\";\nimport { emitDeprecationWarning } from \"./deprecation-warnings.js\";\nimport ajvOrig from \"./ajv.js\";\nimport configSchema from \"../../conf/config-schema.js\";\nimport BuiltInEnvironments from \"../../conf/environments.js\";\n\nconst ajv = ajvOrig();\n\nconst ruleValidators = new WeakMap();\nconst noop = Function.prototype;\n\n//------------------------------------------------------------------------------\n// Private\n//------------------------------------------------------------------------------\nlet validateSchema;\nconst severityMap = {\n error: 2,\n warn: 1,\n off: 0\n};\n\nconst validated = new WeakSet();\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nexport default class ConfigValidator {\n constructor({ builtInRules = new Map() } = {}) {\n this.builtInRules = builtInRules;\n }\n\n /**\n * Gets a complete options schema for a rule.\n * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object\n * @returns {Object} JSON Schema for the rule's options.\n */\n getRuleOptionsSchema(rule) {\n if (!rule) {\n return null;\n }\n\n const schema = rule.schema || rule.meta && rule.meta.schema;\n\n // Given a tuple of schemas, insert warning level at the beginning\n if (Array.isArray(schema)) {\n if (schema.length) {\n return {\n type: \"array\",\n items: schema,\n minItems: 0,\n maxItems: schema.length\n };\n }\n return {\n type: \"array\",\n minItems: 0,\n maxItems: 0\n };\n\n }\n\n // Given a full schema, leave it alone\n return schema || null;\n }\n\n /**\n * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid.\n * @param {options} options The given options for the rule.\n * @returns {number|string} The rule's severity value\n */\n validateRuleSeverity(options) {\n const severity = Array.isArray(options) ? options[0] : options;\n const normSeverity = typeof severity === \"string\" ? severityMap[severity.toLowerCase()] : severity;\n\n if (normSeverity === 0 || normSeverity === 1 || normSeverity === 2) {\n return normSeverity;\n }\n\n throw new Error(`\\tSeverity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '${util.inspect(severity).replace(/'/gu, \"\\\"\").replace(/\\n/gu, \"\")}').\\n`);\n\n }\n\n /**\n * Validates the non-severity options passed to a rule, based on its schema.\n * @param {{create: Function}} rule The rule to validate\n * @param {Array} localOptions The options for the rule, excluding severity\n * @returns {void}\n */\n validateRuleSchema(rule, localOptions) {\n if (!ruleValidators.has(rule)) {\n const schema = this.getRuleOptionsSchema(rule);\n\n if (schema) {\n ruleValidators.set(rule, ajv.compile(schema));\n }\n }\n\n const validateRule = ruleValidators.get(rule);\n\n if (validateRule) {\n validateRule(localOptions);\n if (validateRule.errors) {\n throw new Error(validateRule.errors.map(\n error => `\\tValue ${JSON.stringify(error.data)} ${error.message}.\\n`\n ).join(\"\"));\n }\n }\n }\n\n /**\n * Validates a rule's options against its schema.\n * @param {{create: Function}|null} rule The rule that the config is being validated for\n * @param {string} ruleId The rule's unique name.\n * @param {Array|number} options The given options for the rule.\n * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,\n * no source is prepended to the message.\n * @returns {void}\n */\n validateRuleOptions(rule, ruleId, options, source = null) {\n try {\n const severity = this.validateRuleSeverity(options);\n\n if (severity !== 0) {\n this.validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);\n }\n } catch (err) {\n const enhancedMessage = `Configuration for rule \"${ruleId}\" is invalid:\\n${err.message}`;\n\n if (typeof source === \"string\") {\n throw new Error(`${source}:\\n\\t${enhancedMessage}`);\n } else {\n throw new Error(enhancedMessage);\n }\n }\n }\n\n /**\n * Validates an environment object\n * @param {Object} environment The environment config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments.\n * @returns {void}\n */\n validateEnvironment(\n environment,\n source,\n getAdditionalEnv = noop\n ) {\n\n // not having an environment is ok\n if (!environment) {\n return;\n }\n\n Object.keys(environment).forEach(id => {\n const env = getAdditionalEnv(id) || BuiltInEnvironments.get(id) || null;\n\n if (!env) {\n const message = `${source}:\\n\\tEnvironment key \"${id}\" is unknown\\n`;\n\n throw new Error(message);\n }\n });\n }\n\n /**\n * Validates a rules config object\n * @param {Object} rulesConfig The rules config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules\n * @returns {void}\n */\n validateRules(\n rulesConfig,\n source,\n getAdditionalRule = noop\n ) {\n if (!rulesConfig) {\n return;\n }\n\n Object.keys(rulesConfig).forEach(id => {\n const rule = getAdditionalRule(id) || this.builtInRules.get(id) || null;\n\n this.validateRuleOptions(rule, id, rulesConfig[id], source);\n });\n }\n\n /**\n * Validates a `globals` section of a config file\n * @param {Object} globalsConfig The `globals` section\n * @param {string|null} source The name of the configuration source to report in the event of an error.\n * @returns {void}\n */\n validateGlobals(globalsConfig, source = null) {\n if (!globalsConfig) {\n return;\n }\n\n Object.entries(globalsConfig)\n .forEach(([configuredGlobal, configuredValue]) => {\n try {\n ConfigOps.normalizeConfigGlobal(configuredValue);\n } catch (err) {\n throw new Error(`ESLint configuration of global '${configuredGlobal}' in ${source} is invalid:\\n${err.message}`);\n }\n });\n }\n\n /**\n * Validate `processor` configuration.\n * @param {string|undefined} processorName The processor name.\n * @param {string} source The name of config file.\n * @param {function(id:string): Processor} getProcessor The getter of defined processors.\n * @returns {void}\n */\n validateProcessor(processorName, source, getProcessor) {\n if (processorName && !getProcessor(processorName)) {\n throw new Error(`ESLint configuration of processor in '${source}' is invalid: '${processorName}' was not found.`);\n }\n }\n\n /**\n * Formats an array of schema validation errors.\n * @param {Array} errors An array of error messages to format.\n * @returns {string} Formatted error message\n */\n formatErrors(errors) {\n return errors.map(error => {\n if (error.keyword === \"additionalProperties\") {\n const formattedPropertyPath = error.dataPath.length ? `${error.dataPath.slice(1)}.${error.params.additionalProperty}` : error.params.additionalProperty;\n\n return `Unexpected top-level property \"${formattedPropertyPath}\"`;\n }\n if (error.keyword === \"type\") {\n const formattedField = error.dataPath.slice(1);\n const formattedExpectedType = Array.isArray(error.schema) ? error.schema.join(\"/\") : error.schema;\n const formattedValue = JSON.stringify(error.data);\n\n return `Property \"${formattedField}\" is the wrong type (expected ${formattedExpectedType} but got \\`${formattedValue}\\`)`;\n }\n\n const field = error.dataPath[0] === \".\" ? error.dataPath.slice(1) : error.dataPath;\n\n return `\"${field}\" ${error.message}. Value: ${JSON.stringify(error.data)}`;\n }).map(message => `\\t- ${message}.\\n`).join(\"\");\n }\n\n /**\n * Validates the top level properties of the config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @returns {void}\n */\n validateConfigSchema(config, source = null) {\n validateSchema = validateSchema || ajv.compile(configSchema);\n\n if (!validateSchema(config)) {\n throw new Error(`ESLint configuration in ${source} is invalid:\\n${this.formatErrors(validateSchema.errors)}`);\n }\n\n if (Object.hasOwnProperty.call(config, \"ecmaFeatures\")) {\n emitDeprecationWarning(source, \"ESLINT_LEGACY_ECMAFEATURES\");\n }\n }\n\n /**\n * Validates an entire config object.\n * @param {Object} config The config object to validate.\n * @param {string} source The name of the configuration source to report in any errors.\n * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules.\n * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs.\n * @returns {void}\n */\n validate(config, source, getAdditionalRule, getAdditionalEnv) {\n this.validateConfigSchema(config, source);\n this.validateRules(config.rules, source, getAdditionalRule);\n this.validateEnvironment(config.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n\n for (const override of config.overrides || []) {\n this.validateRules(override.rules, source, getAdditionalRule);\n this.validateEnvironment(override.env, source, getAdditionalEnv);\n this.validateGlobals(config.globals, source);\n }\n }\n\n /**\n * Validate config array object.\n * @param {ConfigArray} configArray The config array to validate.\n * @returns {void}\n */\n validateConfigArray(configArray) {\n const getPluginEnv = Map.prototype.get.bind(configArray.pluginEnvironments);\n const getPluginProcessor = Map.prototype.get.bind(configArray.pluginProcessors);\n const getPluginRule = Map.prototype.get.bind(configArray.pluginRules);\n\n // Validate.\n for (const element of configArray) {\n if (validated.has(element)) {\n continue;\n }\n validated.add(element);\n\n this.validateEnvironment(element.env, element.name, getPluginEnv);\n this.validateGlobals(element.globals, element.name);\n this.validateProcessor(element.processor, element.name, getPluginProcessor);\n this.validateRules(element.rules, element.name, getPluginRule);\n }\n }\n\n}\n","/**\n * @fileoverview Common helpers for naming of plugins, formatters and configs\n */\n\nconst NAMESPACE_REGEX = /^@.*\\//iu;\n\n/**\n * Brings package name to correct format based on prefix\n * @param {string} name The name of the package.\n * @param {string} prefix Can be either \"eslint-plugin\", \"eslint-config\" or \"eslint-formatter\"\n * @returns {string} Normalized name of the package\n * @private\n */\nfunction normalizePackageName(name, prefix) {\n let normalizedName = name;\n\n /**\n * On Windows, name can come in with Windows slashes instead of Unix slashes.\n * Normalize to Unix first to avoid errors later on.\n * https://github.com/eslint/eslint/issues/5644\n */\n if (normalizedName.includes(\"\\\\\")) {\n normalizedName = normalizedName.replace(/\\\\/gu, \"/\");\n }\n\n if (normalizedName.charAt(0) === \"@\") {\n\n /**\n * it's a scoped package\n * package name is the prefix, or just a username\n */\n const scopedPackageShortcutRegex = new RegExp(`^(@[^/]+)(?:/(?:${prefix})?)?$`, \"u\"),\n scopedPackageNameRegex = new RegExp(`^${prefix}(-|$)`, \"u\");\n\n if (scopedPackageShortcutRegex.test(normalizedName)) {\n normalizedName = normalizedName.replace(scopedPackageShortcutRegex, `$1/${prefix}`);\n } else if (!scopedPackageNameRegex.test(normalizedName.split(\"/\")[1])) {\n\n /**\n * for scoped packages, insert the prefix after the first / unless\n * the path is already @scope/eslint or @scope/eslint-xxx-yyy\n */\n normalizedName = normalizedName.replace(/^@([^/]+)\\/(.*)$/u, `@$1/${prefix}-$2`);\n }\n } else if (!normalizedName.startsWith(`${prefix}-`)) {\n normalizedName = `${prefix}-${normalizedName}`;\n }\n\n return normalizedName;\n}\n\n/**\n * Removes the prefix from a fullname.\n * @param {string} fullname The term which may have the prefix.\n * @param {string} prefix The prefix to remove.\n * @returns {string} The term without prefix.\n */\nfunction getShorthandName(fullname, prefix) {\n if (fullname[0] === \"@\") {\n let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, \"u\").exec(fullname);\n\n if (matchResult) {\n return matchResult[1];\n }\n\n matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, \"u\").exec(fullname);\n if (matchResult) {\n return `${matchResult[1]}/${matchResult[2]}`;\n }\n } else if (fullname.startsWith(`${prefix}-`)) {\n return fullname.slice(prefix.length + 1);\n }\n\n return fullname;\n}\n\n/**\n * Gets the scope (namespace) of a term.\n * @param {string} term The term which may have the namespace.\n * @returns {string} The namespace of the term if it has one.\n */\nfunction getNamespaceFromTerm(term) {\n const match = term.match(NAMESPACE_REGEX);\n\n return match ? match[0] : \"\";\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport {\n normalizePackageName,\n getShorthandName,\n getNamespaceFromTerm\n};\n","/**\n * Utility for resolving a module relative to another module\n * @author Teddy Katz\n */\n\nimport Module from \"module\";\n\n/*\n * `Module.createRequire` is added in v12.2.0. It supports URL as well.\n * We only support the case where the argument is a filepath, not a URL.\n */\nconst createRequire = Module.createRequire;\n\n/**\n * Resolves a Node module relative to another module\n * @param {string} moduleName The name of a Node module, or a path to a Node module.\n * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be\n * a file rather than a directory, but the file need not actually exist.\n * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath`\n */\nfunction resolve(moduleName, relativeToPath) {\n try {\n return createRequire(relativeToPath).resolve(moduleName);\n } catch (error) {\n\n // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future.\n if (\n typeof error === \"object\" &&\n error !== null &&\n error.code === \"MODULE_NOT_FOUND\" &&\n !error.requireStack &&\n error.message.includes(moduleName)\n ) {\n error.message += `\\nRequire stack:\\n- ${relativeToPath}`;\n }\n throw error;\n }\n}\n\nexport {\n resolve\n};\n","/**\n * @fileoverview The factory of `ConfigArray` objects.\n *\n * This class provides methods to create `ConfigArray` instance.\n *\n * - `create(configData, options)`\n * Create a `ConfigArray` instance from a config data. This is to handle CLI\n * options except `--config`.\n * - `loadFile(filePath, options)`\n * Create a `ConfigArray` instance from a config file. This is to handle\n * `--config` option. If the file was not found, throws the following error:\n * - If the filename was `*.js`, a `MODULE_NOT_FOUND` error.\n * - If the filename was `package.json`, an IO error or an\n * `ESLINT_CONFIG_FIELD_NOT_FOUND` error.\n * - Otherwise, an IO error such as `ENOENT`.\n * - `loadInDirectory(directoryPath, options)`\n * Create a `ConfigArray` instance from a config file which is on a given\n * directory. This tries to load `.eslintrc.*` or `package.json`. If not\n * found, returns an empty `ConfigArray`.\n * - `loadESLintIgnore(filePath)`\n * Create a `ConfigArray` instance from a config file that is `.eslintignore`\n * format. This is to handle `--ignore-path` option.\n * - `loadDefaultESLintIgnore()`\n * Create a `ConfigArray` instance from `.eslintignore` or `package.json` in\n * the current working directory.\n *\n * `ConfigArrayFactory` class has the responsibility that loads configuration\n * files, including loading `extends`, `parser`, and `plugins`. The created\n * `ConfigArray` instance has the loaded `extends`, `parser`, and `plugins`.\n *\n * But this class doesn't handle cascading. `CascadingConfigArrayFactory` class\n * handles cascading and hierarchy.\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport debugOrig from \"debug\";\nimport fs from \"fs\";\nimport importFresh from \"import-fresh\";\nimport { createRequire } from \"module\";\nimport path from \"path\";\nimport stripComments from \"strip-json-comments\";\n\nimport {\n ConfigArray,\n ConfigDependency,\n IgnorePattern,\n OverrideTester\n} from \"./config-array/index.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport * as ModuleResolver from \"./shared/relative-module-resolver.js\";\n\nconst require = createRequire(import.meta.url);\n\nconst debug = debugOrig(\"eslintrc:config-array-factory\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst configFilenames = [\n \".eslintrc.js\",\n \".eslintrc.cjs\",\n \".eslintrc.yaml\",\n \".eslintrc.yml\",\n \".eslintrc.json\",\n \".eslintrc\",\n \"package.json\"\n];\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"./shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"./shared/types\").OverrideConfigData} OverrideConfigData */\n/** @typedef {import(\"./shared/types\").Parser} Parser */\n/** @typedef {import(\"./shared/types\").Plugin} Plugin */\n/** @typedef {import(\"./shared/types\").Rule} Rule */\n/** @typedef {import(\"./config-array/config-dependency\").DependentParser} DependentParser */\n/** @typedef {import(\"./config-array/config-dependency\").DependentPlugin} DependentPlugin */\n/** @typedef {ConfigArray[0]} ConfigArrayElement */\n\n/**\n * @typedef {Object} ConfigArrayFactoryOptions\n * @property {Map} [additionalPluginPool] The map for additional plugins.\n * @property {string} [cwd] The path to the current working directory.\n * @property {string} [resolvePluginsRelativeTo] A path to the directory that plugins should be resolved from. Defaults to `cwd`.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryInternalSlots\n * @property {Map} additionalPluginPool The map for additional plugins.\n * @property {string} cwd The path to the current working directory.\n * @property {string | undefined} resolvePluginsRelativeTo An absolute path the the directory that plugins should be resolved from.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryLoadingContext\n * @property {string} filePath The path to the current configuration.\n * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @property {string} name The name of the current configuration.\n * @property {string} pluginBasePath The base path to resolve plugins.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The type of the current configuration. This is `\"config\"` in normal. This is `\"ignore\"` if it came from `.eslintignore`. This is `\"implicit-processor\"` if it came from legacy file-extension processors.\n */\n\n/**\n * @typedef {Object} ConfigArrayFactoryLoadingContext\n * @property {string} filePath The path to the current configuration.\n * @property {string} matchBasePath The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @property {string} name The name of the current configuration.\n * @property {\"config\" | \"ignore\" | \"implicit-processor\"} type The type of the current configuration. This is `\"config\"` in normal. This is `\"ignore\"` if it came from `.eslintignore`. This is `\"implicit-processor\"` if it came from legacy file-extension processors.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new WeakMap();\n\n/** @type {WeakMap} */\nconst normalizedPlugins = new WeakMap();\n\n/**\n * Check if a given string is a file path.\n * @param {string} nameOrPath A module name or file path.\n * @returns {boolean} `true` if the `nameOrPath` is a file path.\n */\nfunction isFilePath(nameOrPath) {\n return (\n /^\\.{1,2}[/\\\\]/u.test(nameOrPath) ||\n path.isAbsolute(nameOrPath)\n );\n}\n\n/**\n * Convenience wrapper for synchronously reading file contents.\n * @param {string} filePath The filename to read.\n * @returns {string} The file contents, with the BOM removed.\n * @private\n */\nfunction readFile(filePath) {\n return fs.readFileSync(filePath, \"utf8\").replace(/^\\ufeff/u, \"\");\n}\n\n/**\n * Loads a YAML configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadYAMLConfigFile(filePath) {\n debug(`Loading YAML config file: ${filePath}`);\n\n // lazy load YAML to improve performance when not used\n const yaml = require(\"js-yaml\");\n\n try {\n\n // empty YAML file can be null, so always use\n return yaml.load(readFile(filePath)) || {};\n } catch (e) {\n debug(`Error reading YAML file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a JSON configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadJSONConfigFile(filePath) {\n debug(`Loading JSON config file: ${filePath}`);\n\n try {\n return JSON.parse(stripComments(readFile(filePath)));\n } catch (e) {\n debug(`Error reading JSON file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n e.messageTemplate = \"failed-to-read-json\";\n e.messageData = {\n path: filePath,\n message: e.message\n };\n throw e;\n }\n}\n\n/**\n * Loads a legacy (.eslintrc) configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadLegacyConfigFile(filePath) {\n debug(`Loading legacy config file: ${filePath}`);\n\n // lazy load YAML to improve performance when not used\n const yaml = require(\"js-yaml\");\n\n try {\n return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {};\n } catch (e) {\n debug(\"Error reading YAML file: %s\\n%o\", filePath, e);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a JavaScript configuration from a file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadJSConfigFile(filePath) {\n debug(`Loading JS config file: ${filePath}`);\n try {\n return importFresh(filePath);\n } catch (e) {\n debug(`Error reading JavaScript file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a configuration from a package.json file.\n * @param {string} filePath The filename to load.\n * @returns {ConfigData} The configuration object from the file.\n * @throws {Error} If the file cannot be read.\n * @private\n */\nfunction loadPackageJSONConfigFile(filePath) {\n debug(`Loading package.json config file: ${filePath}`);\n try {\n const packageData = loadJSONConfigFile(filePath);\n\n if (!Object.hasOwnProperty.call(packageData, \"eslintConfig\")) {\n throw Object.assign(\n new Error(\"package.json file doesn't have 'eslintConfig' field.\"),\n { code: \"ESLINT_CONFIG_FIELD_NOT_FOUND\" }\n );\n }\n\n return packageData.eslintConfig;\n } catch (e) {\n debug(`Error reading package.json file: ${filePath}`);\n e.message = `Cannot read config file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Loads a `.eslintignore` from a file.\n * @param {string} filePath The filename to load.\n * @returns {string[]} The ignore patterns from the file.\n * @private\n */\nfunction loadESLintIgnoreFile(filePath) {\n debug(`Loading .eslintignore file: ${filePath}`);\n\n try {\n return readFile(filePath)\n .split(/\\r?\\n/gu)\n .filter(line => line.trim() !== \"\" && !line.startsWith(\"#\"));\n } catch (e) {\n debug(`Error reading .eslintignore file: ${filePath}`);\n e.message = `Cannot read .eslintignore file: ${filePath}\\nError: ${e.message}`;\n throw e;\n }\n}\n\n/**\n * Creates an error to notify about a missing config to extend from.\n * @param {string} configName The name of the missing config.\n * @param {string} importerName The name of the config that imported the missing config\n * @param {string} messageTemplate The text template to source error strings from.\n * @returns {Error} The error object to throw\n * @private\n */\nfunction configInvalidError(configName, importerName, messageTemplate) {\n return Object.assign(\n new Error(`Failed to load config \"${configName}\" to extend from.`),\n {\n messageTemplate,\n messageData: { configName, importerName }\n }\n );\n}\n\n/**\n * Loads a configuration file regardless of the source. Inspects the file path\n * to determine the correctly way to load the config file.\n * @param {string} filePath The path to the configuration.\n * @returns {ConfigData|null} The configuration information.\n * @private\n */\nfunction loadConfigFile(filePath) {\n switch (path.extname(filePath)) {\n case \".js\":\n case \".cjs\":\n return loadJSConfigFile(filePath);\n\n case \".json\":\n if (path.basename(filePath) === \"package.json\") {\n return loadPackageJSONConfigFile(filePath);\n }\n return loadJSONConfigFile(filePath);\n\n case \".yaml\":\n case \".yml\":\n return loadYAMLConfigFile(filePath);\n\n default:\n return loadLegacyConfigFile(filePath);\n }\n}\n\n/**\n * Write debug log.\n * @param {string} request The requested module name.\n * @param {string} relativeTo The file path to resolve the request relative to.\n * @param {string} filePath The resolved file path.\n * @returns {void}\n */\nfunction writeDebugLogForLoading(request, relativeTo, filePath) {\n /* istanbul ignore next */\n if (debug.enabled) {\n let nameAndVersion = null;\n\n try {\n const packageJsonPath = ModuleResolver.resolve(\n `${request}/package.json`,\n relativeTo\n );\n const { version = \"unknown\" } = require(packageJsonPath);\n\n nameAndVersion = `${request}@${version}`;\n } catch (error) {\n debug(\"package.json was not found:\", error.message);\n nameAndVersion = request;\n }\n\n debug(\"Loaded: %s (%s)\", nameAndVersion, filePath);\n }\n}\n\n/**\n * Create a new context with default values.\n * @param {ConfigArrayFactoryInternalSlots} slots The internal slots.\n * @param {\"config\" | \"ignore\" | \"implicit-processor\" | undefined} providedType The type of the current configuration. Default is `\"config\"`.\n * @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.\n * @param {string | undefined} providedFilePath The path to the current configuration. Default is empty string.\n * @param {string | undefined} providedMatchBasePath The type of the current configuration. Default is the directory of `filePath` or `cwd`.\n * @returns {ConfigArrayFactoryLoadingContext} The created context.\n */\nfunction createContext(\n { cwd, resolvePluginsRelativeTo },\n providedType,\n providedName,\n providedFilePath,\n providedMatchBasePath\n) {\n const filePath = providedFilePath\n ? path.resolve(cwd, providedFilePath)\n : \"\";\n const matchBasePath =\n (providedMatchBasePath && path.resolve(cwd, providedMatchBasePath)) ||\n (filePath && path.dirname(filePath)) ||\n cwd;\n const name =\n providedName ||\n (filePath && path.relative(cwd, filePath)) ||\n \"\";\n const pluginBasePath =\n resolvePluginsRelativeTo ||\n (filePath && path.dirname(filePath)) ||\n cwd;\n const type = providedType || \"config\";\n\n return { filePath, matchBasePath, name, pluginBasePath, type };\n}\n\n/**\n * Normalize a given plugin.\n * - Ensure the object to have four properties: configs, environments, processors, and rules.\n * - Ensure the object to not have other properties.\n * @param {Plugin} plugin The plugin to normalize.\n * @returns {Plugin} The normalized plugin.\n */\nfunction normalizePlugin(plugin) {\n\n // first check the cache\n let normalizedPlugin = normalizedPlugins.get(plugin);\n\n if (normalizedPlugin) {\n return normalizedPlugin;\n }\n\n normalizedPlugin = {\n configs: plugin.configs || {},\n environments: plugin.environments || {},\n processors: plugin.processors || {},\n rules: plugin.rules || {}\n };\n\n // save the reference for later\n normalizedPlugins.set(plugin, normalizedPlugin);\n\n return normalizedPlugin;\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\n/**\n * The factory of `ConfigArray` objects.\n */\nclass ConfigArrayFactory {\n\n /**\n * Initialize this instance.\n * @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.\n */\n constructor({\n additionalPluginPool = new Map(),\n cwd = process.cwd(),\n resolvePluginsRelativeTo,\n builtInRules,\n resolver = ModuleResolver,\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n } = {}) {\n internalSlotsMap.set(this, {\n additionalPluginPool,\n cwd,\n resolvePluginsRelativeTo:\n resolvePluginsRelativeTo &&\n path.resolve(cwd, resolvePluginsRelativeTo),\n builtInRules,\n resolver,\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n });\n }\n\n /**\n * Create `ConfigArray` instance from a config data.\n * @param {ConfigData|null} configData The config data to create.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.filePath] The path to this config data.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config.\n */\n create(configData, { basePath, filePath, name } = {}) {\n if (!configData) {\n return new ConfigArray();\n }\n\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(slots, \"config\", name, filePath, basePath);\n const elements = this._normalizeConfigData(configData, ctx);\n\n return new ConfigArray(...elements);\n }\n\n /**\n * Load a config file.\n * @param {string} filePath The path to a config file.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config.\n */\n loadFile(filePath, { basePath, name } = {}) {\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(slots, \"config\", name, filePath, basePath);\n\n return new ConfigArray(...this._loadConfigData(ctx));\n }\n\n /**\n * Load the config file on a given directory if exists.\n * @param {string} directoryPath The path to a directory.\n * @param {Object} [options] The options.\n * @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.\n * @param {string} [options.name] The config name.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadInDirectory(directoryPath, { basePath, name } = {}) {\n const slots = internalSlotsMap.get(this);\n\n for (const filename of configFilenames) {\n const ctx = createContext(\n slots,\n \"config\",\n name,\n path.join(directoryPath, filename),\n basePath\n );\n\n if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) {\n let configData;\n\n try {\n configData = loadConfigFile(ctx.filePath);\n } catch (error) {\n if (!error || error.code !== \"ESLINT_CONFIG_FIELD_NOT_FOUND\") {\n throw error;\n }\n }\n\n if (configData) {\n debug(`Config file found: ${ctx.filePath}`);\n return new ConfigArray(\n ...this._normalizeConfigData(configData, ctx)\n );\n }\n }\n }\n\n debug(`Config file not found on ${directoryPath}`);\n return new ConfigArray();\n }\n\n /**\n * Check if a config file on a given directory exists or not.\n * @param {string} directoryPath The path to a directory.\n * @returns {string | null} The path to the found config file. If not found then null.\n */\n static getPathToConfigFileInDirectory(directoryPath) {\n for (const filename of configFilenames) {\n const filePath = path.join(directoryPath, filename);\n\n if (fs.existsSync(filePath)) {\n if (filename === \"package.json\") {\n try {\n loadPackageJSONConfigFile(filePath);\n return filePath;\n } catch { /* ignore */ }\n } else {\n return filePath;\n }\n }\n }\n return null;\n }\n\n /**\n * Load `.eslintignore` file.\n * @param {string} filePath The path to a `.eslintignore` file to load.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadESLintIgnore(filePath) {\n const slots = internalSlotsMap.get(this);\n const ctx = createContext(\n slots,\n \"ignore\",\n void 0,\n filePath,\n slots.cwd\n );\n const ignorePatterns = loadESLintIgnoreFile(ctx.filePath);\n\n return new ConfigArray(\n ...this._normalizeESLintIgnoreData(ignorePatterns, ctx)\n );\n }\n\n /**\n * Load `.eslintignore` file in the current working directory.\n * @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.\n */\n loadDefaultESLintIgnore() {\n const slots = internalSlotsMap.get(this);\n const eslintIgnorePath = path.resolve(slots.cwd, \".eslintignore\");\n const packageJsonPath = path.resolve(slots.cwd, \"package.json\");\n\n if (fs.existsSync(eslintIgnorePath)) {\n return this.loadESLintIgnore(eslintIgnorePath);\n }\n if (fs.existsSync(packageJsonPath)) {\n const data = loadJSONConfigFile(packageJsonPath);\n\n if (Object.hasOwnProperty.call(data, \"eslintIgnore\")) {\n if (!Array.isArray(data.eslintIgnore)) {\n throw new Error(\"Package.json eslintIgnore property requires an array of paths\");\n }\n const ctx = createContext(\n slots,\n \"ignore\",\n \"eslintIgnore in package.json\",\n packageJsonPath,\n slots.cwd\n );\n\n return new ConfigArray(\n ...this._normalizeESLintIgnoreData(data.eslintIgnore, ctx)\n );\n }\n }\n\n return new ConfigArray();\n }\n\n /**\n * Load a given config file.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} Loaded config.\n * @private\n */\n _loadConfigData(ctx) {\n return this._normalizeConfigData(loadConfigFile(ctx.filePath), ctx);\n }\n\n /**\n * Normalize a given `.eslintignore` data to config array elements.\n * @param {string[]} ignorePatterns The patterns to ignore files.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeESLintIgnoreData(ignorePatterns, ctx) {\n const elements = this._normalizeObjectConfigData(\n { ignorePatterns },\n ctx\n );\n\n // Set `ignorePattern.loose` flag for backward compatibility.\n for (const element of elements) {\n if (element.ignorePattern) {\n element.ignorePattern.loose = true;\n }\n yield element;\n }\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _normalizeConfigData(configData, ctx) {\n const validator = new ConfigValidator();\n\n validator.validateConfigSchema(configData, ctx.name || ctx.filePath);\n return this._normalizeObjectConfigData(configData, ctx);\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData|OverrideConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeObjectConfigData(configData, ctx) {\n const { files, excludedFiles, ...configBody } = configData;\n const criteria = OverrideTester.create(\n files,\n excludedFiles,\n ctx.matchBasePath\n );\n const elements = this._normalizeObjectConfigDataBody(configBody, ctx);\n\n // Apply the criteria to every element.\n for (const element of elements) {\n\n /*\n * Merge the criteria.\n * This is for the `overrides` entries that came from the\n * configurations of `overrides[].extends`.\n */\n element.criteria = OverrideTester.and(criteria, element.criteria);\n\n /*\n * Remove `root` property to ignore `root` settings which came from\n * `extends` in `overrides`.\n */\n if (element.criteria) {\n element.root = void 0;\n }\n\n yield element;\n }\n }\n\n /**\n * Normalize a given config to an array.\n * @param {ConfigData} configData The config data to normalize.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n *_normalizeObjectConfigDataBody(\n {\n env,\n extends: extend,\n globals,\n ignorePatterns,\n noInlineConfig,\n parser: parserName,\n parserOptions,\n plugins: pluginList,\n processor,\n reportUnusedDisableDirectives,\n root,\n rules,\n settings,\n overrides: overrideList = []\n },\n ctx\n ) {\n const extendList = Array.isArray(extend) ? extend : [extend];\n const ignorePattern = ignorePatterns && new IgnorePattern(\n Array.isArray(ignorePatterns) ? ignorePatterns : [ignorePatterns],\n ctx.matchBasePath\n );\n\n // Flatten `extends`.\n for (const extendName of extendList.filter(Boolean)) {\n yield* this._loadExtends(extendName, ctx);\n }\n\n // Load parser & plugins.\n const parser = parserName && this._loadParser(parserName, ctx);\n const plugins = pluginList && this._loadPlugins(pluginList, ctx);\n\n // Yield pseudo config data for file extension processors.\n if (plugins) {\n yield* this._takeFileExtensionProcessors(plugins, ctx);\n }\n\n // Yield the config data except `extends` and `overrides`.\n yield {\n\n // Debug information.\n type: ctx.type,\n name: ctx.name,\n filePath: ctx.filePath,\n\n // Config data.\n criteria: null,\n env,\n globals,\n ignorePattern,\n noInlineConfig,\n parser,\n parserOptions,\n plugins,\n processor,\n reportUnusedDisableDirectives,\n root,\n rules,\n settings\n };\n\n // Flatten `overries`.\n for (let i = 0; i < overrideList.length; ++i) {\n yield* this._normalizeObjectConfigData(\n overrideList[i],\n { ...ctx, name: `${ctx.name}#overrides[${i}]` }\n );\n }\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtends(extendName, ctx) {\n debug(\"Loading {extends:%j} relative to %s\", extendName, ctx.filePath);\n try {\n if (extendName.startsWith(\"eslint:\")) {\n return this._loadExtendedBuiltInConfig(extendName, ctx);\n }\n if (extendName.startsWith(\"plugin:\")) {\n return this._loadExtendedPluginConfig(extendName, ctx);\n }\n return this._loadExtendedShareableConfig(extendName, ctx);\n } catch (error) {\n error.message += `\\nReferenced from: ${ctx.filePath || ctx.name}`;\n throw error;\n }\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtendedBuiltInConfig(extendName, ctx) {\n const {\n eslintAllPath,\n getEslintAllConfig,\n eslintRecommendedPath,\n getEslintRecommendedConfig\n } = internalSlotsMap.get(this);\n\n if (extendName === \"eslint:recommended\") {\n const name = `${ctx.name} » ${extendName}`;\n\n if (getEslintRecommendedConfig) {\n if (typeof getEslintRecommendedConfig !== \"function\") {\n throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`);\n }\n return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: \"\" });\n }\n return this._loadConfigData({\n ...ctx,\n name,\n filePath: eslintRecommendedPath\n });\n }\n if (extendName === \"eslint:all\") {\n const name = `${ctx.name} » ${extendName}`;\n\n if (getEslintAllConfig) {\n if (typeof getEslintAllConfig !== \"function\") {\n throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`);\n }\n return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: \"\" });\n }\n return this._loadConfigData({\n ...ctx,\n name,\n filePath: eslintAllPath\n });\n }\n\n throw configInvalidError(extendName, ctx.name, \"extend-config-missing\");\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtendedPluginConfig(extendName, ctx) {\n const slashIndex = extendName.lastIndexOf(\"/\");\n\n if (slashIndex === -1) {\n throw configInvalidError(extendName, ctx.filePath, \"plugin-invalid\");\n }\n\n const pluginName = extendName.slice(\"plugin:\".length, slashIndex);\n const configName = extendName.slice(slashIndex + 1);\n\n if (isFilePath(pluginName)) {\n throw new Error(\"'extends' cannot use a file path for plugins.\");\n }\n\n const plugin = this._loadPlugin(pluginName, ctx);\n const configData =\n plugin.definition &&\n plugin.definition.configs[configName];\n\n if (configData) {\n return this._normalizeConfigData(configData, {\n ...ctx,\n filePath: plugin.filePath || ctx.filePath,\n name: `${ctx.name} » plugin:${plugin.id}/${configName}`\n });\n }\n\n throw plugin.error || configInvalidError(extendName, ctx.filePath, \"extend-config-missing\");\n }\n\n /**\n * Load configs of an element in `extends`.\n * @param {string} extendName The name of a base config.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The normalized config.\n * @private\n */\n _loadExtendedShareableConfig(extendName, ctx) {\n const { cwd, resolver } = internalSlotsMap.get(this);\n const relativeTo = ctx.filePath || path.join(cwd, \"__placeholder__.js\");\n let request;\n\n if (isFilePath(extendName)) {\n request = extendName;\n } else if (extendName.startsWith(\".\")) {\n request = `./${extendName}`; // For backward compatibility. A ton of tests depended on this behavior.\n } else {\n request = naming.normalizePackageName(\n extendName,\n \"eslint-config\"\n );\n }\n\n let filePath;\n\n try {\n filePath = resolver.resolve(request, relativeTo);\n } catch (error) {\n /* istanbul ignore else */\n if (error && error.code === \"MODULE_NOT_FOUND\") {\n throw configInvalidError(extendName, ctx.filePath, \"extend-config-missing\");\n }\n throw error;\n }\n\n writeDebugLogForLoading(request, relativeTo, filePath);\n return this._loadConfigData({\n ...ctx,\n filePath,\n name: `${ctx.name} » ${request}`\n });\n }\n\n /**\n * Load given plugins.\n * @param {string[]} names The plugin names to load.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {Record} The loaded parser.\n * @private\n */\n _loadPlugins(names, ctx) {\n return names.reduce((map, name) => {\n if (isFilePath(name)) {\n throw new Error(\"Plugins array cannot includes file paths.\");\n }\n const plugin = this._loadPlugin(name, ctx);\n\n map[plugin.id] = plugin;\n\n return map;\n }, {});\n }\n\n /**\n * Load a given parser.\n * @param {string} nameOrPath The package name or the path to a parser file.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {DependentParser} The loaded parser.\n */\n _loadParser(nameOrPath, ctx) {\n debug(\"Loading parser %j from %s\", nameOrPath, ctx.filePath);\n\n const { cwd, resolver } = internalSlotsMap.get(this);\n const relativeTo = ctx.filePath || path.join(cwd, \"__placeholder__.js\");\n\n try {\n const filePath = resolver.resolve(nameOrPath, relativeTo);\n\n writeDebugLogForLoading(nameOrPath, relativeTo, filePath);\n\n return new ConfigDependency({\n definition: require(filePath),\n filePath,\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n } catch (error) {\n\n // If the parser name is \"espree\", load the espree of ESLint.\n if (nameOrPath === \"espree\") {\n debug(\"Fallback espree.\");\n return new ConfigDependency({\n definition: require(\"espree\"),\n filePath: require.resolve(\"espree\"),\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n debug(\"Failed to load parser '%s' declared in '%s'.\", nameOrPath, ctx.name);\n error.message = `Failed to load parser '${nameOrPath}' declared in '${ctx.name}': ${error.message}`;\n\n return new ConfigDependency({\n error,\n id: nameOrPath,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n }\n\n /**\n * Load a given plugin.\n * @param {string} name The plugin name to load.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {DependentPlugin} The loaded plugin.\n * @private\n */\n _loadPlugin(name, ctx) {\n debug(\"Loading plugin %j from %s\", name, ctx.filePath);\n\n const { additionalPluginPool, resolver } = internalSlotsMap.get(this);\n const request = naming.normalizePackageName(name, \"eslint-plugin\");\n const id = naming.getShorthandName(request, \"eslint-plugin\");\n const relativeTo = path.join(ctx.pluginBasePath, \"__placeholder__.js\");\n\n if (name.match(/\\s+/u)) {\n const error = Object.assign(\n new Error(`Whitespace found in plugin name '${name}'`),\n {\n messageTemplate: \"whitespace-found\",\n messageData: { pluginName: request }\n }\n );\n\n return new ConfigDependency({\n error,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n // Check for additional pool.\n const plugin =\n additionalPluginPool.get(request) ||\n additionalPluginPool.get(id);\n\n if (plugin) {\n return new ConfigDependency({\n definition: normalizePlugin(plugin),\n original: plugin,\n filePath: \"\", // It's unknown where the plugin came from.\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n let filePath;\n let error;\n\n try {\n filePath = resolver.resolve(request, relativeTo);\n } catch (resolveError) {\n error = resolveError;\n /* istanbul ignore else */\n if (error && error.code === \"MODULE_NOT_FOUND\") {\n error.messageTemplate = \"plugin-missing\";\n error.messageData = {\n pluginName: request,\n resolvePluginsRelativeTo: ctx.pluginBasePath,\n importerName: ctx.name\n };\n }\n }\n\n if (filePath) {\n try {\n writeDebugLogForLoading(request, relativeTo, filePath);\n\n const startTime = Date.now();\n const pluginDefinition = require(filePath);\n\n debug(`Plugin ${filePath} loaded in: ${Date.now() - startTime}ms`);\n\n return new ConfigDependency({\n definition: normalizePlugin(pluginDefinition),\n original: pluginDefinition,\n filePath,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n } catch (loadError) {\n error = loadError;\n }\n }\n\n debug(\"Failed to load plugin '%s' declared in '%s'.\", name, ctx.name);\n error.message = `Failed to load plugin '${name}' declared in '${ctx.name}': ${error.message}`;\n return new ConfigDependency({\n error,\n id,\n importerName: ctx.name,\n importerPath: ctx.filePath\n });\n }\n\n /**\n * Take file expression processors as config array elements.\n * @param {Record} plugins The plugin definitions.\n * @param {ConfigArrayFactoryLoadingContext} ctx The loading context.\n * @returns {IterableIterator} The config array elements of file expression processors.\n * @private\n */\n *_takeFileExtensionProcessors(plugins, ctx) {\n for (const pluginId of Object.keys(plugins)) {\n const processors =\n plugins[pluginId] &&\n plugins[pluginId].definition &&\n plugins[pluginId].definition.processors;\n\n if (!processors) {\n continue;\n }\n\n for (const processorId of Object.keys(processors)) {\n if (processorId.startsWith(\".\")) {\n yield* this._normalizeObjectConfigData(\n {\n files: [`*${processorId}`],\n processor: `${pluginId}/${processorId}`\n },\n {\n ...ctx,\n type: \"implicit-processor\",\n name: `${ctx.name}#processors[\"${pluginId}/${processorId}\"]`\n }\n );\n }\n }\n }\n }\n}\n\nexport { ConfigArrayFactory, createContext };\n","/**\n * @fileoverview `CascadingConfigArrayFactory` class.\n *\n * `CascadingConfigArrayFactory` class has a responsibility:\n *\n * 1. Handles cascading of config files.\n *\n * It provides two methods:\n *\n * - `getConfigArrayForFile(filePath)`\n * Get the corresponded configuration of a given file. This method doesn't\n * throw even if the given file didn't exist.\n * - `clearCache()`\n * Clear the internal cache. You have to call this method when\n * `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends\n * on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)\n *\n * @author Toru Nagashima \n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport debugOrig from \"debug\";\nimport os from \"os\";\nimport path from \"path\";\n\nimport { ConfigArrayFactory } from \"./config-array-factory.js\";\nimport {\n ConfigArray,\n ConfigDependency,\n IgnorePattern\n} from \"./config-array/index.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport { emitDeprecationWarning } from \"./shared/deprecation-warnings.js\";\n\nconst debug = debugOrig(\"eslintrc:cascading-config-array-factory\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\n// Define types for VSCode IntelliSense.\n/** @typedef {import(\"./shared/types\").ConfigData} ConfigData */\n/** @typedef {import(\"./shared/types\").Parser} Parser */\n/** @typedef {import(\"./shared/types\").Plugin} Plugin */\n/** @typedef {import(\"./shared/types\").Rule} Rule */\n/** @typedef {ReturnType} ConfigArray */\n\n/**\n * @typedef {Object} CascadingConfigArrayFactoryOptions\n * @property {Map} [additionalPluginPool] The map for additional plugins.\n * @property {ConfigData} [baseConfig] The config by `baseConfig` option.\n * @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.\n * @property {string} [cwd] The base directory to start lookup.\n * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.\n * @property {string[]} [rulePaths] The value of `--rulesdir` option.\n * @property {string} [specificConfigPath] The value of `--config` option.\n * @property {boolean} [useEslintrc] if `false` then it doesn't load config files.\n * @property {Function} loadRules The function to use to load rules.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/**\n * @typedef {Object} CascadingConfigArrayFactoryInternalSlots\n * @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.\n * @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.\n * @property {ConfigArray} cliConfigArray The config array of CLI options.\n * @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.\n * @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.\n * @property {Map} configCache The cache from directory paths to config arrays.\n * @property {string} cwd The base directory to start lookup.\n * @property {WeakMap} finalizeCache The cache from config arrays to finalized config arrays.\n * @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.\n * @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.\n * @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.\n * @property {boolean} useEslintrc if `false` then it doesn't load config files.\n * @property {Function} loadRules The function to use to load rules.\n * @property {Map} builtInRules The rules that are built in to ESLint.\n * @property {Object} [resolver=ModuleResolver] The module resolver object.\n * @property {string} eslintAllPath The path to the definitions for eslint:all.\n * @property {Function} getEslintAllConfig Returns the config data for eslint:all.\n * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.\n * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.\n */\n\n/** @type {WeakMap} */\nconst internalSlotsMap = new WeakMap();\n\n/**\n * Create the config array from `baseConfig` and `rulePaths`.\n * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.\n * @returns {ConfigArray} The config array of the base configs.\n */\nfunction createBaseConfigArray({\n configArrayFactory,\n baseConfigData,\n rulePaths,\n cwd,\n loadRules\n}) {\n const baseConfigArray = configArrayFactory.create(\n baseConfigData,\n { name: \"BaseConfig\" }\n );\n\n /*\n * Create the config array element for the default ignore patterns.\n * This element has `ignorePattern` property that ignores the default\n * patterns in the current working directory.\n */\n baseConfigArray.unshift(configArrayFactory.create(\n { ignorePatterns: IgnorePattern.DefaultPatterns },\n { name: \"DefaultIgnorePattern\" }\n )[0]);\n\n /*\n * Load rules `--rulesdir` option as a pseudo plugin.\n * Use a pseudo plugin to define rules of `--rulesdir`, so we can validate\n * the rule's options with only information in the config array.\n */\n if (rulePaths && rulePaths.length > 0) {\n baseConfigArray.push({\n type: \"config\",\n name: \"--rulesdir\",\n filePath: \"\",\n plugins: {\n \"\": new ConfigDependency({\n definition: {\n rules: rulePaths.reduce(\n (map, rulesPath) => Object.assign(\n map,\n loadRules(rulesPath, cwd)\n ),\n {}\n )\n },\n filePath: \"\",\n id: \"\",\n importerName: \"--rulesdir\",\n importerPath: \"\"\n })\n }\n });\n }\n\n return baseConfigArray;\n}\n\n/**\n * Create the config array from CLI options.\n * @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.\n * @returns {ConfigArray} The config array of the base configs.\n */\nfunction createCLIConfigArray({\n cliConfigData,\n configArrayFactory,\n cwd,\n ignorePath,\n specificConfigPath\n}) {\n const cliConfigArray = configArrayFactory.create(\n cliConfigData,\n { name: \"CLIOptions\" }\n );\n\n cliConfigArray.unshift(\n ...(ignorePath\n ? configArrayFactory.loadESLintIgnore(ignorePath)\n : configArrayFactory.loadDefaultESLintIgnore())\n );\n\n if (specificConfigPath) {\n cliConfigArray.unshift(\n ...configArrayFactory.loadFile(\n specificConfigPath,\n { name: \"--config\", basePath: cwd }\n )\n );\n }\n\n return cliConfigArray;\n}\n\n/**\n * The error type when there are files matched by a glob, but all of them have been ignored.\n */\nclass ConfigurationNotFoundError extends Error {\n\n // eslint-disable-next-line jsdoc/require-description\n /**\n * @param {string} directoryPath The directory path.\n */\n constructor(directoryPath) {\n super(`No ESLint configuration found in ${directoryPath}.`);\n this.messageTemplate = \"no-config-found\";\n this.messageData = { directoryPath };\n }\n}\n\n/**\n * This class provides the functionality that enumerates every file which is\n * matched by given glob patterns and that configuration.\n */\nclass CascadingConfigArrayFactory {\n\n /**\n * Initialize this enumerator.\n * @param {CascadingConfigArrayFactoryOptions} options The options.\n */\n constructor({\n additionalPluginPool = new Map(),\n baseConfig: baseConfigData = null,\n cliConfig: cliConfigData = null,\n cwd = process.cwd(),\n ignorePath,\n resolvePluginsRelativeTo,\n rulePaths = [],\n specificConfigPath = null,\n useEslintrc = true,\n builtInRules = new Map(),\n loadRules,\n resolver,\n eslintRecommendedPath,\n getEslintRecommendedConfig,\n eslintAllPath,\n getEslintAllConfig\n } = {}) {\n const configArrayFactory = new ConfigArrayFactory({\n additionalPluginPool,\n cwd,\n resolvePluginsRelativeTo,\n builtInRules,\n resolver,\n eslintRecommendedPath,\n getEslintRecommendedConfig,\n eslintAllPath,\n getEslintAllConfig\n });\n\n internalSlotsMap.set(this, {\n baseConfigArray: createBaseConfigArray({\n baseConfigData,\n configArrayFactory,\n cwd,\n rulePaths,\n loadRules\n }),\n baseConfigData,\n cliConfigArray: createCLIConfigArray({\n cliConfigData,\n configArrayFactory,\n cwd,\n ignorePath,\n specificConfigPath\n }),\n cliConfigData,\n configArrayFactory,\n configCache: new Map(),\n cwd,\n finalizeCache: new WeakMap(),\n ignorePath,\n rulePaths,\n specificConfigPath,\n useEslintrc,\n builtInRules,\n loadRules\n });\n }\n\n /**\n * The path to the current working directory.\n * This is used by tests.\n * @type {string}\n */\n get cwd() {\n const { cwd } = internalSlotsMap.get(this);\n\n return cwd;\n }\n\n /**\n * Get the config array of a given file.\n * If `filePath` was not given, it returns the config which contains only\n * `baseConfigData` and `cliConfigData`.\n * @param {string} [filePath] The file path to a file.\n * @param {Object} [options] The options.\n * @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.\n * @returns {ConfigArray} The config array of the file.\n */\n getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {\n const {\n baseConfigArray,\n cliConfigArray,\n cwd\n } = internalSlotsMap.get(this);\n\n if (!filePath) {\n return new ConfigArray(...baseConfigArray, ...cliConfigArray);\n }\n\n const directoryPath = path.dirname(path.resolve(cwd, filePath));\n\n debug(`Load config files for ${directoryPath}.`);\n\n return this._finalizeConfigArray(\n this._loadConfigInAncestors(directoryPath),\n directoryPath,\n ignoreNotFoundError\n );\n }\n\n /**\n * Set the config data to override all configs.\n * Require to call `clearCache()` method after this method is called.\n * @param {ConfigData} configData The config data to override all configs.\n * @returns {void}\n */\n setOverrideConfig(configData) {\n const slots = internalSlotsMap.get(this);\n\n slots.cliConfigData = configData;\n }\n\n /**\n * Clear config cache.\n * @returns {void}\n */\n clearCache() {\n const slots = internalSlotsMap.get(this);\n\n slots.baseConfigArray = createBaseConfigArray(slots);\n slots.cliConfigArray = createCLIConfigArray(slots);\n slots.configCache.clear();\n }\n\n /**\n * Load and normalize config files from the ancestor directories.\n * @param {string} directoryPath The path to a leaf directory.\n * @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.\n * @returns {ConfigArray} The loaded config.\n * @private\n */\n _loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {\n const {\n baseConfigArray,\n configArrayFactory,\n configCache,\n cwd,\n useEslintrc\n } = internalSlotsMap.get(this);\n\n if (!useEslintrc) {\n return baseConfigArray;\n }\n\n let configArray = configCache.get(directoryPath);\n\n // Hit cache.\n if (configArray) {\n debug(`Cache hit: ${directoryPath}.`);\n return configArray;\n }\n debug(`No cache found: ${directoryPath}.`);\n\n const homePath = os.homedir();\n\n // Consider this is root.\n if (directoryPath === homePath && cwd !== homePath) {\n debug(\"Stop traversing because of considered root.\");\n if (configsExistInSubdirs) {\n const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);\n\n if (filePath) {\n emitDeprecationWarning(\n filePath,\n \"ESLINT_PERSONAL_CONFIG_SUPPRESS\"\n );\n }\n }\n return this._cacheConfig(directoryPath, baseConfigArray);\n }\n\n // Load the config on this directory.\n try {\n configArray = configArrayFactory.loadInDirectory(directoryPath);\n } catch (error) {\n /* istanbul ignore next */\n if (error.code === \"EACCES\") {\n debug(\"Stop traversing because of 'EACCES' error.\");\n return this._cacheConfig(directoryPath, baseConfigArray);\n }\n throw error;\n }\n\n if (configArray.length > 0 && configArray.isRoot()) {\n debug(\"Stop traversing because of 'root:true'.\");\n configArray.unshift(...baseConfigArray);\n return this._cacheConfig(directoryPath, configArray);\n }\n\n // Load from the ancestors and merge it.\n const parentPath = path.dirname(directoryPath);\n const parentConfigArray = parentPath && parentPath !== directoryPath\n ? this._loadConfigInAncestors(\n parentPath,\n configsExistInSubdirs || configArray.length > 0\n )\n : baseConfigArray;\n\n if (configArray.length > 0) {\n configArray.unshift(...parentConfigArray);\n } else {\n configArray = parentConfigArray;\n }\n\n // Cache and return.\n return this._cacheConfig(directoryPath, configArray);\n }\n\n /**\n * Freeze and cache a given config.\n * @param {string} directoryPath The path to a directory as a cache key.\n * @param {ConfigArray} configArray The config array as a cache value.\n * @returns {ConfigArray} The `configArray` (frozen).\n */\n _cacheConfig(directoryPath, configArray) {\n const { configCache } = internalSlotsMap.get(this);\n\n Object.freeze(configArray);\n configCache.set(directoryPath, configArray);\n\n return configArray;\n }\n\n /**\n * Finalize a given config array.\n * Concatenate `--config` and other CLI options.\n * @param {ConfigArray} configArray The parent config array.\n * @param {string} directoryPath The path to the leaf directory to find config files.\n * @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.\n * @returns {ConfigArray} The loaded config.\n * @private\n */\n _finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {\n const {\n cliConfigArray,\n configArrayFactory,\n finalizeCache,\n useEslintrc,\n builtInRules\n } = internalSlotsMap.get(this);\n\n let finalConfigArray = finalizeCache.get(configArray);\n\n if (!finalConfigArray) {\n finalConfigArray = configArray;\n\n // Load the personal config if there are no regular config files.\n if (\n useEslintrc &&\n configArray.every(c => !c.filePath) &&\n cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.\n ) {\n const homePath = os.homedir();\n\n debug(\"Loading the config file of the home directory:\", homePath);\n\n const personalConfigArray = configArrayFactory.loadInDirectory(\n homePath,\n { name: \"PersonalConfig\" }\n );\n\n if (\n personalConfigArray.length > 0 &&\n !directoryPath.startsWith(homePath)\n ) {\n const lastElement =\n personalConfigArray[personalConfigArray.length - 1];\n\n emitDeprecationWarning(\n lastElement.filePath,\n \"ESLINT_PERSONAL_CONFIG_LOAD\"\n );\n }\n\n finalConfigArray = finalConfigArray.concat(personalConfigArray);\n }\n\n // Apply CLI options.\n if (cliConfigArray.length > 0) {\n finalConfigArray = finalConfigArray.concat(cliConfigArray);\n }\n\n // Validate rule settings and environments.\n const validator = new ConfigValidator({\n builtInRules\n });\n\n validator.validateConfigArray(finalConfigArray);\n\n // Cache it.\n Object.freeze(finalConfigArray);\n finalizeCache.set(configArray, finalConfigArray);\n\n debug(\n \"Configuration was determined: %o on %s\",\n finalConfigArray,\n directoryPath\n );\n }\n\n // At least one element (the default ignore patterns) exists.\n if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {\n throw new ConfigurationNotFoundError(directoryPath);\n }\n\n return finalConfigArray;\n }\n}\n\n//------------------------------------------------------------------------------\n// Public Interface\n//------------------------------------------------------------------------------\n\nexport { CascadingConfigArrayFactory };\n","/**\n * @fileoverview Compatibility class for flat config.\n * @author Nicholas C. Zakas\n */\n\n//-----------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------------------------------\n\nimport createDebug from \"debug\";\nimport path from \"path\";\n\nimport environments from \"../conf/environments.js\";\nimport { ConfigArrayFactory } from \"./config-array-factory.js\";\n\n//-----------------------------------------------------------------------------\n// Helpers\n//-----------------------------------------------------------------------------\n\n/** @typedef {import(\"../../shared/types\").Environment} Environment */\n/** @typedef {import(\"../../shared/types\").Processor} Processor */\n\nconst debug = createDebug(\"eslintrc:flat-compat\");\nconst cafactory = Symbol(\"cafactory\");\n\n/**\n * Translates an ESLintRC-style config object into a flag-config-style config\n * object.\n * @param {Object} eslintrcConfig An ESLintRC-style config object.\n * @param {Object} options Options to help translate the config.\n * @param {string} options.resolveConfigRelativeTo To the directory to resolve\n * configs from.\n * @param {string} options.resolvePluginsRelativeTo The directory to resolve\n * plugins from.\n * @param {ReadOnlyMap} options.pluginEnvironments A map of plugin environment\n * names to objects.\n * @param {ReadOnlyMap} options.pluginProcessors A map of plugin processor\n * names to objects.\n * @returns {Object} A flag-config-style config object.\n */\nfunction translateESLintRC(eslintrcConfig, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo,\n pluginEnvironments,\n pluginProcessors\n}) {\n\n const flatConfig = {};\n const configs = [];\n const languageOptions = {};\n const linterOptions = {};\n const keysToCopy = [\"settings\", \"rules\", \"processor\"];\n const languageOptionsKeysToCopy = [\"globals\", \"parser\", \"parserOptions\"];\n const linterOptionsKeysToCopy = [\"noInlineConfig\", \"reportUnusedDisableDirectives\"];\n\n // copy over simple translations\n for (const key of keysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n flatConfig[key] = eslintrcConfig[key];\n }\n }\n\n // copy over languageOptions\n for (const key of languageOptionsKeysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n\n // create the languageOptions key in the flat config\n flatConfig.languageOptions = languageOptions;\n\n if (key === \"parser\") {\n debug(`Resolving parser '${languageOptions[key]}' relative to ${resolveConfigRelativeTo}`);\n\n if (eslintrcConfig[key].error) {\n throw eslintrcConfig[key].error;\n }\n\n languageOptions[key] = eslintrcConfig[key].definition;\n continue;\n }\n\n // clone any object values that are in the eslintrc config\n if (eslintrcConfig[key] && typeof eslintrcConfig[key] === \"object\") {\n languageOptions[key] = {\n ...eslintrcConfig[key]\n };\n } else {\n languageOptions[key] = eslintrcConfig[key];\n }\n }\n }\n\n // copy over linterOptions\n for (const key of linterOptionsKeysToCopy) {\n if (key in eslintrcConfig && typeof eslintrcConfig[key] !== \"undefined\") {\n flatConfig.linterOptions = linterOptions;\n linterOptions[key] = eslintrcConfig[key];\n }\n }\n\n // move ecmaVersion a level up\n if (languageOptions.parserOptions) {\n\n if (\"ecmaVersion\" in languageOptions.parserOptions) {\n languageOptions.ecmaVersion = languageOptions.parserOptions.ecmaVersion;\n delete languageOptions.parserOptions.ecmaVersion;\n }\n\n if (\"sourceType\" in languageOptions.parserOptions) {\n languageOptions.sourceType = languageOptions.parserOptions.sourceType;\n delete languageOptions.parserOptions.sourceType;\n }\n\n // check to see if we even need parserOptions anymore and remove it if not\n if (Object.keys(languageOptions.parserOptions).length === 0) {\n delete languageOptions.parserOptions;\n }\n }\n\n // overrides\n if (eslintrcConfig.criteria) {\n flatConfig.files = [absoluteFilePath => eslintrcConfig.criteria.test(absoluteFilePath)];\n }\n\n // translate plugins\n if (eslintrcConfig.plugins && typeof eslintrcConfig.plugins === \"object\") {\n debug(`Translating plugins: ${eslintrcConfig.plugins}`);\n\n flatConfig.plugins = {};\n\n for (const pluginName of Object.keys(eslintrcConfig.plugins)) {\n\n debug(`Translating plugin: ${pluginName}`);\n debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`);\n\n const { original: plugin, error } = eslintrcConfig.plugins[pluginName];\n\n if (error) {\n throw error;\n }\n\n flatConfig.plugins[pluginName] = plugin;\n\n // create a config for any processors\n if (plugin.processors) {\n for (const processorName of Object.keys(plugin.processors)) {\n if (processorName.startsWith(\".\")) {\n debug(`Assigning processor: ${pluginName}/${processorName}`);\n\n configs.unshift({\n files: [`**/*${processorName}`],\n processor: pluginProcessors.get(`${pluginName}/${processorName}`)\n });\n }\n\n }\n }\n }\n }\n\n // translate env - must come after plugins\n if (eslintrcConfig.env && typeof eslintrcConfig.env === \"object\") {\n for (const envName of Object.keys(eslintrcConfig.env)) {\n\n // only add environments that are true\n if (eslintrcConfig.env[envName]) {\n debug(`Translating environment: ${envName}`);\n\n if (environments.has(envName)) {\n\n // built-in environments should be defined first\n configs.unshift(...translateESLintRC({\n criteria: eslintrcConfig.criteria,\n ...environments.get(envName)\n }, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo\n }));\n } else if (pluginEnvironments.has(envName)) {\n\n // if the environment comes from a plugin, it should come after the plugin config\n configs.push(...translateESLintRC({\n criteria: eslintrcConfig.criteria,\n ...pluginEnvironments.get(envName)\n }, {\n resolveConfigRelativeTo,\n resolvePluginsRelativeTo\n }));\n }\n }\n }\n }\n\n // only add if there are actually keys in the config\n if (Object.keys(flatConfig).length > 0) {\n configs.push(flatConfig);\n }\n\n return configs;\n}\n\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\n/**\n * A compatibility class for working with configs.\n */\nclass FlatCompat {\n\n constructor({\n baseDirectory = process.cwd(),\n resolvePluginsRelativeTo = baseDirectory,\n recommendedConfig,\n allConfig\n } = {}) {\n this.baseDirectory = baseDirectory;\n this.resolvePluginsRelativeTo = resolvePluginsRelativeTo;\n this[cafactory] = new ConfigArrayFactory({\n cwd: baseDirectory,\n resolvePluginsRelativeTo,\n getEslintAllConfig: () => {\n\n if (!allConfig) {\n throw new TypeError(\"Missing parameter 'allConfig' in FlatCompat constructor.\");\n }\n\n return allConfig;\n },\n getEslintRecommendedConfig: () => {\n\n if (!recommendedConfig) {\n throw new TypeError(\"Missing parameter 'recommendedConfig' in FlatCompat constructor.\");\n }\n\n return recommendedConfig;\n }\n });\n }\n\n /**\n * Translates an ESLintRC-style config into a flag-config-style config.\n * @param {Object} eslintrcConfig The ESLintRC-style config object.\n * @returns {Object} A flag-config-style config object.\n */\n config(eslintrcConfig) {\n const eslintrcArray = this[cafactory].create(eslintrcConfig, {\n basePath: this.baseDirectory\n });\n\n const flatArray = [];\n let hasIgnorePatterns = false;\n\n eslintrcArray.forEach(configData => {\n if (configData.type === \"config\") {\n hasIgnorePatterns = hasIgnorePatterns || configData.ignorePattern;\n flatArray.push(...translateESLintRC(configData, {\n resolveConfigRelativeTo: path.join(this.baseDirectory, \"__placeholder.js\"),\n resolvePluginsRelativeTo: path.join(this.resolvePluginsRelativeTo, \"__placeholder.js\"),\n pluginEnvironments: eslintrcArray.pluginEnvironments,\n pluginProcessors: eslintrcArray.pluginProcessors\n }));\n }\n });\n\n // combine ignorePatterns to emulate ESLintRC behavior better\n if (hasIgnorePatterns) {\n flatArray.unshift({\n ignores: [filePath => {\n\n // Compute the final config for this file.\n // This filters config array elements by `files`/`excludedFiles` then merges the elements.\n const finalConfig = eslintrcArray.extractConfig(filePath);\n\n // Test the `ignorePattern` properties of the final config.\n return Boolean(finalConfig.ignores) && finalConfig.ignores(filePath);\n }]\n });\n }\n\n return flatArray;\n }\n\n /**\n * Translates the `env` section of an ESLintRC-style config.\n * @param {Object} envConfig The `env` section of an ESLintRC config.\n * @returns {Object[]} An array of flag-config objects representing the environments.\n */\n env(envConfig) {\n return this.config({\n env: envConfig\n });\n }\n\n /**\n * Translates the `extends` section of an ESLintRC-style config.\n * @param {...string} configsToExtend The names of the configs to load.\n * @returns {Object[]} An array of flag-config objects representing the config.\n */\n extends(...configsToExtend) {\n return this.config({\n extends: configsToExtend\n });\n }\n\n /**\n * Translates the `plugins` section of an ESLintRC-style config.\n * @param {...string} plugins The names of the plugins to load.\n * @returns {Object[]} An array of flag-config objects representing the plugins.\n */\n plugins(...plugins) {\n return this.config({\n plugins\n });\n }\n}\n\nexport { FlatCompat };\n","/**\n * @fileoverview Package exports for @eslint/eslintrc\n * @author Nicholas C. Zakas\n */\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nimport {\n ConfigArrayFactory,\n createContext as createConfigArrayFactoryContext\n} from \"./config-array-factory.js\";\n\nimport { CascadingConfigArrayFactory } from \"./cascading-config-array-factory.js\";\nimport * as ModuleResolver from \"./shared/relative-module-resolver.js\";\nimport { ConfigArray, getUsedExtractedConfigs } from \"./config-array/index.js\";\nimport { ConfigDependency } from \"./config-array/config-dependency.js\";\nimport { ExtractedConfig } from \"./config-array/extracted-config.js\";\nimport { IgnorePattern } from \"./config-array/ignore-pattern.js\";\nimport { OverrideTester } from \"./config-array/override-tester.js\";\nimport * as ConfigOps from \"./shared/config-ops.js\";\nimport ConfigValidator from \"./shared/config-validator.js\";\nimport * as naming from \"./shared/naming.js\";\nimport { FlatCompat } from \"./flat-compat.js\";\nimport environments from \"../conf/environments.js\";\n\n//-----------------------------------------------------------------------------\n// Exports\n//-----------------------------------------------------------------------------\n\nconst Legacy = {\n ConfigArray,\n createConfigArrayFactoryContext,\n CascadingConfigArrayFactory,\n ConfigArrayFactory,\n ConfigDependency,\n ExtractedConfig,\n IgnorePattern,\n OverrideTester,\n getUsedExtractedConfigs,\n environments,\n\n // shared\n ConfigOps,\n ConfigValidator,\n ModuleResolver,\n naming\n};\n\nexport {\n\n Legacy,\n\n FlatCompat\n\n};\n"],"names":["debug","debugOrig","path","ignore","assert","internalSlotsMap","util","minimatch","Ajv","globals","BuiltInEnvironments","ConfigOps.normalizeConfigGlobal","Module","require","createRequire","fs","stripComments","importFresh","ModuleResolver.resolve","naming.normalizePackageName","naming.getShorthandName","os","createDebug","createConfigArrayFactoryContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAUA;AACA,MAAMA,OAAK,GAAGC,6BAAS,CAAC,yBAAyB,CAAC,CAAC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,WAAW,EAAE;AAC5C,IAAI,IAAI,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAChC;AACA,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;AACjD,QAAQ,MAAM,CAAC,GAAG,MAAM,CAAC;AACzB,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACjC;AACA;AACA,QAAQ,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;AAC7C;AACA;AACA,QAAQ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,UAAU,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE;AAC3E,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AAC/B,gBAAgB,MAAM,GAAG,CAAC,CAAC,KAAK,C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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAsBA;AACA,MAAMC,SAAO,GAAGC,oBAAa,CAAC,mDAAe,CAAC,CAAC;AAC/C;AACA,MAAMd,OAAK,GAAGC,6BAAS,CAAC,+BAA+B,CAAC,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG;AACxB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,WAAW;AACf,IAAI,cAAc;AAClB,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,kBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;AACvC;AACA;AACA,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAE,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,UAAU,EAAE;AAChC,IAAI;AACJ,QAAQ,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC;AACzC,QAAQH,wBAAI,CAAC,UAAU,CAAC,UAAU,CAAC;AACnC,MAAM;AACN,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,QAAQ,EAAE;AAC5B,IAAI,OAAOa,sBAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACrE,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;A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CAAC;AACtD,4BAA4B,SAAS,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AACnE,yBAAyB;AACzB,wBAAwB;AACxB,4BAA4B,GAAG,GAAG;AAClC,4BAA4B,IAAI,EAAE,oBAAoB;AACtD,4BAA4B,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;AACxF,yBAAyB;AACzB,qBAAqB,CAAC;AACtB,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL;;AC5nCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA,MAAMA,OAAK,GAAGC,6BAAS,CAAC,yCAAyC,CAAC,CAAC;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,gBAAgB,GAAG,IAAI,OAAO,EAAE,CAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC;AAC/B,IAAI,kBAAkB;AACtB,IAAI,cAAc;AAClB,IAAI,SAAS;AACb,IAAI,GAAG;AACP,IAAI,SAAS;AACb,CAAC,EAAE;AACH,IAAI,MAAM,eAAe,GAAG,kBAAkB,CAAC,MAAM;AACrD,QAAQ,cAAc;AACtB,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE;AAC9B,KAAK,CAAC;AACN;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,eAAe,CAAC,OAAO,CAAC,kBAAk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ACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,GAAG,eAAe,EAAE;AAChC,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3B,YAAY,OAAO,EAAE,eAAe;AACpC,SAAS,CAAC,CAAC;AACX,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,CAAC,GAAG,OAAO,EAAE;AACxB,QAAQ,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3B,YAAY,OAAO;AACnB,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;AC3TA;AACA;AACA;AACA;AAsBA;AACA;AACA;AACA;AACA;AACK,MAAC,MAAM,GAAG;AACf,IAAI,WAAW;AACf,qCAAIqB,aAA+B;AACnC,IAAI,2BAA2B;AAC/B,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,eAAe;AACnB,IAAI,aAAa;AACjB,IAAI,cAAc;AAClB,IAAI,uBAAuB;AAC3B,IAAI,YAAY;AAChB;AACA;AACA,IAAI,SAAS;AACb,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,MAAM;AACV;;;;;"} \ No newline at end of file diff --git a/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js b/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js index c991c24b6..597352e43 100644 --- a/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js +++ b/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js @@ -17,19 +17,25 @@ * * @author Toru Nagashima */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const os = require("os"); -const path = require("path"); -const ConfigValidator = require("./shared/config-validator"); -const { emitDeprecationWarning } = require("./shared/deprecation-warnings"); -const { ConfigArrayFactory } = require("./config-array-factory"); -const { ConfigArray, ConfigDependency, IgnorePattern } = require("./config-array"); -const debug = require("debug")("eslintrc:cascading-config-array-factory"); +import debugOrig from "debug"; +import os from "os"; +import path from "path"; + +import { ConfigArrayFactory } from "./config-array-factory.js"; +import { + ConfigArray, + ConfigDependency, + IgnorePattern +} from "./config-array/index.js"; +import ConfigValidator from "./shared/config-validator.js"; +import { emitDeprecationWarning } from "./shared/deprecation-warnings.js"; + +const debug = debugOrig("eslintrc:cascading-config-array-factory"); //------------------------------------------------------------------------------ // Helpers @@ -56,7 +62,9 @@ const debug = require("debug")("eslintrc:cascading-config-array-factory"); * @property {Map} builtInRules The rules that are built in to ESLint. * @property {Object} [resolver=ModuleResolver] The module resolver object. * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. */ /** @@ -77,7 +85,9 @@ const debug = require("debug")("eslintrc:cascading-config-array-factory"); * @property {Map} builtInRules The rules that are built in to ESLint. * @property {Object} [resolver=ModuleResolver] The module resolver object. * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. */ /** @type {WeakMap} */ @@ -218,7 +228,9 @@ class CascadingConfigArrayFactory { loadRules, resolver, eslintRecommendedPath, - eslintAllPath + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig } = {}) { const configArrayFactory = new ConfigArrayFactory({ additionalPluginPool, @@ -227,7 +239,9 @@ class CascadingConfigArrayFactory { builtInRules, resolver, eslintRecommendedPath, - eslintAllPath + getEslintRecommendedConfig, + eslintAllPath, + getEslintAllConfig }); internalSlotsMap.set(this, { @@ -236,8 +250,7 @@ class CascadingConfigArrayFactory { configArrayFactory, cwd, rulePaths, - loadRules, - resolver + loadRules }), baseConfigData, cliConfigArray: createCLIConfigArray({ @@ -516,4 +529,4 @@ class CascadingConfigArrayFactory { // Public Interface //------------------------------------------------------------------------------ -module.exports = { CascadingConfigArrayFactory }; +export { CascadingConfigArrayFactory }; diff --git a/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/node_modules/@eslint/eslintrc/lib/config-array-factory.js index c7ff6a09a..58c1e808b 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array-factory.js +++ b/node_modules/@eslint/eslintrc/lib/config-array-factory.js @@ -33,26 +33,31 @@ * * @author Toru Nagashima */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const fs = require("fs"); -const path = require("path"); -const importFresh = require("import-fresh"); -const stripComments = require("strip-json-comments"); -const ConfigValidator = require("./shared/config-validator"); -const naming = require("./shared/naming"); -const ModuleResolver = require("./shared/relative-module-resolver"); -const { +import debugOrig from "debug"; +import fs from "fs"; +import importFresh from "import-fresh"; +import { createRequire } from "module"; +import path from "path"; +import stripComments from "strip-json-comments"; + +import { ConfigArray, ConfigDependency, IgnorePattern, OverrideTester -} = require("./config-array"); -const debug = require("debug")("eslintrc:config-array-factory"); +} from "./config-array/index.js"; +import ConfigValidator from "./shared/config-validator.js"; +import * as naming from "./shared/naming.js"; +import * as ModuleResolver from "./shared/relative-module-resolver.js"; + +const require = createRequire(import.meta.url); + +const debug = debugOrig("eslintrc:config-array-factory"); //------------------------------------------------------------------------------ // Helpers @@ -86,7 +91,9 @@ const configFilenames = [ * @property {Map} builtInRules The rules that are built in to ESLint. * @property {Object} [resolver=ModuleResolver] The module resolver object. * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. */ /** @@ -97,7 +104,9 @@ const configFilenames = [ * @property {Map} builtInRules The rules that are built in to ESLint. * @property {Object} [resolver=ModuleResolver] The module resolver object. * @property {string} eslintAllPath The path to the definitions for eslint:all. + * @property {Function} getEslintAllConfig Returns the config data for eslint:all. * @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended. + * @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended. */ /** @@ -120,6 +129,9 @@ const configFilenames = [ /** @type {WeakMap} */ const internalSlotsMap = new WeakMap(); +/** @type {WeakMap} */ +const normalizedPlugins = new WeakMap(); + /** * Check if a given string is a file path. * @param {string} nameOrPath A module name or file path. @@ -158,7 +170,7 @@ function loadYAMLConfigFile(filePath) { try { // empty YAML file can be null, so always use - return yaml.safeLoad(readFile(filePath)) || {}; + return yaml.load(readFile(filePath)) || {}; } catch (e) { debug(`Error reading YAML file: ${filePath}`); e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; @@ -204,7 +216,7 @@ function loadLegacyConfigFile(filePath) { const yaml = require("js-yaml"); try { - return yaml.safeLoad(stripComments(readFile(filePath))) || /* istanbul ignore next */ {}; + return yaml.load(stripComments(readFile(filePath))) || /* istanbul ignore next */ {}; } catch (e) { debug("Error reading YAML file: %s\n%o", filePath, e); e.message = `Cannot read config file: ${filePath}\nError: ${e.message}`; @@ -396,12 +408,25 @@ function createContext( * @returns {Plugin} The normalized plugin. */ function normalizePlugin(plugin) { - return { + + // first check the cache + let normalizedPlugin = normalizedPlugins.get(plugin); + + if (normalizedPlugin) { + return normalizedPlugin; + } + + normalizedPlugin = { configs: plugin.configs || {}, environments: plugin.environments || {}, processors: plugin.processors || {}, rules: plugin.rules || {} }; + + // save the reference for later + normalizedPlugins.set(plugin, normalizedPlugin); + + return normalizedPlugin; } //------------------------------------------------------------------------------ @@ -424,7 +449,9 @@ class ConfigArrayFactory { builtInRules, resolver = ModuleResolver, eslintAllPath, - eslintRecommendedPath + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig } = {}) { internalSlotsMap.set(this, { additionalPluginPool, @@ -435,7 +462,9 @@ class ConfigArrayFactory { builtInRules, resolver, eslintAllPath, - eslintRecommendedPath + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig }); } @@ -495,7 +524,7 @@ class ConfigArrayFactory { basePath ); - if (fs.existsSync(ctx.filePath)) { + if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) { let configData; try { @@ -793,20 +822,41 @@ class ConfigArrayFactory { * @private */ _loadExtendedBuiltInConfig(extendName, ctx) { - const { eslintAllPath, eslintRecommendedPath } = internalSlotsMap.get(this); + const { + eslintAllPath, + getEslintAllConfig, + eslintRecommendedPath, + getEslintRecommendedConfig + } = internalSlotsMap.get(this); if (extendName === "eslint:recommended") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintRecommendedConfig) { + if (typeof getEslintRecommendedConfig !== "function") { + throw new Error(`getEslintRecommendedConfig must be a function instead of '${getEslintRecommendedConfig}'`); + } + return this._normalizeConfigData(getEslintRecommendedConfig(), { ...ctx, name, filePath: "" }); + } return this._loadConfigData({ ...ctx, - filePath: eslintRecommendedPath, - name: `${ctx.name} » ${extendName}` + name, + filePath: eslintRecommendedPath }); } if (extendName === "eslint:all") { + const name = `${ctx.name} » ${extendName}`; + + if (getEslintAllConfig) { + if (typeof getEslintAllConfig !== "function") { + throw new Error(`getEslintAllConfig must be a function instead of '${getEslintAllConfig}'`); + } + return this._normalizeConfigData(getEslintAllConfig(), { ...ctx, name, filePath: "" }); + } return this._loadConfigData({ ...ctx, - filePath: eslintAllPath, - name: `${ctx.name} » ${extendName}` + name, + filePath: eslintAllPath }); } @@ -922,11 +972,11 @@ class ConfigArrayFactory { _loadParser(nameOrPath, ctx) { debug("Loading parser %j from %s", nameOrPath, ctx.filePath); - const { cwd } = internalSlotsMap.get(this); + const { cwd, resolver } = internalSlotsMap.get(this); const relativeTo = ctx.filePath || path.join(cwd, "__placeholder__.js"); try { - const filePath = ModuleResolver.resolve(nameOrPath, relativeTo); + const filePath = resolver.resolve(nameOrPath, relativeTo); writeDebugLogForLoading(nameOrPath, relativeTo, filePath); @@ -973,7 +1023,7 @@ class ConfigArrayFactory { _loadPlugin(name, ctx) { debug("Loading plugin %j from %s", name, ctx.filePath); - const { additionalPluginPool } = internalSlotsMap.get(this); + const { additionalPluginPool, resolver } = internalSlotsMap.get(this); const request = naming.normalizePackageName(name, "eslint-plugin"); const id = naming.getShorthandName(request, "eslint-plugin"); const relativeTo = path.join(ctx.pluginBasePath, "__placeholder__.js"); @@ -1003,6 +1053,7 @@ class ConfigArrayFactory { if (plugin) { return new ConfigDependency({ definition: normalizePlugin(plugin), + original: plugin, filePath: "", // It's unknown where the plugin came from. id, importerName: ctx.name, @@ -1014,7 +1065,7 @@ class ConfigArrayFactory { let error; try { - filePath = ModuleResolver.resolve(request, relativeTo); + filePath = resolver.resolve(request, relativeTo); } catch (resolveError) { error = resolveError; /* istanbul ignore else */ @@ -1039,6 +1090,7 @@ class ConfigArrayFactory { return new ConfigDependency({ definition: normalizePlugin(pluginDefinition), + original: pluginDefinition, filePath, id, importerName: ctx.name, @@ -1096,4 +1148,4 @@ class ConfigArrayFactory { } } -module.exports = { ConfigArrayFactory, createContext }; +export { ConfigArrayFactory, createContext }; diff --git a/node_modules/@eslint/eslintrc/lib/config-array/config-array.js b/node_modules/@eslint/eslintrc/lib/config-array/config-array.js index 42a736273..133f5a242 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array/config-array.js +++ b/node_modules/@eslint/eslintrc/lib/config-array/config-array.js @@ -24,14 +24,13 @@ * * @author Toru Nagashima */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const { ExtractedConfig } = require("./extracted-config"); -const { IgnorePattern } = require("./ignore-pattern"); +import { ExtractedConfig } from "./extracted-config.js"; +import { IgnorePattern } from "./ignore-pattern.js"; //------------------------------------------------------------------------------ // Helpers @@ -504,21 +503,21 @@ class ConfigArray extends Array { } } -const exportObject = { - ConfigArray, +/** + * Get the used extracted configs. + * CLIEngine will use this method to collect used deprecated rules. + * @param {ConfigArray} instance The config array object to get. + * @returns {ExtractedConfig[]} The used extracted configs. + * @private + */ +function getUsedExtractedConfigs(instance) { + const { cache } = internalSlotsMap.get(instance); - /** - * Get the used extracted configs. - * CLIEngine will use this method to collect used deprecated rules. - * @param {ConfigArray} instance The config array object to get. - * @returns {ExtractedConfig[]} The used extracted configs. - * @private - */ - getUsedExtractedConfigs(instance) { - const { cache } = internalSlotsMap.get(instance); + return Array.from(cache.values()); +} - return Array.from(cache.values()); - } -}; -module.exports = exportObject; +export { + ConfigArray, + getUsedExtractedConfigs +}; diff --git a/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js b/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js index 0d5f6f713..080e6405e 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +++ b/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js @@ -14,9 +14,8 @@ * * @author Toru Nagashima */ -"use strict"; -const util = require("util"); +import util from "util"; /** * The class is to store parsers or plugins. @@ -29,6 +28,7 @@ class ConfigDependency { * Initialize this instance. * @param {Object} data The dependency data. * @param {T} [data.definition] The dependency if the loading succeeded. + * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded. * @param {Error} [data.error] The error object if the loading failed. * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. * @param {string} data.id The ID of this dependency. @@ -37,6 +37,7 @@ class ConfigDependency { */ constructor({ definition = null, + original = null, error = null, filePath = null, id, @@ -50,6 +51,12 @@ class ConfigDependency { */ this.definition = definition; + /** + * The original dependency as loaded directly from disk if the loading succeeded. + * @type {T|null} + */ + this.original = original; + /** * The error object if the loading failed. * @type {Error|null} @@ -102,7 +109,8 @@ class ConfigDependency { */ [util.inspect.custom]() { const { - definition: _ignore, // eslint-disable-line no-unused-vars + definition: _ignore1, // eslint-disable-line no-unused-vars + original: _ignore2, // eslint-disable-line no-unused-vars ...obj } = this; @@ -113,4 +121,4 @@ class ConfigDependency { /** @typedef {ConfigDependency} DependentParser */ /** @typedef {ConfigDependency} DependentPlugin */ -module.exports = { ConfigDependency }; +export { ConfigDependency }; diff --git a/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js b/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js index b27d6ffb1..e93b0b67b 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js +++ b/node_modules/@eslint/eslintrc/lib/config-array/extracted-config.js @@ -14,9 +14,8 @@ * * @author Toru Nagashima */ -"use strict"; -const { IgnorePattern } = require("./ignore-pattern"); +import { IgnorePattern } from "./ignore-pattern.js"; // For VSCode intellisense /** @typedef {import("../../shared/types").ConfigData} ConfigData */ @@ -143,4 +142,4 @@ class ExtractedConfig { } } -module.exports = { ExtractedConfig }; +export { ExtractedConfig }; diff --git a/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js b/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js index 4c16278ee..3022ba9f4 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js +++ b/node_modules/@eslint/eslintrc/lib/config-array/ignore-pattern.js @@ -27,16 +27,17 @@ * * @author Toru Nagashima */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const assert = require("assert"); -const path = require("path"); -const ignore = require("ignore"); -const debug = require("debug")("eslintrc:ignore-pattern"); +import assert from "assert"; +import path from "path"; +import ignore from "ignore"; +import debugOrig from "debug"; + +const debug = debugOrig("eslintrc:ignore-pattern"); /** @typedef {ReturnType} Ignore */ @@ -155,8 +156,8 @@ class IgnorePattern { const patterns = [].concat( ...ignorePatterns.map(p => p.getPatternsRelativeTo(basePath)) ); - const ig = ignore().add([...DotPatterns, ...patterns]); - const dotIg = ignore().add(patterns); + const ig = ignore({ allowRelativePaths: true }).add([...DotPatterns, ...patterns]); + const dotIg = ignore({ allowRelativePaths: true }).add(patterns); debug(" processed: %o", { basePath, patterns }); @@ -234,4 +235,4 @@ class IgnorePattern { } } -module.exports = { IgnorePattern }; +export { IgnorePattern }; diff --git a/node_modules/@eslint/eslintrc/lib/config-array/index.js b/node_modules/@eslint/eslintrc/lib/config-array/index.js index 928d76c83..647f02b74 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array/index.js +++ b/node_modules/@eslint/eslintrc/lib/config-array/index.js @@ -2,15 +2,14 @@ * @fileoverview `ConfigArray` class. * @author Toru Nagashima */ -"use strict"; -const { ConfigArray, getUsedExtractedConfigs } = require("./config-array"); -const { ConfigDependency } = require("./config-dependency"); -const { ExtractedConfig } = require("./extracted-config"); -const { IgnorePattern } = require("./ignore-pattern"); -const { OverrideTester } = require("./override-tester"); +import { ConfigArray, getUsedExtractedConfigs } from "./config-array.js"; +import { ConfigDependency } from "./config-dependency.js"; +import { ExtractedConfig } from "./extracted-config.js"; +import { IgnorePattern } from "./ignore-pattern.js"; +import { OverrideTester } from "./override-tester.js"; -module.exports = { +export { ConfigArray, ConfigDependency, ExtractedConfig, diff --git a/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js b/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js index e7ba1202f..460aafcf8 100644 --- a/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js +++ b/node_modules/@eslint/eslintrc/lib/config-array/override-tester.js @@ -16,12 +16,14 @@ * * @author Toru Nagashima */ -"use strict"; -const assert = require("assert"); -const path = require("path"); -const util = require("util"); -const { Minimatch } = require("minimatch"); +import assert from "assert"; +import path from "path"; +import util from "util"; +import minimatch from "minimatch"; + +const { Minimatch } = minimatch; + const minimatchOpts = { dot: true, matchBase: true }; /** @@ -220,4 +222,4 @@ class OverrideTester { } } -module.exports = { OverrideTester }; +export { OverrideTester }; diff --git a/node_modules/@eslint/eslintrc/lib/flat-compat.js b/node_modules/@eslint/eslintrc/lib/flat-compat.js index c0d0ea228..6c307a992 100644 --- a/node_modules/@eslint/eslintrc/lib/flat-compat.js +++ b/node_modules/@eslint/eslintrc/lib/flat-compat.js @@ -3,16 +3,15 @@ * @author Nicholas C. Zakas */ -"use strict"; - //----------------------------------------------------------------------------- // Requirements //----------------------------------------------------------------------------- -const path = require("path"); -const environments = require("../conf/environments"); -const createDebug = require("debug"); -const { ConfigArrayFactory } = require("./config-array-factory"); +import createDebug from "debug"; +import path from "path"; + +import environments from "../conf/environments.js"; +import { ConfigArrayFactory } from "./config-array-factory.js"; //----------------------------------------------------------------------------- // Helpers @@ -54,17 +53,6 @@ function translateESLintRC(eslintrcConfig, { const languageOptionsKeysToCopy = ["globals", "parser", "parserOptions"]; const linterOptionsKeysToCopy = ["noInlineConfig", "reportUnusedDisableDirectives"]; - // check for special settings for eslint:all and eslint:recommended: - if (eslintrcConfig.settings) { - if (eslintrcConfig.settings["eslint:all"] === true) { - return ["eslint:all"]; - } - - if (eslintrcConfig.settings["eslint:recommended"] === true) { - return ["eslint:recommended"]; - } - } - // copy over simple translations for (const key of keysToCopy) { if (key in eslintrcConfig && typeof eslintrcConfig[key] !== "undefined") { @@ -144,7 +132,7 @@ function translateESLintRC(eslintrcConfig, { debug(`Translating plugin: ${pluginName}`); debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`); - const { definition: plugin, error } = eslintrcConfig.plugins[pluginName]; + const { original: plugin, error } = eslintrcConfig.plugins[pluginName]; if (error) { throw error; @@ -180,14 +168,20 @@ function translateESLintRC(eslintrcConfig, { if (environments.has(envName)) { // built-in environments should be defined first - configs.unshift(...translateESLintRC(environments.get(envName), { + configs.unshift(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...environments.get(envName) + }, { resolveConfigRelativeTo, resolvePluginsRelativeTo })); } else if (pluginEnvironments.has(envName)) { // if the environment comes from a plugin, it should come after the plugin config - configs.push(...translateESLintRC(pluginEnvironments.get(envName), { + configs.push(...translateESLintRC({ + criteria: eslintrcConfig.criteria, + ...pluginEnvironments.get(envName) + }, { resolveConfigRelativeTo, resolvePluginsRelativeTo })); @@ -216,15 +210,31 @@ class FlatCompat { constructor({ baseDirectory = process.cwd(), - resolvePluginsRelativeTo = baseDirectory + resolvePluginsRelativeTo = baseDirectory, + recommendedConfig, + allConfig } = {}) { this.baseDirectory = baseDirectory; this.resolvePluginsRelativeTo = resolvePluginsRelativeTo; this[cafactory] = new ConfigArrayFactory({ cwd: baseDirectory, resolvePluginsRelativeTo, - eslintAllPath: path.resolve(__dirname, "../conf/eslint-all.js"), - eslintRecommendedPath: path.resolve(__dirname, "../conf/eslint-recommended.js") + getEslintAllConfig: () => { + + if (!allConfig) { + throw new TypeError("Missing parameter 'allConfig' in FlatCompat constructor."); + } + + return allConfig; + }, + getEslintRecommendedConfig: () => { + + if (!recommendedConfig) { + throw new TypeError("Missing parameter 'recommendedConfig' in FlatCompat constructor."); + } + + return recommendedConfig; + } }); } @@ -274,7 +284,7 @@ class FlatCompat { /** * Translates the `env` section of an ESLintRC-style config. * @param {Object} envConfig The `env` section of an ESLintRC config. - * @returns {Object} A flag-config object representing the environments. + * @returns {Object[]} An array of flag-config objects representing the environments. */ env(envConfig) { return this.config({ @@ -285,7 +295,7 @@ class FlatCompat { /** * Translates the `extends` section of an ESLintRC-style config. * @param {...string} configsToExtend The names of the configs to load. - * @returns {Object} A flag-config object representing the config. + * @returns {Object[]} An array of flag-config objects representing the config. */ extends(...configsToExtend) { return this.config({ @@ -296,7 +306,7 @@ class FlatCompat { /** * Translates the `plugins` section of an ESLintRC-style config. * @param {...string} plugins The names of the plugins to load. - * @returns {Object} A flag-config object representing the plugins. + * @returns {Object[]} An array of flag-config objects representing the plugins. */ plugins(...plugins) { return this.config({ @@ -305,4 +315,4 @@ class FlatCompat { } } -exports.FlatCompat = FlatCompat; +export { FlatCompat }; diff --git a/node_modules/@eslint/eslintrc/lib/index-universal.js b/node_modules/@eslint/eslintrc/lib/index-universal.js new file mode 100644 index 000000000..6f6b30265 --- /dev/null +++ b/node_modules/@eslint/eslintrc/lib/index-universal.js @@ -0,0 +1,29 @@ +/** + * @fileoverview Package exports for @eslint/eslintrc + * @author Nicholas C. Zakas + */ +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +import * as ConfigOps from "./shared/config-ops.js"; +import ConfigValidator from "./shared/config-validator.js"; +import * as naming from "./shared/naming.js"; +import environments from "../conf/environments.js"; + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +const Legacy = { + environments, + + // shared + ConfigOps, + ConfigValidator, + naming +}; + +export { + Legacy +}; diff --git a/node_modules/@eslint/eslintrc/lib/index.js b/node_modules/@eslint/eslintrc/lib/index.js index 3e8dd90e6..9e3d13f5f 100644 --- a/node_modules/@eslint/eslintrc/lib/index.js +++ b/node_modules/@eslint/eslintrc/lib/index.js @@ -2,52 +2,54 @@ * @fileoverview Package exports for @eslint/eslintrc * @author Nicholas C. Zakas */ -"use strict"; - //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const { +import { ConfigArrayFactory, - createContext: createConfigArrayFactoryContext -} = require("./config-array-factory"); - -const { CascadingConfigArrayFactory } = require("./cascading-config-array-factory"); -const { ModuleResolver } = require("./shared/relative-module-resolver"); -const { ConfigArray, getUsedExtractedConfigs } = require("./config-array"); -const { ConfigDependency } = require("./config-array/config-dependency"); -const { ExtractedConfig } = require("./config-array/extracted-config"); -const { IgnorePattern } = require("./config-array/ignore-pattern"); -const { OverrideTester } = require("./config-array/override-tester"); -const ConfigOps = require("./shared/config-ops"); -const ConfigValidator = require("./shared/config-validator"); -const naming = require("./shared/naming"); -const { FlatCompat } = require("./flat-compat"); + createContext as createConfigArrayFactoryContext +} from "./config-array-factory.js"; + +import { CascadingConfigArrayFactory } from "./cascading-config-array-factory.js"; +import * as ModuleResolver from "./shared/relative-module-resolver.js"; +import { ConfigArray, getUsedExtractedConfigs } from "./config-array/index.js"; +import { ConfigDependency } from "./config-array/config-dependency.js"; +import { ExtractedConfig } from "./config-array/extracted-config.js"; +import { IgnorePattern } from "./config-array/ignore-pattern.js"; +import { OverrideTester } from "./config-array/override-tester.js"; +import * as ConfigOps from "./shared/config-ops.js"; +import ConfigValidator from "./shared/config-validator.js"; +import * as naming from "./shared/naming.js"; +import { FlatCompat } from "./flat-compat.js"; +import environments from "../conf/environments.js"; //----------------------------------------------------------------------------- // Exports //----------------------------------------------------------------------------- -module.exports = { - - Legacy: { - ConfigArray, - createConfigArrayFactoryContext, - CascadingConfigArrayFactory, - ConfigArrayFactory, - ConfigDependency, - ExtractedConfig, - IgnorePattern, - OverrideTester, - getUsedExtractedConfigs, - - // shared - ConfigOps, - ConfigValidator, - ModuleResolver, - naming - }, +const Legacy = { + ConfigArray, + createConfigArrayFactoryContext, + CascadingConfigArrayFactory, + ConfigArrayFactory, + ConfigDependency, + ExtractedConfig, + IgnorePattern, + OverrideTester, + getUsedExtractedConfigs, + environments, + + // shared + ConfigOps, + ConfigValidator, + ModuleResolver, + naming +}; + +export { + + Legacy, FlatCompat diff --git a/node_modules/@eslint/eslintrc/lib/shared/ajv.js b/node_modules/@eslint/eslintrc/lib/shared/ajv.js index 3fb0fbdd3..b79ad36c3 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/ajv.js +++ b/node_modules/@eslint/eslintrc/lib/shared/ajv.js @@ -2,20 +2,177 @@ * @fileoverview The instance of Ajv validator. * @author Evgeny Poberezkin */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const Ajv = require("ajv"), - metaSchema = require("ajv/lib/refs/json-schema-draft-04.json"); +import Ajv from "ajv"; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/* + * Copied from ajv/lib/refs/json-schema-draft-04.json + * The MIT License (MIT) + * Copyright (c) 2015-2017 Evgeny Poberezkin + */ +const metaSchema = { + id: "http://json-schema.org/draft-04/schema#", + $schema: "http://json-schema.org/draft-04/schema#", + description: "Core schema meta-schema", + definitions: { + schemaArray: { + type: "array", + minItems: 1, + items: { $ref: "#" } + }, + positiveInteger: { + type: "integer", + minimum: 0 + }, + positiveIntegerDefault0: { + allOf: [{ $ref: "#/definitions/positiveInteger" }, { default: 0 }] + }, + simpleTypes: { + enum: ["array", "boolean", "integer", "null", "number", "object", "string"] + }, + stringArray: { + type: "array", + items: { type: "string" }, + minItems: 1, + uniqueItems: true + } + }, + type: "object", + properties: { + id: { + type: "string" + }, + $schema: { + type: "string" + }, + title: { + type: "string" + }, + description: { + type: "string" + }, + default: { }, + multipleOf: { + type: "number", + minimum: 0, + exclusiveMinimum: true + }, + maximum: { + type: "number" + }, + exclusiveMaximum: { + type: "boolean", + default: false + }, + minimum: { + type: "number" + }, + exclusiveMinimum: { + type: "boolean", + default: false + }, + maxLength: { $ref: "#/definitions/positiveInteger" }, + minLength: { $ref: "#/definitions/positiveIntegerDefault0" }, + pattern: { + type: "string", + format: "regex" + }, + additionalItems: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + items: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/schemaArray" } + ], + default: { } + }, + maxItems: { $ref: "#/definitions/positiveInteger" }, + minItems: { $ref: "#/definitions/positiveIntegerDefault0" }, + uniqueItems: { + type: "boolean", + default: false + }, + maxProperties: { $ref: "#/definitions/positiveInteger" }, + minProperties: { $ref: "#/definitions/positiveIntegerDefault0" }, + required: { $ref: "#/definitions/stringArray" }, + additionalProperties: { + anyOf: [ + { type: "boolean" }, + { $ref: "#" } + ], + default: { } + }, + definitions: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + properties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + patternProperties: { + type: "object", + additionalProperties: { $ref: "#" }, + default: { } + }, + dependencies: { + type: "object", + additionalProperties: { + anyOf: [ + { $ref: "#" }, + { $ref: "#/definitions/stringArray" } + ] + } + }, + enum: { + type: "array", + minItems: 1, + uniqueItems: true + }, + type: { + anyOf: [ + { $ref: "#/definitions/simpleTypes" }, + { + type: "array", + items: { $ref: "#/definitions/simpleTypes" }, + minItems: 1, + uniqueItems: true + } + ] + }, + format: { type: "string" }, + allOf: { $ref: "#/definitions/schemaArray" }, + anyOf: { $ref: "#/definitions/schemaArray" }, + oneOf: { $ref: "#/definitions/schemaArray" }, + not: { $ref: "#" } + }, + dependencies: { + exclusiveMaximum: ["maximum"], + exclusiveMinimum: ["minimum"] + }, + default: { } +}; //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ -module.exports = (additionalOptions = {}) => { +export default (additionalOptions = {}) => { const ajv = new Ajv({ meta: false, useDefaults: true, diff --git a/node_modules/@eslint/eslintrc/lib/shared/config-ops.js b/node_modules/@eslint/eslintrc/lib/shared/config-ops.js index 3b4d5699d..d203be0e0 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/config-ops.js +++ b/node_modules/@eslint/eslintrc/lib/shared/config-ops.js @@ -3,7 +3,6 @@ * so no Node-specific code can be here. * @author Nicholas C. Zakas */ -"use strict"; //------------------------------------------------------------------------------ // Private @@ -20,111 +19,117 @@ const RULE_SEVERITY_STRINGS = ["off", "warn", "error"], // Public Interface //------------------------------------------------------------------------------ -module.exports = { - - /** - * Normalizes the severity value of a rule's configuration to a number - * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally - * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), - * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array - * whose first element is one of the above values. Strings are matched case-insensitively. - * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. - */ - getRuleSeverity(ruleConfig) { - const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; - - if (severityValue === 0 || severityValue === 1 || severityValue === 2) { - return severityValue; - } - - if (typeof severityValue === "string") { - return RULE_SEVERITY[severityValue.toLowerCase()] || 0; - } - - return 0; - }, - - /** - * Converts old-style severity settings (0, 1, 2) into new-style - * severity settings (off, warn, error) for all rules. Assumption is that severity - * values have already been validated as correct. - * @param {Object} config The config object to normalize. - * @returns {void} - */ - normalizeToStrings(config) { - - if (config.rules) { - Object.keys(config.rules).forEach(ruleId => { - const ruleConfig = config.rules[ruleId]; - - if (typeof ruleConfig === "number") { - config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; - } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { - ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; - } - }); - } - }, - - /** - * Determines if the severity for the given rule configuration represents an error. - * @param {int|string|Array} ruleConfig The configuration for an individual rule. - * @returns {boolean} True if the rule represents an error, false if not. - */ - isErrorSeverity(ruleConfig) { - return module.exports.getRuleSeverity(ruleConfig) === 2; - }, - - /** - * Checks whether a given config has valid severity or not. - * @param {number|string|Array} ruleConfig The configuration for an individual rule. - * @returns {boolean} `true` if the configuration has valid severity. - */ - isValidSeverity(ruleConfig) { - let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; - - if (typeof severity === "string") { - severity = severity.toLowerCase(); - } - return VALID_SEVERITIES.indexOf(severity) !== -1; - }, - - /** - * Checks whether every rule of a given config has valid severity or not. - * @param {Object} config The configuration for rules. - * @returns {boolean} `true` if the configuration has valid severity. - */ - isEverySeverityValid(config) { - return Object.keys(config).every(ruleId => this.isValidSeverity(config[ruleId])); - }, - - /** - * Normalizes a value for a global in a config - * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in - * a global directive comment - * @returns {("readable"|"writeable"|"off")} The value normalized as a string - * @throws Error if global value is invalid - */ - normalizeConfigGlobal(configuredValue) { - switch (configuredValue) { - case "off": - return "off"; - - case true: - case "true": - case "writeable": - case "writable": - return "writable"; - - case null: - case false: - case "false": - case "readable": - case "readonly": - return "readonly"; - - default: - throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); - } +/** + * Normalizes the severity value of a rule's configuration to a number + * @param {(number|string|[number, ...*]|[string, ...*])} ruleConfig A rule's configuration value, generally + * received from the user. A valid config value is either 0, 1, 2, the string "off" (treated the same as 0), + * the string "warn" (treated the same as 1), the string "error" (treated the same as 2), or an array + * whose first element is one of the above values. Strings are matched case-insensitively. + * @returns {(0|1|2)} The numeric severity value if the config value was valid, otherwise 0. + */ +function getRuleSeverity(ruleConfig) { + const severityValue = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (severityValue === 0 || severityValue === 1 || severityValue === 2) { + return severityValue; + } + + if (typeof severityValue === "string") { + return RULE_SEVERITY[severityValue.toLowerCase()] || 0; + } + + return 0; +} + +/** + * Converts old-style severity settings (0, 1, 2) into new-style + * severity settings (off, warn, error) for all rules. Assumption is that severity + * values have already been validated as correct. + * @param {Object} config The config object to normalize. + * @returns {void} + */ +function normalizeToStrings(config) { + + if (config.rules) { + Object.keys(config.rules).forEach(ruleId => { + const ruleConfig = config.rules[ruleId]; + + if (typeof ruleConfig === "number") { + config.rules[ruleId] = RULE_SEVERITY_STRINGS[ruleConfig] || RULE_SEVERITY_STRINGS[0]; + } else if (Array.isArray(ruleConfig) && typeof ruleConfig[0] === "number") { + ruleConfig[0] = RULE_SEVERITY_STRINGS[ruleConfig[0]] || RULE_SEVERITY_STRINGS[0]; + } + }); + } +} + +/** + * Determines if the severity for the given rule configuration represents an error. + * @param {int|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} True if the rule represents an error, false if not. + */ +function isErrorSeverity(ruleConfig) { + return getRuleSeverity(ruleConfig) === 2; +} + +/** + * Checks whether a given config has valid severity or not. + * @param {number|string|Array} ruleConfig The configuration for an individual rule. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isValidSeverity(ruleConfig) { + let severity = Array.isArray(ruleConfig) ? ruleConfig[0] : ruleConfig; + + if (typeof severity === "string") { + severity = severity.toLowerCase(); + } + return VALID_SEVERITIES.indexOf(severity) !== -1; +} + +/** + * Checks whether every rule of a given config has valid severity or not. + * @param {Object} config The configuration for rules. + * @returns {boolean} `true` if the configuration has valid severity. + */ +function isEverySeverityValid(config) { + return Object.keys(config).every(ruleId => isValidSeverity(config[ruleId])); +} + +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); } +} + +export { + getRuleSeverity, + normalizeToStrings, + isErrorSeverity, + isValidSeverity, + isEverySeverityValid, + normalizeConfigGlobal }; diff --git a/node_modules/@eslint/eslintrc/lib/shared/config-validator.js b/node_modules/@eslint/eslintrc/lib/shared/config-validator.js index dbc6f3f38..32174a56b 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/config-validator.js +++ b/node_modules/@eslint/eslintrc/lib/shared/config-validator.js @@ -3,20 +3,21 @@ * @author Brandon Mills */ -"use strict"; +/* eslint class-methods-use-this: "off" */ //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const - util = require("util"), - configSchema = require("../../conf/config-schema"), - BuiltInEnvironments = require("../../conf/environments"), - ConfigOps = require("./config-ops"), - { emitDeprecationWarning } = require("./deprecation-warnings"); +import util from "util"; +import * as ConfigOps from "./config-ops.js"; +import { emitDeprecationWarning } from "./deprecation-warnings.js"; +import ajvOrig from "./ajv.js"; +import configSchema from "../../conf/config-schema.js"; +import BuiltInEnvironments from "../../conf/environments.js"; + +const ajv = ajvOrig(); -const ajv = require("./ajv")(); const ruleValidators = new WeakMap(); const noop = Function.prototype; @@ -36,7 +37,7 @@ const validated = new WeakSet(); // Exports //----------------------------------------------------------------------------- -module.exports = class ConfigValidator { +export default class ConfigValidator { constructor({ builtInRules = new Map() } = {}) { this.builtInRules = builtInRules; } @@ -321,4 +322,4 @@ module.exports = class ConfigValidator { } } -}; +} diff --git a/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js b/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js index 136fc255f..91907b137 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js +++ b/node_modules/@eslint/eslintrc/lib/shared/deprecation-warnings.js @@ -2,13 +2,12 @@ * @fileoverview Provide the function that emits deprecation warnings. * @author Toru Nagashima */ -"use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ -const path = require("path"); +import path from "path"; //------------------------------------------------------------------------------ // Private @@ -59,6 +58,6 @@ function emitDeprecationWarning(source, errorCode) { // Public Interface //------------------------------------------------------------------------------ -module.exports = { +export { emitDeprecationWarning }; diff --git a/node_modules/@eslint/eslintrc/lib/shared/naming.js b/node_modules/@eslint/eslintrc/lib/shared/naming.js index 32cff9453..93df5fc43 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/naming.js +++ b/node_modules/@eslint/eslintrc/lib/shared/naming.js @@ -1,7 +1,6 @@ /** * @fileoverview Common helpers for naming of plugins, formatters and configs */ -"use strict"; const NAMESPACE_REGEX = /^@.*\//iu; @@ -90,7 +89,7 @@ function getNamespaceFromTerm(term) { // Public Interface //------------------------------------------------------------------------------ -module.exports = { +export { normalizePackageName, getShorthandName, getNamespaceFromTerm diff --git a/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js b/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js index 80335c5cf..1df0ca807 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js +++ b/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js @@ -3,42 +3,40 @@ * @author Teddy Katz */ -"use strict"; - -const Module = require("module"); +import Module from "module"; /* * `Module.createRequire` is added in v12.2.0. It supports URL as well. * We only support the case where the argument is a filepath, not a URL. */ -// eslint-disable-next-line node/no-unsupported-features/node-builtins, node/no-deprecated-api -const createRequire = Module.createRequire || Module.createRequireFromPath; - -module.exports = { +const createRequire = Module.createRequire; - /** - * Resolves a Node module relative to another module - * @param {string} moduleName The name of a Node module, or a path to a Node module. - * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be - * a file rather than a directory, but the file need not actually exist. - * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath` - */ - resolve(moduleName, relativeToPath) { - try { - return createRequire(relativeToPath).resolve(moduleName); - } catch (error) { +/** + * Resolves a Node module relative to another module + * @param {string} moduleName The name of a Node module, or a path to a Node module. + * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be + * a file rather than a directory, but the file need not actually exist. + * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath` + */ +function resolve(moduleName, relativeToPath) { + try { + return createRequire(relativeToPath).resolve(moduleName); + } catch (error) { - // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future. - if ( - typeof error === "object" && - error !== null && - error.code === "MODULE_NOT_FOUND" && - !error.requireStack && - error.message.includes(moduleName) - ) { - error.message += `\nRequire stack:\n- ${relativeToPath}`; - } - throw error; + // This `if` block is for older Node.js than 12.0.0. We can remove this block in the future. + if ( + typeof error === "object" && + error !== null && + error.code === "MODULE_NOT_FOUND" && + !error.requireStack && + error.message.includes(moduleName) + ) { + error.message += `\nRequire stack:\n- ${relativeToPath}`; } + throw error; } +} + +export { + resolve }; diff --git a/node_modules/@eslint/eslintrc/lib/shared/types.js b/node_modules/@eslint/eslintrc/lib/shared/types.js index d4ac14e26..a32c35e39 100644 --- a/node_modules/@eslint/eslintrc/lib/shared/types.js +++ b/node_modules/@eslint/eslintrc/lib/shared/types.js @@ -2,10 +2,9 @@ * @fileoverview Define common types for input completion. * @author Toru Nagashima */ -"use strict"; /** @type {any} */ -module.exports = {}; +export default {}; /** @typedef {boolean | "off" | "readable" | "readonly" | "writable" | "writeable"} GlobalConf */ /** @typedef {0 | 1 | 2 | "off" | "warn" | "error"} SeverityConf */ diff --git a/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml new file mode 120000 index 000000000..9dbd010d4 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/CHANGELOG.md b/node_modules/@eslint/eslintrc/node_modules/argparse/CHANGELOG.md new file mode 100644 index 000000000..dc39ed695 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,216 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [2.0.1] - 2020-08-29 +### Fixed +- Fix issue with `process.argv` when used with interpreters (`coffee`, `ts-node`, etc.), #150. + + +## [2.0.0] - 2020-08-14 +### Changed +- Full rewrite. Now port from python 3.9.0 & more precise following. + See [doc](./doc) for difference and migration info. +- node.js 10+ required +- Removed most of local docs in favour of original ones. + + +## [1.0.10] - 2018-02-15 +### Fixed +- Use .concat instead of + for arrays, #122. + + +## [1.0.9] - 2016-09-29 +### Changed +- Rerelease after 1.0.8 - deps cleanup. + + +## [1.0.8] - 2016-09-29 +### Changed +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +## [1.0.7] - 2016-03-17 +### Changed +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +## [1.0.6] - 2016-02-06 +### Changed +- Maintenance: moved to eslint & updated CS. + + +## [1.0.5] - 2016-02-05 +### Changed +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +## [1.0.4] - 2016-01-17 +### Changed +- Maintenance: lodash update to 4.0.0. + + +## [1.0.3] - 2015-10-27 +### Fixed +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +## [1.0.2] - 2015-03-22 +### Changed +- Relaxed lodash version dependency. + + +## [1.0.1] - 2015-02-20 +### Changed +- Changed dependencies to be compatible with ancient nodejs. + + +## [1.0.0] - 2015-02-19 +### Changed +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +## [0.1.16] - 2013-12-01 +### Changed +- Maintenance release. Updated dependencies and docs. + + +## [0.1.15] - 2013-05-13 +### Fixed +- Fixed #55, @trebor89 + + +## [0.1.14] - 2013-05-12 +### Fixed +- Fixed #62, @maxtaco + + +## [0.1.13] - 2013-04-08 +### Changed +- Added `.npmignore` to reduce package size + + +## [0.1.12] - 2013-02-10 +### Fixed +- Fixed conflictHandler (#46), @hpaulj + + +## [0.1.11] - 2013-02-07 +### Added +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + +### Fixed +- Multiple bugfixes, @hpaulj + + +## [0.1.10] - 2012-12-30 +### Added +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj + +### Fixed +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +## [0.1.9] - 2012-12-27 +### Fixed +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Improve negative argument parsing, thanks to @hpaulj + + +## [0.1.8] - 2012-12-01 +### Fixed +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +## [0.1.7] - 2012-10-14 +### Fixed +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +## [0.1.6] - 2012-09-09 +### Fixed +- Fixed check for conflict of options (thanks to @tomxtobin) + + +## [0.1.5] - 2012-09-03 +### Fixed +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +## [0.1.4] - 2012-07-30 +### Fixed +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +## [0.1.3] - 2012-06-27 +### Fixed +- Fixed formatter api name: Formatter -> HelpFormatter + + +## [0.1.2] - 2012-05-29 +### Fixed +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + +### Added +- Added basic tests + + +## [0.1.1] - 2012-05-23 +### Fixed +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +## [0.1.0] - 2012-05-16 +### Added +- First release. + + +[2.0.1]: https://github.com/nodeca/argparse/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/argparse/compare/1.0.10...2.0.0 +[1.0.10]: https://github.com/nodeca/argparse/compare/1.0.9...1.0.10 +[1.0.9]: https://github.com/nodeca/argparse/compare/1.0.8...1.0.9 +[1.0.8]: https://github.com/nodeca/argparse/compare/1.0.7...1.0.8 +[1.0.7]: https://github.com/nodeca/argparse/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/nodeca/argparse/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/nodeca/argparse/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/nodeca/argparse/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/nodeca/argparse/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/argparse/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/argparse/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/argparse/compare/0.1.16...1.0.0 +[0.1.16]: https://github.com/nodeca/argparse/compare/0.1.15...0.1.16 +[0.1.15]: https://github.com/nodeca/argparse/compare/0.1.14...0.1.15 +[0.1.14]: https://github.com/nodeca/argparse/compare/0.1.13...0.1.14 +[0.1.13]: https://github.com/nodeca/argparse/compare/0.1.12...0.1.13 +[0.1.12]: https://github.com/nodeca/argparse/compare/0.1.11...0.1.12 +[0.1.11]: https://github.com/nodeca/argparse/compare/0.1.10...0.1.11 +[0.1.10]: https://github.com/nodeca/argparse/compare/0.1.9...0.1.10 +[0.1.9]: https://github.com/nodeca/argparse/compare/0.1.8...0.1.9 +[0.1.8]: https://github.com/nodeca/argparse/compare/0.1.7...0.1.8 +[0.1.7]: https://github.com/nodeca/argparse/compare/0.1.6...0.1.7 +[0.1.6]: https://github.com/nodeca/argparse/compare/0.1.5...0.1.6 +[0.1.5]: https://github.com/nodeca/argparse/compare/0.1.4...0.1.5 +[0.1.4]: https://github.com/nodeca/argparse/compare/0.1.3...0.1.4 +[0.1.3]: https://github.com/nodeca/argparse/compare/0.1.2...0.1.3 +[0.1.2]: https://github.com/nodeca/argparse/compare/0.1.1...0.1.2 +[0.1.1]: https://github.com/nodeca/argparse/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/nodeca/argparse/releases/tag/0.1.0 diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/LICENSE b/node_modules/@eslint/eslintrc/node_modules/argparse/LICENSE new file mode 100644 index 000000000..66a3ac80d --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/LICENSE @@ -0,0 +1,254 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/README.md b/node_modules/@eslint/eslintrc/node_modules/argparse/README.md new file mode 100644 index 000000000..550b5c9b7 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/README.md @@ -0,0 +1,84 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js, with [sub-commands](https://docs.python.org/3.9/library/argparse.html#sub-commands) support. Port of python's [argparse](http://docs.python.org/dev/library/argparse.html) (version [3.9.0](https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py)). + +**Difference with original.** + +- JS has no keyword arguments support. + - Pass options instead: `new ArgumentParser({ description: 'example', add_help: true })`. +- JS has no python's types `int`, `float`, ... + - Use string-typed names: `.add_argument('-b', { type: 'int', help: 'help' })`. +- `%r` format specifier uses `require('util').inspect()`. + +More details in [doc](./doc). + + +Example +------- + +`test.js` file: + +```javascript +#!/usr/bin/env node +'use strict'; + +const { ArgumentParser } = require('argparse'); +const { version } = require('./package.json'); + +const parser = new ArgumentParser({ + description: 'Argparse example' +}); + +parser.add_argument('-v', '--version', { action: 'version', version }); +parser.add_argument('-f', '--foo', { help: 'foo bar' }); +parser.add_argument('-b', '--bar', { help: 'bar foo' }); +parser.add_argument('--baz', { help: 'baz bar' }); + +console.dir(parser.parse_args()); +``` + +Display help: + +``` +$ ./test.js -h +usage: test.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + + +API docs +-------- + +Since this is a port with minimal divergence, there's no separate documentation. +Use original one instead, with notes about difference. + +1. [Original doc](https://docs.python.org/3.9/library/argparse.html). +2. [Original tutorial](https://docs.python.org/3.9/howto/argparse.html). +3. [Difference with python](./doc). + + +argparse for enterprise +----------------------- + +Available as part of the Tidelift Subscription + +The maintainers of argparse and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-argparse?utm_source=npm-argparse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/argparse.js b/node_modules/@eslint/eslintrc/node_modules/argparse/argparse.js new file mode 100644 index 000000000..2b8c8c631 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/argparse.js @@ -0,0 +1,3707 @@ +// Port of python's argparse module, version 3.9.0: +// https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py + +'use strict' + +// Copyright (C) 2010-2020 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors + +/* + * Command-line parsing library + * + * This module is an optparse-inspired command-line parsing library that: + * + * - handles both optional and positional arguments + * - produces highly informative usage messages + * - supports parsers that dispatch to sub-parsers + * + * The following is a simple usage example that sums integers from the + * command-line and writes the result to a file:: + * + * parser = argparse.ArgumentParser( + * description='sum the integers at the command line') + * parser.add_argument( + * 'integers', metavar='int', nargs='+', type=int, + * help='an integer to be summed') + * parser.add_argument( + * '--log', default=sys.stdout, type=argparse.FileType('w'), + * help='the file where the sum should be written') + * args = parser.parse_args() + * args.log.write('%s' % sum(args.integers)) + * args.log.close() + * + * The module contains the following public classes: + * + * - ArgumentParser -- The main entry point for command-line parsing. As the + * example above shows, the add_argument() method is used to populate + * the parser with actions for optional and positional arguments. Then + * the parse_args() method is invoked to convert the args at the + * command-line into an object with attributes. + * + * - ArgumentError -- The exception raised by ArgumentParser objects when + * there are errors with the parser's actions. Errors raised while + * parsing the command-line are caught by ArgumentParser and emitted + * as command-line messages. + * + * - FileType -- A factory for defining types of files to be created. As the + * example above shows, instances of FileType are typically passed as + * the type= argument of add_argument() calls. + * + * - Action -- The base class for parser actions. Typically actions are + * selected by passing strings like 'store_true' or 'append_const' to + * the action= argument of add_argument(). However, for greater + * customization of ArgumentParser actions, subclasses of Action may + * be defined and passed as the action= argument. + * + * - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, + * ArgumentDefaultsHelpFormatter -- Formatter classes which + * may be passed as the formatter_class= argument to the + * ArgumentParser constructor. HelpFormatter is the default, + * RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser + * not to change the formatting for help text, and + * ArgumentDefaultsHelpFormatter adds information about argument defaults + * to the help. + * + * All other classes in this module are considered implementation details. + * (Also note that HelpFormatter and RawDescriptionHelpFormatter are only + * considered public as object names -- the API of the formatter objects is + * still considered an implementation detail.) + */ + +const SUPPRESS = '==SUPPRESS==' + +const OPTIONAL = '?' +const ZERO_OR_MORE = '*' +const ONE_OR_MORE = '+' +const PARSER = 'A...' +const REMAINDER = '...' +const _UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args' + + +// ================================== +// Utility functions used for porting +// ================================== +const assert = require('assert') +const util = require('util') +const fs = require('fs') +const sub = require('./lib/sub') +const path = require('path') +const repr = util.inspect + +function get_argv() { + // omit first argument (which is assumed to be interpreter - `node`, `coffee`, `ts-node`, etc.) + return process.argv.slice(1) +} + +function get_terminal_size() { + return { + columns: +process.env.COLUMNS || process.stdout.columns || 80 + } +} + +function hasattr(object, name) { + return Object.prototype.hasOwnProperty.call(object, name) +} + +function getattr(object, name, value) { + return hasattr(object, name) ? object[name] : value +} + +function setattr(object, name, value) { + object[name] = value +} + +function setdefault(object, name, value) { + if (!hasattr(object, name)) object[name] = value + return object[name] +} + +function delattr(object, name) { + delete object[name] +} + +function range(from, to, step=1) { + // range(10) is equivalent to range(0, 10) + if (arguments.length === 1) [ to, from ] = [ from, 0 ] + if (typeof from !== 'number' || typeof to !== 'number' || typeof step !== 'number') { + throw new TypeError('argument cannot be interpreted as an integer') + } + if (step === 0) throw new TypeError('range() arg 3 must not be zero') + + let result = [] + if (step > 0) { + for (let i = from; i < to; i += step) result.push(i) + } else { + for (let i = from; i > to; i += step) result.push(i) + } + return result +} + +function splitlines(str, keepends = false) { + let result + if (!keepends) { + result = str.split(/\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029]/) + } else { + result = [] + let parts = str.split(/(\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029])/) + for (let i = 0; i < parts.length; i += 2) { + result.push(parts[i] + (i + 1 < parts.length ? parts[i + 1] : '')) + } + } + if (!result[result.length - 1]) result.pop() + return result +} + +function _string_lstrip(string, prefix_chars) { + let idx = 0 + while (idx < string.length && prefix_chars.includes(string[idx])) idx++ + return idx ? string.slice(idx) : string +} + +function _string_split(string, sep, maxsplit) { + let result = string.split(sep) + if (result.length > maxsplit) { + result = result.slice(0, maxsplit).concat([ result.slice(maxsplit).join(sep) ]) + } + return result +} + +function _array_equal(array1, array2) { + if (array1.length !== array2.length) return false + for (let i = 0; i < array1.length; i++) { + if (array1[i] !== array2[i]) return false + } + return true +} + +function _array_remove(array, item) { + let idx = array.indexOf(item) + if (idx === -1) throw new TypeError(sub('%r not in list', item)) + array.splice(idx, 1) +} + +// normalize choices to array; +// this isn't required in python because `in` and `map` operators work with anything, +// but in js dealing with multiple types here is too clunky +function _choices_to_array(choices) { + if (choices === undefined) { + return [] + } else if (Array.isArray(choices)) { + return choices + } else if (choices !== null && typeof choices[Symbol.iterator] === 'function') { + return Array.from(choices) + } else if (typeof choices === 'object' && choices !== null) { + return Object.keys(choices) + } else { + throw new Error(sub('invalid choices value: %r', choices)) + } +} + +// decorator that allows a class to be called without new +function _callable(cls) { + let result = { // object is needed for inferred class name + [cls.name]: function (...args) { + let this_class = new.target === result || !new.target + return Reflect.construct(cls, args, this_class ? cls : new.target) + } + } + result[cls.name].prototype = cls.prototype + // fix default tag for toString, e.g. [object Action] instead of [object Object] + cls.prototype[Symbol.toStringTag] = cls.name + return result[cls.name] +} + +function _alias(object, from, to) { + try { + let name = object.constructor.name + Object.defineProperty(object, from, { + value: util.deprecate(object[to], sub('%s.%s() is renamed to %s.%s()', + name, from, name, to)), + enumerable: false + }) + } catch {} +} + +// decorator that allows snake_case class methods to be called with camelCase and vice versa +function _camelcase_alias(_class) { + for (let name of Object.getOwnPropertyNames(_class.prototype)) { + let camelcase = name.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (camelcase !== name) _alias(_class.prototype, camelcase, name) + } + return _class +} + +function _to_legacy_name(key) { + key = key.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (key === 'default') key = 'defaultValue' + if (key === 'const') key = 'constant' + return key +} + +function _to_new_name(key) { + if (key === 'defaultValue') key = 'default' + if (key === 'constant') key = 'const' + key = key.replace(/[A-Z]/g, c => '_' + c.toLowerCase()) + return key +} + +// parse options +let no_default = Symbol('no_default_value') +function _parse_opts(args, descriptor) { + function get_name() { + let stack = new Error().stack.split('\n') + .map(x => x.match(/^ at (.*) \(.*\)$/)) + .filter(Boolean) + .map(m => m[1]) + .map(fn => fn.match(/[^ .]*$/)[0]) + + if (stack.length && stack[0] === get_name.name) stack.shift() + if (stack.length && stack[0] === _parse_opts.name) stack.shift() + return stack.length ? stack[0] : '' + } + + args = Array.from(args) + let kwargs = {} + let result = [] + let last_opt = args.length && args[args.length - 1] + + if (typeof last_opt === 'object' && last_opt !== null && !Array.isArray(last_opt) && + (!last_opt.constructor || last_opt.constructor.name === 'Object')) { + kwargs = Object.assign({}, args.pop()) + } + + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(descriptor)) { + let old_name = _to_legacy_name(key) + if (old_name !== key && (old_name in kwargs)) { + if (key in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else { + kwargs[key] = kwargs[old_name] + } + renames.push([ old_name, key ]) + delete kwargs[old_name] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + + let missing_positionals = [] + let positional_count = args.length + + for (let [ key, def ] of Object.entries(descriptor)) { + if (key[0] === '*') { + if (key.length > 0 && key[1] === '*') { + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(kwargs)) { + let new_name = _to_new_name(key) + if (new_name !== key && (key in kwargs)) { + if (new_name in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), new_name)) + } else { + kwargs[new_name] = kwargs[key] + } + renames.push([ key, new_name ]) + delete kwargs[key] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + result.push(kwargs) + kwargs = {} + } else { + result.push(args) + args = [] + } + } else if (key in kwargs && args.length > 0) { + throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else if (key in kwargs) { + result.push(kwargs[key]) + delete kwargs[key] + } else if (args.length > 0) { + result.push(args.shift()) + } else if (def !== no_default) { + result.push(def) + } else { + missing_positionals.push(key) + } + } + + if (Object.keys(kwargs).length) { + throw new TypeError(sub('%s() got an unexpected keyword argument %r', + get_name(), Object.keys(kwargs)[0])) + } + + if (args.length) { + let from = Object.entries(descriptor).filter(([ k, v ]) => k[0] !== '*' && v !== no_default).length + let to = Object.entries(descriptor).filter(([ k ]) => k[0] !== '*').length + throw new TypeError(sub('%s() takes %s positional argument%s but %s %s given', + get_name(), + from === to ? sub('from %s to %s', from, to) : to, + from === to && to === 1 ? '' : 's', + positional_count, + positional_count === 1 ? 'was' : 'were')) + } + + if (missing_positionals.length) { + let strs = missing_positionals.map(repr) + if (strs.length > 1) strs[strs.length - 1] = 'and ' + strs[strs.length - 1] + let str_joined = strs.join(strs.length === 2 ? '' : ', ') + throw new TypeError(sub('%s() missing %i required positional argument%s: %s', + get_name(), strs.length, strs.length === 1 ? '' : 's', str_joined)) + } + + return result +} + +let _deprecations = {} +function deprecate(id, string) { + _deprecations[id] = _deprecations[id] || util.deprecate(() => {}, string) + _deprecations[id]() +} + + +// ============================= +// Utility functions and classes +// ============================= +function _AttributeHolder(cls = Object) { + /* + * Abstract base class that provides __repr__. + * + * The __repr__ method returns a string in the format:: + * ClassName(attr=name, attr=name, ...) + * The attributes are determined either by a class-level attribute, + * '_kwarg_names', or by inspecting the instance __dict__. + */ + + return class _AttributeHolder extends cls { + [util.inspect.custom]() { + let type_name = this.constructor.name + let arg_strings = [] + let star_args = {} + for (let arg of this._get_args()) { + arg_strings.push(repr(arg)) + } + for (let [ name, value ] of this._get_kwargs()) { + if (/^[a-z_][a-z0-9_$]*$/i.test(name)) { + arg_strings.push(sub('%s=%r', name, value)) + } else { + star_args[name] = value + } + } + if (Object.keys(star_args).length) { + arg_strings.push(sub('**%s', repr(star_args))) + } + return sub('%s(%s)', type_name, arg_strings.join(', ')) + } + + toString() { + return this[util.inspect.custom]() + } + + _get_kwargs() { + return Object.entries(this) + } + + _get_args() { + return [] + } + } +} + + +function _copy_items(items) { + if (items === undefined) { + return [] + } + return items.slice(0) +} + + +// =============== +// Formatting Help +// =============== +const HelpFormatter = _camelcase_alias(_callable(class HelpFormatter { + /* + * Formatter for generating usage messages and argument help strings. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + constructor() { + let [ + prog, + indent_increment, + max_help_position, + width + ] = _parse_opts(arguments, { + prog: no_default, + indent_increment: 2, + max_help_position: 24, + width: undefined + }) + + // default setting for width + if (width === undefined) { + width = get_terminal_size().columns + width -= 2 + } + + this._prog = prog + this._indent_increment = indent_increment + this._max_help_position = Math.min(max_help_position, + Math.max(width - 20, indent_increment * 2)) + this._width = width + + this._current_indent = 0 + this._level = 0 + this._action_max_length = 0 + + this._root_section = this._Section(this, undefined) + this._current_section = this._root_section + + this._whitespace_matcher = /[ \t\n\r\f\v]+/g // equivalent to python /\s+/ with ASCII flag + this._long_break_matcher = /\n\n\n+/g + } + + // =============================== + // Section and indentation methods + // =============================== + _indent() { + this._current_indent += this._indent_increment + this._level += 1 + } + + _dedent() { + this._current_indent -= this._indent_increment + assert(this._current_indent >= 0, 'Indent decreased below 0.') + this._level -= 1 + } + + _add_item(func, args) { + this._current_section.items.push([ func, args ]) + } + + // ======================== + // Message building methods + // ======================== + start_section(heading) { + this._indent() + let section = this._Section(this, this._current_section, heading) + this._add_item(section.format_help.bind(section), []) + this._current_section = section + } + + end_section() { + this._current_section = this._current_section.parent + this._dedent() + } + + add_text(text) { + if (text !== SUPPRESS && text !== undefined) { + this._add_item(this._format_text.bind(this), [text]) + } + } + + add_usage(usage, actions, groups, prefix = undefined) { + if (usage !== SUPPRESS) { + let args = [ usage, actions, groups, prefix ] + this._add_item(this._format_usage.bind(this), args) + } + } + + add_argument(action) { + if (action.help !== SUPPRESS) { + + // find all invocations + let invocations = [this._format_action_invocation(action)] + for (let subaction of this._iter_indented_subactions(action)) { + invocations.push(this._format_action_invocation(subaction)) + } + + // update the maximum item length + let invocation_length = Math.max(...invocations.map(invocation => invocation.length)) + let action_length = invocation_length + this._current_indent + this._action_max_length = Math.max(this._action_max_length, + action_length) + + // add the item to the list + this._add_item(this._format_action.bind(this), [action]) + } + } + + add_arguments(actions) { + for (let action of actions) { + this.add_argument(action) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_help() { + let help = this._root_section.format_help() + if (help) { + help = help.replace(this._long_break_matcher, '\n\n') + help = help.replace(/^\n+|\n+$/g, '') + '\n' + } + return help + } + + _join_parts(part_strings) { + return part_strings.filter(part => part && part !== SUPPRESS).join('') + } + + _format_usage(usage, actions, groups, prefix) { + if (prefix === undefined) { + prefix = 'usage: ' + } + + // if usage is specified, use that + if (usage !== undefined) { + usage = sub(usage, { prog: this._prog }) + + // if no optionals or positionals are available, usage is just prog + } else if (usage === undefined && !actions.length) { + usage = sub('%(prog)s', { prog: this._prog }) + + // if optionals and positionals are available, calculate usage + } else if (usage === undefined) { + let prog = sub('%(prog)s', { prog: this._prog }) + + // split optionals from positionals + let optionals = [] + let positionals = [] + for (let action of actions) { + if (action.option_strings.length) { + optionals.push(action) + } else { + positionals.push(action) + } + } + + // build full usage string + let action_usage = this._format_actions_usage([].concat(optionals).concat(positionals), groups) + usage = [ prog, action_usage ].map(String).join(' ') + + // wrap the usage parts if it's too long + let text_width = this._width - this._current_indent + if (prefix.length + usage.length > text_width) { + + // break usage into wrappable parts + let part_regexp = /\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+/g + let opt_usage = this._format_actions_usage(optionals, groups) + let pos_usage = this._format_actions_usage(positionals, groups) + let opt_parts = opt_usage.match(part_regexp) || [] + let pos_parts = pos_usage.match(part_regexp) || [] + assert(opt_parts.join(' ') === opt_usage) + assert(pos_parts.join(' ') === pos_usage) + + // helper for wrapping lines + let get_lines = (parts, indent, prefix = undefined) => { + let lines = [] + let line = [] + let line_len + if (prefix !== undefined) { + line_len = prefix.length - 1 + } else { + line_len = indent.length - 1 + } + for (let part of parts) { + if (line_len + 1 + part.length > text_width && line) { + lines.push(indent + line.join(' ')) + line = [] + line_len = indent.length - 1 + } + line.push(part) + line_len += part.length + 1 + } + if (line.length) { + lines.push(indent + line.join(' ')) + } + if (prefix !== undefined) { + lines[0] = lines[0].slice(indent.length) + } + return lines + } + + let lines + + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * text_width) { + let indent = ' '.repeat(prefix.length + prog.length + 1) + if (opt_parts.length) { + lines = get_lines([prog].concat(opt_parts), indent, prefix) + lines = lines.concat(get_lines(pos_parts, indent)) + } else if (pos_parts.length) { + lines = get_lines([prog].concat(pos_parts), indent, prefix) + } else { + lines = [prog] + } + + // if prog is long, put it on its own line + } else { + let indent = ' '.repeat(prefix.length) + let parts = [].concat(opt_parts).concat(pos_parts) + lines = get_lines(parts, indent) + if (lines.length > 1) { + lines = [] + lines = lines.concat(get_lines(opt_parts, indent)) + lines = lines.concat(get_lines(pos_parts, indent)) + } + lines = [prog].concat(lines) + } + + // join lines into usage + usage = lines.join('\n') + } + } + + // prefix with 'usage:' + return sub('%s%s\n\n', prefix, usage) + } + + _format_actions_usage(actions, groups) { + // find group indices and identify actions in groups + let group_actions = new Set() + let inserts = {} + for (let group of groups) { + let start = actions.indexOf(group._group_actions[0]) + if (start === -1) { + continue + } else { + let end = start + group._group_actions.length + if (_array_equal(actions.slice(start, end), group._group_actions)) { + for (let action of group._group_actions) { + group_actions.add(action) + } + if (!group.required) { + if (start in inserts) { + inserts[start] += ' [' + } else { + inserts[start] = '[' + } + if (end in inserts) { + inserts[end] += ']' + } else { + inserts[end] = ']' + } + } else { + if (start in inserts) { + inserts[start] += ' (' + } else { + inserts[start] = '(' + } + if (end in inserts) { + inserts[end] += ')' + } else { + inserts[end] = ')' + } + } + for (let i of range(start + 1, end)) { + inserts[i] = '|' + } + } + } + } + + // collect all actions format strings + let parts = [] + for (let [ i, action ] of Object.entries(actions)) { + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === SUPPRESS) { + parts.push(undefined) + if (inserts[+i] === '|') { + delete inserts[+i] + } else if (inserts[+i + 1] === '|') { + delete inserts[+i + 1] + } + + // produce all arg strings + } else if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let part = this._format_args(action, default_value) + + // if it's in a group, strip the outer [] + if (group_actions.has(action)) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1) + } + } + + // add the action string to the list + parts.push(part) + + // produce the first way to invoke the option in brackets + } else { + let option_string = action.option_strings[0] + let part + + // if the Optional doesn't take a value, format is: + // -s or --long + if (action.nargs === 0) { + part = action.format_usage() + + // if the Optional takes a value, format is: + // -s ARGS or --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + part = sub('%s %s', option_string, args_string) + } + + // make it look optional if it's not required or in a group + if (!action.required && !group_actions.has(action)) { + part = sub('[%s]', part) + } + + // add the action string to the list + parts.push(part) + } + } + + // insert things at the necessary indices + for (let i of Object.keys(inserts).map(Number).sort((a, b) => b - a)) { + parts.splice(+i, 0, inserts[+i]) + } + + // join all the action items with spaces + let text = parts.filter(Boolean).join(' ') + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1') + text = text.replace(/ ([\])])/g, '$1') + text = text.replace(/[\[(] *[\])]/g, '') + text = text.replace(/\(([^|]*)\)/g, '$1', text) + text = text.trim() + + // return the text + return text + } + + _format_text(text) { + if (text.includes('%(prog)')) { + text = sub(text, { prog: this._prog }) + } + let text_width = Math.max(this._width - this._current_indent, 11) + let indent = ' '.repeat(this._current_indent) + return this._fill_text(text, text_width, indent) + '\n\n' + } + + _format_action(action) { + // determine the required width and the entry label + let help_position = Math.min(this._action_max_length + 2, + this._max_help_position) + let help_width = Math.max(this._width - help_position, 11) + let action_width = help_position - this._current_indent - 2 + let action_header = this._format_action_invocation(action) + let indent_first + + // no help; start on same line and add a final newline + if (!action.help) { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + + // short action name; start on the same line and pad two spaces + } else if (action_header.length <= action_width) { + let tup = [ this._current_indent, '', action_width, action_header ] + action_header = sub('%*s%-*s ', ...tup) + indent_first = 0 + + // long action name; start on the next line + } else { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + indent_first = help_position + } + + // collect the pieces of the action help + let parts = [action_header] + + // if there was help for the action, add lines of help text + if (action.help) { + let help_text = this._expand_help(action) + let help_lines = this._split_lines(help_text, help_width) + parts.push(sub('%*s%s\n', indent_first, '', help_lines[0])) + for (let line of help_lines.slice(1)) { + parts.push(sub('%*s%s\n', help_position, '', line)) + } + + // or add a newline if the description doesn't end with one + } else if (!action_header.endsWith('\n')) { + parts.push('\n') + } + + // if there are any sub-actions, add their help as well + for (let subaction of this._iter_indented_subactions(action)) { + parts.push(this._format_action(subaction)) + } + + // return a single string + return this._join_parts(parts) + } + + _format_action_invocation(action) { + if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let metavar = this._metavar_formatter(action, default_value)(1)[0] + return metavar + + } else { + let parts = [] + + // if the Optional doesn't take a value, format is: + // -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.option_strings) + + // if the Optional takes a value, format is: + // -s ARGS, --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + for (let option_string of action.option_strings) { + parts.push(sub('%s %s', option_string, args_string)) + } + } + + return parts.join(', ') + } + } + + _metavar_formatter(action, default_metavar) { + let result + if (action.metavar !== undefined) { + result = action.metavar + } else if (action.choices !== undefined) { + let choice_strs = _choices_to_array(action.choices).map(String) + result = sub('{%s}', choice_strs.join(',')) + } else { + result = default_metavar + } + + function format(tuple_size) { + if (Array.isArray(result)) { + return result + } else { + return Array(tuple_size).fill(result) + } + } + return format + } + + _format_args(action, default_metavar) { + let get_metavar = this._metavar_formatter(action, default_metavar) + let result + if (action.nargs === undefined) { + result = sub('%s', ...get_metavar(1)) + } else if (action.nargs === OPTIONAL) { + result = sub('[%s]', ...get_metavar(1)) + } else if (action.nargs === ZERO_OR_MORE) { + let metavar = get_metavar(1) + if (metavar.length === 2) { + result = sub('[%s [%s ...]]', ...metavar) + } else { + result = sub('[%s ...]', ...metavar) + } + } else if (action.nargs === ONE_OR_MORE) { + result = sub('%s [%s ...]', ...get_metavar(2)) + } else if (action.nargs === REMAINDER) { + result = '...' + } else if (action.nargs === PARSER) { + result = sub('%s ...', ...get_metavar(1)) + } else if (action.nargs === SUPPRESS) { + result = '' + } else { + let formats + try { + formats = range(action.nargs).map(() => '%s') + } catch (err) { + throw new TypeError('invalid nargs value') + } + result = sub(formats.join(' '), ...get_metavar(action.nargs)) + } + return result + } + + _expand_help(action) { + let params = Object.assign({ prog: this._prog }, action) + for (let name of Object.keys(params)) { + if (params[name] === SUPPRESS) { + delete params[name] + } + } + for (let name of Object.keys(params)) { + if (params[name] && params[name].name) { + params[name] = params[name].name + } + } + if (params.choices !== undefined) { + let choices_str = _choices_to_array(params.choices).map(String).join(', ') + params.choices = choices_str + } + // LEGACY (v1 compatibility): camelcase + for (let key of Object.keys(params)) { + let old_name = _to_legacy_name(key) + if (old_name !== key) { + params[old_name] = params[key] + } + } + // end + return sub(this._get_help_string(action), params) + } + + * _iter_indented_subactions(action) { + if (typeof action._get_subactions === 'function') { + this._indent() + yield* action._get_subactions() + this._dedent() + } + } + + _split_lines(text, width) { + text = text.replace(this._whitespace_matcher, ' ').trim() + // The textwrap module is used only for formatting help. + // Delay its import for speeding up the common usage of argparse. + let textwrap = require('./lib/textwrap') + return textwrap.wrap(text, { width }) + } + + _fill_text(text, width, indent) { + text = text.replace(this._whitespace_matcher, ' ').trim() + let textwrap = require('./lib/textwrap') + return textwrap.fill(text, { width, + initial_indent: indent, + subsequent_indent: indent }) + } + + _get_help_string(action) { + return action.help + } + + _get_default_metavar_for_optional(action) { + return action.dest.toUpperCase() + } + + _get_default_metavar_for_positional(action) { + return action.dest + } +})) + +HelpFormatter.prototype._Section = _callable(class _Section { + + constructor(formatter, parent, heading = undefined) { + this.formatter = formatter + this.parent = parent + this.heading = heading + this.items = [] + } + + format_help() { + // format the indented section + if (this.parent !== undefined) { + this.formatter._indent() + } + let item_help = this.formatter._join_parts(this.items.map(([ func, args ]) => func.apply(null, args))) + if (this.parent !== undefined) { + this.formatter._dedent() + } + + // return nothing if the section was empty + if (!item_help) { + return '' + } + + // add the heading if the section was non-empty + let heading + if (this.heading !== SUPPRESS && this.heading !== undefined) { + let current_indent = this.formatter._current_indent + heading = sub('%*s%s:\n', current_indent, '', this.heading) + } else { + heading = '' + } + + // join the section-initial newline, the heading and the help + return this.formatter._join_parts(['\n', heading, item_help, '\n']) + } +}) + + +const RawDescriptionHelpFormatter = _camelcase_alias(_callable(class RawDescriptionHelpFormatter extends HelpFormatter { + /* + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _fill_text(text, width, indent) { + return splitlines(text, true).map(line => indent + line).join('') + } +})) + + +const RawTextHelpFormatter = _camelcase_alias(_callable(class RawTextHelpFormatter extends RawDescriptionHelpFormatter { + /* + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _split_lines(text/*, width*/) { + return splitlines(text) + } +})) + + +const ArgumentDefaultsHelpFormatter = _camelcase_alias(_callable(class ArgumentDefaultsHelpFormatter extends HelpFormatter { + /* + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_help_string(action) { + let help = action.help + // LEGACY (v1 compatibility): additional check for defaultValue needed + if (!action.help.includes('%(default)') && !action.help.includes('%(defaultValue)')) { + if (action.default !== SUPPRESS) { + let defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] + if (action.option_strings.length || defaulting_nargs.includes(action.nargs)) { + help += ' (default: %(default)s)' + } + } + } + return help + } +})) + + +const MetavarTypeHelpFormatter = _camelcase_alias(_callable(class MetavarTypeHelpFormatter extends HelpFormatter { + /* + * Help message formatter which uses the argument 'type' as the default + * metavar value (instead of the argument 'dest') + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_default_metavar_for_optional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } + + _get_default_metavar_for_positional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } +})) + + +// ===================== +// Options and Arguments +// ===================== +function _get_action_name(argument) { + if (argument === undefined) { + return undefined + } else if (argument.option_strings.length) { + return argument.option_strings.join('/') + } else if (![ undefined, SUPPRESS ].includes(argument.metavar)) { + return argument.metavar + } else if (![ undefined, SUPPRESS ].includes(argument.dest)) { + return argument.dest + } else { + return undefined + } +} + + +const ArgumentError = _callable(class ArgumentError extends Error { + /* + * An error from creating or using an argument (optional or positional). + * + * The string value of this exception is the message, augmented with + * information about the argument that caused it. + */ + + constructor(argument, message) { + super() + this.name = 'ArgumentError' + this._argument_name = _get_action_name(argument) + this._message = message + this.message = this.str() + } + + str() { + let format + if (this._argument_name === undefined) { + format = '%(message)s' + } else { + format = 'argument %(argument_name)s: %(message)s' + } + return sub(format, { message: this._message, + argument_name: this._argument_name }) + } +}) + + +const ArgumentTypeError = _callable(class ArgumentTypeError extends Error { + /* + * An error from trying to convert a command line string to a type. + */ + + constructor(message) { + super(message) + this.name = 'ArgumentTypeError' + } +}) + + +// ============== +// Action classes +// ============== +const Action = _camelcase_alias(_callable(class Action extends _AttributeHolder(Function) { + /* + * Information about how to convert command line strings to Python objects. + * + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the + * command line. The keyword arguments to the Action constructor are also + * all attributes of Action instances. + * + * Keyword Arguments: + * + * - option_strings -- A list of command-line option strings which + * should be associated with this action. + * + * - dest -- The name of the attribute to hold the created object(s) + * + * - nargs -- The number of command-line arguments that should be + * consumed. By default, one argument will be consumed and a single + * value will be produced. Other values include: + * - N (an integer) consumes N arguments (and produces a list) + * - '?' consumes zero or one arguments + * - '*' consumes zero or more arguments (and produces a list) + * - '+' consumes one or more arguments (and produces a list) + * Note that the difference between the default and nargs=1 is that + * with the default, a single value will be produced, while with + * nargs=1, a list containing a single value will be produced. + * + * - const -- The value to be produced if the option is specified and the + * option uses an action that takes no values. + * + * - default -- The value to be produced if the option is not specified. + * + * - type -- A callable that accepts a single string argument, and + * returns the converted value. The standard Python types str, int, + * float, and complex are useful examples of such callables. If None, + * str is used. + * + * - choices -- A container of values that should be allowed. If not None, + * after a command-line argument has been converted to the appropriate + * type, an exception will be raised if it is not a member of this + * collection. + * + * - required -- True if the action must always be specified at the + * command line. This is only meaningful for optional command-line + * arguments. + * + * - help -- The help string describing the argument. + * + * - metavar -- The name to be used for the option's argument with the + * help string. If None, the 'dest' value will be used as the name. + */ + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + this.option_strings = option_strings + this.dest = dest + this.nargs = nargs + this.const = const_value + this.default = default_value + this.type = type + this.choices = choices + this.required = required + this.help = help + this.metavar = metavar + } + + _get_kwargs() { + let names = [ + 'option_strings', + 'dest', + 'nargs', + 'const', + 'default', + 'type', + 'choices', + 'help', + 'metavar' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + format_usage() { + return this.option_strings[0] + } + + call(/*parser, namespace, values, option_string = undefined*/) { + throw new Error('.call() not defined') + } +})) + + +const BooleanOptionalAction = _camelcase_alias(_callable(class BooleanOptionalAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + let _option_strings = [] + for (let option_string of option_strings) { + _option_strings.push(option_string) + + if (option_string.startsWith('--')) { + option_string = '--no-' + option_string.slice(2) + _option_strings.push(option_string) + } + } + + if (help !== undefined && default_value !== undefined) { + help += ` (default: ${default_value})` + } + + super({ + option_strings: _option_strings, + dest, + nargs: 0, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values, option_string = undefined) { + if (this.option_strings.includes(option_string)) { + setattr(namespace, this.dest, !option_string.startsWith('--no-')) + } + } + + format_usage() { + return this.option_strings.join(' | ') + } +})) + + +const _StoreAction = _callable(class _StoreAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for store actions must be != 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + setattr(namespace, this.dest, values) + } +}) + + +const _StoreConstAction = _callable(class _StoreConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help + //, metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + setattr(namespace, this.dest, this.const) + } +}) + + +const _StoreTrueAction = _callable(class _StoreTrueAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: false, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: true, + default: default_value, + required, + help + }) + } +}) + + +const _StoreFalseAction = _callable(class _StoreFalseAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: true, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: false, + default: default_value, + required, + help + }) + } +}) + + +const _AppendAction = _callable(class _AppendAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for append actions must be != 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(values) + setattr(namespace, this.dest, items) + } +}) + + +const _AppendConstAction = _callable(class _AppendConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help, + metavar + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(this.const) + setattr(namespace, this.dest, items) + } +}) + + +const _CountAction = _callable(class _CountAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let count = getattr(namespace, this.dest, undefined) + if (count === undefined) { + count = 0 + } + setattr(namespace, this.dest, count + 1) + } +}) + + +const _HelpAction = _callable(class _HelpAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: SUPPRESS, + default: SUPPRESS, + help: undefined + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + } + + call(parser/*, namespace, values, option_string = undefined*/) { + parser.print_help() + parser.exit() + } +}) + + +const _VersionAction = _callable(class _VersionAction extends Action { + + constructor() { + let [ + option_strings, + version, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + version: undefined, + dest: SUPPRESS, + default: SUPPRESS, + help: "show program's version number and exit" + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + this.version = version + } + + call(parser/*, namespace, values, option_string = undefined*/) { + let version = this.version + if (version === undefined) { + version = parser.version + } + let formatter = parser._get_formatter() + formatter.add_text(version) + parser._print_message(formatter.format_help(), process.stdout) + parser.exit() + } +}) + + +const _SubParsersAction = _camelcase_alias(_callable(class _SubParsersAction extends Action { + + constructor() { + let [ + option_strings, + prog, + parser_class, + dest, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + prog: no_default, + parser_class: no_default, + dest: SUPPRESS, + required: false, + help: undefined, + metavar: undefined + }) + + let name_parser_map = {} + + super({ + option_strings, + dest, + nargs: PARSER, + choices: name_parser_map, + required, + help, + metavar + }) + + this._prog_prefix = prog + this._parser_class = parser_class + this._name_parser_map = name_parser_map + this._choices_actions = [] + } + + add_parser() { + let [ + name, + kwargs + ] = _parse_opts(arguments, { + name: no_default, + '**kwargs': no_default + }) + + // set prog from the existing prefix + if (kwargs.prog === undefined) { + kwargs.prog = sub('%s %s', this._prog_prefix, name) + } + + let aliases = getattr(kwargs, 'aliases', []) + delete kwargs.aliases + + // create a pseudo-action to hold the choice help + if ('help' in kwargs) { + let help = kwargs.help + delete kwargs.help + let choice_action = this._ChoicesPseudoAction(name, aliases, help) + this._choices_actions.push(choice_action) + } + + // create the parser and add it to the map + let parser = new this._parser_class(kwargs) + this._name_parser_map[name] = parser + + // make parser available under aliases also + for (let alias of aliases) { + this._name_parser_map[alias] = parser + } + + return parser + } + + _get_subactions() { + return this._choices_actions + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let parser_name = values[0] + let arg_strings = values.slice(1) + + // set the parser name if requested + if (this.dest !== SUPPRESS) { + setattr(namespace, this.dest, parser_name) + } + + // select the parser + if (hasattr(this._name_parser_map, parser_name)) { + parser = this._name_parser_map[parser_name] + } else { + let args = {parser_name, + choices: this._name_parser_map.join(', ')} + let msg = sub('unknown parser %(parser_name)r (choices: %(choices)s)', args) + throw new ArgumentError(this, msg) + } + + // parse all the remaining options into the namespace + // store any unrecognized options on the object, so that the top + // level parser can decide what to do with them + + // In case this subparser defines new defaults, we parse them + // in a new namespace object and then update the original + // namespace for the relevant parts. + let subnamespace + [ subnamespace, arg_strings ] = parser.parse_known_args(arg_strings, undefined) + for (let [ key, value ] of Object.entries(subnamespace)) { + setattr(namespace, key, value) + } + + if (arg_strings.length) { + setdefault(namespace, _UNRECOGNIZED_ARGS_ATTR, []) + getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).push(...arg_strings) + } + } +})) + + +_SubParsersAction.prototype._ChoicesPseudoAction = _callable(class _ChoicesPseudoAction extends Action { + constructor(name, aliases, help) { + let metavar = name, dest = name + if (aliases.length) { + metavar += sub(' (%s)', aliases.join(', ')) + } + super({ option_strings: [], dest, help, metavar }) + } +}) + + +const _ExtendAction = _callable(class _ExtendAction extends _AppendAction { + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items = items.concat(values) + setattr(namespace, this.dest, items) + } +}) + + +// ============== +// Type classes +// ============== +const FileType = _callable(class FileType extends Function { + /* + * Factory for creating file object types + * + * Instances of FileType are typically passed as type= arguments to the + * ArgumentParser add_argument() method. + * + * Keyword Arguments: + * - mode -- A string indicating how the file is to be opened. Accepts the + * same values as the builtin open() function. + * - bufsize -- The file's desired buffer size. Accepts the same values as + * the builtin open() function. + * - encoding -- The file's encoding. Accepts the same values as the + * builtin open() function. + * - errors -- A string indicating how encoding and decoding errors are to + * be handled. Accepts the same value as the builtin open() function. + */ + + constructor() { + let [ + flags, + encoding, + mode, + autoClose, + emitClose, + start, + end, + highWaterMark, + fs + ] = _parse_opts(arguments, { + flags: 'r', + encoding: undefined, + mode: undefined, // 0o666 + autoClose: undefined, // true + emitClose: undefined, // false + start: undefined, // 0 + end: undefined, // Infinity + highWaterMark: undefined, // 64 * 1024 + fs: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + Object.defineProperty(this, 'name', { + get() { + return sub('FileType(%r)', flags) + } + }) + this._flags = flags + this._options = {} + if (encoding !== undefined) this._options.encoding = encoding + if (mode !== undefined) this._options.mode = mode + if (autoClose !== undefined) this._options.autoClose = autoClose + if (emitClose !== undefined) this._options.emitClose = emitClose + if (start !== undefined) this._options.start = start + if (end !== undefined) this._options.end = end + if (highWaterMark !== undefined) this._options.highWaterMark = highWaterMark + if (fs !== undefined) this._options.fs = fs + } + + call(string) { + // the special argument "-" means sys.std{in,out} + if (string === '-') { + if (this._flags.includes('r')) { + return process.stdin + } else if (this._flags.includes('w')) { + return process.stdout + } else { + let msg = sub('argument "-" with mode %r', this._flags) + throw new TypeError(msg) + } + } + + // all other arguments are used as file names + let fd + try { + fd = fs.openSync(string, this._flags, this._options.mode) + } catch (e) { + let args = { filename: string, error: e.message } + let message = "can't open '%(filename)s': %(error)s" + throw new ArgumentTypeError(sub(message, args)) + } + + let options = Object.assign({ fd, flags: this._flags }, this._options) + if (this._flags.includes('r')) { + return fs.createReadStream(undefined, options) + } else if (this._flags.includes('w')) { + return fs.createWriteStream(undefined, options) + } else { + let msg = sub('argument "%s" with mode %r', string, this._flags) + throw new TypeError(msg) + } + } + + [util.inspect.custom]() { + let args = [ this._flags ] + let kwargs = Object.entries(this._options).map(([ k, v ]) => { + if (k === 'mode') v = { value: v, [util.inspect.custom]() { return '0o' + this.value.toString(8) } } + return [ k, v ] + }) + let args_str = [] + .concat(args.filter(arg => arg !== -1).map(repr)) + .concat(kwargs.filter(([/*kw*/, arg]) => arg !== undefined) + .map(([kw, arg]) => sub('%s=%r', kw, arg))) + .join(', ') + return sub('%s(%s)', this.constructor.name, args_str) + } + + toString() { + return this[util.inspect.custom]() + } +}) + +// =========================== +// Optional and Positional Parsing +// =========================== +const Namespace = _callable(class Namespace extends _AttributeHolder() { + /* + * Simple object for storing attributes. + * + * Implements equality by attribute names and values, and provides a simple + * string representation. + */ + + constructor(options = {}) { + super() + Object.assign(this, options) + } +}) + +// unset string tag to mimic plain object +Namespace.prototype[Symbol.toStringTag] = undefined + + +const _ActionsContainer = _camelcase_alias(_callable(class _ActionsContainer { + + constructor() { + let [ + description, + prefix_chars, + argument_default, + conflict_handler + ] = _parse_opts(arguments, { + description: no_default, + prefix_chars: no_default, + argument_default: no_default, + conflict_handler: no_default + }) + + this.description = description + this.argument_default = argument_default + this.prefix_chars = prefix_chars + this.conflict_handler = conflict_handler + + // set up registries + this._registries = {} + + // register actions + this.register('action', undefined, _StoreAction) + this.register('action', 'store', _StoreAction) + this.register('action', 'store_const', _StoreConstAction) + this.register('action', 'store_true', _StoreTrueAction) + this.register('action', 'store_false', _StoreFalseAction) + this.register('action', 'append', _AppendAction) + this.register('action', 'append_const', _AppendConstAction) + this.register('action', 'count', _CountAction) + this.register('action', 'help', _HelpAction) + this.register('action', 'version', _VersionAction) + this.register('action', 'parsers', _SubParsersAction) + this.register('action', 'extend', _ExtendAction) + // LEGACY (v1 compatibility): camelcase variants + ;[ 'storeConst', 'storeTrue', 'storeFalse', 'appendConst' ].forEach(old_name => { + let new_name = _to_new_name(old_name) + this.register('action', old_name, util.deprecate(this._registry_get('action', new_name), + sub('{action: "%s"} is renamed to {action: "%s"}', old_name, new_name))) + }) + // end + + // raise an exception if the conflict handler is invalid + this._get_handler() + + // action storage + this._actions = [] + this._option_string_actions = {} + + // groups + this._action_groups = [] + this._mutually_exclusive_groups = [] + + // defaults storage + this._defaults = {} + + // determines whether an "option" looks like a negative number + this._negative_number_matcher = /^-\d+$|^-\d*\.\d+$/ + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._has_negative_number_optionals = [] + } + + // ==================== + // Registration methods + // ==================== + register(registry_name, value, object) { + let registry = setdefault(this._registries, registry_name, {}) + registry[value] = object + } + + _registry_get(registry_name, value, default_value = undefined) { + return getattr(this._registries[registry_name], value, default_value) + } + + // ================================== + // Namespace default accessor methods + // ================================== + set_defaults(kwargs) { + Object.assign(this._defaults, kwargs) + + // if these defaults match any existing arguments, replace + // the previous default on the object with the new one + for (let action of this._actions) { + if (action.dest in kwargs) { + action.default = kwargs[action.dest] + } + } + } + + get_default(dest) { + for (let action of this._actions) { + if (action.dest === dest && action.default !== undefined) { + return action.default + } + } + return this._defaults[dest] + } + + + // ======================= + // Adding argument actions + // ======================= + add_argument() { + /* + * add_argument(dest, ..., name=value, ...) + * add_argument(option_string, option_string, ..., name=value, ...) + */ + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + // LEGACY (v1 compatibility), old-style add_argument([ args ], { options }) + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + deprecate('argument-array', + sub('use add_argument(%(args)s, {...}) instead of add_argument([ %(args)s ], { ... })', { + args: args.map(repr).join(', ') + })) + } + // end + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional + // argument + let chars = this.prefix_chars + if (!args.length || args.length === 1 && !chars.includes(args[0][0])) { + if (args.length && 'dest' in kwargs) { + throw new TypeError('dest supplied twice for positional argument') + } + kwargs = this._get_positional_kwargs(...args, kwargs) + + // otherwise, we're adding an optional argument + } else { + kwargs = this._get_optional_kwargs(...args, kwargs) + } + + // if no default was supplied, use the parser-level default + if (!('default' in kwargs)) { + let dest = kwargs.dest + if (dest in this._defaults) { + kwargs.default = this._defaults[dest] + } else if (this.argument_default !== undefined) { + kwargs.default = this.argument_default + } + } + + // create the action object, and add it to the parser + let action_class = this._pop_action_class(kwargs) + if (typeof action_class !== 'function') { + throw new TypeError(sub('unknown action "%s"', action_class)) + } + // eslint-disable-next-line new-cap + let action = new action_class(kwargs) + + // raise an error if the action type is not callable + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + throw new TypeError(sub('%r is not callable', type_func)) + } + + if (type_func === FileType) { + throw new TypeError(sub('%r is a FileType class object, instance of it' + + ' must be passed', type_func)) + } + + // raise an error if the metavar does not match the type + if ('_get_formatter' in this) { + try { + this._get_formatter()._format_args(action, undefined) + } catch (err) { + // check for 'invalid nargs value' is an artifact of TypeError and ValueError in js being the same + if (err instanceof TypeError && err.message !== 'invalid nargs value') { + throw new TypeError('length of metavar tuple does not match nargs') + } else { + throw err + } + } + } + + return this._add_action(action) + } + + add_argument_group() { + let group = _ArgumentGroup(this, ...arguments) + this._action_groups.push(group) + return group + } + + add_mutually_exclusive_group() { + // eslint-disable-next-line no-use-before-define + let group = _MutuallyExclusiveGroup(this, ...arguments) + this._mutually_exclusive_groups.push(group) + return group + } + + _add_action(action) { + // resolve any conflicts + this._check_conflict(action) + + // add to actions list + this._actions.push(action) + action.container = this + + // index the action by any option strings it has + for (let option_string of action.option_strings) { + this._option_string_actions[option_string] = action + } + + // set the flag if any option strings look like negative numbers + for (let option_string of action.option_strings) { + if (this._negative_number_matcher.test(option_string)) { + if (!this._has_negative_number_optionals.length) { + this._has_negative_number_optionals.push(true) + } + } + } + + // return the created action + return action + } + + _remove_action(action) { + _array_remove(this._actions, action) + } + + _add_container_actions(container) { + // collect groups by titles + let title_group_map = {} + for (let group of this._action_groups) { + if (group.title in title_group_map) { + let msg = 'cannot merge actions - two groups are named %r' + throw new TypeError(sub(msg, group.title)) + } + title_group_map[group.title] = group + } + + // map each action to its group + let group_map = new Map() + for (let group of container._action_groups) { + + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!(group.title in title_group_map)) { + title_group_map[group.title] = this.add_argument_group({ + title: group.title, + description: group.description, + conflict_handler: group.conflict_handler + }) + } + + // map the actions to their new group + for (let action of group._group_actions) { + group_map.set(action, title_group_map[group.title]) + } + } + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + for (let group of container._mutually_exclusive_groups) { + let mutex_group = this.add_mutually_exclusive_group({ + required: group.required + }) + + // map the actions to their new mutex group + for (let action of group._group_actions) { + group_map.set(action, mutex_group) + } + } + + // add all actions to this container or their group + for (let action of container._actions) { + group_map.get(action)._add_action(action) + } + } + + _get_positional_kwargs() { + let [ + dest, + kwargs + ] = _parse_opts(arguments, { + dest: no_default, + '**kwargs': no_default + }) + + // make sure required is not specified + if ('required' in kwargs) { + let msg = "'required' is an invalid argument for positionals" + throw new TypeError(msg) + } + + // mark positional arguments as required if at least one is + // always required + if (![OPTIONAL, ZERO_OR_MORE].includes(kwargs.nargs)) { + kwargs.required = true + } + if (kwargs.nargs === ZERO_OR_MORE && !('default' in kwargs)) { + kwargs.required = true + } + + // return the keyword arguments with no option strings + return Object.assign(kwargs, { dest, option_strings: [] }) + } + + _get_optional_kwargs() { + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + + // determine short and long option strings + let option_strings = [] + let long_option_strings = [] + let option_string + for (option_string of args) { + // error on strings that don't start with an appropriate prefix + if (!this.prefix_chars.includes(option_string[0])) { + let args = {option: option_string, + prefix_chars: this.prefix_chars} + let msg = 'invalid option string %(option)r: ' + + 'must start with a character %(prefix_chars)r' + throw new TypeError(sub(msg, args)) + } + + // strings starting with two prefix characters are long options + option_strings.push(option_string) + if (option_string.length > 1 && this.prefix_chars.includes(option_string[1])) { + long_option_strings.push(option_string) + } + } + + // infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + let dest = kwargs.dest + delete kwargs.dest + if (dest === undefined) { + let dest_option_string + if (long_option_strings.length) { + dest_option_string = long_option_strings[0] + } else { + dest_option_string = option_strings[0] + } + dest = _string_lstrip(dest_option_string, this.prefix_chars) + if (!dest) { + let msg = 'dest= is required for options like %r' + throw new TypeError(sub(msg, option_string)) + } + dest = dest.replace(/-/g, '_') + } + + // return the updated keyword arguments + return Object.assign(kwargs, { dest, option_strings }) + } + + _pop_action_class(kwargs, default_value = undefined) { + let action = getattr(kwargs, 'action', default_value) + delete kwargs.action + return this._registry_get('action', action, action) + } + + _get_handler() { + // determine function from conflict handler string + let handler_func_name = sub('_handle_conflict_%s', this.conflict_handler) + if (typeof this[handler_func_name] === 'function') { + return this[handler_func_name] + } else { + let msg = 'invalid conflict_resolution value: %r' + throw new TypeError(sub(msg, this.conflict_handler)) + } + } + + _check_conflict(action) { + + // find all options that conflict with this option + let confl_optionals = [] + for (let option_string of action.option_strings) { + if (hasattr(this._option_string_actions, option_string)) { + let confl_optional = this._option_string_actions[option_string] + confl_optionals.push([ option_string, confl_optional ]) + } + } + + // resolve any conflicts + if (confl_optionals.length) { + let conflict_handler = this._get_handler() + conflict_handler.call(this, action, confl_optionals) + } + } + + _handle_conflict_error(action, conflicting_actions) { + let message = conflicting_actions.length === 1 ? + 'conflicting option string: %s' : + 'conflicting option strings: %s' + let conflict_string = conflicting_actions.map(([ option_string/*, action*/ ]) => option_string).join(', ') + throw new ArgumentError(action, sub(message, conflict_string)) + } + + _handle_conflict_resolve(action, conflicting_actions) { + + // remove all conflicting options + for (let [ option_string, action ] of conflicting_actions) { + + // remove the conflicting option + _array_remove(action.option_strings, option_string) + delete this._option_string_actions[option_string] + + // if the option now has no option string, remove it from the + // container holding it + if (!action.option_strings.length) { + action.container._remove_action(action) + } + } + } +})) + + +const _ArgumentGroup = _callable(class _ArgumentGroup extends _ActionsContainer { + + constructor() { + let [ + container, + title, + description, + kwargs + ] = _parse_opts(arguments, { + container: no_default, + title: undefined, + description: undefined, + '**kwargs': no_default + }) + + // add any missing keyword arguments by checking the container + setdefault(kwargs, 'conflict_handler', container.conflict_handler) + setdefault(kwargs, 'prefix_chars', container.prefix_chars) + setdefault(kwargs, 'argument_default', container.argument_default) + super(Object.assign({ description }, kwargs)) + + // group attributes + this.title = title + this._group_actions = [] + + // share most attributes with the container + this._registries = container._registries + this._actions = container._actions + this._option_string_actions = container._option_string_actions + this._defaults = container._defaults + this._has_negative_number_optionals = + container._has_negative_number_optionals + this._mutually_exclusive_groups = container._mutually_exclusive_groups + } + + _add_action(action) { + action = super._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + super._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const _MutuallyExclusiveGroup = _callable(class _MutuallyExclusiveGroup extends _ArgumentGroup { + + constructor() { + let [ + container, + required + ] = _parse_opts(arguments, { + container: no_default, + required: false + }) + + super(container) + this.required = required + this._container = container + } + + _add_action(action) { + if (action.required) { + let msg = 'mutually exclusive arguments must be optional' + throw new TypeError(msg) + } + action = this._container._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + this._container._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const ArgumentParser = _camelcase_alias(_callable(class ArgumentParser extends _AttributeHolder(_ActionsContainer) { + /* + * Object for parsing command line strings into Python objects. + * + * Keyword Arguments: + * - prog -- The name of the program (default: sys.argv[0]) + * - usage -- A usage message (default: auto-generated from arguments) + * - description -- A description of what the program does + * - epilog -- Text following the argument descriptions + * - parents -- Parsers whose arguments should be copied into this one + * - formatter_class -- HelpFormatter class for printing help messages + * - prefix_chars -- Characters that prefix optional arguments + * - fromfile_prefix_chars -- Characters that prefix files containing + * additional arguments + * - argument_default -- The default value for all arguments + * - conflict_handler -- String indicating how to handle conflicts + * - add_help -- Add a -h/-help option + * - allow_abbrev -- Allow long options to be abbreviated unambiguously + * - exit_on_error -- Determines whether or not ArgumentParser exits with + * error info when an error occurs + */ + + constructor() { + let [ + prog, + usage, + description, + epilog, + parents, + formatter_class, + prefix_chars, + fromfile_prefix_chars, + argument_default, + conflict_handler, + add_help, + allow_abbrev, + exit_on_error, + debug, // LEGACY (v1 compatibility), debug mode + version // LEGACY (v1 compatibility), version + ] = _parse_opts(arguments, { + prog: undefined, + usage: undefined, + description: undefined, + epilog: undefined, + parents: [], + formatter_class: HelpFormatter, + prefix_chars: '-', + fromfile_prefix_chars: undefined, + argument_default: undefined, + conflict_handler: 'error', + add_help: true, + allow_abbrev: true, + exit_on_error: true, + debug: undefined, // LEGACY (v1 compatibility), debug mode + version: undefined // LEGACY (v1 compatibility), version + }) + + // LEGACY (v1 compatibility) + if (debug !== undefined) { + deprecate('debug', + 'The "debug" argument to ArgumentParser is deprecated. Please ' + + 'override ArgumentParser.exit function instead.' + ) + } + + if (version !== undefined) { + deprecate('version', + 'The "version" argument to ArgumentParser is deprecated. Please use ' + + "add_argument(..., { action: 'version', version: 'N', ... }) instead." + ) + } + // end + + super({ + description, + prefix_chars, + argument_default, + conflict_handler + }) + + // default setting for prog + if (prog === undefined) { + prog = path.basename(get_argv()[0] || '') + } + + this.prog = prog + this.usage = usage + this.epilog = epilog + this.formatter_class = formatter_class + this.fromfile_prefix_chars = fromfile_prefix_chars + this.add_help = add_help + this.allow_abbrev = allow_abbrev + this.exit_on_error = exit_on_error + // LEGACY (v1 compatibility), debug mode + this.debug = debug + // end + + this._positionals = this.add_argument_group('positional arguments') + this._optionals = this.add_argument_group('optional arguments') + this._subparsers = undefined + + // register types + function identity(string) { + return string + } + this.register('type', undefined, identity) + this.register('type', null, identity) + this.register('type', 'auto', identity) + this.register('type', 'int', function (x) { + let result = Number(x) + if (!Number.isInteger(result)) { + throw new TypeError(sub('could not convert string to int: %r', x)) + } + return result + }) + this.register('type', 'float', function (x) { + let result = Number(x) + if (isNaN(result)) { + throw new TypeError(sub('could not convert string to float: %r', x)) + } + return result + }) + this.register('type', 'str', String) + // LEGACY (v1 compatibility): custom types + this.register('type', 'string', + util.deprecate(String, 'use {type:"str"} or {type:String} instead of {type:"string"}')) + // end + + // add help argument if necessary + // (using explicit default to override global argument_default) + let default_prefix = prefix_chars.includes('-') ? '-' : prefix_chars[0] + if (this.add_help) { + this.add_argument( + default_prefix + 'h', + default_prefix.repeat(2) + 'help', + { + action: 'help', + default: SUPPRESS, + help: 'show this help message and exit' + } + ) + } + // LEGACY (v1 compatibility), version + if (version) { + this.add_argument( + default_prefix + 'v', + default_prefix.repeat(2) + 'version', + { + action: 'version', + default: SUPPRESS, + version: this.version, + help: "show program's version number and exit" + } + ) + } + // end + + // add parent arguments and defaults + for (let parent of parents) { + this._add_container_actions(parent) + Object.assign(this._defaults, parent._defaults) + } + } + + // ======================= + // Pretty __repr__ methods + // ======================= + _get_kwargs() { + let names = [ + 'prog', + 'usage', + 'description', + 'formatter_class', + 'conflict_handler', + 'add_help' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + // ================================== + // Optional/Positional adding methods + // ================================== + add_subparsers() { + let [ + kwargs + ] = _parse_opts(arguments, { + '**kwargs': no_default + }) + + if (this._subparsers !== undefined) { + this.error('cannot have multiple subparser arguments') + } + + // add the parser class to the arguments if it's not present + setdefault(kwargs, 'parser_class', this.constructor) + + if ('title' in kwargs || 'description' in kwargs) { + let title = getattr(kwargs, 'title', 'subcommands') + let description = getattr(kwargs, 'description', undefined) + delete kwargs.title + delete kwargs.description + this._subparsers = this.add_argument_group(title, description) + } else { + this._subparsers = this._positionals + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (kwargs.prog === undefined) { + let formatter = this._get_formatter() + let positionals = this._get_positional_actions() + let groups = this._mutually_exclusive_groups + formatter.add_usage(this.usage, positionals, groups, '') + kwargs.prog = formatter.format_help().trim() + } + + // create the parsers action and add it to the positionals list + let parsers_class = this._pop_action_class(kwargs, 'parsers') + // eslint-disable-next-line new-cap + let action = new parsers_class(Object.assign({ option_strings: [] }, kwargs)) + this._subparsers._add_action(action) + + // return the created parsers action + return action + } + + _add_action(action) { + if (action.option_strings.length) { + this._optionals._add_action(action) + } else { + this._positionals._add_action(action) + } + return action + } + + _get_optional_actions() { + return this._actions.filter(action => action.option_strings.length) + } + + _get_positional_actions() { + return this._actions.filter(action => !action.option_strings.length) + } + + // ===================================== + // Command line argument parsing methods + // ===================================== + parse_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_args(args, namespace) + if (argv && argv.length > 0) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_args(args = undefined, namespace = undefined) { + if (args === undefined) { + args = get_argv().slice(1) + } + + // default Namespace built from parser defaults + if (namespace === undefined) { + namespace = new Namespace() + } + + // add any action defaults that aren't present + for (let action of this._actions) { + if (action.dest !== SUPPRESS) { + if (!hasattr(namespace, action.dest)) { + if (action.default !== SUPPRESS) { + setattr(namespace, action.dest, action.default) + } + } + } + } + + // add any parser defaults that aren't present + for (let dest of Object.keys(this._defaults)) { + if (!hasattr(namespace, dest)) { + setattr(namespace, dest, this._defaults[dest]) + } + } + + // parse the arguments and exit if there are any errors + if (this.exit_on_error) { + try { + [ namespace, args ] = this._parse_known_args(args, namespace) + } catch (err) { + if (err instanceof ArgumentError) { + this.error(err.message) + } else { + throw err + } + } + } else { + [ namespace, args ] = this._parse_known_args(args, namespace) + } + + if (hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) { + args = args.concat(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) + delattr(namespace, _UNRECOGNIZED_ARGS_ATTR) + } + + return [ namespace, args ] + } + + _parse_known_args(arg_strings, namespace) { + // replace arg strings that are file references + if (this.fromfile_prefix_chars !== undefined) { + arg_strings = this._read_args_from_files(arg_strings) + } + + // map all mutually exclusive arguments to the other arguments + // they can't occur with + let action_conflicts = new Map() + for (let mutex_group of this._mutually_exclusive_groups) { + let group_actions = mutex_group._group_actions + for (let [ i, mutex_action ] of Object.entries(mutex_group._group_actions)) { + let conflicts = action_conflicts.get(mutex_action) || [] + conflicts = conflicts.concat(group_actions.slice(0, +i)) + conflicts = conflicts.concat(group_actions.slice(+i + 1)) + action_conflicts.set(mutex_action, conflicts) + } + } + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + let option_string_indices = {} + let arg_string_pattern_parts = [] + let arg_strings_iter = Object.entries(arg_strings)[Symbol.iterator]() + for (let [ i, arg_string ] of arg_strings_iter) { + + // all args after -- are non-options + if (arg_string === '--') { + arg_string_pattern_parts.push('-') + for ([ i, arg_string ] of arg_strings_iter) { + arg_string_pattern_parts.push('A') + } + + // otherwise, add the arg to the arg strings + // and note the index if it was an option + } else { + let option_tuple = this._parse_optional(arg_string) + let pattern + if (option_tuple === undefined) { + pattern = 'A' + } else { + option_string_indices[i] = option_tuple + pattern = 'O' + } + arg_string_pattern_parts.push(pattern) + } + } + + // join the pieces together to form the pattern + let arg_strings_pattern = arg_string_pattern_parts.join('') + + // converts arg strings to the appropriate and then takes the action + let seen_actions = new Set() + let seen_non_default_actions = new Set() + let extras + + let take_action = (action, argument_strings, option_string = undefined) => { + seen_actions.add(action) + let argument_values = this._get_values(action, argument_strings) + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argument_values !== action.default) { + seen_non_default_actions.add(action) + for (let conflict_action of action_conflicts.get(action) || []) { + if (seen_non_default_actions.has(conflict_action)) { + let msg = 'not allowed with argument %s' + let action_name = _get_action_name(conflict_action) + throw new ArgumentError(action, sub(msg, action_name)) + } + } + } + + // take the action if we didn't receive a SUPPRESS value + // (e.g. from a default) + if (argument_values !== SUPPRESS) { + action(this, namespace, argument_values, option_string) + } + } + + // function to convert arg_strings into an optional action + let consume_optional = start_index => { + + // get the optional identified at this index + let option_tuple = option_string_indices[start_index] + let [ action, option_string, explicit_arg ] = option_tuple + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + let action_tuples = [] + let stop + for (;;) { + + // if we found no optional action, skip it + if (action === undefined) { + extras.push(arg_strings[start_index]) + return start_index + 1 + } + + // if there is an explicit argument, try to match the + // optional's string arguments to only this + if (explicit_arg !== undefined) { + let arg_count = this._match_argument(action, 'A') + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + let chars = this.prefix_chars + if (arg_count === 0 && !chars.includes(option_string[1])) { + action_tuples.push([ action, [], option_string ]) + let char = option_string[0] + option_string = char + explicit_arg[0] + let new_explicit_arg = explicit_arg.slice(1) || undefined + let optionals_map = this._option_string_actions + if (hasattr(optionals_map, option_string)) { + action = optionals_map[option_string] + explicit_arg = new_explicit_arg + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + } else if (arg_count === 1) { + stop = start_index + 1 + let args = [ explicit_arg ] + action_tuples.push([ action, args, option_string ]) + break + + // error if a double-dash option did not use the + // explicit argument + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + } else { + let start = start_index + 1 + let selected_patterns = arg_strings_pattern.slice(start) + let arg_count = this._match_argument(action, selected_patterns) + stop = start + arg_count + let args = arg_strings.slice(start, stop) + action_tuples.push([ action, args, option_string ]) + break + } + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + assert(action_tuples.length) + for (let [ action, args, option_string ] of action_tuples) { + take_action(action, args, option_string) + } + return stop + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + let positionals = this._get_positional_actions() + + // function to convert arg_strings into positional actions + let consume_positionals = start_index => { + // match as many Positionals as possible + let selected_pattern = arg_strings_pattern.slice(start_index) + let arg_counts = this._match_arguments_partial(positionals, selected_pattern) + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (let i = 0; i < positionals.length && i < arg_counts.length; i++) { + let action = positionals[i] + let arg_count = arg_counts[i] + let args = arg_strings.slice(start_index, start_index + arg_count) + start_index += arg_count + take_action(action, args) + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(arg_counts.length) + return start_index + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + extras = [] + let start_index = 0 + let max_option_string_index = Math.max(-1, ...Object.keys(option_string_indices).map(Number)) + while (start_index <= max_option_string_index) { + + // consume any Positionals preceding the next option + let next_option_string_index = Math.min( + // eslint-disable-next-line no-loop-func + ...Object.keys(option_string_indices).map(Number).filter(index => index >= start_index) + ) + if (start_index !== next_option_string_index) { + let positionals_end_index = consume_positionals(start_index) + + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionals_end_index > start_index) { + start_index = positionals_end_index + continue + } else { + start_index = positionals_end_index + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!(start_index in option_string_indices)) { + let strings = arg_strings.slice(start_index, next_option_string_index) + extras = extras.concat(strings) + start_index = next_option_string_index + } + + // consume the next optional and any arguments for it + start_index = consume_optional(start_index) + } + + // consume any positionals following the last Optional + let stop_index = consume_positionals(start_index) + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(arg_strings.slice(stop_index)) + + // make sure all required actions were present and also convert + // action defaults which were not given as arguments + let required_actions = [] + for (let action of this._actions) { + if (!seen_actions.has(action)) { + if (action.required) { + required_actions.push(_get_action_name(action)) + } else { + // Convert action default now instead of doing it before + // parsing arguments to avoid calling convert functions + // twice (which may fail) if the argument was given, but + // only if it was defined already in the namespace + if (action.default !== undefined && + typeof action.default === 'string' && + hasattr(namespace, action.dest) && + action.default === getattr(namespace, action.dest)) { + setattr(namespace, action.dest, + this._get_value(action, action.default)) + } + } + } + } + + if (required_actions.length) { + this.error(sub('the following arguments are required: %s', + required_actions.join(', '))) + } + + // make sure all required groups had one option present + for (let group of this._mutually_exclusive_groups) { + if (group.required) { + let no_actions_used = true + for (let action of group._group_actions) { + if (seen_non_default_actions.has(action)) { + no_actions_used = false + break + } + } + + // if no actions were used, report the error + if (no_actions_used) { + let names = group._group_actions + .filter(action => action.help !== SUPPRESS) + .map(action => _get_action_name(action)) + let msg = 'one of the arguments %s is required' + this.error(sub(msg, names.join(' '))) + } + } + } + + // return the updated namespace and the extra arguments + return [ namespace, extras ] + } + + _read_args_from_files(arg_strings) { + // expand arguments referencing files + let new_arg_strings = [] + for (let arg_string of arg_strings) { + + // for regular arguments, just add them back into the list + if (!arg_string || !this.fromfile_prefix_chars.includes(arg_string[0])) { + new_arg_strings.push(arg_string) + + // replace arguments referencing files with the file content + } else { + try { + let args_file = fs.readFileSync(arg_string.slice(1), 'utf8') + let arg_strings = [] + for (let arg_line of splitlines(args_file)) { + for (let arg of this.convert_arg_line_to_args(arg_line)) { + arg_strings.push(arg) + } + } + arg_strings = this._read_args_from_files(arg_strings) + new_arg_strings = new_arg_strings.concat(arg_strings) + } catch (err) { + this.error(err.message) + } + } + } + + // return the modified argument list + return new_arg_strings + } + + convert_arg_line_to_args(arg_line) { + return [arg_line] + } + + _match_argument(action, arg_strings_pattern) { + // match the pattern for this action to the arg strings + let nargs_pattern = this._get_nargs_pattern(action) + let match = arg_strings_pattern.match(new RegExp('^' + nargs_pattern)) + + // raise an exception if we weren't able to find a match + if (match === null) { + let nargs_errors = { + undefined: 'expected one argument', + [OPTIONAL]: 'expected at most one argument', + [ONE_OR_MORE]: 'expected at least one argument' + } + let msg = nargs_errors[action.nargs] + if (msg === undefined) { + msg = sub(action.nargs === 1 ? 'expected %s argument' : 'expected %s arguments', action.nargs) + } + throw new ArgumentError(action, msg) + } + + // return the number of arguments matched + return match[1].length + } + + _match_arguments_partial(actions, arg_strings_pattern) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + let result = [] + for (let i of range(actions.length, 0, -1)) { + let actions_slice = actions.slice(0, i) + let pattern = actions_slice.map(action => this._get_nargs_pattern(action)).join('') + let match = arg_strings_pattern.match(new RegExp('^' + pattern)) + if (match !== null) { + result = result.concat(match.slice(1).map(string => string.length)) + break + } + } + + // return the list of arg string counts + return result + } + + _parse_optional(arg_string) { + // if it's an empty string, it was meant to be a positional + if (!arg_string) { + return undefined + } + + // if it doesn't start with a prefix, it was meant to be positional + if (!this.prefix_chars.includes(arg_string[0])) { + return undefined + } + + // if the option string is present in the parser, return the action + if (arg_string in this._option_string_actions) { + let action = this._option_string_actions[arg_string] + return [ action, arg_string, undefined ] + } + + // if it's just a single character, it was meant to be positional + if (arg_string.length === 1) { + return undefined + } + + // if the option string before the "=" is present, return the action + if (arg_string.includes('=')) { + let [ option_string, explicit_arg ] = _string_split(arg_string, '=', 1) + if (option_string in this._option_string_actions) { + let action = this._option_string_actions[option_string] + return [ action, option_string, explicit_arg ] + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + let option_tuples = this._get_option_tuples(arg_string) + + // if multiple actions match, the option string was ambiguous + if (option_tuples.length > 1) { + let options = option_tuples.map(([ /*action*/, option_string/*, explicit_arg*/ ]) => option_string).join(', ') + let args = {option: arg_string, matches: options} + let msg = 'ambiguous option: %(option)s could match %(matches)s' + this.error(sub(msg, args)) + + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (option_tuples.length === 1) { + let [ option_tuple ] = option_tuples + return option_tuple + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (this._negative_number_matcher.test(arg_string)) { + if (!this._has_negative_number_optionals.length) { + return undefined + } + } + + // if it contains a space, it was meant to be a positional + if (arg_string.includes(' ')) { + return undefined + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ undefined, arg_string, undefined ] + } + + _get_option_tuples(option_string) { + let result = [] + + // option strings starting with two prefix characters are only + // split at the '=' + let chars = this.prefix_chars + if (chars.includes(option_string[0]) && chars.includes(option_string[1])) { + if (this.allow_abbrev) { + let option_prefix, explicit_arg + if (option_string.includes('=')) { + [ option_prefix, explicit_arg ] = _string_split(option_string, '=', 1) + } else { + option_prefix = option_string + explicit_arg = undefined + } + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.includes(option_string[0]) && !chars.includes(option_string[1])) { + let option_prefix = option_string + let explicit_arg = undefined + let short_option_prefix = option_string.slice(0, 2) + let short_explicit_arg = option_string.slice(2) + + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string === short_option_prefix) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, short_explicit_arg ] + result.push(tup) + } else if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + + // shouldn't ever get here + } else { + this.error(sub('unexpected option string: %s', option_string)) + } + + // return the collected option tuples + return result + } + + _get_nargs_pattern(action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + let nargs = action.nargs + let nargs_pattern + + // the default (None) is assumed to be a single argument + if (nargs === undefined) { + nargs_pattern = '(-*A-*)' + + // allow zero or one arguments + } else if (nargs === OPTIONAL) { + nargs_pattern = '(-*A?-*)' + + // allow zero or more arguments + } else if (nargs === ZERO_OR_MORE) { + nargs_pattern = '(-*[A-]*)' + + // allow one or more arguments + } else if (nargs === ONE_OR_MORE) { + nargs_pattern = '(-*A[A-]*)' + + // allow any number of options or arguments + } else if (nargs === REMAINDER) { + nargs_pattern = '([-AO]*)' + + // allow one argument followed by any number of options or arguments + } else if (nargs === PARSER) { + nargs_pattern = '(-*A[-AO]*)' + + // suppress action, like nargs=0 + } else if (nargs === SUPPRESS) { + nargs_pattern = '(-*-*)' + + // all others should be integers + } else { + nargs_pattern = sub('(-*%s-*)', 'A'.repeat(nargs).split('').join('-*')) + } + + // if this is an optional action, -- is not allowed + if (action.option_strings.length) { + nargs_pattern = nargs_pattern.replace(/-\*/g, '') + nargs_pattern = nargs_pattern.replace(/-/g, '') + } + + // return the pattern + return nargs_pattern + } + + // ======================== + // Alt command line argument parsing, allowing free intermix + // ======================== + + parse_intermixed_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_intermixed_args(args, namespace) + if (argv.length) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_intermixed_args(args = undefined, namespace = undefined) { + // returns a namespace and list of extras + // + // positional can be freely intermixed with optionals. optionals are + // first parsed with all positional arguments deactivated. The 'extras' + // are then parsed. If the parser definition is incompatible with the + // intermixed assumptions (e.g. use of REMAINDER, subparsers) a + // TypeError is raised. + // + // positionals are 'deactivated' by setting nargs and default to + // SUPPRESS. This blocks the addition of that positional to the + // namespace + + let extras + let positionals = this._get_positional_actions() + let a = positionals.filter(action => [ PARSER, REMAINDER ].includes(action.nargs)) + if (a.length) { + throw new TypeError(sub('parse_intermixed_args: positional arg' + + ' with nargs=%s', a[0].nargs)) + } + + for (let group of this._mutually_exclusive_groups) { + for (let action of group._group_actions) { + if (positionals.includes(action)) { + throw new TypeError('parse_intermixed_args: positional in' + + ' mutuallyExclusiveGroup') + } + } + } + + let save_usage + try { + save_usage = this.usage + let remaining_args + try { + if (this.usage === undefined) { + // capture the full usage for use in error messages + this.usage = this.format_usage().slice(7) + } + for (let action of positionals) { + // deactivate positionals + action.save_nargs = action.nargs + // action.nargs = 0 + action.nargs = SUPPRESS + action.save_default = action.default + action.default = SUPPRESS + } + [ namespace, remaining_args ] = this.parse_known_args(args, + namespace) + for (let action of positionals) { + // remove the empty positional values from namespace + let attr = getattr(namespace, action.dest) + if (Array.isArray(attr) && attr.length === 0) { + // eslint-disable-next-line no-console + console.warn(sub('Do not expect %s in %s', action.dest, namespace)) + delattr(namespace, action.dest) + } + } + } finally { + // restore nargs and usage before exiting + for (let action of positionals) { + action.nargs = action.save_nargs + action.default = action.save_default + } + } + let optionals = this._get_optional_actions() + try { + // parse positionals. optionals aren't normally required, but + // they could be, so make sure they aren't. + for (let action of optionals) { + action.save_required = action.required + action.required = false + } + for (let group of this._mutually_exclusive_groups) { + group.save_required = group.required + group.required = false + } + [ namespace, extras ] = this.parse_known_args(remaining_args, + namespace) + } finally { + // restore parser values before exiting + for (let action of optionals) { + action.required = action.save_required + } + for (let group of this._mutually_exclusive_groups) { + group.required = group.save_required + } + } + } finally { + this.usage = save_usage + } + return [ namespace, extras ] + } + + // ======================== + // Value conversion methods + // ======================== + _get_values(action, arg_strings) { + // for everything but PARSER, REMAINDER args, strip out first '--' + if (![PARSER, REMAINDER].includes(action.nargs)) { + try { + _array_remove(arg_strings, '--') + } catch (err) {} + } + + let value + // optional argument produces a default when not present + if (!arg_strings.length && action.nargs === OPTIONAL) { + if (action.option_strings.length) { + value = action.const + } else { + value = action.default + } + if (typeof value === 'string') { + value = this._get_value(action, value) + this._check_value(action, value) + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (!arg_strings.length && action.nargs === ZERO_OR_MORE && + !action.option_strings.length) { + if (action.default !== undefined) { + value = action.default + } else { + value = arg_strings + } + this._check_value(action, value) + + // single argument or optional argument produces a single value + } else if (arg_strings.length === 1 && [undefined, OPTIONAL].includes(action.nargs)) { + let arg_string = arg_strings[0] + value = this._get_value(action, arg_string) + this._check_value(action, value) + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === REMAINDER) { + value = arg_strings.map(v => this._get_value(action, v)) + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === PARSER) { + value = arg_strings.map(v => this._get_value(action, v)) + this._check_value(action, value[0]) + + // SUPPRESS argument does not put anything in the namespace + } else if (action.nargs === SUPPRESS) { + value = SUPPRESS + + // all other types of nargs produce a list + } else { + value = arg_strings.map(v => this._get_value(action, v)) + for (let v of value) { + this._check_value(action, v) + } + } + + // return the converted value + return value + } + + _get_value(action, arg_string) { + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + let msg = '%r is not callable' + throw new ArgumentError(action, sub(msg, type_func)) + } + + // convert the value to the appropriate type + let result + try { + try { + result = type_func(arg_string) + } catch (err) { + // Dear TC39, why would you ever consider making es6 classes not callable? + // We had one universal interface, [[Call]], which worked for anything + // (with familiar this-instanceof guard for classes). Now we have two. + if (err instanceof TypeError && + /Class constructor .* cannot be invoked without 'new'/.test(err.message)) { + // eslint-disable-next-line new-cap + result = new type_func(arg_string) + } else { + throw err + } + } + + } catch (err) { + // ArgumentTypeErrors indicate errors + if (err instanceof ArgumentTypeError) { + //let name = getattr(action.type, 'name', repr(action.type)) + let msg = err.message + throw new ArgumentError(action, msg) + + // TypeErrors or ValueErrors also indicate errors + } else if (err instanceof TypeError) { + let name = getattr(action.type, 'name', repr(action.type)) + let args = {type: name, value: arg_string} + let msg = 'invalid %(type)s value: %(value)r' + throw new ArgumentError(action, sub(msg, args)) + } else { + throw err + } + } + + // return the converted value + return result + } + + _check_value(action, value) { + // converted value must be one of the choices (if specified) + if (action.choices !== undefined && !_choices_to_array(action.choices).includes(value)) { + let args = {value, + choices: _choices_to_array(action.choices).map(repr).join(', ')} + let msg = 'invalid choice: %(value)r (choose from %(choices)s)' + throw new ArgumentError(action, sub(msg, args)) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_usage() { + let formatter = this._get_formatter() + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + return formatter.format_help() + } + + format_help() { + let formatter = this._get_formatter() + + // usage + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + + // description + formatter.add_text(this.description) + + // positionals, optionals and user-defined groups + for (let action_group of this._action_groups) { + formatter.start_section(action_group.title) + formatter.add_text(action_group.description) + formatter.add_arguments(action_group._group_actions) + formatter.end_section() + } + + // epilog + formatter.add_text(this.epilog) + + // determine help from format above + return formatter.format_help() + } + + _get_formatter() { + // eslint-disable-next-line new-cap + return new this.formatter_class({ prog: this.prog }) + } + + // ===================== + // Help-printing methods + // ===================== + print_usage(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_usage(), file) + } + + print_help(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_help(), file) + } + + _print_message(message, file = undefined) { + if (message) { + if (file === undefined) file = process.stderr + file.write(message) + } + } + + // =============== + // Exiting methods + // =============== + exit(status = 0, message = undefined) { + if (message) { + this._print_message(message, process.stderr) + } + process.exit(status) + } + + error(message) { + /* + * error(message: string) + * + * Prints a usage message incorporating the message to stderr and + * exits. + * + * If you override this in a subclass, it should not return -- it + * should either exit or raise an exception. + */ + + // LEGACY (v1 compatibility), debug mode + if (this.debug === true) throw new Error(message) + // end + this.print_usage(process.stderr) + let args = {prog: this.prog, message: message} + this.exit(2, sub('%(prog)s: error: %(message)s\n', args)) + } +})) + + +module.exports = { + ArgumentParser, + ArgumentError, + ArgumentTypeError, + BooleanOptionalAction, + FileType, + HelpFormatter, + ArgumentDefaultsHelpFormatter, + RawDescriptionHelpFormatter, + RawTextHelpFormatter, + MetavarTypeHelpFormatter, + Namespace, + Action, + ONE_OR_MORE, + OPTIONAL, + PARSER, + REMAINDER, + SUPPRESS, + ZERO_OR_MORE +} + +// LEGACY (v1 compatibility), Const alias +Object.defineProperty(module.exports, 'Const', { + get() { + let result = {} + Object.entries({ ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('use argparse.%s instead of argparse.Const.%s', n, n)) + return v + } + }) + }) + Object.entries({ _UNRECOGNIZED_ARGS_ATTR }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('argparse.Const.%s is an internal symbol and will no longer be available', n)) + return v + } + }) + }) + return result + }, + enumerable: false +}) +// end diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/lib/sub.js b/node_modules/@eslint/eslintrc/node_modules/argparse/lib/sub.js new file mode 100644 index 000000000..e3eb3215f --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/lib/sub.js @@ -0,0 +1,67 @@ +// Limited implementation of python % string operator, supports only %s and %r for now +// (other formats are not used here, but may appear in custom templates) + +'use strict' + +const { inspect } = require('util') + + +module.exports = function sub(pattern, ...values) { + let regex = /%(?:(%)|(-)?(\*)?(?:\((\w+)\))?([A-Za-z]))/g + + let result = pattern.replace(regex, function (_, is_literal, is_left_align, is_padded, name, format) { + if (is_literal) return '%' + + let padded_count = 0 + if (is_padded) { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + padded_count = values.shift() + if (!Number.isInteger(padded_count)) throw new TypeError('* wants int') + } + + let str + if (name !== undefined) { + let dict = values[0] + if (typeof dict !== 'object' || dict === null) throw new TypeError('format requires a mapping') + if (!(name in dict)) throw new TypeError(`no such key: '${name}'`) + str = dict[name] + } else { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + str = values.shift() + } + + switch (format) { + case 's': + str = String(str) + break + case 'r': + str = inspect(str) + break + case 'd': + case 'i': + if (typeof str !== 'number') { + throw new TypeError(`%${format} format: a number is required, not ${typeof str}`) + } + str = String(str.toFixed(0)) + break + default: + throw new TypeError(`unsupported format character '${format}'`) + } + + if (padded_count > 0) { + return is_left_align ? str.padEnd(padded_count) : str.padStart(padded_count) + } else { + return str + } + }) + + if (values.length) { + if (values.length === 1 && typeof values[0] === 'object' && values[0] !== null) { + // mapping + } else { + throw new TypeError('not all arguments converted during string formatting') + } + } + + return result +} diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/lib/textwrap.js b/node_modules/@eslint/eslintrc/node_modules/argparse/lib/textwrap.js new file mode 100644 index 000000000..23d51cdb9 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/lib/textwrap.js @@ -0,0 +1,440 @@ +// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions): +// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py + +'use strict' + +/* + * Text wrapping and filling. + */ + +// Copyright (C) 1999-2001 Gregory P. Ward. +// Copyright (C) 2002, 2003 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors +// Originally written by Greg Ward + +// Hardcode the recognized whitespace characters to the US-ASCII +// whitespace characters. The main reason for doing this is that +// some Unicode spaces (like \u00a0) are non-breaking whitespaces. +// +// This less funky little regex just split on recognized spaces. E.g. +// "Hello there -- you goof-ball, use the -b option!" +// splits into +// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/ +const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/ + +class TextWrapper { + /* + * Object for wrapping/filling text. The public interface consists of + * the wrap() and fill() methods; the other methods are just there for + * subclasses to override in order to tweak the default behaviour. + * If you want to completely replace the main wrapping algorithm, + * you'll probably have to override _wrap_chunks(). + * + * Several instance attributes control various aspects of wrapping: + * width (default: 70) + * the maximum width of wrapped lines (unless break_long_words + * is false) + * initial_indent (default: "") + * string that will be prepended to the first line of wrapped + * output. Counts towards the line's width. + * subsequent_indent (default: "") + * string that will be prepended to all lines save the first + * of wrapped output; also counts towards each line's width. + * expand_tabs (default: true) + * Expand tabs in input text to spaces before further processing. + * Each tab will become 0 .. 'tabsize' spaces, depending on its position + * in its line. If false, each tab is treated as a single character. + * tabsize (default: 8) + * Expand tabs in input text to 0 .. 'tabsize' spaces, unless + * 'expand_tabs' is false. + * replace_whitespace (default: true) + * Replace all whitespace characters in the input text by spaces + * after tab expansion. Note that if expand_tabs is false and + * replace_whitespace is true, every tab will be converted to a + * single space! + * fix_sentence_endings (default: false) + * Ensure that sentence-ending punctuation is always followed + * by two spaces. Off by default because the algorithm is + * (unavoidably) imperfect. + * break_long_words (default: true) + * Break words longer than 'width'. If false, those words will not + * be broken, and some lines might be longer than 'width'. + * break_on_hyphens (default: true) + * Allow breaking hyphenated words. If true, wrapping will occur + * preferably on whitespaces and right after hyphens part of + * compound words. + * drop_whitespace (default: true) + * Drop leading and trailing whitespace from lines. + * max_lines (default: None) + * Truncate wrapped lines. + * placeholder (default: ' [...]') + * Append to the last line of truncated text. + */ + + constructor(options = {}) { + let { + width = 70, + initial_indent = '', + subsequent_indent = '', + expand_tabs = true, + replace_whitespace = true, + fix_sentence_endings = false, + break_long_words = true, + drop_whitespace = true, + break_on_hyphens = true, + tabsize = 8, + max_lines = undefined, + placeholder=' [...]' + } = options + + this.width = width + this.initial_indent = initial_indent + this.subsequent_indent = subsequent_indent + this.expand_tabs = expand_tabs + this.replace_whitespace = replace_whitespace + this.fix_sentence_endings = fix_sentence_endings + this.break_long_words = break_long_words + this.drop_whitespace = drop_whitespace + this.break_on_hyphens = break_on_hyphens + this.tabsize = tabsize + this.max_lines = max_lines + this.placeholder = placeholder + } + + + // -- Private methods ----------------------------------------------- + // (possibly useful for subclasses to override) + + _munge_whitespace(text) { + /* + * _munge_whitespace(text : string) -> string + * + * Munge whitespace in text: expand tabs and convert all other + * whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz" + * becomes " foo bar baz". + */ + if (this.expand_tabs) { + text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js + } + if (this.replace_whitespace) { + text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ') + } + return text + } + + _split(text) { + /* + * _split(text : string) -> [string] + * + * Split the text to wrap into indivisible chunks. Chunks are + * not quite the same as words; see _wrap_chunks() for full + * details. As an example, the text + * Look, goof-ball -- use the -b option! + * breaks into the following chunks: + * 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', 'option!' + * if break_on_hyphens is True, or in: + * 'Look,', ' ', 'goof-ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', option!' + * otherwise. + */ + let chunks = text.split(wordsep_simple_re) + chunks = chunks.filter(Boolean) + return chunks + } + + _handle_long_word(reversed_chunks, cur_line, cur_len, width) { + /* + * _handle_long_word(chunks : [string], + * cur_line : [string], + * cur_len : int, width : int) + * + * Handle a chunk of text (most likely a word, not whitespace) that + * is too long to fit in any line. + */ + // Figure out when indent is larger than the specified width, and make + // sure at least one character is stripped off on every pass + let space_left + if (width < 1) { + space_left = 1 + } else { + space_left = width - cur_len + } + + // If we're allowed to break long words, then do so: put as much + // of the next chunk onto the current line as will fit. + if (this.break_long_words) { + cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left)) + reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left) + + // Otherwise, we have to preserve the long word intact. Only add + // it to the current line if there's nothing already there -- + // that minimizes how much we violate the width constraint. + } else if (!cur_line) { + cur_line.push(...reversed_chunks.pop()) + } + + // If we're not allowed to break long words, and there's already + // text on the current line, do nothing. Next time through the + // main loop of _wrap_chunks(), we'll wind up here again, but + // cur_len will be zero, so the next line will be entirely + // devoted to the long word that we can't handle right now. + } + + _wrap_chunks(chunks) { + /* + * _wrap_chunks(chunks : [string]) -> [string] + * + * Wrap a sequence of text chunks and return a list of lines of + * length 'self.width' or less. (If 'break_long_words' is false, + * some lines may be longer than this.) Chunks correspond roughly + * to words and the whitespace between them: each chunk is + * indivisible (modulo 'break_long_words'), but a line break can + * come between any two chunks. Chunks should not have internal + * whitespace; ie. a chunk is either all whitespace or a "word". + * Whitespace chunks will be removed from the beginning and end of + * lines, but apart from that whitespace is preserved. + */ + let lines = [] + let indent + if (this.width <= 0) { + throw Error(`invalid width ${this.width} (must be > 0)`) + } + if (this.max_lines !== undefined) { + if (this.max_lines > 1) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + if (indent.length + this.placeholder.trimStart().length > this.width) { + throw Error('placeholder too large for max width') + } + } + + // Arrange in reverse order so items can be efficiently popped + // from a stack of chucks. + chunks = chunks.reverse() + + while (chunks.length > 0) { + + // Start the list of chunks that will make up the current line. + // cur_len is just the length of all the chunks in cur_line. + let cur_line = [] + let cur_len = 0 + + // Figure out which static string will prefix this line. + let indent + if (lines) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + + // Maximum width for this line. + let width = this.width - indent.length + + // First chunk on line is whitespace -- drop it, unless this + // is the very beginning of the text (ie. no lines started yet). + if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) { + chunks.pop() + } + + while (chunks.length > 0) { + let l = chunks[chunks.length - 1].length + + // Can at least squeeze this chunk onto the current line. + if (cur_len + l <= width) { + cur_line.push(chunks.pop()) + cur_len += l + + // Nope, this line is full. + } else { + break + } + } + + // The current line is full, and the next chunk is too big to + // fit on *any* line (not just this one). + if (chunks.length && chunks[chunks.length - 1].length > width) { + this._handle_long_word(chunks, cur_line, cur_len, width) + cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0) + } + + // If the last chunk on this line is all whitespace, drop it. + if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') { + cur_len -= cur_line[cur_line.length - 1].length + cur_line.pop() + } + + if (cur_line) { + if (this.max_lines === undefined || + lines.length + 1 < this.max_lines || + (chunks.length === 0 || + this.drop_whitespace && + chunks.length === 1 && + !chunks[0].trim()) && cur_len <= width) { + // Convert current line back to a string and store it in + // list of all lines (return value). + lines.push(indent + cur_line.join('')) + } else { + let had_break = false + while (cur_line) { + if (cur_line[cur_line.length - 1].trim() && + cur_len + this.placeholder.length <= width) { + cur_line.push(this.placeholder) + lines.push(indent + cur_line.join('')) + had_break = true + break + } + cur_len -= cur_line[-1].length + cur_line.pop() + } + if (!had_break) { + if (lines) { + let prev_line = lines[lines.length - 1].trimEnd() + if (prev_line.length + this.placeholder.length <= + this.width) { + lines[lines.length - 1] = prev_line + this.placeholder + break + } + } + lines.push(indent + this.placeholder.lstrip()) + } + break + } + } + } + + return lines + } + + _split_chunks(text) { + text = this._munge_whitespace(text) + return this._split(text) + } + + // -- Public interface ---------------------------------------------- + + wrap(text) { + /* + * wrap(text : string) -> [string] + * + * Reformat the single paragraph in 'text' so it fits in lines of + * no more than 'self.width' columns, and return a list of wrapped + * lines. Tabs in 'text' are expanded with string.expandtabs(), + * and all other whitespace characters (including newline) are + * converted to space. + */ + let chunks = this._split_chunks(text) + // not implemented in js + //if (this.fix_sentence_endings) { + // this._fix_sentence_endings(chunks) + //} + return this._wrap_chunks(chunks) + } + + fill(text) { + /* + * fill(text : string) -> string + * + * Reformat the single paragraph in 'text' to fit in lines of no + * more than 'self.width' columns, and return a new string + * containing the entire wrapped paragraph. + */ + return this.wrap(text).join('\n') + } +} + + +// -- Convenience interface --------------------------------------------- + +function wrap(text, options = {}) { + /* + * Wrap a single paragraph of text, returning a list of wrapped lines. + * + * Reformat the single paragraph in 'text' so it fits in lines of no + * more than 'width' columns, and return a list of wrapped lines. By + * default, tabs in 'text' are expanded with string.expandtabs(), and + * all other whitespace characters (including newline) are converted to + * space. See TextWrapper class for available keyword args to customize + * wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.wrap(text) +} + +function fill(text, options = {}) { + /* + * Fill a single paragraph of text, returning a new string. + * + * Reformat the single paragraph in 'text' to fit in lines of no more + * than 'width' columns, and return a new string containing the entire + * wrapped paragraph. As with wrap(), tabs are expanded and other + * whitespace characters converted to space. See TextWrapper class for + * available keyword args to customize wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.fill(text) +} + +// -- Loosely related functionality ------------------------------------- + +let _whitespace_only_re = /^[ \t]+$/mg +let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg + +function dedent(text) { + /* + * Remove any common leading whitespace from every line in `text`. + * + * This can be used to make triple-quoted strings line up with the left + * edge of the display, while still presenting them in the source code + * in indented form. + * + * Note that tabs and spaces are both treated as whitespace, but they + * are not equal: the lines " hello" and "\\thello" are + * considered to have no common leading whitespace. + * + * Entirely blank lines are normalized to a newline character. + */ + // Look for the longest leading string of spaces and tabs common to + // all lines. + let margin = undefined + text = text.replace(_whitespace_only_re, '') + let indents = text.match(_leading_whitespace_re) || [] + for (let indent of indents) { + indent = indent.slice(0, -1) + + if (margin === undefined) { + margin = indent + + // Current line more deeply indented than previous winner: + // no change (previous winner is still on top). + } else if (indent.startsWith(margin)) { + // pass + + // Current line consistent with and no deeper than previous winner: + // it's the new winner. + } else if (margin.startsWith(indent)) { + margin = indent + + // Find the largest common whitespace between current line and previous + // winner. + } else { + for (let i = 0; i < margin.length && i < indent.length; i++) { + if (margin[i] !== indent[i]) { + margin = margin.slice(0, i) + break + } + } + } + } + + if (margin) { + text = text.replace(new RegExp('^' + margin, 'mg'), '') + } + return text +} + +module.exports = { wrap, fill, dedent } diff --git a/node_modules/@eslint/eslintrc/node_modules/argparse/package.json b/node_modules/@eslint/eslintrc/node_modules/argparse/package.json new file mode 100644 index 000000000..647d2aff1 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/argparse/package.json @@ -0,0 +1,31 @@ +{ + "name": "argparse", + "description": "CLI arguments parser. Native port of python's argparse.", + "version": "2.0.1", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "main": "argparse.js", + "files": [ + "argparse.js", + "lib/" + ], + "license": "Python-2.0", + "repository": "nodeca/argparse", + "scripts": { + "lint": "eslint .", + "test": "npm run lint && nyc mocha", + "coverage": "npm run test && nyc report --reporter html" + }, + "devDependencies": { + "@babel/eslint-parser": "^7.11.0", + "@babel/plugin-syntax-class-properties": "^7.10.4", + "eslint": "^7.5.0", + "mocha": "^8.0.1", + "nyc": "^15.1.0" + } +} diff --git a/node_modules/@eslint/eslintrc/node_modules/globals/globals.json b/node_modules/@eslint/eslintrc/node_modules/globals/globals.json deleted file mode 100644 index b85dc3f80..000000000 --- a/node_modules/@eslint/eslintrc/node_modules/globals/globals.json +++ /dev/null @@ -1,1586 +0,0 @@ -{ - "builtin": { - "Array": false, - "ArrayBuffer": false, - "Atomics": false, - "BigInt": false, - "BigInt64Array": false, - "BigUint64Array": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "globalThis": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "SharedArrayBuffer": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "es5": { - "Array": false, - "Boolean": false, - "constructor": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "propertyIsEnumerable": false, - "RangeError": false, - "ReferenceError": false, - "RegExp": false, - "String": false, - "SyntaxError": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false - }, - "es2015": { - "Array": false, - "ArrayBuffer": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "es2017": { - "Array": false, - "ArrayBuffer": false, - "Atomics": false, - "Boolean": false, - "constructor": false, - "DataView": false, - "Date": false, - "decodeURI": false, - "decodeURIComponent": false, - "encodeURI": false, - "encodeURIComponent": false, - "Error": false, - "escape": false, - "eval": false, - "EvalError": false, - "Float32Array": false, - "Float64Array": false, - "Function": false, - "hasOwnProperty": false, - "Infinity": false, - "Int16Array": false, - "Int32Array": false, - "Int8Array": false, - "isFinite": false, - "isNaN": false, - "isPrototypeOf": false, - "JSON": false, - "Map": false, - "Math": false, - "NaN": false, - "Number": false, - "Object": false, - "parseFloat": false, - "parseInt": false, - "Promise": false, - "propertyIsEnumerable": false, - "Proxy": false, - "RangeError": false, - "ReferenceError": false, - "Reflect": false, - "RegExp": false, - "Set": false, - "SharedArrayBuffer": false, - "String": false, - "Symbol": false, - "SyntaxError": false, - "toLocaleString": false, - "toString": false, - "TypeError": false, - "Uint16Array": false, - "Uint32Array": false, - "Uint8Array": false, - "Uint8ClampedArray": false, - "undefined": false, - "unescape": false, - "URIError": false, - "valueOf": false, - "WeakMap": false, - "WeakSet": false - }, - "browser": { - "AbortController": false, - "AbortSignal": false, - "addEventListener": false, - "alert": false, - "AnalyserNode": false, - "Animation": false, - "AnimationEffectReadOnly": false, - "AnimationEffectTiming": false, - "AnimationEffectTimingReadOnly": false, - "AnimationEvent": false, - "AnimationPlaybackEvent": false, - "AnimationTimeline": false, - "applicationCache": false, - "ApplicationCache": false, - "ApplicationCacheErrorEvent": false, - "atob": false, - "Attr": false, - "Audio": false, - "AudioBuffer": false, - "AudioBufferSourceNode": false, - "AudioContext": false, - "AudioDestinationNode": false, - "AudioListener": false, - "AudioNode": false, - "AudioParam": false, - "AudioProcessingEvent": false, - "AudioScheduledSourceNode": false, - "AudioWorkletGlobalScope ": false, - "AudioWorkletNode": false, - "AudioWorkletProcessor": false, - "BarProp": false, - "BaseAudioContext": false, - "BatteryManager": false, - "BeforeUnloadEvent": false, - "BiquadFilterNode": false, - "Blob": false, - "BlobEvent": false, - "blur": false, - "BroadcastChannel": false, - "btoa": false, - "BudgetService": false, - "ByteLengthQueuingStrategy": false, - "Cache": false, - "caches": false, - "CacheStorage": false, - "cancelAnimationFrame": false, - "cancelIdleCallback": false, - "CanvasCaptureMediaStreamTrack": false, - "CanvasGradient": false, - "CanvasPattern": false, - "CanvasRenderingContext2D": false, - "ChannelMergerNode": false, - "ChannelSplitterNode": false, - "CharacterData": false, - "clearInterval": false, - "clearTimeout": false, - "clientInformation": false, - "ClipboardEvent": false, - "close": false, - "closed": false, - "CloseEvent": false, - "Comment": false, - "CompositionEvent": false, - "confirm": false, - "console": false, - "ConstantSourceNode": false, - "ConvolverNode": false, - "CountQueuingStrategy": false, - "createImageBitmap": false, - "Credential": false, - "CredentialsContainer": false, - "crypto": false, - "Crypto": false, - "CryptoKey": false, - "CSS": false, - "CSSConditionRule": false, - "CSSFontFaceRule": false, - "CSSGroupingRule": false, - "CSSImportRule": false, - "CSSKeyframeRule": false, - "CSSKeyframesRule": false, - "CSSMediaRule": false, - "CSSNamespaceRule": false, - "CSSPageRule": false, - "CSSRule": false, - "CSSRuleList": false, - "CSSStyleDeclaration": false, - "CSSStyleRule": false, - "CSSStyleSheet": false, - "CSSSupportsRule": false, - "CustomElementRegistry": false, - "customElements": false, - "CustomEvent": false, - "DataTransfer": false, - "DataTransferItem": false, - "DataTransferItemList": false, - "defaultstatus": false, - "defaultStatus": false, - "DelayNode": false, - "DeviceMotionEvent": false, - "DeviceOrientationEvent": false, - "devicePixelRatio": false, - "dispatchEvent": false, - "document": false, - "Document": false, - "DocumentFragment": false, - "DocumentType": false, - "DOMError": false, - "DOMException": false, - "DOMImplementation": false, - "DOMMatrix": false, - "DOMMatrixReadOnly": false, - "DOMParser": false, - "DOMPoint": false, - "DOMPointReadOnly": false, - "DOMQuad": false, - "DOMRect": false, - "DOMRectReadOnly": false, - "DOMStringList": false, - "DOMStringMap": false, - "DOMTokenList": false, - "DragEvent": false, - "DynamicsCompressorNode": false, - "Element": false, - "ErrorEvent": false, - "event": false, - "Event": false, - "EventSource": false, - "EventTarget": false, - "external": false, - "fetch": false, - "File": false, - "FileList": false, - "FileReader": false, - "find": false, - "focus": false, - "FocusEvent": false, - "FontFace": false, - "FontFaceSetLoadEvent": false, - "FormData": false, - "frameElement": false, - "frames": false, - "GainNode": false, - "Gamepad": false, - "GamepadButton": false, - "GamepadEvent": false, - "getComputedStyle": false, - "getSelection": false, - "HashChangeEvent": false, - "Headers": false, - "history": false, - "History": false, - "HTMLAllCollection": false, - "HTMLAnchorElement": false, - "HTMLAreaElement": false, - "HTMLAudioElement": false, - "HTMLBaseElement": false, - "HTMLBodyElement": false, - "HTMLBRElement": false, - "HTMLButtonElement": false, - "HTMLCanvasElement": false, - "HTMLCollection": false, - "HTMLContentElement": false, - "HTMLDataElement": false, - "HTMLDataListElement": false, - "HTMLDetailsElement": false, - "HTMLDialogElement": false, - "HTMLDirectoryElement": false, - "HTMLDivElement": false, - "HTMLDListElement": false, - "HTMLDocument": false, - "HTMLElement": false, - "HTMLEmbedElement": false, - "HTMLFieldSetElement": false, - "HTMLFontElement": false, - "HTMLFormControlsCollection": false, - "HTMLFormElement": false, - "HTMLFrameElement": false, - "HTMLFrameSetElement": false, - "HTMLHeadElement": false, - "HTMLHeadingElement": false, - "HTMLHRElement": false, - "HTMLHtmlElement": false, - "HTMLIFrameElement": false, - "HTMLImageElement": false, - "HTMLInputElement": false, - "HTMLLabelElement": false, - "HTMLLegendElement": false, - "HTMLLIElement": false, - "HTMLLinkElement": false, - "HTMLMapElement": false, - "HTMLMarqueeElement": false, - "HTMLMediaElement": false, - "HTMLMenuElement": false, - "HTMLMetaElement": false, - "HTMLMeterElement": false, - "HTMLModElement": false, - "HTMLObjectElement": false, - "HTMLOListElement": false, - "HTMLOptGroupElement": false, - "HTMLOptionElement": false, - "HTMLOptionsCollection": false, - "HTMLOutputElement": false, - "HTMLParagraphElement": false, - "HTMLParamElement": false, - "HTMLPictureElement": false, - "HTMLPreElement": false, - "HTMLProgressElement": false, - "HTMLQuoteElement": false, - "HTMLScriptElement": false, - "HTMLSelectElement": false, - "HTMLShadowElement": false, - "HTMLSlotElement": false, - "HTMLSourceElement": false, - "HTMLSpanElement": false, - "HTMLStyleElement": false, - "HTMLTableCaptionElement": false, - "HTMLTableCellElement": false, - "HTMLTableColElement": false, - "HTMLTableElement": false, - "HTMLTableRowElement": false, - "HTMLTableSectionElement": false, - "HTMLTemplateElement": false, - "HTMLTextAreaElement": false, - "HTMLTimeElement": false, - "HTMLTitleElement": false, - "HTMLTrackElement": false, - "HTMLUListElement": false, - "HTMLUnknownElement": false, - "HTMLVideoElement": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "IdleDeadline": false, - "IIRFilterNode": false, - "Image": false, - "ImageBitmap": false, - "ImageBitmapRenderingContext": false, - "ImageCapture": false, - "ImageData": false, - "indexedDB": false, - "innerHeight": false, - "innerWidth": false, - "InputEvent": false, - "IntersectionObserver": false, - "IntersectionObserverEntry": false, - "Intl": false, - "isSecureContext": false, - "KeyboardEvent": false, - "KeyframeEffect": false, - "KeyframeEffectReadOnly": false, - "length": false, - "localStorage": false, - "location": true, - "Location": false, - "locationbar": false, - "matchMedia": false, - "MediaDeviceInfo": false, - "MediaDevices": false, - "MediaElementAudioSourceNode": false, - "MediaEncryptedEvent": false, - "MediaError": false, - "MediaKeyMessageEvent": false, - "MediaKeySession": false, - "MediaKeyStatusMap": false, - "MediaKeySystemAccess": false, - "MediaList": false, - "MediaQueryList": false, - "MediaQueryListEvent": false, - "MediaRecorder": false, - "MediaSettingsRange": false, - "MediaSource": false, - "MediaStream": false, - "MediaStreamAudioDestinationNode": false, - "MediaStreamAudioSourceNode": false, - "MediaStreamEvent": false, - "MediaStreamTrack": false, - "MediaStreamTrackEvent": false, - "menubar": false, - "MessageChannel": false, - "MessageEvent": false, - "MessagePort": false, - "MIDIAccess": false, - "MIDIConnectionEvent": false, - "MIDIInput": false, - "MIDIInputMap": false, - "MIDIMessageEvent": false, - "MIDIOutput": false, - "MIDIOutputMap": false, - "MIDIPort": false, - "MimeType": false, - "MimeTypeArray": false, - "MouseEvent": false, - "moveBy": false, - "moveTo": false, - "MutationEvent": false, - "MutationObserver": false, - "MutationRecord": false, - "name": false, - "NamedNodeMap": false, - "NavigationPreloadManager": false, - "navigator": false, - "Navigator": false, - "NetworkInformation": false, - "Node": false, - "NodeFilter": false, - "NodeIterator": false, - "NodeList": false, - "Notification": false, - "OfflineAudioCompletionEvent": false, - "OfflineAudioContext": false, - "offscreenBuffering": false, - "OffscreenCanvas": true, - "onabort": true, - "onafterprint": true, - "onanimationend": true, - "onanimationiteration": true, - "onanimationstart": true, - "onappinstalled": true, - "onauxclick": true, - "onbeforeinstallprompt": true, - "onbeforeprint": true, - "onbeforeunload": true, - "onblur": true, - "oncancel": true, - "oncanplay": true, - "oncanplaythrough": true, - "onchange": true, - "onclick": true, - "onclose": true, - "oncontextmenu": true, - "oncuechange": true, - "ondblclick": true, - "ondevicemotion": true, - "ondeviceorientation": true, - "ondeviceorientationabsolute": true, - "ondrag": true, - "ondragend": true, - "ondragenter": true, - "ondragleave": true, - "ondragover": true, - "ondragstart": true, - "ondrop": true, - "ondurationchange": true, - "onemptied": true, - "onended": true, - "onerror": true, - "onfocus": true, - "ongotpointercapture": true, - "onhashchange": true, - "oninput": true, - "oninvalid": true, - "onkeydown": true, - "onkeypress": true, - "onkeyup": true, - "onlanguagechange": true, - "onload": true, - "onloadeddata": true, - "onloadedmetadata": true, - "onloadstart": true, - "onlostpointercapture": true, - "onmessage": true, - "onmessageerror": true, - "onmousedown": true, - "onmouseenter": true, - "onmouseleave": true, - "onmousemove": true, - "onmouseout": true, - "onmouseover": true, - "onmouseup": true, - "onmousewheel": true, - "onoffline": true, - "ononline": true, - "onpagehide": true, - "onpageshow": true, - "onpause": true, - "onplay": true, - "onplaying": true, - "onpointercancel": true, - "onpointerdown": true, - "onpointerenter": true, - "onpointerleave": true, - "onpointermove": true, - "onpointerout": true, - "onpointerover": true, - "onpointerup": true, - "onpopstate": true, - "onprogress": true, - "onratechange": true, - "onrejectionhandled": true, - "onreset": true, - "onresize": true, - "onscroll": true, - "onsearch": true, - "onseeked": true, - "onseeking": true, - "onselect": true, - "onstalled": true, - "onstorage": true, - "onsubmit": true, - "onsuspend": true, - "ontimeupdate": true, - "ontoggle": true, - "ontransitionend": true, - "onunhandledrejection": true, - "onunload": true, - "onvolumechange": true, - "onwaiting": true, - "onwheel": true, - "open": false, - "openDatabase": false, - "opener": false, - "Option": false, - "origin": false, - "OscillatorNode": false, - "outerHeight": false, - "outerWidth": false, - "PageTransitionEvent": false, - "pageXOffset": false, - "pageYOffset": false, - "PannerNode": false, - "parent": false, - "Path2D": false, - "PaymentAddress": false, - "PaymentRequest": false, - "PaymentRequestUpdateEvent": false, - "PaymentResponse": false, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceLongTaskTiming": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceNavigationTiming": false, - "PerformanceObserver": false, - "PerformanceObserverEntryList": false, - "PerformancePaintTiming": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "PeriodicWave": false, - "Permissions": false, - "PermissionStatus": false, - "personalbar": false, - "PhotoCapabilities": false, - "Plugin": false, - "PluginArray": false, - "PointerEvent": false, - "PopStateEvent": false, - "postMessage": false, - "Presentation": false, - "PresentationAvailability": false, - "PresentationConnection": false, - "PresentationConnectionAvailableEvent": false, - "PresentationConnectionCloseEvent": false, - "PresentationConnectionList": false, - "PresentationReceiver": false, - "PresentationRequest": false, - "print": false, - "ProcessingInstruction": false, - "ProgressEvent": false, - "PromiseRejectionEvent": false, - "prompt": false, - "PushManager": false, - "PushSubscription": false, - "PushSubscriptionOptions": false, - "queueMicrotask": false, - "RadioNodeList": false, - "Range": false, - "ReadableStream": false, - "registerProcessor": false, - "RemotePlayback": false, - "removeEventListener": false, - "Request": false, - "requestAnimationFrame": false, - "requestIdleCallback": false, - "resizeBy": false, - "ResizeObserver": false, - "ResizeObserverEntry": false, - "resizeTo": false, - "Response": false, - "RTCCertificate": false, - "RTCDataChannel": false, - "RTCDataChannelEvent": false, - "RTCDtlsTransport": false, - "RTCIceCandidate": false, - "RTCIceGatherer": false, - "RTCIceTransport": false, - "RTCPeerConnection": false, - "RTCPeerConnectionIceEvent": false, - "RTCRtpContributingSource": false, - "RTCRtpReceiver": false, - "RTCRtpSender": false, - "RTCSctpTransport": false, - "RTCSessionDescription": false, - "RTCStatsReport": false, - "RTCTrackEvent": false, - "screen": false, - "Screen": false, - "screenLeft": false, - "ScreenOrientation": false, - "screenTop": false, - "screenX": false, - "screenY": false, - "ScriptProcessorNode": false, - "scroll": false, - "scrollbars": false, - "scrollBy": false, - "scrollTo": false, - "scrollX": false, - "scrollY": false, - "SecurityPolicyViolationEvent": false, - "Selection": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerRegistration": false, - "sessionStorage": false, - "setInterval": false, - "setTimeout": false, - "ShadowRoot": false, - "SharedWorker": false, - "SourceBuffer": false, - "SourceBufferList": false, - "speechSynthesis": false, - "SpeechSynthesisEvent": false, - "SpeechSynthesisUtterance": false, - "StaticRange": false, - "status": false, - "statusbar": false, - "StereoPannerNode": false, - "stop": false, - "Storage": false, - "StorageEvent": false, - "StorageManager": false, - "styleMedia": false, - "StyleSheet": false, - "StyleSheetList": false, - "SubtleCrypto": false, - "SVGAElement": false, - "SVGAngle": false, - "SVGAnimatedAngle": false, - "SVGAnimatedBoolean": false, - "SVGAnimatedEnumeration": false, - "SVGAnimatedInteger": false, - "SVGAnimatedLength": false, - "SVGAnimatedLengthList": false, - "SVGAnimatedNumber": false, - "SVGAnimatedNumberList": false, - "SVGAnimatedPreserveAspectRatio": false, - "SVGAnimatedRect": false, - "SVGAnimatedString": false, - "SVGAnimatedTransformList": false, - "SVGAnimateElement": false, - "SVGAnimateMotionElement": false, - "SVGAnimateTransformElement": false, - "SVGAnimationElement": false, - "SVGCircleElement": false, - "SVGClipPathElement": false, - "SVGComponentTransferFunctionElement": false, - "SVGDefsElement": false, - "SVGDescElement": false, - "SVGDiscardElement": false, - "SVGElement": false, - "SVGEllipseElement": false, - "SVGFEBlendElement": false, - "SVGFEColorMatrixElement": false, - "SVGFEComponentTransferElement": false, - "SVGFECompositeElement": false, - "SVGFEConvolveMatrixElement": false, - "SVGFEDiffuseLightingElement": false, - "SVGFEDisplacementMapElement": false, - "SVGFEDistantLightElement": false, - "SVGFEDropShadowElement": false, - "SVGFEFloodElement": false, - "SVGFEFuncAElement": false, - "SVGFEFuncBElement": false, - "SVGFEFuncGElement": false, - "SVGFEFuncRElement": false, - "SVGFEGaussianBlurElement": false, - "SVGFEImageElement": false, - "SVGFEMergeElement": false, - "SVGFEMergeNodeElement": false, - "SVGFEMorphologyElement": false, - "SVGFEOffsetElement": false, - "SVGFEPointLightElement": false, - "SVGFESpecularLightingElement": false, - "SVGFESpotLightElement": false, - "SVGFETileElement": false, - "SVGFETurbulenceElement": false, - "SVGFilterElement": false, - "SVGForeignObjectElement": false, - "SVGGElement": false, - "SVGGeometryElement": false, - "SVGGradientElement": false, - "SVGGraphicsElement": false, - "SVGImageElement": false, - "SVGLength": false, - "SVGLengthList": false, - "SVGLinearGradientElement": false, - "SVGLineElement": false, - "SVGMarkerElement": false, - "SVGMaskElement": false, - "SVGMatrix": false, - "SVGMetadataElement": false, - "SVGMPathElement": false, - "SVGNumber": false, - "SVGNumberList": false, - "SVGPathElement": false, - "SVGPatternElement": false, - "SVGPoint": false, - "SVGPointList": false, - "SVGPolygonElement": false, - "SVGPolylineElement": false, - "SVGPreserveAspectRatio": false, - "SVGRadialGradientElement": false, - "SVGRect": false, - "SVGRectElement": false, - "SVGScriptElement": false, - "SVGSetElement": false, - "SVGStopElement": false, - "SVGStringList": false, - "SVGStyleElement": false, - "SVGSVGElement": false, - "SVGSwitchElement": false, - "SVGSymbolElement": false, - "SVGTextContentElement": false, - "SVGTextElement": false, - "SVGTextPathElement": false, - "SVGTextPositioningElement": false, - "SVGTitleElement": false, - "SVGTransform": false, - "SVGTransformList": false, - "SVGTSpanElement": false, - "SVGUnitTypes": false, - "SVGUseElement": false, - "SVGViewElement": false, - "TaskAttributionTiming": false, - "Text": false, - "TextDecoder": false, - "TextEncoder": false, - "TextEvent": false, - "TextMetrics": false, - "TextTrack": false, - "TextTrackCue": false, - "TextTrackCueList": false, - "TextTrackList": false, - "TimeRanges": false, - "toolbar": false, - "top": false, - "Touch": false, - "TouchEvent": false, - "TouchList": false, - "TrackEvent": false, - "TransitionEvent": false, - "TreeWalker": false, - "UIEvent": false, - "URL": false, - "URLSearchParams": false, - "ValidityState": false, - "visualViewport": false, - "VisualViewport": false, - "VTTCue": false, - "WaveShaperNode": false, - "WebAssembly": false, - "WebGL2RenderingContext": false, - "WebGLActiveInfo": false, - "WebGLBuffer": false, - "WebGLContextEvent": false, - "WebGLFramebuffer": false, - "WebGLProgram": false, - "WebGLQuery": false, - "WebGLRenderbuffer": false, - "WebGLRenderingContext": false, - "WebGLSampler": false, - "WebGLShader": false, - "WebGLShaderPrecisionFormat": false, - "WebGLSync": false, - "WebGLTexture": false, - "WebGLTransformFeedback": false, - "WebGLUniformLocation": false, - "WebGLVertexArrayObject": false, - "WebSocket": false, - "WheelEvent": false, - "window": false, - "Window": false, - "Worker": false, - "WritableStream": false, - "XMLDocument": false, - "XMLHttpRequest": false, - "XMLHttpRequestEventTarget": false, - "XMLHttpRequestUpload": false, - "XMLSerializer": false, - "XPathEvaluator": false, - "XPathExpression": false, - "XPathResult": false, - "XSLTProcessor": false - }, - "worker": { - "addEventListener": false, - "applicationCache": false, - "atob": false, - "Blob": false, - "BroadcastChannel": false, - "btoa": false, - "Cache": false, - "caches": false, - "clearInterval": false, - "clearTimeout": false, - "close": true, - "console": false, - "fetch": false, - "FileReaderSync": false, - "FormData": false, - "Headers": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "ImageData": false, - "importScripts": true, - "indexedDB": false, - "location": false, - "MessageChannel": false, - "MessagePort": false, - "name": false, - "navigator": false, - "Notification": false, - "onclose": true, - "onconnect": true, - "onerror": true, - "onlanguagechange": true, - "onmessage": true, - "onoffline": true, - "ononline": true, - "onrejectionhandled": true, - "onunhandledrejection": true, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "postMessage": true, - "Promise": false, - "queueMicrotask": false, - "removeEventListener": false, - "Request": false, - "Response": false, - "self": true, - "ServiceWorkerRegistration": false, - "setInterval": false, - "setTimeout": false, - "TextDecoder": false, - "TextEncoder": false, - "URL": false, - "URLSearchParams": false, - "WebSocket": false, - "Worker": false, - "WorkerGlobalScope": false, - "XMLHttpRequest": false - }, - "node": { - "__dirname": false, - "__filename": false, - "Buffer": false, - "clearImmediate": false, - "clearInterval": false, - "clearTimeout": false, - "console": false, - "exports": true, - "global": false, - "Intl": false, - "module": false, - "process": false, - "queueMicrotask": false, - "require": false, - "setImmediate": false, - "setInterval": false, - "setTimeout": false, - "TextDecoder": false, - "TextEncoder": false, - "URL": false, - "URLSearchParams": false - }, - "nodeBuiltin": { - "Buffer": false, - "clearImmediate": false, - "clearInterval": false, - "clearTimeout": false, - "console": false, - "global": false, - "Intl": false, - "process": false, - "queueMicrotask": false, - "setImmediate": false, - "setInterval": false, - "setTimeout": false, - "TextDecoder": false, - "TextEncoder": false, - "URL": false, - "URLSearchParams": false - }, - "commonjs": { - "exports": true, - "global": false, - "module": false, - "require": false - }, - "amd": { - "define": false, - "require": false - }, - "mocha": { - "after": false, - "afterEach": false, - "before": false, - "beforeEach": false, - "context": false, - "describe": false, - "it": false, - "mocha": false, - "run": false, - "setup": false, - "specify": false, - "suite": false, - "suiteSetup": false, - "suiteTeardown": false, - "teardown": false, - "test": false, - "xcontext": false, - "xdescribe": false, - "xit": false, - "xspecify": false - }, - "jasmine": { - "afterAll": false, - "afterEach": false, - "beforeAll": false, - "beforeEach": false, - "describe": false, - "expect": false, - "expectAsync": false, - "fail": false, - "fdescribe": false, - "fit": false, - "it": false, - "jasmine": false, - "pending": false, - "runs": false, - "spyOn": false, - "spyOnAllFunctions": false, - "spyOnProperty": false, - "waits": false, - "waitsFor": false, - "xdescribe": false, - "xit": false - }, - "jest": { - "afterAll": false, - "afterEach": false, - "beforeAll": false, - "beforeEach": false, - "describe": false, - "expect": false, - "fdescribe": false, - "fit": false, - "it": false, - "jest": false, - "pit": false, - "require": false, - "test": false, - "xdescribe": false, - "xit": false, - "xtest": false - }, - "qunit": { - "asyncTest": false, - "deepEqual": false, - "equal": false, - "expect": false, - "module": false, - "notDeepEqual": false, - "notEqual": false, - "notOk": false, - "notPropEqual": false, - "notStrictEqual": false, - "ok": false, - "propEqual": false, - "QUnit": false, - "raises": false, - "start": false, - "stop": false, - "strictEqual": false, - "test": false, - "throws": false - }, - "phantomjs": { - "console": true, - "exports": true, - "phantom": true, - "require": true, - "WebPage": true - }, - "couch": { - "emit": false, - "exports": false, - "getRow": false, - "log": false, - "module": false, - "provides": false, - "require": false, - "respond": false, - "send": false, - "start": false, - "sum": false - }, - "rhino": { - "defineClass": false, - "deserialize": false, - "gc": false, - "help": false, - "importClass": false, - "importPackage": false, - "java": false, - "load": false, - "loadClass": false, - "Packages": false, - "print": false, - "quit": false, - "readFile": false, - "readUrl": false, - "runCommand": false, - "seal": false, - "serialize": false, - "spawn": false, - "sync": false, - "toint32": false, - "version": false - }, - "nashorn": { - "__DIR__": false, - "__FILE__": false, - "__LINE__": false, - "com": false, - "edu": false, - "exit": false, - "java": false, - "Java": false, - "javafx": false, - "JavaImporter": false, - "javax": false, - "JSAdapter": false, - "load": false, - "loadWithNewGlobal": false, - "org": false, - "Packages": false, - "print": false, - "quit": false - }, - "wsh": { - "ActiveXObject": true, - "CollectGarbage": true, - "Debug": true, - "Enumerator": true, - "GetObject": true, - "RuntimeObject": true, - "ScriptEngine": true, - "ScriptEngineBuildVersion": true, - "ScriptEngineMajorVersion": true, - "ScriptEngineMinorVersion": true, - "VBArray": true, - "WScript": true, - "WSH": true, - "XDomainRequest": true - }, - "jquery": { - "$": false, - "jQuery": false - }, - "yui": { - "YAHOO": false, - "YAHOO_config": false, - "YUI": false, - "YUI_config": false - }, - "shelljs": { - "cat": false, - "cd": false, - "chmod": false, - "config": false, - "cp": false, - "dirs": false, - "echo": false, - "env": false, - "error": false, - "exec": false, - "exit": false, - "find": false, - "grep": false, - "ln": false, - "ls": false, - "mkdir": false, - "mv": false, - "popd": false, - "pushd": false, - "pwd": false, - "rm": false, - "sed": false, - "set": false, - "target": false, - "tempdir": false, - "test": false, - "touch": false, - "which": false - }, - "prototypejs": { - "$": false, - "$$": false, - "$A": false, - "$break": false, - "$continue": false, - "$F": false, - "$H": false, - "$R": false, - "$w": false, - "Abstract": false, - "Ajax": false, - "Autocompleter": false, - "Builder": false, - "Class": false, - "Control": false, - "Draggable": false, - "Draggables": false, - "Droppables": false, - "Effect": false, - "Element": false, - "Enumerable": false, - "Event": false, - "Field": false, - "Form": false, - "Hash": false, - "Insertion": false, - "ObjectRange": false, - "PeriodicalExecuter": false, - "Position": false, - "Prototype": false, - "Scriptaculous": false, - "Selector": false, - "Sortable": false, - "SortableObserver": false, - "Sound": false, - "Template": false, - "Toggle": false, - "Try": false - }, - "meteor": { - "_": false, - "$": false, - "Accounts": false, - "AccountsClient": false, - "AccountsCommon": false, - "AccountsServer": false, - "App": false, - "Assets": false, - "Blaze": false, - "check": false, - "Cordova": false, - "DDP": false, - "DDPRateLimiter": false, - "DDPServer": false, - "Deps": false, - "EJSON": false, - "Email": false, - "HTTP": false, - "Log": false, - "Match": false, - "Meteor": false, - "Mongo": false, - "MongoInternals": false, - "Npm": false, - "Package": false, - "Plugin": false, - "process": false, - "Random": false, - "ReactiveDict": false, - "ReactiveVar": false, - "Router": false, - "ServiceConfiguration": false, - "Session": false, - "share": false, - "Spacebars": false, - "Template": false, - "Tinytest": false, - "Tracker": false, - "UI": false, - "Utils": false, - "WebApp": false, - "WebAppInternals": false - }, - "mongo": { - "_isWindows": false, - "_rand": false, - "BulkWriteResult": false, - "cat": false, - "cd": false, - "connect": false, - "db": false, - "getHostName": false, - "getMemInfo": false, - "hostname": false, - "ISODate": false, - "listFiles": false, - "load": false, - "ls": false, - "md5sumFile": false, - "mkdir": false, - "Mongo": false, - "NumberInt": false, - "NumberLong": false, - "ObjectId": false, - "PlanCache": false, - "print": false, - "printjson": false, - "pwd": false, - "quit": false, - "removeFile": false, - "rs": false, - "sh": false, - "UUID": false, - "version": false, - "WriteResult": false - }, - "applescript": { - "$": false, - "Application": false, - "Automation": false, - "console": false, - "delay": false, - "Library": false, - "ObjC": false, - "ObjectSpecifier": false, - "Path": false, - "Progress": false, - "Ref": false - }, - "serviceworker": { - "addEventListener": false, - "applicationCache": false, - "atob": false, - "Blob": false, - "BroadcastChannel": false, - "btoa": false, - "Cache": false, - "caches": false, - "CacheStorage": false, - "clearInterval": false, - "clearTimeout": false, - "Client": false, - "clients": false, - "Clients": false, - "close": true, - "console": false, - "ExtendableEvent": false, - "ExtendableMessageEvent": false, - "fetch": false, - "FetchEvent": false, - "FileReaderSync": false, - "FormData": false, - "Headers": false, - "IDBCursor": false, - "IDBCursorWithValue": false, - "IDBDatabase": false, - "IDBFactory": false, - "IDBIndex": false, - "IDBKeyRange": false, - "IDBObjectStore": false, - "IDBOpenDBRequest": false, - "IDBRequest": false, - "IDBTransaction": false, - "IDBVersionChangeEvent": false, - "ImageData": false, - "importScripts": false, - "indexedDB": false, - "location": false, - "MessageChannel": false, - "MessagePort": false, - "name": false, - "navigator": false, - "Notification": false, - "onclose": true, - "onconnect": true, - "onerror": true, - "onfetch": true, - "oninstall": true, - "onlanguagechange": true, - "onmessage": true, - "onmessageerror": true, - "onnotificationclick": true, - "onnotificationclose": true, - "onoffline": true, - "ononline": true, - "onpush": true, - "onpushsubscriptionchange": true, - "onrejectionhandled": true, - "onsync": true, - "onunhandledrejection": true, - "performance": false, - "Performance": false, - "PerformanceEntry": false, - "PerformanceMark": false, - "PerformanceMeasure": false, - "PerformanceNavigation": false, - "PerformanceResourceTiming": false, - "PerformanceTiming": false, - "postMessage": true, - "Promise": false, - "queueMicrotask": false, - "registration": false, - "removeEventListener": false, - "Request": false, - "Response": false, - "self": false, - "ServiceWorker": false, - "ServiceWorkerContainer": false, - "ServiceWorkerGlobalScope": false, - "ServiceWorkerMessageEvent": false, - "ServiceWorkerRegistration": false, - "setInterval": false, - "setTimeout": false, - "skipWaiting": false, - "TextDecoder": false, - "TextEncoder": false, - "URL": false, - "URLSearchParams": false, - "WebSocket": false, - "WindowClient": false, - "Worker": false, - "WorkerGlobalScope": false, - "XMLHttpRequest": false - }, - "atomtest": { - "advanceClock": false, - "fakeClearInterval": false, - "fakeClearTimeout": false, - "fakeSetInterval": false, - "fakeSetTimeout": false, - "resetTimeouts": false, - "waitsForPromise": false - }, - "embertest": { - "andThen": false, - "click": false, - "currentPath": false, - "currentRouteName": false, - "currentURL": false, - "fillIn": false, - "find": false, - "findAll": false, - "findWithAssert": false, - "keyEvent": false, - "pauseTest": false, - "resumeTest": false, - "triggerEvent": false, - "visit": false, - "wait": false - }, - "protractor": { - "$": false, - "$$": false, - "browser": false, - "by": false, - "By": false, - "DartObject": false, - "element": false, - "protractor": false - }, - "shared-node-browser": { - "clearInterval": false, - "clearTimeout": false, - "console": false, - "setInterval": false, - "setTimeout": false, - "URL": false, - "URLSearchParams": false - }, - "webextensions": { - "browser": false, - "chrome": false, - "opr": false - }, - "greasemonkey": { - "cloneInto": false, - "createObjectIn": false, - "exportFunction": false, - "GM": false, - "GM_addStyle": false, - "GM_deleteValue": false, - "GM_getResourceText": false, - "GM_getResourceURL": false, - "GM_getValue": false, - "GM_info": false, - "GM_listValues": false, - "GM_log": false, - "GM_openInTab": false, - "GM_registerMenuCommand": false, - "GM_setClipboard": false, - "GM_setValue": false, - "GM_xmlhttpRequest": false, - "unsafeWindow": false - }, - "devtools": { - "$": false, - "$_": false, - "$$": false, - "$0": false, - "$1": false, - "$2": false, - "$3": false, - "$4": false, - "$x": false, - "chrome": false, - "clear": false, - "copy": false, - "debug": false, - "dir": false, - "dirxml": false, - "getEventListeners": false, - "inspect": false, - "keys": false, - "monitor": false, - "monitorEvents": false, - "profile": false, - "profileEnd": false, - "queryObjects": false, - "table": false, - "undebug": false, - "unmonitor": false, - "unmonitorEvents": false, - "values": false - } -} diff --git a/node_modules/@eslint/eslintrc/node_modules/globals/index.d.ts b/node_modules/@eslint/eslintrc/node_modules/globals/index.d.ts deleted file mode 100644 index a842e4c88..000000000 --- a/node_modules/@eslint/eslintrc/node_modules/globals/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import {ReadonlyDeep} from 'type-fest'; -import globalsJson = require('./globals.json'); - -declare const globals: ReadonlyDeep; - -export = globals; diff --git a/node_modules/@eslint/eslintrc/node_modules/globals/index.js b/node_modules/@eslint/eslintrc/node_modules/globals/index.js deleted file mode 100644 index a951582e4..000000000 --- a/node_modules/@eslint/eslintrc/node_modules/globals/index.js +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; -module.exports = require('./globals.json'); diff --git a/node_modules/@eslint/eslintrc/node_modules/globals/package.json b/node_modules/@eslint/eslintrc/node_modules/globals/package.json deleted file mode 100644 index db23e3aa4..000000000 --- a/node_modules/@eslint/eslintrc/node_modules/globals/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "globals@^12.1.0", - "_id": "globals@12.4.0", - "_inBundle": false, - "_integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "_location": "/@eslint/eslintrc/globals", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "globals@^12.1.0", - "name": "globals", - "escapedName": "globals", - "rawSpec": "^12.1.0", - "saveSpec": null, - "fetchSpec": "^12.1.0" - }, - "_requiredBy": [ - "/@eslint/eslintrc" - ], - "_resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "_shasum": "a18813576a41b00a24a97e7f815918c2e19925f8", - "_spec": "globals@^12.1.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/@eslint/eslintrc", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/globals/issues" - }, - "bundleDependencies": false, - "dependencies": { - "type-fest": "^0.8.1" - }, - "deprecated": false, - "description": "Global identifiers from different JavaScript environments", - "devDependencies": { - "ava": "^2.2.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts", - "globals.json" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/globals#readme", - "keywords": [ - "globals", - "global", - "identifiers", - "variables", - "vars", - "jshint", - "eslint", - "environments" - ], - "license": "MIT", - "name": "globals", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globals.git" - }, - "scripts": { - "test": "xo && ava" - }, - "tsd": { - "compilerOptions": { - "resolveJsonModule": true - } - }, - "version": "12.4.0", - "xo": { - "ignores": [ - "get-browser-globals.js" - ] - } -} diff --git a/node_modules/@eslint/eslintrc/node_modules/globals/readme.md b/node_modules/@eslint/eslintrc/node_modules/globals/readme.md deleted file mode 100644 index fdcfa087a..000000000 --- a/node_modules/@eslint/eslintrc/node_modules/globals/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# globals [![Build Status](https://travis-ci.org/sindresorhus/globals.svg?branch=master)](https://travis-ci.org/sindresorhus/globals) - -> Global identifiers from different JavaScript environments - -Extracted from [JSHint](https://github.com/jshint/jshint/blob/3a8efa979dbb157bfb5c10b5826603a55a33b9ad/src/vars.js) and [ESLint](https://github.com/eslint/eslint/blob/b648406218f8a2d7302b98f5565e23199f44eb31/conf/environments.json) and merged. - -It's just a [JSON file](globals.json), so use it in whatever environment you like. - -**This module [no longer accepts](https://github.com/sindresorhus/globals/issues/82) new environments. If you need it for ESLint, just [create a plugin](http://eslint.org/docs/developer-guide/working-with-plugins#environments-in-plugins).** - -## Install - -``` -$ npm install globals -``` - -## Usage - -```js -const globals = require('globals'); - -console.log(globals.browser); -/* -{ - addEventListener: false, - applicationCache: false, - ArrayBuffer: false, - atob: false, - … -} -*/ -``` - -Each global is given a value of `true` or `false`. A value of `true` indicates that the variable may be overwritten. A value of `false` indicates that the variable should be considered read-only. This information is used by static analysis tools to flag incorrect behavior. We assume all variables should be `false` unless we hear otherwise. - -For Node.js this package provides two sets of globals: - -- `globals.nodeBuiltin`: Globals available to all code running in Node.js. - These will usually be available as properties on the `global` object and include `process`, `Buffer`, but not CommonJS arguments like `require`. - See: https://nodejs.org/api/globals.html -- `globals.node`: A combination of the globals from `nodeBuiltin` plus all CommonJS arguments ("CommonJS module scope"). - See: https://nodejs.org/api/modules.html#modules_the_module_scope - -When analyzing code that is known to run outside of a CommonJS wrapper, for example, JavaScript modules, `nodeBuiltin` can find accidental CommonJS references. - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/CHANGELOG.md b/node_modules/@eslint/eslintrc/node_modules/js-yaml/CHANGELOG.md new file mode 100644 index 000000000..ff2375e05 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/CHANGELOG.md @@ -0,0 +1,616 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [4.1.0] - 2021-04-15 +### Added +- Types are now exported as `yaml.types.XXX`. +- Every type now has `options` property with original arguments kept as they were + (see `yaml.types.int.options` as an example). + +### Changed +- `Schema.extend()` now keeps old type order in case of conflicts + (e.g. Schema.extend([ a, b, c ]).extend([ b, a, d ]) is now ordered as `abcd` instead of `cbad`). + + +## [4.0.0] - 2021-01-03 +### Changed +- Check [migration guide](migrate_v3_to_v4.md) to see details for all breaking changes. +- Breaking: "unsafe" tags `!!js/function`, `!!js/regexp`, `!!js/undefined` are + moved to [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) package. +- Breaking: removed `safe*` functions. Use `load`, `loadAll`, `dump` + instead which are all now safe by default. +- `yaml.DEFAULT_SAFE_SCHEMA` and `yaml.DEFAULT_FULL_SCHEMA` are removed, use + `yaml.DEFAULT_SCHEMA` instead. +- `yaml.Schema.create(schema, tags)` is removed, use `schema.extend(tags)` instead. +- `!!binary` now always mapped to `Uint8Array` on load. +- Reduced nesting of `/lib` folder. +- Parse numbers according to YAML 1.2 instead of YAML 1.1 (`01234` is now decimal, + `0o1234` is octal, `1:23` is parsed as string instead of base60). +- `dump()` no longer quotes `:`, `[`, `]`, `(`, `)` except when necessary, #470, #557. +- Line and column in exceptions are now formatted as `(X:Y)` instead of + `at line X, column Y` (also present in compact format), #332. +- Code snippet created in exceptions now contains multiple lines with line numbers. +- `dump()` now serializes `undefined` as `null` in collections and removes keys with + `undefined` in mappings, #571. +- `dump()` with `skipInvalid=true` now serializes invalid items in collections as null. +- Custom tags starting with `!` are now dumped as `!tag` instead of `!`, #576. +- Custom tags starting with `tag:yaml.org,2002:` are now shorthanded using `!!`, #258. + +### Added +- Added `.mjs` (es modules) support. +- Added `quotingType` and `forceQuotes` options for dumper to configure + string literal style, #290, #529. +- Added `styles: { '!!null': 'empty' }` option for dumper + (serializes `{ foo: null }` as "`foo: `"), #570. +- Added `replacer` option (similar to option in JSON.stringify), #339. +- Custom `Tag` can now handle all tags or multiple tags with the same prefix, #385. + +### Fixed +- Astral characters are no longer encoded by `dump()`, #587. +- "duplicate mapping key" exception now points at the correct column, #452. +- Extra commas in flow collections (e.g. `[foo,,bar]`) now throw an exception + instead of producing null, #321. +- `__proto__` key no longer overrides object prototype, #164. +- Removed `bower.json`. +- Tags are now url-decoded in `load()` and url-encoded in `dump()` + (previously usage of custom non-ascii tags may have led to invalid YAML that can't be parsed). +- Anchors now work correctly with empty nodes, #301. +- Fix incorrect parsing of invalid block mapping syntax, #418. +- Throw an error if block sequence/mapping indent contains a tab, #80. + + +## [3.14.1] - 2020-12-07 +### Security +- Fix possible code execution in (already unsafe) `.load()` (in &anchor). + + +## [3.14.0] - 2020-05-22 +### Changed +- Support `safe/loadAll(input, options)` variant of call. +- CI: drop outdated nodejs versions. +- Dev deps bump. + +### Fixed +- Quote `=` in plain scalars #519. +- Check the node type for `!` tag in case user manually specifies it. +- Verify that there are no null-bytes in input. +- Fix wrong quote position when writing condensed flow, #526. + + +## [3.13.1] - 2019-04-05 +### Security +- Fix possible code execution in (already unsafe) `.load()`, #480. + + +## [3.13.0] - 2019-03-20 +### Security +- Security fix: `safeLoad()` can hang when arrays with nested refs + used as key. Now throws exception for nested arrays. #475. + + +## [3.12.2] - 2019-02-26 +### Fixed +- Fix `noArrayIndent` option for root level, #468. + + +## [3.12.1] - 2019-01-05 +### Added +- Added `noArrayIndent` option, #432. + + +## [3.12.0] - 2018-06-02 +### Changed +- Support arrow functions without a block statement, #421. + + +## [3.11.0] - 2018-03-05 +### Added +- Add arrow functions suport for `!!js/function`. + +### Fixed +- Fix dump in bin/octal/hex formats for negative integers, #399. + + +## [3.10.0] - 2017-09-10 +### Fixed +- Fix `condenseFlow` output (quote keys for sure, instead of spaces), #371, #370. +- Dump astrals as codepoints instead of surrogate pair, #368. + + +## [3.9.1] - 2017-07-08 +### Fixed +- Ensure stack is present for custom errors in node 7.+, #351. + + +## [3.9.0] - 2017-07-08 +### Added +- Add `condenseFlow` option (to create pretty URL query params), #346. + +### Fixed +- Support array return from safeLoadAll/loadAll, #350. + + +## [3.8.4] - 2017-05-08 +### Fixed +- Dumper: prevent space after dash for arrays that wrap, #343. + + +## [3.8.3] - 2017-04-05 +### Fixed +- Should not allow numbers to begin and end with underscore, #335. + + +## [3.8.2] - 2017-03-02 +### Fixed +- Fix `!!float 123` (integers) parse, #333. +- Don't allow leading zeros in floats (except 0, 0.xxx). +- Allow positive exponent without sign in floats. + + +## [3.8.1] - 2017-02-07 +### Changed +- Maintenance: update browserified build. + + +## [3.8.0] - 2017-02-07 +### Fixed +- Fix reported position for `duplicated mapping key` errors. + Now points to block start instead of block end. + (#243, thanks to @shockey). + + +## [3.7.0] - 2016-11-12 +### Added +- Support polymorphism for tags (#300, thanks to @monken). + +### Fixed +- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). + + +## [3.6.1] - 2016-05-11 +### Fixed +- Fix output cut on a pipe, #286. + + +## [3.6.0] - 2016-04-16 +### Fixed +- Dumper rewrite, fix multiple bugs with trailing `\n`. + Big thanks to @aepsilon! +- Loader: fix leading/trailing newlines in block scalars, @aepsilon. + + +## [3.5.5] - 2016-03-17 +### Fixed +- Date parse fix: don't allow dates with on digit in month and day, #268. + + +## [3.5.4] - 2016-03-09 +### Added +- `noCompatMode` for dumper, to disable quoting YAML 1.1 values. + + +## [3.5.3] - 2016-02-11 +### Changed +- Maintenance release. + + +## [3.5.2] - 2016-01-11 +### Changed +- Maintenance: missed comma in bower config. + + +## [3.5.1] - 2016-01-11 +### Changed +- Removed `inherit` dependency, #239. +- Better browserify workaround for esprima load. +- Demo rewrite. + + +## [3.5.0] - 2016-01-10 +### Fixed +- Dumper. Fold strings only, #217. +- Dumper. `norefs` option, to clone linked objects, #229. +- Loader. Throw a warning for duplicate keys, #166. +- Improved browserify support (mark `esprima` & `Buffer` excluded). + + +## [3.4.6] - 2015-11-26 +### Changed +- Use standalone `inherit` to keep browserified files clear. + + +## [3.4.5] - 2015-11-23 +### Added +- Added `lineWidth` option to dumper. + + +## [3.4.4] - 2015-11-21 +### Fixed +- Fixed floats dump (missed dot for scientific format), #220. +- Allow non-printable characters inside quoted scalars, #192. + + +## [3.4.3] - 2015-10-10 +### Changed +- Maintenance release - deps bump (esprima, argparse). + + +## [3.4.2] - 2015-09-09 +### Fixed +- Fixed serialization of duplicated entries in sequences, #205. + Thanks to @vogelsgesang. + + +## [3.4.1] - 2015-09-05 +### Fixed +- Fixed stacktrace handling in generated errors, for browsers (FF/IE). + + +## [3.4.0] - 2015-08-23 +### Changed +- Don't throw on warnings anymore. Use `onWarning` option to catch. +- Throw error on unknown tags (was warning before). +- Reworked internals of error class. + +### Fixed +- Fixed multiline keys dump, #197. Thanks to @tcr. +- Fixed heading line breaks in some scalars (regression). + + +## [3.3.1] - 2015-05-13 +### Added +- Added `.sortKeys` dumper option, thanks to @rjmunro. + +### Fixed +- Fixed astral characters support, #191. + + +## [3.3.0] - 2015-04-26 +### Changed +- Significantly improved long strings formatting in dumper, thanks to @isaacs. +- Strip BOM if exists. + + +## [3.2.7] - 2015-02-19 +### Changed +- Maintenance release. +- Updated dependencies. +- HISTORY.md -> CHANGELOG.md + + +## [3.2.6] - 2015-02-07 +### Fixed +- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). +- Fixed demo dates dump (#113, thanks to @Hypercubed). + + +## [3.2.5] - 2014-12-28 +### Fixed +- Fixed resolving of all built-in types on empty nodes. +- Fixed invalid warning on empty lines within quoted scalars and flow collections. +- Fixed bug: Tag on an empty node didn't resolve in some cases. + + +## [3.2.4] - 2014-12-19 +### Fixed +- Fixed resolving of !!null tag on an empty node. + + +## [3.2.3] - 2014-11-08 +### Fixed +- Implemented dumping of objects with circular and cross references. +- Partially fixed aliasing of constructed objects. (see issue #141 for details) + + +## [3.2.2] - 2014-09-07 +### Fixed +- Fixed infinite loop on unindented block scalars. +- Rewritten base64 encode/decode in binary type, to keep code licence clear. + + +## [3.2.1] - 2014-08-24 +### Fixed +- Nothig new. Just fix npm publish error. + + +## [3.2.0] - 2014-08-24 +### Added +- Added input piping support to CLI. + +### Fixed +- Fixed typo, that could cause hand on initial indent (#139). + + +## [3.1.0] - 2014-07-07 +### Changed +- 1.5x-2x speed boost. +- Removed deprecated `require('xxx.yml')` support. +- Significant code cleanup and refactoring. +- Internal API changed. If you used custom types - see updated examples. + Others are not affected. +- Even if the input string has no trailing line break character, + it will be parsed as if it has one. +- Added benchmark scripts. +- Moved bower files to /dist folder +- Bugfixes. + + +## [3.0.2] - 2014-02-27 +### Fixed +- Fixed bug: "constructor" string parsed as `null`. + + +## [3.0.1] - 2013-12-22 +### Fixed +- Fixed parsing of literal scalars. (issue #108) +- Prevented adding unnecessary spaces in object dumps. (issue #68) +- Fixed dumping of objects with very long (> 1024 in length) keys. + + +## [3.0.0] - 2013-12-16 +### Changed +- Refactored code. Changed API for custom types. +- Removed output colors in CLI, dump json by default. +- Removed big dependencies from browser version (esprima, buffer). Load `esprima` manually, if `!!js/function` needed. `!!bin` now returns Array in browser +- AMD support. +- Don't quote dumped strings because of `-` & `?` (if not first char). +- __Deprecated__ loading yaml files via `require()`, as not recommended + behaviour for node. + + +## [2.1.3] - 2013-10-16 +### Fixed +- Fix wrong loading of empty block scalars. + + +## [2.1.2] - 2013-10-07 +### Fixed +- Fix unwanted line breaks in folded scalars. + + +## [2.1.1] - 2013-10-02 +### Fixed +- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 +- Fixed reader bug in JSON-like sequences/mappings. + + +## [2.1.0] - 2013-06-05 +### Added +- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), + JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). +- Add `skipInvalid` dumper option. + +### Changed +- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` + and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. +- Use `safeLoad` for `require` extension. + +### Fixed +- Bug fix: export `NIL` constant from the public interface. + + +## [2.0.5] - 2013-04-26 +### Security +- Close security issue in !!js/function constructor. + Big thanks to @nealpoole for security audit. + + +## [2.0.4] - 2013-04-08 +### Changed +- Updated .npmignore to reduce package size + + +## [2.0.3] - 2013-02-26 +### Fixed +- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) + + +## [2.0.2] - 2013-02-15 +### Fixed +- Fixed input validation: tabs are printable characters. + + +## [2.0.1] - 2013-02-09 +### Fixed +- Fixed error, when options not passed to function cass + + +## [2.0.0] - 2013-02-09 +### Changed +- Full rewrite. New architecture. Fast one-stage parsing. +- Changed custom types API. +- Added YAML dumper. + + +## [1.0.3] - 2012-11-05 +### Fixed +- Fixed utf-8 files loading. + + +## [1.0.2] - 2012-08-02 +### Fixed +- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. +- Fix timstamps incorectly parsed in local time when no time part specified. + + +## [1.0.1] - 2012-07-07 +### Fixed +- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. +- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. + + +## [1.0.0] - 2012-07-01 +### Changed +- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. + Fixes #42. +- `require(filename)` now returns a single document and throws an Error if + file contains more than one document. +- CLI was merged back from js-yaml.bin + + +## [0.3.7] - 2012-02-28 +### Fixed +- Fix export of `addConstructor()`. Closes #39. + + +## [0.3.6] - 2012-02-22 +### Changed +- Removed AMD parts - too buggy to use. Need help to rewrite from scratch + +### Fixed +- Removed YUI compressor warning (renamed `double` variable). Closes #40. + + +## [0.3.5] - 2012-01-10 +### Fixed +- Workagound for .npmignore fuckup under windows. Thanks to airportyh. + + +## [0.3.4] - 2011-12-24 +### Fixed +- Fixes str[] for oldIEs support. +- Adds better has change support for browserified demo. +- improves compact output of Error. Closes #33. + + +## [0.3.3] - 2011-12-20 +### Added +- adds `compact` stringification of Errors. + +### Changed +- jsyaml executable moved to separate module. + + +## [0.3.2] - 2011-12-16 +### Added +- Added jsyaml executable. +- Added !!js/function support. Closes #12. + +### Fixed +- Fixes ug with block style scalars. Closes #26. +- All sources are passing JSLint now. +- Fixes bug in Safari. Closes #28. +- Fixes bug in Opers. Closes #29. +- Improves browser support. Closes #20. + + +## [0.3.1] - 2011-11-18 +### Added +- Added AMD support for browserified version. +- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. +- Added !!js/regexp and !!js/undefined types. Partially solves #12. + +### Changed +- Wrapped browserified js-yaml into closure. + +### Fixed +- Fixed the resolvement of non-specific tags. Closes #17. +- Fixed !!set mapping. +- Fixed month parse in dates. Closes #19. + + +## [0.3.0] - 2011-11-09 +### Added +- Added browserified version. Closes #13. +- Added live demo of browserified version. +- Ported some of the PyYAML tests. See #14. + +### Fixed +- Removed JS.Class dependency. Closes #3. +- Fixed timestamp bug when fraction was given. + + +## [0.2.2] - 2011-11-06 +### Fixed +- Fixed crash on docs without ---. Closes #8. +- Fixed multiline string parse +- Fixed tests/comments for using array as key + + +## [0.2.1] - 2011-11-02 +### Fixed +- Fixed short file read (<4k). Closes #9. + + +## [0.2.0] - 2011-11-02 +### Changed +- First public release + + +[4.1.0]: https://github.com/nodeca/js-yaml/compare/4.0.0...4.1.0 +[4.0.0]: https://github.com/nodeca/js-yaml/compare/3.14.0...4.0.0 +[3.14.0]: https://github.com/nodeca/js-yaml/compare/3.13.1...3.14.0 +[3.13.1]: https://github.com/nodeca/js-yaml/compare/3.13.0...3.13.1 +[3.13.0]: https://github.com/nodeca/js-yaml/compare/3.12.2...3.13.0 +[3.12.2]: https://github.com/nodeca/js-yaml/compare/3.12.1...3.12.2 +[3.12.1]: https://github.com/nodeca/js-yaml/compare/3.12.0...3.12.1 +[3.12.0]: https://github.com/nodeca/js-yaml/compare/3.11.0...3.12.0 +[3.11.0]: https://github.com/nodeca/js-yaml/compare/3.10.0...3.11.0 +[3.10.0]: https://github.com/nodeca/js-yaml/compare/3.9.1...3.10.0 +[3.9.1]: https://github.com/nodeca/js-yaml/compare/3.9.0...3.9.1 +[3.9.0]: https://github.com/nodeca/js-yaml/compare/3.8.4...3.9.0 +[3.8.4]: https://github.com/nodeca/js-yaml/compare/3.8.3...3.8.4 +[3.8.3]: https://github.com/nodeca/js-yaml/compare/3.8.2...3.8.3 +[3.8.2]: https://github.com/nodeca/js-yaml/compare/3.8.1...3.8.2 +[3.8.1]: https://github.com/nodeca/js-yaml/compare/3.8.0...3.8.1 +[3.8.0]: https://github.com/nodeca/js-yaml/compare/3.7.0...3.8.0 +[3.7.0]: https://github.com/nodeca/js-yaml/compare/3.6.1...3.7.0 +[3.6.1]: https://github.com/nodeca/js-yaml/compare/3.6.0...3.6.1 +[3.6.0]: https://github.com/nodeca/js-yaml/compare/3.5.5...3.6.0 +[3.5.5]: https://github.com/nodeca/js-yaml/compare/3.5.4...3.5.5 +[3.5.4]: https://github.com/nodeca/js-yaml/compare/3.5.3...3.5.4 +[3.5.3]: https://github.com/nodeca/js-yaml/compare/3.5.2...3.5.3 +[3.5.2]: https://github.com/nodeca/js-yaml/compare/3.5.1...3.5.2 +[3.5.1]: https://github.com/nodeca/js-yaml/compare/3.5.0...3.5.1 +[3.5.0]: https://github.com/nodeca/js-yaml/compare/3.4.6...3.5.0 +[3.4.6]: https://github.com/nodeca/js-yaml/compare/3.4.5...3.4.6 +[3.4.5]: https://github.com/nodeca/js-yaml/compare/3.4.4...3.4.5 +[3.4.4]: https://github.com/nodeca/js-yaml/compare/3.4.3...3.4.4 +[3.4.3]: https://github.com/nodeca/js-yaml/compare/3.4.2...3.4.3 +[3.4.2]: https://github.com/nodeca/js-yaml/compare/3.4.1...3.4.2 +[3.4.1]: https://github.com/nodeca/js-yaml/compare/3.4.0...3.4.1 +[3.4.0]: https://github.com/nodeca/js-yaml/compare/3.3.1...3.4.0 +[3.3.1]: https://github.com/nodeca/js-yaml/compare/3.3.0...3.3.1 +[3.3.0]: https://github.com/nodeca/js-yaml/compare/3.2.7...3.3.0 +[3.2.7]: https://github.com/nodeca/js-yaml/compare/3.2.6...3.2.7 +[3.2.6]: https://github.com/nodeca/js-yaml/compare/3.2.5...3.2.6 +[3.2.5]: https://github.com/nodeca/js-yaml/compare/3.2.4...3.2.5 +[3.2.4]: https://github.com/nodeca/js-yaml/compare/3.2.3...3.2.4 +[3.2.3]: https://github.com/nodeca/js-yaml/compare/3.2.2...3.2.3 +[3.2.2]: https://github.com/nodeca/js-yaml/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/nodeca/js-yaml/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/nodeca/js-yaml/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/nodeca/js-yaml/compare/3.0.2...3.1.0 +[3.0.2]: https://github.com/nodeca/js-yaml/compare/3.0.1...3.0.2 +[3.0.1]: https://github.com/nodeca/js-yaml/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/nodeca/js-yaml/compare/2.1.3...3.0.0 +[2.1.3]: https://github.com/nodeca/js-yaml/compare/2.1.2...2.1.3 +[2.1.2]: https://github.com/nodeca/js-yaml/compare/2.1.1...2.1.2 +[2.1.1]: https://github.com/nodeca/js-yaml/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/nodeca/js-yaml/compare/2.0.5...2.1.0 +[2.0.5]: https://github.com/nodeca/js-yaml/compare/2.0.4...2.0.5 +[2.0.4]: https://github.com/nodeca/js-yaml/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/nodeca/js-yaml/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/nodeca/js-yaml/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/nodeca/js-yaml/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/js-yaml/compare/1.0.3...2.0.0 +[1.0.3]: https://github.com/nodeca/js-yaml/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/js-yaml/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/js-yaml/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/js-yaml/compare/0.3.7...1.0.0 +[0.3.7]: https://github.com/nodeca/js-yaml/compare/0.3.6...0.3.7 +[0.3.6]: https://github.com/nodeca/js-yaml/compare/0.3.5...0.3.6 +[0.3.5]: https://github.com/nodeca/js-yaml/compare/0.3.4...0.3.5 +[0.3.4]: https://github.com/nodeca/js-yaml/compare/0.3.3...0.3.4 +[0.3.3]: https://github.com/nodeca/js-yaml/compare/0.3.2...0.3.3 +[0.3.2]: https://github.com/nodeca/js-yaml/compare/0.3.1...0.3.2 +[0.3.1]: https://github.com/nodeca/js-yaml/compare/0.3.0...0.3.1 +[0.3.0]: https://github.com/nodeca/js-yaml/compare/0.2.2...0.3.0 +[0.2.2]: https://github.com/nodeca/js-yaml/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/nodeca/js-yaml/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/nodeca/js-yaml/releases/tag/0.2.0 diff --git a/node_modules/ansi-colors/LICENSE b/node_modules/@eslint/eslintrc/node_modules/js-yaml/LICENSE similarity index 93% rename from node_modules/ansi-colors/LICENSE rename to node_modules/@eslint/eslintrc/node_modules/js-yaml/LICENSE index 8749cc754..09d3a29e9 100644 --- a/node_modules/ansi-colors/LICENSE +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +(The MIT License) -Copyright (c) 2015-present, Brian Woodward. +Copyright (C) 2011-2015 by Vitaly Puzrin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/README.md b/node_modules/@eslint/eslintrc/node_modules/js-yaml/README.md new file mode 100644 index 000000000..3cbc4bd2d --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/README.md @@ -0,0 +1,246 @@ +JS-YAML - YAML 1.2 parser / writer for JavaScript +================================================= + +[![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions) +[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml) + +__[Online Demo](http://nodeca.github.com/js-yaml/)__ + + +This is an implementation of [YAML](http://yaml.org/), a human-friendly data +serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was +completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. + + +Installation +------------ + +### YAML module for node.js + +``` +npm install js-yaml +``` + + +### CLI executable + +If you want to inspect your YAML files from CLI, install js-yaml globally: + +``` +npm install -g js-yaml +``` + +#### Usage + +``` +usage: js-yaml [-h] [-v] [-c] [-t] file + +Positional arguments: + file File with YAML document(s) + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -c, --compact Display errors in compact mode + -t, --trace Show stack trace on error +``` + + +API +--- + +Here we cover the most 'useful' methods. If you need advanced details (creating +your own tags), see [examples](https://github.com/nodeca/js-yaml/tree/master/examples) +for more info. + +``` javascript +const yaml = require('js-yaml'); +const fs = require('fs'); + +// Get document, or throw exception on error +try { + const doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8')); + console.log(doc); +} catch (e) { + console.log(e); +} +``` + + +### load (string [ , options ]) + +Parses `string` as single YAML document. Returns either a +plain object, a string, a number, `null` or `undefined`, or throws `YAMLException` on error. By default, does +not support regexps, functions and undefined. + +options: + +- `filename` _(default: null)_ - string to be used as a file path in + error/warning messages. +- `onWarning` _(default: null)_ - function to call on warning messages. + Loader will call this function with an instance of `YAMLException` for each warning. +- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use. + - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: + http://www.yaml.org/spec/1.2/spec.html#id2802346 + - `JSON_SCHEMA` - all JSON-supported types: + http://www.yaml.org/spec/1.2/spec.html#id2803231 + - `CORE_SCHEMA` - same as `JSON_SCHEMA`: + http://www.yaml.org/spec/1.2/spec.html#id2804923 + - `DEFAULT_SCHEMA` - all supported YAML types. +- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. + +NOTE: This function **does not** understand multi-document sources, it throws +exception on those. + +NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. +So, the JSON schema is not as strictly defined in the YAML specification. +It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. +The core schema also has no such restrictions. It allows binary notation for integers. + + +### loadAll (string [, iterator] [, options ]) + +Same as `load()`, but understands multi-document sources. Applies +`iterator` to each document if specified, or returns array of documents. + +``` javascript +const yaml = require('js-yaml'); + +yaml.loadAll(data, function (doc) { + console.log(doc); +}); +``` + + +### dump (object [ , options ]) + +Serializes `object` as a YAML document. Uses `DEFAULT_SCHEMA`, so it will +throw an exception if you try to dump regexps or functions. However, you can +disable exceptions by setting the `skipInvalid` option to `true`. + +options: + +- `indent` _(default: 2)_ - indentation width to use (in spaces). +- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements +- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function + in the safe schema) and skip pairs and single values with such types. +- `flowLevel` _(default: -1)_ - specifies level of nesting, when to switch from + block to flow style for collections. -1 means block style everwhere +- `styles` - "tag" => "style" map. Each tag may have own set of styles. +- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use. +- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a + function, use the function to sort the keys. +- `lineWidth` _(default: `80`)_ - set max line width. Set `-1` for unlimited width. +- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references +- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older + yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 +- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. +- `quotingType` _(`'` or `"`, default: `'`)_ - strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. +- `forceQuotes` _(default: `false`)_ - if `true`, all non-key strings will be quoted even if they normally don't need to. +- `replacer` - callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). + +The following table show availlable styles (e.g. "canonical", +"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml +output is shown on the right side after `=>` (default setting) or `->`: + +``` none +!!null + "canonical" -> "~" + "lowercase" => "null" + "uppercase" -> "NULL" + "camelcase" -> "Null" + +!!int + "binary" -> "0b1", "0b101010", "0b1110001111010" + "octal" -> "0o1", "0o52", "0o16172" + "decimal" => "1", "42", "7290" + "hexadecimal" -> "0x1", "0x2A", "0x1C7A" + +!!bool + "lowercase" => "true", "false" + "uppercase" -> "TRUE", "FALSE" + "camelcase" -> "True", "False" + +!!float + "lowercase" => ".nan", '.inf' + "uppercase" -> ".NAN", '.INF' + "camelcase" -> ".NaN", '.Inf' +``` + +Example: + +``` javascript +dump(object, { + 'styles': { + '!!null': 'canonical' // dump null as ~ + }, + 'sortKeys': true // sort object keys +}); +``` + +Supported YAML types +-------------------- + +The list of standard YAML tags and corresponding JavaScript types. See also +[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and +[YAML types repository](http://yaml.org/type/). + +``` +!!null '' # null +!!bool 'yes' # bool +!!int '3...' # number +!!float '3.14...' # number +!!binary '...base64...' # buffer +!!timestamp 'YYYY-...' # date +!!omap [ ... ] # array of key-value pairs +!!pairs [ ... ] # array or array pairs +!!set { ... } # array of objects with given keys and null values +!!str '...' # string +!!seq [ ... ] # array +!!map { ... } # object +``` + +**JavaScript-specific tags** + +See [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) for +extra types. + + +Caveats +------- + +Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects +or arrays as keys, and stringifies (by calling `toString()` method) them at the +moment of adding them. + +``` yaml +--- +? [ foo, bar ] +: - baz +? { foo: bar } +: - baz + - baz +``` + +``` javascript +{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } +``` + +Also, reading of properties on implicit block mapping keys is not supported yet. +So, the following YAML document cannot be loaded. + +``` yaml +&anchor foo: + foo: bar + *anchor: duplicate key + baz: bat + *anchor: duplicate key +``` + + +js-yaml for enterprise +---------------------- + +Available as part of the Tidelift Subscription + +The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js new file mode 100755 index 000000000..a182f1afb --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/bin/js-yaml.js @@ -0,0 +1,126 @@ +#!/usr/bin/env node + + +'use strict'; + +/*eslint-disable no-console*/ + + +var fs = require('fs'); +var argparse = require('argparse'); +var yaml = require('..'); + + +//////////////////////////////////////////////////////////////////////////////// + + +var cli = new argparse.ArgumentParser({ + prog: 'js-yaml', + add_help: true +}); + +cli.add_argument('-v', '--version', { + action: 'version', + version: require('../package.json').version +}); + +cli.add_argument('-c', '--compact', { + help: 'Display errors in compact mode', + action: 'store_true' +}); + +// deprecated (not needed after we removed output colors) +// option suppressed, but not completely removed for compatibility +cli.add_argument('-j', '--to-json', { + help: argparse.SUPPRESS, + dest: 'json', + action: 'store_true' +}); + +cli.add_argument('-t', '--trace', { + help: 'Show stack trace on error', + action: 'store_true' +}); + +cli.add_argument('file', { + help: 'File to read, utf-8 encoded without BOM', + nargs: '?', + default: '-' +}); + + +//////////////////////////////////////////////////////////////////////////////// + + +var options = cli.parse_args(); + + +//////////////////////////////////////////////////////////////////////////////// + +function readFile(filename, encoding, callback) { + if (options.file === '-') { + // read from stdin + + var chunks = []; + + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }); + + process.stdin.on('end', function () { + return callback(null, Buffer.concat(chunks).toString(encoding)); + }); + } else { + fs.readFile(filename, encoding, callback); + } +} + +readFile(options.file, 'utf8', function (error, input) { + var output, isYaml; + + if (error) { + if (error.code === 'ENOENT') { + console.error('File not found: ' + options.file); + process.exit(2); + } + + console.error( + options.trace && error.stack || + error.message || + String(error)); + + process.exit(1); + } + + try { + output = JSON.parse(input); + isYaml = false; + } catch (err) { + if (err instanceof SyntaxError) { + try { + output = []; + yaml.loadAll(input, function (doc) { output.push(doc); }, {}); + isYaml = true; + + if (output.length === 0) output = null; + else if (output.length === 1) output = output[0]; + + } catch (e) { + if (options.trace && err.stack) console.error(e.stack); + else console.error(e.toString(options.compact)); + + process.exit(1); + } + } else { + console.error( + options.trace && err.stack || + err.message || + String(err)); + + process.exit(1); + } + } + + if (isYaml) console.log(JSON.stringify(output, null, ' ')); + else console.log(yaml.dump(output)); +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.js new file mode 100644 index 000000000..4cc0ddf6d --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.js @@ -0,0 +1,3874 @@ + +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jsyaml = {})); +}(this, (function (exports) { 'use strict'; + + function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); + } + + + function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); + } + + + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; + } + + + function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; + } + + + function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; + } + + + function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); + } + + + var isNothing_1 = isNothing; + var isObject_1 = isObject; + var toArray_1 = toArray; + var repeat_1 = repeat; + var isNegativeZero_1 = isNegativeZero; + var extend_1 = extend; + + var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 + }; + + // YAML error class. http://stackoverflow.com/questions/8458984 + + + function formatError(exception, compact) { + var where = '', message = exception.reason || '(unknown reason)'; + + if (!exception.mark) return message; + + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + + where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; + + if (!compact && exception.mark.snippet) { + where += '\n\n' + exception.mark.snippet; + } + + return message + ' ' + where; + } + + + function YAMLException$1(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } + } + + + // Inherit from Error + YAMLException$1.prototype = Object.create(Error.prototype); + YAMLException$1.prototype.constructor = YAMLException$1; + + + YAMLException$1.prototype.toString = function toString(compact) { + return this.name + ': ' + formatError(this, compact); + }; + + + var exception = YAMLException$1; + + // get snippet for a single line, respecting maxLength + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ''; + var tail = ''; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + + if (position - lineStart > maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; + } + + + function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; + } + + + function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); + } + + + var snippet = makeSnippet; + + var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' + ]; + + var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' + ]; + + function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; + } + + function Type$1(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + + var type = Type$1; + + /*eslint-disable max-len*/ + + + + + + function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; + } + + + function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + + + function Schema$1(definition) { + return this.extend(definition); + } + + + Schema$1.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new exception('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type$1.loadKind && type$1.loadKind !== 'scalar') { + throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type$1.multi) { + throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema$1.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; + }; + + + var schema = Schema$1; + + var str = new type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } + }); + + var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } + }); + + var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } + }); + + var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] + }); + + function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); + } + + function constructYamlNull() { + return null; + } + + function isNull(object) { + return object === null; + } + + var _null = new type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' + }); + + function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); + } + + function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; + } + + function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; + } + + var bool = new type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' + }); + + function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); + } + + function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); + } + + function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); + } + + function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; + } + + function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); + } + + function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); + } + + var int = new type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } + }); + + var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + + function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; + } + + function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); + } + + + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + + function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; + } + + function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); + } + + var float = new type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' + }); + + var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] + }); + + var core = json; + + var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + + var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; + } + + function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); + } + + var timestamp = new type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + + function resolveYamlMerge(data) { + return data === '<<' || data === null; + } + + var merge = new type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge + }); + + /*eslint-disable no-bitwise*/ + + + + + + // [ 64, 65, 66 ] -> [ padding, CR, LF ] + var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + + function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; + } + + function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); + } + + function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; + } + + function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; + } + + var binary = new type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + + var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; + var _toString$2 = Object.prototype.toString; + + function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString$2.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; + } + + function constructYamlOmap(data) { + return data !== null ? data : []; + } + + var omap = new type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + + var _toString$1 = Object.prototype.toString; + + function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString$1.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; + } + + function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; + } + + var pairs = new type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + + var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; + } + + function constructYamlSet(data) { + return data !== null ? data : {}; + } + + var set = new type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet + }); + + var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] + }); + + /*eslint-disable max-len,no-use-before-define*/ + + + + + + + + var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + + + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + + + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + + function _class(obj) { return Object.prototype.toString.call(obj); } + + function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); + } + + function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); + } + + function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); + } + + function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; + } + + function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; + } + + function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; + } + + function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; + } + + function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; + } + + function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); + } + + var simpleEscapeCheck = new Array(256); // integer, for fast access + var simpleEscapeMap = new Array(256); + for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + + + function State$1(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || _default; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + + } + + + function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = snippet(mark); + + return new exception(message, mark); + } + + function throwError(state, message) { + throw generateError(state, message); + } + + function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } + } + + + var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty$1.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } + }; + + + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } + } + + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty$1.call(overridableKeys, keyNode) && + _hasOwnProperty$1.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; + } + + function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; + } + + function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; + } + + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } + } + + + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; + } + + function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); + } + + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); + } + + function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); + } + + function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; + } + + function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; + } + + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; + } + + function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; + } + + function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; + } + + function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + + function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } + } + + + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State$1(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; + } + + + function loadAll$1(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + + + function load$1(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception('expected a single document in the stream, but found more'); + } + + + var loadAll_1 = loadAll$1; + var load_1 = load$1; + + var loader = { + loadAll: loadAll_1, + load: load_1 + }; + + /*eslint-disable no-use-before-define*/ + + + + + + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + + var CHAR_BOM = 0xFEFF; + var CHAR_TAB = 0x09; /* Tab */ + var CHAR_LINE_FEED = 0x0A; /* LF */ + var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ + var CHAR_SPACE = 0x20; /* Space */ + var CHAR_EXCLAMATION = 0x21; /* ! */ + var CHAR_DOUBLE_QUOTE = 0x22; /* " */ + var CHAR_SHARP = 0x23; /* # */ + var CHAR_PERCENT = 0x25; /* % */ + var CHAR_AMPERSAND = 0x26; /* & */ + var CHAR_SINGLE_QUOTE = 0x27; /* ' */ + var CHAR_ASTERISK = 0x2A; /* * */ + var CHAR_COMMA = 0x2C; /* , */ + var CHAR_MINUS = 0x2D; /* - */ + var CHAR_COLON = 0x3A; /* : */ + var CHAR_EQUALS = 0x3D; /* = */ + var CHAR_GREATER_THAN = 0x3E; /* > */ + var CHAR_QUESTION = 0x3F; /* ? */ + var CHAR_COMMERCIAL_AT = 0x40; /* @ */ + var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ + var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ + var CHAR_GRAVE_ACCENT = 0x60; /* ` */ + var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ + var CHAR_VERTICAL_LINE = 0x7C; /* | */ + var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + + var ESCAPE_SEQUENCES = {}; + + ESCAPE_SEQUENCES[0x00] = '\\0'; + ESCAPE_SEQUENCES[0x07] = '\\a'; + ESCAPE_SEQUENCES[0x08] = '\\b'; + ESCAPE_SEQUENCES[0x09] = '\\t'; + ESCAPE_SEQUENCES[0x0A] = '\\n'; + ESCAPE_SEQUENCES[0x0B] = '\\v'; + ESCAPE_SEQUENCES[0x0C] = '\\f'; + ESCAPE_SEQUENCES[0x0D] = '\\r'; + ESCAPE_SEQUENCES[0x1B] = '\\e'; + ESCAPE_SEQUENCES[0x22] = '\\"'; + ESCAPE_SEQUENCES[0x5C] = '\\\\'; + ESCAPE_SEQUENCES[0x85] = '\\N'; + ESCAPE_SEQUENCES[0xA0] = '\\_'; + ESCAPE_SEQUENCES[0x2028] = '\\L'; + ESCAPE_SEQUENCES[0x2029] = '\\P'; + + var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' + ]; + + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; + } + + function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; + } + + + var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + + function State(options) { + this.schema = options['schema'] || _default; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; + } + + // Indents every line in a string. Empty lines (\n only) are not indented. + function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; + } + + function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); + } + + function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; + } + + // [33] s-white ::= s-space | s-tab + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + + // Returns true if the character can be printed without escaping. + // From YAML 1.2: "any allowed characters known to be non-printable + // should also be escaped. [However,] This isn’t mandatory" + // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. + function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); + } + + // [34] ns-char ::= nb-char - s-white + // [27] nb-char ::= c-printable - b-char - c-byte-order-mark + // [26] b-char ::= b-line-feed | b-carriage-return + // Including s-white (for some reason, examples doesn't match specs in this aspect) + // ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark + function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; + } + + // [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out + // c = flow-in ⇒ ns-plain-safe-in + // c = block-key ⇒ ns-plain-safe-out + // c = flow-key ⇒ ns-plain-safe-in + // [128] ns-plain-safe-out ::= ns-char + // [129] ns-plain-safe-in ::= ns-char - c-flow-indicator + // [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) + // | ( /* An ns-char preceding */ “#” ) + // | ( “:” /* Followed by an ns-plain-safe(c) */ ) + function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' + } + + // Simplified test for values allowed as the first character in plain style. + function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; + } + + // Simplified test for values allowed as the last character in plain style. + function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; + } + + // Same as 'string'.codePointAt(pos), but works in older browsers. + function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; + } + + // Determines whether block indentation indicator is required. + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + + var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + + // Determines which scalar styles are possible and returns the preferred style. + // lineWidth = -1 => no limit. + // Pre-conditions: str.length > 0. + // Post-conditions: + // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. + // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). + // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + + // Note: line breaking/folding is implemented for only the folded style. + // NB. We drop the last trailing newline (if any) of a returned block scalar + // since the dumper adds its own newline. This always works: + // • No ending newline => unaffected; already using strip "-" chomping. + // • Ending newline => removed then restored. + // Importantly, this keeps the "+" chomp indicator from gaining an extra line. + function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string) + '"'; + default: + throw new exception('impossible error: invalid scalar style'); + } + }()); + } + + // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; + } + + // (See the note for writeScalar.) + function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; + } + + // Note: a long line without a suitable break point will exceed the width limit. + // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. + function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; + } + + // Greedy line breaking. + // Picks the longest line under the limit each time, + // otherwise settles for the shortest line over the limit. + // NB. More-indented lines *cannot* be folded, as that would add an extra \n. + function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner + } + + // Escapes a double-quoted string. + function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; + } + + function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; + } + + function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. + } + + function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; + } + + function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new exception('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. + } + + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; + } + + // Serializes `object` and writes it to global `result`. + // Returns true on success, or false on invalid object. + // + function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new exception('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; + } + + function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + + function dump$1(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; + } + + var dump_1 = dump$1; + + var dumper = { + dump: dump_1 + }; + + function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; + } + + + var Type = type; + var Schema = schema; + var FAILSAFE_SCHEMA = failsafe; + var JSON_SCHEMA = json; + var CORE_SCHEMA = core; + var DEFAULT_SCHEMA = _default; + var load = loader.load; + var loadAll = loader.loadAll; + var dump = dumper.dump; + var YAMLException = exception; + + // Re-export all types in case user wants to create custom schema + var types = { + binary: binary, + float: float, + map: map, + null: _null, + pairs: pairs, + set: set, + timestamp: timestamp, + bool: bool, + int: int, + merge: merge, + omap: omap, + seq: seq, + str: str + }; + + // Removed functions from JS-YAML 3.0.x + var safeLoad = renamed('safeLoad', 'load'); + var safeLoadAll = renamed('safeLoadAll', 'loadAll'); + var safeDump = renamed('safeDump', 'dump'); + + var jsYaml = { + Type: Type, + Schema: Schema, + FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, + JSON_SCHEMA: JSON_SCHEMA, + CORE_SCHEMA: CORE_SCHEMA, + DEFAULT_SCHEMA: DEFAULT_SCHEMA, + load: load, + loadAll: loadAll, + dump: dump, + YAMLException: YAMLException, + types: types, + safeLoad: safeLoad, + safeLoadAll: safeLoadAll, + safeDump: safeDump + }; + + exports.CORE_SCHEMA = CORE_SCHEMA; + exports.DEFAULT_SCHEMA = DEFAULT_SCHEMA; + exports.FAILSAFE_SCHEMA = FAILSAFE_SCHEMA; + exports.JSON_SCHEMA = JSON_SCHEMA; + exports.Schema = Schema; + exports.Type = Type; + exports.YAMLException = YAMLException; + exports.default = jsYaml; + exports.dump = dump; + exports.load = load; + exports.loadAll = loadAll; + exports.safeDump = safeDump; + exports.safeLoad = safeLoad; + exports.safeLoadAll = safeLoadAll; + exports.types = types; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.min.js new file mode 100644 index 000000000..bdd8eef54 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.min.js @@ -0,0 +1,2 @@ +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})}(this,(function(e){"use strict";function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,o=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var u,p,f="",d=Math.min(e.line+t.linesAfter,c.length).toString().length,h=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=a(e.buffer,o[s-u],c[s-u],e.position-(o[s]-o[s-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=a(e.buffer,o[s],c[s],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=c.length);u++)p=a(e.buffer,o[s+u],c[s+u],e.position-(o[s]-o[s+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[];if(e instanceof p)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(d.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var I=/^[-+]?[0-9]+e/;var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),O=b.extend({implicit:[A,v,C,S]}),j=O,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==N.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=T.exec(e))&&(t=N.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var E=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var L=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=M;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=M,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=M;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString;var U=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ie=new Array(256),re=new Array(256),oe=0;oe<256;oe++)ie[oe]=te(oe)?1:0,re[oe]=te(oe);function ae(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=c(n),new o(t,n)}function ce(e,t){throw le(e,t)}function se(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var ue={YAML:function(e,t,n){var i,r,o;null!==e.version&&ce(e,"duplication of %YAML directive"),1!==n.length&&ce(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ce(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&se(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ce(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],G.test(i)||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&ce(e,'there is a previously declared suffix for "'+i+'" tag handle'),V.test(r)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ce(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function pe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=n.repeat("\n",t-1))}function be(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),45===i)&&z(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,we(e,t,3,!1,!0),a.push(e.result),ge(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ce(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),we(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(de(e,f,d,h,g,m,a,l,c),h=g=m=null),ge(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ce(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ce(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(Q(a)){do{a=e.input.charCodeAt(++e.position)}while(Q(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!J(a)&&0!==a)}for(;0!==a;){for(he(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),J(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ee(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ce(e,"expected hexadecimal character");e.result+=ne(o),e.position++}else ce(e,"unknown escape sequence");n=i=e.position}else J(l)?(pe(e,n,i,!0),ye(e,ge(e,!1,t)),n=i=e.position):e.position===e.lineStart&&me(e)?ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ce(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!z(i)&&!X(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(z(u=e.input.charCodeAt(e.position))||X(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(z(i=e.input.charCodeAt(e.position+1))||n&&X(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(z(i=e.input.charCodeAt(e.position+1))||n&&X(i))break}else if(35===u){if(z(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&me(e)||n&&X(u))break;if(J(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(pe(e,r,o,!1),ye(e,e.line-l),r=o=e.position,a=!1),Q(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return pe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ce(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&be(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ce(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function ke(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ce(e,"directive name must not be less than one character in length");0!==r;){for(;Q(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!J(r));break}if(J(r))break;for(t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&he(e),P.call(ue,n)?ue[n](e,n,i):se(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):a&&ce(e,"directives end mark is expected"),we(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&H.test(e.input.slice(o,e.position))&&se(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&me(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Re(e){return/^\n* /.test(e)}function Be(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=De(s=Ye(e,0))&&s!==Oe&&!_e(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!_e(e)&&58!==e}(Ye(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!De(u=Ye(e,c)))return 5;m=m&&qe(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Ye(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!De(u))return 5;m=m&&qe(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Re(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Ke(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Te.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(Be(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Pe(t,e.indent)+We(Me(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,He(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+He(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Ye(e,r),!(t=je[i])&&De(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Fe(i);return n}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function Pe(e,t){var n=Re(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function We(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function He(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function $e(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Ve(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Ge(e,n,!1)||Ge(e,n,!0);var c,s=Ie.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(r=0,a=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Le(e,t)),Ve(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ve(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$e(e,t-1,e.dump,r):$e(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function Ze(e,t){var n,i,r=[],o=[];for(Je(e,r,o),n=0,i=o.length;n maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; +} + + +function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; +} + + +function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); +} + + +var snippet = makeSnippet; + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type$1(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +var type = Type$1; + +/*eslint-disable max-len*/ + + + + + +function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema$1(definition) { + return this.extend(definition); +} + + +Schema$1.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new exception('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type$1.loadKind && type$1.loadKind !== 'scalar') { + throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type$1.multi) { + throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema$1.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; +}; + + +var schema = Schema$1; + +var str = new type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + +var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + +var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] +}); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +var _null = new type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' +}); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +var bool = new type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +var int = new type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +var float = new type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] +}); + +var core = json; + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +var timestamp = new type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +var merge = new type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +/*eslint-disable no-bitwise*/ + + + + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; +} + +var binary = new type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; +var _toString$2 = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString$2.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +var omap = new type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +var _toString$1 = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString$1.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +var pairs = new type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +var set = new type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] +}); + +/*eslint-disable max-len,no-use-before-define*/ + + + + + + + +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State$1(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || _default; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = snippet(mark); + + return new exception(message, mark); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty$1.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty$1.call(overridableKeys, keyNode) && + _hasOwnProperty$1.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State$1(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll$1(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load$1(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception('expected a single document in the stream, but found more'); +} + + +var loadAll_1 = loadAll$1; +var load_1 = load$1; + +var loader = { + loadAll: loadAll_1, + load: load_1 +}; + +/*eslint-disable no-use-before-define*/ + + + + + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_BOM = 0xFEFF; +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + + +var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + +function State(options) { + this.schema = options['schema'] || _default; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// Including s-white (for some reason, examples doesn't match specs in this aspect) +// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark +function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out +// c = flow-in ⇒ ns-plain-safe-in +// c = block-key ⇒ ns-plain-safe-out +// c = flow-key ⇒ ns-plain-safe-in +// [128] ns-plain-safe-out ::= ns-char +// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator +// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) +// | ( /* An ns-char preceding */ “#” ) +// | ( “:” /* Followed by an ns-plain-safe(c) */ ) +function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Simplified test for values allowed as the last character in plain style. +function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; +} + +// Same as 'string'.codePointAt(pos), but works in older browsers. +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string) + '"'; + default: + throw new exception('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new exception('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new exception('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump$1(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; +} + +var dump_1 = dump$1; + +var dumper = { + dump: dump_1 +}; + +function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; +} + + +var Type = type; +var Schema = schema; +var FAILSAFE_SCHEMA = failsafe; +var JSON_SCHEMA = json; +var CORE_SCHEMA = core; +var DEFAULT_SCHEMA = _default; +var load = loader.load; +var loadAll = loader.loadAll; +var dump = dumper.dump; +var YAMLException = exception; + +// Re-export all types in case user wants to create custom schema +var types = { + binary: binary, + float: float, + map: map, + null: _null, + pairs: pairs, + set: set, + timestamp: timestamp, + bool: bool, + int: int, + merge: merge, + omap: omap, + seq: seq, + str: str +}; + +// Removed functions from JS-YAML 3.0.x +var safeLoad = renamed('safeLoad', 'load'); +var safeLoadAll = renamed('safeLoadAll', 'loadAll'); +var safeDump = renamed('safeDump', 'dump'); + +var jsYaml = { + Type: Type, + Schema: Schema, + FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, + JSON_SCHEMA: JSON_SCHEMA, + CORE_SCHEMA: CORE_SCHEMA, + DEFAULT_SCHEMA: DEFAULT_SCHEMA, + load: load, + loadAll: loadAll, + dump: dump, + YAMLException: YAMLException, + types: types, + safeLoad: safeLoad, + safeLoadAll: safeLoadAll, + safeDump: safeDump +}; + +export default jsYaml; +export { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types }; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/index.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/index.js new file mode 100644 index 000000000..bcb7eba7a --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/index.js @@ -0,0 +1,47 @@ +'use strict'; + + +var loader = require('./lib/loader'); +var dumper = require('./lib/dumper'); + + +function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; +} + + +module.exports.Type = require('./lib/type'); +module.exports.Schema = require('./lib/schema'); +module.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe'); +module.exports.JSON_SCHEMA = require('./lib/schema/json'); +module.exports.CORE_SCHEMA = require('./lib/schema/core'); +module.exports.DEFAULT_SCHEMA = require('./lib/schema/default'); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.dump = dumper.dump; +module.exports.YAMLException = require('./lib/exception'); + +// Re-export all types in case user wants to create custom schema +module.exports.types = { + binary: require('./lib/type/binary'), + float: require('./lib/type/float'), + map: require('./lib/type/map'), + null: require('./lib/type/null'), + pairs: require('./lib/type/pairs'), + set: require('./lib/type/set'), + timestamp: require('./lib/type/timestamp'), + bool: require('./lib/type/bool'), + int: require('./lib/type/int'), + merge: require('./lib/type/merge'), + omap: require('./lib/type/omap'), + seq: require('./lib/type/seq'), + str: require('./lib/type/str') +}; + +// Removed functions from JS-YAML 3.0.x +module.exports.safeLoad = renamed('safeLoad', 'load'); +module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); +module.exports.safeDump = renamed('safeDump', 'dump'); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/common.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/common.js new file mode 100644 index 000000000..25ef7d8e4 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/common.js @@ -0,0 +1,59 @@ +'use strict'; + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/dumper.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/dumper.js new file mode 100644 index 000000000..f357a6aee --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/dumper.js @@ -0,0 +1,965 @@ +'use strict'; + +/*eslint-disable no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var DEFAULT_SCHEMA = require('./schema/default'); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_BOM = 0xFEFF; +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + + +var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + +function State(options) { + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// Including s-white (for some reason, examples doesn't match specs in this aspect) +// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark +function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out +// c = flow-in ⇒ ns-plain-safe-in +// c = block-key ⇒ ns-plain-safe-out +// c = flow-key ⇒ ns-plain-safe-in +// [128] ns-plain-safe-out ::= ns-char +// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator +// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) +// | ( /* An ns-char preceding */ “#” ) +// | ( “:” /* Followed by an ns-plain-safe(c) */ ) +function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Simplified test for values allowed as the last character in plain style. +function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; +} + +// Same as 'string'.codePointAt(pos), but works in older browsers. +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; +} + +module.exports.dump = dump; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/exception.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/exception.js new file mode 100644 index 000000000..7f62daaef --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/exception.js @@ -0,0 +1,55 @@ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + + +function formatError(exception, compact) { + var where = '', message = exception.reason || '(unknown reason)'; + + if (!exception.mark) return message; + + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + + where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; + + if (!compact && exception.mark.snippet) { + where += '\n\n' + exception.mark.snippet; + } + + return message + ' ' + where; +} + + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + return this.name + ': ' + formatError(this, compact); +}; + + +module.exports = YAMLException; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/loader.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/loader.js new file mode 100644 index 000000000..39f13f561 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/loader.js @@ -0,0 +1,1727 @@ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var makeSnippet = require('./snippet'); +var DEFAULT_SCHEMA = require('./schema/default'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = makeSnippet(mark); + + return new YAMLException(message, mark); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema.js new file mode 100644 index 000000000..65b41f401 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema.js @@ -0,0 +1,121 @@ +'use strict'; + +/*eslint-disable max-len*/ + +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + return this.extend(definition); +} + + +Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof Type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type.multi) { + throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; +}; + + +module.exports = Schema; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/core.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/core.js new file mode 100644 index 000000000..608b26de2 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/core.js @@ -0,0 +1,11 @@ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +module.exports = require('./json'); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/default.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/default.js new file mode 100644 index 000000000..3af0520d5 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/default.js @@ -0,0 +1,22 @@ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +module.exports = require('./core').extend({ + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/failsafe.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/failsafe.js new file mode 100644 index 000000000..b7a33eb7a --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/failsafe.js @@ -0,0 +1,17 @@ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/json.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/json.js new file mode 100644 index 000000000..b73df78e5 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/schema/json.js @@ -0,0 +1,19 @@ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +module.exports = require('./failsafe').extend({ + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/snippet.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/snippet.js new file mode 100644 index 000000000..00e2133c0 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/snippet.js @@ -0,0 +1,101 @@ +'use strict'; + + +var common = require('./common'); + + +// get snippet for a single line, respecting maxLength +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ''; + var tail = ''; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + + if (position - lineStart > maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; +} + + +function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; +} + + +function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); +} + + +module.exports = makeSnippet; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type.js new file mode 100644 index 000000000..5e57877fe --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type.js @@ -0,0 +1,66 @@ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/binary.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/binary.js new file mode 100644 index 000000000..e1523513d --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/binary.js @@ -0,0 +1,125 @@ +'use strict'; + +/*eslint-disable no-bitwise*/ + + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/bool.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/bool.js new file mode 100644 index 000000000..cb7745930 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/bool.js @@ -0,0 +1,35 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/float.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/float.js new file mode 100644 index 000000000..74d77ec2e --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/float.js @@ -0,0 +1,97 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/int.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/int.js new file mode 100644 index 000000000..3fe3a4437 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/int.js @@ -0,0 +1,156 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/map.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/map.js new file mode 100644 index 000000000..f327beebd --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/map.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/merge.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/merge.js new file mode 100644 index 000000000..ae08a8644 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/merge.js @@ -0,0 +1,12 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/null.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/null.js new file mode 100644 index 000000000..315ca4e23 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/null.js @@ -0,0 +1,35 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/omap.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/omap.js new file mode 100644 index 000000000..b2b5323bd --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/omap.js @@ -0,0 +1,44 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/pairs.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/pairs.js new file mode 100644 index 000000000..74b52403f --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/pairs.js @@ -0,0 +1,53 @@ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/seq.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/seq.js new file mode 100644 index 000000000..be8f77f28 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/seq.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/set.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/set.js new file mode 100644 index 000000000..f885a329c --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/set.js @@ -0,0 +1,29 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/str.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/str.js new file mode 100644 index 000000000..27acc106c --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/str.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/timestamp.js b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/timestamp.js new file mode 100644 index 000000000..8fa9c5865 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/lib/type/timestamp.js @@ -0,0 +1,88 @@ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); diff --git a/node_modules/@eslint/eslintrc/node_modules/js-yaml/package.json b/node_modules/@eslint/eslintrc/node_modules/js-yaml/package.json new file mode 100644 index 000000000..17574da80 --- /dev/null +++ b/node_modules/@eslint/eslintrc/node_modules/js-yaml/package.json @@ -0,0 +1,66 @@ +{ + "name": "js-yaml", + "version": "4.1.0", + "description": "YAML 1.2 parser and serializer", + "keywords": [ + "yaml", + "parser", + "serializer", + "pyyaml" + ], + "author": "Vladimir Zapparov ", + "contributors": [ + "Aleksey V Zapparov (http://www.ixti.net/)", + "Vitaly Puzrin (https://github.com/puzrin)", + "Martin Grenfell (http://got-ravings.blogspot.com)" + ], + "license": "MIT", + "repository": "nodeca/js-yaml", + "files": [ + "index.js", + "lib/", + "bin/", + "dist/" + ], + "bin": { + "js-yaml": "bin/js-yaml.js" + }, + "module": "./dist/js-yaml.mjs", + "exports": { + ".": { + "import": "./dist/js-yaml.mjs", + "require": "./index.js" + }, + "./package.json": "./package.json" + }, + "scripts": { + "lint": "eslint .", + "test": "npm run lint && mocha", + "coverage": "npm run lint && nyc mocha && nyc report --reporter html", + "demo": "npm run lint && node support/build_demo.js", + "gh-demo": "npm run demo && gh-pages -d demo -f", + "browserify": "rollup -c support/rollup.config.js", + "prepublishOnly": "npm run gh-demo" + }, + "unpkg": "dist/js-yaml.min.js", + "jsdelivr": "dist/js-yaml.min.js", + "dependencies": { + "argparse": "^2.0.1" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^17.0.0", + "@rollup/plugin-node-resolve": "^11.0.0", + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "codemirror": "^5.13.4", + "eslint": "^7.0.0", + "fast-check": "^2.8.0", + "gh-pages": "^3.1.0", + "mocha": "^8.2.1", + "nyc": "^15.1.0", + "rollup": "^2.34.1", + "rollup-plugin-node-polyfills": "^0.2.1", + "rollup-plugin-terser": "^7.0.2", + "shelljs": "^0.8.4" + } +} diff --git a/node_modules/@eslint/eslintrc/package.json b/node_modules/@eslint/eslintrc/package.json index 9a0546cb3..aa43e7563 100644 --- a/node_modules/@eslint/eslintrc/package.json +++ b/node_modules/@eslint/eslintrc/package.json @@ -1,95 +1,82 @@ { - "_from": "@eslint/eslintrc@^0.4.0", - "_id": "@eslint/eslintrc@0.4.0", - "_inBundle": false, - "_integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", - "_location": "/@eslint/eslintrc", - "_phantomChildren": { - "type-fest": "0.8.1" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "@eslint/eslintrc@^0.4.0", - "name": "@eslint/eslintrc", - "escapedName": "@eslint%2feslintrc", - "scope": "@eslint", - "rawSpec": "^0.4.0", - "saveSpec": null, - "fetchSpec": "^0.4.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "_shasum": "99cc0a0584d72f1df38b900fb062ba995f395547", - "_spec": "@eslint/eslintrc@^0.4.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Nicholas C. Zakas" - }, - "bugs": { - "url": "https://github.com/eslint/eslintrc/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - }, - "deprecated": false, + "name": "@eslint/eslintrc", + "version": "2.1.4", "description": "The legacy ESLintRC config file format for ESLint", - "devDependencies": { - "chai": "^4.2.0", - "eslint": "^7.7.0", - "eslint-config-eslint": "^6.0.0", - "eslint-plugin-jsdoc": "^22.1.0", - "eslint-plugin-node": "^11.1.0", - "eslint-release": "^3.1.2", - "fs-teardown": "^0.1.0", - "mocha": "^8.1.1", - "shelljs": "^0.8.4", - "sinon": "^9.2.0", - "temp-dir": "^2.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" + "type": "module", + "main": "./dist/eslintrc.cjs", + "exports": { + ".": { + "import": "./lib/index.js", + "require": "./dist/eslintrc.cjs" + }, + "./package.json": "./package.json", + "./universal": { + "import": "./lib/index-universal.js", + "require": "./dist/eslintrc-universal.cjs" + } }, "files": [ "lib", "conf", - "LICENSE" + "LICENSE", + "dist", + "universal.js" ], - "homepage": "https://github.com/eslint/eslintrc#readme", + "publishConfig": { + "access": "public" + }, + "scripts": { + "build": "rollup -c", + "lint": "eslint . --report-unused-disable-directives", + "lint:fix": "npm run lint -- --fix", + "prepare": "npm run build", + "release:generate:latest": "eslint-generate-release", + "release:generate:alpha": "eslint-generate-prerelease alpha", + "release:generate:beta": "eslint-generate-prerelease beta", + "release:generate:rc": "eslint-generate-prerelease rc", + "release:publish": "eslint-publish-release", + "test": "mocha -R progress -c 'tests/lib/*.cjs' && c8 mocha -R progress -c 'tests/lib/**/*.js'" + }, + "repository": "eslint/eslintrc", + "funding": "https://opencollective.com/eslint", "keywords": [ "ESLint", "ESLintRC", "Configuration" ], + "author": "Nicholas C. Zakas", "license": "MIT", - "main": "lib/index.js", - "name": "@eslint/eslintrc", - "publishConfig": { - "access": "public" + "bugs": { + "url": "https://github.com/eslint/eslintrc/issues" }, - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslintrc.git" + "homepage": "https://github.com/eslint/eslintrc#readme", + "devDependencies": { + "c8": "^7.7.3", + "chai": "^4.3.4", + "eslint": "^7.31.0", + "eslint-config-eslint": "^7.0.0", + "eslint-plugin-jsdoc": "^35.4.1", + "eslint-plugin-node": "^11.1.0", + "eslint-release": "^3.2.0", + "fs-teardown": "^0.1.3", + "mocha": "^9.0.3", + "rollup": "^2.70.1", + "shelljs": "^0.8.4", + "sinon": "^11.1.2", + "temp-dir": "^2.0.0" }, - "scripts": { - "generate-alpharelease": "eslint-generate-prerelease alpha", - "generate-betarelease": "eslint-generate-prerelease beta", - "generate-rcrelease": "eslint-generate-prerelease rc", - "generate-release": "eslint-generate-release", - "lint": "eslint .", - "publish-release": "eslint-publish-release", - "test": "mocha -R progress -c 'tests/lib/**/*.js'" + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, - "version": "0.4.0" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } } diff --git a/node_modules/@eslint/eslintrc/universal.js b/node_modules/@eslint/eslintrc/universal.js new file mode 100644 index 000000000..4e1846ee6 --- /dev/null +++ b/node_modules/@eslint/eslintrc/universal.js @@ -0,0 +1,9 @@ +// Jest (and probably some other runtimes with custom implementations of +// `require`) doesn't support `exports` in `package.json`, so this file is here +// to help them load this module. Note that it is also `.js` and not `.cjs` for +// the same reason - `cjs` files requires to be loaded with an extension, but +// since Jest doesn't respect `module` outside of ESM mode it still works in +// this case (and the `require` in _this_ file does specify the extension). + +// eslint-disable-next-line no-undef +module.exports = require("./dist/eslintrc-universal.cjs"); diff --git a/node_modules/@eslint/js/LICENSE b/node_modules/@eslint/js/LICENSE new file mode 100644 index 000000000..b607bb36e --- /dev/null +++ b/node_modules/@eslint/js/LICENSE @@ -0,0 +1,19 @@ +Copyright OpenJS Foundation and other contributors, + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@eslint/js/README.md b/node_modules/@eslint/js/README.md new file mode 100644 index 000000000..a8121c3a7 --- /dev/null +++ b/node_modules/@eslint/js/README.md @@ -0,0 +1,57 @@ +[![npm version](https://img.shields.io/npm/v/@eslint/js.svg)](https://www.npmjs.com/package/@eslint/js) + +# ESLint JavaScript Plugin + +[Website](https://eslint.org) | [Configure ESLint](https://eslint.org/docs/latest/use/configure) | [Rules](https://eslint.org/docs/rules/) | [Contributing](https://eslint.org/docs/latest/contribute) | [Twitter](https://twitter.com/geteslint) | [Chatroom](https://eslint.org/chat) + +The beginnings of separating out JavaScript-specific functionality from ESLint. + +Right now, this plugin contains two configurations: + +* `recommended` - enables the rules recommended by the ESLint team (the replacement for `"eslint:recommended"`) +* `all` - enables all ESLint rules (the replacement for `"eslint:all"`) + +## Installation + +```shell +npm install @eslint/js -D +``` + +## Usage + +Use in your `eslint.config.js` file anytime you want to extend one of the configs: + +```js +import js from "@eslint/js"; + +export default [ + + // apply recommended rules to JS files + { + files: ["**/*.js"], + rules: js.configs.recommended.rules + }, + + // apply recommended rules to JS files with an override + { + files: ["**/*.js"], + rules: { + ...js.configs.recommended.rules, + "no-unused-vars": "warn" + } + }, + + // apply all rules to JS files + { + files: ["**/*.js"], + rules: { + ...js.configs.all.rules, + "no-unused-vars": "warn" + } + } +] +``` + +## License + +MIT diff --git a/node_modules/@eslint/js/package.json b/node_modules/@eslint/js/package.json new file mode 100644 index 000000000..8f6776fa0 --- /dev/null +++ b/node_modules/@eslint/js/package.json @@ -0,0 +1,31 @@ +{ + "name": "@eslint/js", + "version": "8.57.0", + "description": "ESLint JavaScript language implementation", + "main": "./src/index.js", + "scripts": {}, + "files": [ + "LICENSE", + "README.md", + "src" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "https://github.com/eslint/eslint.git", + "directory": "packages/js" + }, + "homepage": "https://eslint.org", + "bugs": "https://github.com/eslint/eslint/issues/", + "keywords": [ + "javascript", + "eslint-plugin", + "eslint" + ], + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } +} diff --git a/node_modules/@eslint/js/src/configs/eslint-all.js b/node_modules/@eslint/js/src/configs/eslint-all.js new file mode 100644 index 000000000..f2f7a664a --- /dev/null +++ b/node_modules/@eslint/js/src/configs/eslint-all.js @@ -0,0 +1,211 @@ +/* + * WARNING: This file is autogenerated using the tools/update-eslint-all.js + * script. Do not edit manually. + */ +"use strict"; + +/* eslint quote-props: off -- autogenerated so don't lint */ + +module.exports = Object.freeze({ + "rules": { + "accessor-pairs": "error", + "array-callback-return": "error", + "arrow-body-style": "error", + "block-scoped-var": "error", + "camelcase": "error", + "capitalized-comments": "error", + "class-methods-use-this": "error", + "complexity": "error", + "consistent-return": "error", + "consistent-this": "error", + "constructor-super": "error", + "curly": "error", + "default-case": "error", + "default-case-last": "error", + "default-param-last": "error", + "dot-notation": "error", + "eqeqeq": "error", + "for-direction": "error", + "func-name-matching": "error", + "func-names": "error", + "func-style": "error", + "getter-return": "error", + "grouped-accessor-pairs": "error", + "guard-for-in": "error", + "id-denylist": "error", + "id-length": "error", + "id-match": "error", + "init-declarations": "error", + "line-comment-position": "error", + "logical-assignment-operators": "error", + "max-classes-per-file": "error", + "max-depth": "error", + "max-lines": "error", + "max-lines-per-function": "error", + "max-nested-callbacks": "error", + "max-params": "error", + "max-statements": "error", + "multiline-comment-style": "error", + "new-cap": "error", + "no-alert": "error", + "no-array-constructor": "error", + "no-async-promise-executor": "error", + "no-await-in-loop": "error", + "no-bitwise": "error", + "no-caller": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-console": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-constructor-return": "error", + "no-continue": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-div-regex": "error", + "no-dupe-args": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-duplicate-imports": "error", + "no-else-return": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-function": "error", + "no-empty-pattern": "error", + "no-empty-static-block": "error", + "no-eq-null": "error", + "no-eval": "error", + "no-ex-assign": "error", + "no-extend-native": "error", + "no-extra-bind": "error", + "no-extra-boolean-cast": "error", + "no-extra-label": "error", + "no-fallthrough": "error", + "no-func-assign": "error", + "no-global-assign": "error", + "no-implicit-coercion": "error", + "no-implicit-globals": "error", + "no-implied-eval": "error", + "no-import-assign": "error", + "no-inline-comments": "error", + "no-inner-declarations": "error", + "no-invalid-regexp": "error", + "no-invalid-this": "error", + "no-irregular-whitespace": "error", + "no-iterator": "error", + "no-label-var": "error", + "no-labels": "error", + "no-lone-blocks": "error", + "no-lonely-if": "error", + "no-loop-func": "error", + "no-loss-of-precision": "error", + "no-magic-numbers": "error", + "no-misleading-character-class": "error", + "no-multi-assign": "error", + "no-multi-str": "error", + "no-negated-condition": "error", + "no-nested-ternary": "error", + "no-new": "error", + "no-new-func": "error", + "no-new-native-nonconstructor": "error", + "no-new-symbol": "error", + "no-new-wrappers": "error", + "no-nonoctal-decimal-escape": "error", + "no-obj-calls": "error", + "no-object-constructor": "error", + "no-octal": "error", + "no-octal-escape": "error", + "no-param-reassign": "error", + "no-plusplus": "error", + "no-promise-executor-return": "error", + "no-proto": "error", + "no-prototype-builtins": "error", + "no-redeclare": "error", + "no-regex-spaces": "error", + "no-restricted-exports": "error", + "no-restricted-globals": "error", + "no-restricted-imports": "error", + "no-restricted-properties": "error", + "no-restricted-syntax": "error", + "no-return-assign": "error", + "no-script-url": "error", + "no-self-assign": "error", + "no-self-compare": "error", + "no-sequences": "error", + "no-setter-return": "error", + "no-shadow": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-template-curly-in-string": "error", + "no-ternary": "error", + "no-this-before-super": "error", + "no-throw-literal": "error", + "no-undef": "error", + "no-undef-init": "error", + "no-undefined": "error", + "no-underscore-dangle": "error", + "no-unexpected-multiline": "error", + "no-unmodified-loop-condition": "error", + "no-unneeded-ternary": "error", + "no-unreachable": "error", + "no-unreachable-loop": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", + "no-unused-expressions": "error", + "no-unused-labels": "error", + "no-unused-private-class-members": "error", + "no-unused-vars": "error", + "no-use-before-define": "error", + "no-useless-backreference": "error", + "no-useless-call": "error", + "no-useless-catch": "error", + "no-useless-computed-key": "error", + "no-useless-concat": "error", + "no-useless-constructor": "error", + "no-useless-escape": "error", + "no-useless-rename": "error", + "no-useless-return": "error", + "no-var": "error", + "no-void": "error", + "no-warning-comments": "error", + "no-with": "error", + "object-shorthand": "error", + "one-var": "error", + "operator-assignment": "error", + "prefer-arrow-callback": "error", + "prefer-const": "error", + "prefer-destructuring": "error", + "prefer-exponentiation-operator": "error", + "prefer-named-capture-group": "error", + "prefer-numeric-literals": "error", + "prefer-object-has-own": "error", + "prefer-object-spread": "error", + "prefer-promise-reject-errors": "error", + "prefer-regex-literals": "error", + "prefer-rest-params": "error", + "prefer-spread": "error", + "prefer-template": "error", + "radix": "error", + "require-atomic-updates": "error", + "require-await": "error", + "require-unicode-regexp": "error", + "require-yield": "error", + "sort-imports": "error", + "sort-keys": "error", + "sort-vars": "error", + "strict": "error", + "symbol-description": "error", + "unicode-bom": "error", + "use-isnan": "error", + "valid-typeof": "error", + "vars-on-top": "error", + "yoda": "error" + } +}); diff --git a/node_modules/eslint/conf/eslint-recommended.js b/node_modules/@eslint/js/src/configs/eslint-recommended.js similarity index 87% rename from node_modules/eslint/conf/eslint-recommended.js rename to node_modules/@eslint/js/src/configs/eslint-recommended.js index 2137685fb..248c613ca 100644 --- a/node_modules/eslint/conf/eslint-recommended.js +++ b/node_modules/@eslint/js/src/configs/eslint-recommended.js @@ -6,11 +6,11 @@ "use strict"; -/* eslint sort-keys: ["error", "asc"] */ +/* eslint sort-keys: ["error", "asc"] -- Long, so make more readable */ /** @type {import("../lib/shared/types").ConfigData} */ -module.exports = { - rules: { +module.exports = Object.freeze({ + rules: Object.freeze({ "constructor-super": "error", "for-direction": "error", "getter-return": "error", @@ -42,9 +42,11 @@ module.exports = { "no-inner-declarations": "error", "no-invalid-regexp": "error", "no-irregular-whitespace": "error", + "no-loss-of-precision": "error", "no-misleading-character-class": "error", "no-mixed-spaces-and-tabs": "error", "no-new-symbol": "error", + "no-nonoctal-decimal-escape": "error", "no-obj-calls": "error", "no-octal": "error", "no-prototype-builtins": "error", @@ -60,13 +62,15 @@ module.exports = { "no-unreachable": "error", "no-unsafe-finally": "error", "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", "no-unused-labels": "error", "no-unused-vars": "error", + "no-useless-backreference": "error", "no-useless-catch": "error", "no-useless-escape": "error", "no-with": "error", "require-yield": "error", "use-isnan": "error", "valid-typeof": "error" - } -}; + }) +}); diff --git a/node_modules/@eslint/js/src/index.js b/node_modules/@eslint/js/src/index.js new file mode 100644 index 000000000..0d4be486a --- /dev/null +++ b/node_modules/@eslint/js/src/index.js @@ -0,0 +1,17 @@ +/** + * @fileoverview Main package entrypoint. + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + configs: { + all: require("./configs/eslint-all"), + recommended: require("./configs/eslint-recommended") + } +}; diff --git a/node_modules/espree/node_modules/eslint-visitor-keys/LICENSE b/node_modules/@humanwhocodes/config-array/LICENSE similarity index 99% rename from node_modules/espree/node_modules/eslint-visitor-keys/LICENSE rename to node_modules/@humanwhocodes/config-array/LICENSE index 17a25538d..261eeb9e9 100644 --- a/node_modules/espree/node_modules/eslint-visitor-keys/LICENSE +++ b/node_modules/@humanwhocodes/config-array/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright contributors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/node_modules/@humanwhocodes/config-array/README.md b/node_modules/@humanwhocodes/config-array/README.md new file mode 100644 index 000000000..d64784c17 --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/README.md @@ -0,0 +1,342 @@ +# Config Array + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). + +## Description + +A config array is a way of managing configurations that are based on glob pattern matching of filenames. Each config array contains the information needed to determine the correct configuration for any file based on the filename. + +## Background + +In 2019, I submitted an [ESLint RFC](https://github.com/eslint/rfcs/pull/9) proposing a new way of configuring ESLint. The goal was to streamline what had become an increasingly complicated configuration process. Over several iterations, this proposal was eventually born. + +The basic idea is that all configuration, including overrides, can be represented by a single array where each item in the array is a config object. Config objects appearing later in the array override config objects appearing earlier in the array. You can calculate a config for a given file by traversing all config objects in the array to find the ones that match the filename. Matching is done by specifying glob patterns in `files` and `ignores` properties on each config object. Here's an example: + +```js +export default [ + + // match all JSON files + { + name: "JSON Handler", + files: ["**/*.json"], + handler: jsonHandler + }, + + // match only package.json + { + name: "package.json Handler", + files: ["package.json"], + handler: packageJsonHandler + } +]; +``` + +In this example, there are two config objects: the first matches all JSON files in all directories and the second matches just `package.json` in the base path directory (all the globs are evaluated as relative to a base path that can be specified). When you retrieve a configuration for `foo.json`, only the first config object matches so `handler` is equal to `jsonHandler`; when you retrieve a configuration for `package.json`, `handler` is equal to `packageJsonHandler` (because both config objects match, the second one wins). + +## Installation + +You can install the package using npm or Yarn: + +```bash +npm install @humanwhocodes/config-array --save + +# or + +yarn add @humanwhocodes/config-array +``` + +## Usage + +First, import the `ConfigArray` constructor: + +```js +import { ConfigArray } from "@humanwhocodes/config-array"; + +// or using CommonJS + +const { ConfigArray } = require("@humanwhocodes/config-array"); +``` + +When you create a new instance of `ConfigArray`, you must pass in two arguments: an array of configs and an options object. The array of configs is most likely read in from a configuration file, so here's a typical example: + +```js +const configFilename = path.resolve(process.cwd(), "my.config.js"); +const { default: rawConfigs } = await import(configFilename); +const configs = new ConfigArray(rawConfigs, { + + // the path to match filenames from + basePath: process.cwd(), + + // additional items in each config + schema: mySchema +}); +``` + +This example reads in an object or array from `my.config.js` and passes it into the `ConfigArray` constructor as the first argument. The second argument is an object specifying the `basePath` (the directory in which `my.config.js` is found) and a `schema` to define the additional properties of a config object beyond `files`, `ignores`, and `name`. + +### Specifying a Schema + +The `schema` option is required for you to use additional properties in config objects. The schema is an object that follows the format of an [`ObjectSchema`](https://npmjs.com/package/@humanwhocodes/object-schema). The schema specifies both validation and merge rules that the `ConfigArray` instance needs to combine configs when there are multiple matches. Here's an example: + +```js +const configFilename = path.resolve(process.cwd(), "my.config.js"); +const { default: rawConfigs } = await import(configFilename); + +const mySchema = { + + // define the handler key in configs + handler: { + required: true, + merge(a, b) { + if (!b) return a; + if (!a) return b; + }, + validate(value) { + if (typeof value !== "function") { + throw new TypeError("Function expected."); + } + } + } +}; + +const configs = new ConfigArray(rawConfigs, { + + // the path to match filenames from + basePath: process.cwd(), + + // additional item schemas in each config + schema: mySchema, + + // additional config types supported (default: []) + extraConfigTypes: ["array", "function"]; +}); +``` + +### Config Arrays + +Config arrays can be multidimensional, so it's possible for a config array to contain another config array when `extraConfigTypes` contains `"array"`, such as: + +```js +export default [ + + // JS config + { + files: ["**/*.js"], + handler: jsHandler + }, + + // JSON configs + [ + + // match all JSON files + { + name: "JSON Handler", + files: ["**/*.json"], + handler: jsonHandler + }, + + // match only package.json + { + name: "package.json Handler", + files: ["package.json"], + handler: packageJsonHandler + } + ], + + // filename must match function + { + files: [ filePath => filePath.endsWith(".md") ], + handler: markdownHandler + }, + + // filename must match all patterns in subarray + { + files: [ ["*.test.*", "*.js"] ], + handler: jsTestHandler + }, + + // filename must not match patterns beginning with ! + { + name: "Non-JS files", + files: ["!*.js"], + settings: { + js: false + } + } +]; +``` + +In this example, the array contains both config objects and a config array. When a config array is normalized (see details below), it is flattened so only config objects remain. However, the order of evaluation remains the same. + +If the `files` array contains a function, then that function is called with the absolute path of the file and is expected to return `true` if there is a match and `false` if not. (The `ignores` array can also contain functions.) + +If the `files` array contains an item that is an array of strings and functions, then all patterns must match in order for the config to match. In the preceding examples, both `*.test.*` and `*.js` must match in order for the config object to be used. + +If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically get a `settings.js` property set to `false`. + +You can also specify an `ignores` key that will force files matching those patterns to not be included. If the `ignores` key is in a config object without any other keys, then those ignores will always be applied; otherwise those ignores act as exclusions. Here's an example: + +```js +export default [ + + // Always ignored + { + ignores: ["**/.git/**", "**/node_modules/**"] + }, + + // .eslintrc.js file is ignored only when .js file matches + { + files: ["**/*.js"], + ignores: [".eslintrc.js"] + handler: jsHandler + } +]; +``` + +You can use negated patterns in `ignores` to exclude a file that was already ignored, such as: + +```js +export default [ + + // Ignore all JSON files except tsconfig.json + { + files: ["**/*"], + ignores: ["**/*.json", "!tsconfig.json"] + }, + +]; +``` + +### Config Functions + +Config arrays can also include config functions when `extraConfigTypes` contains `"function"`. A config function accepts a single parameter, `context` (defined by you), and must return either a config object or a config array (it cannot return another function). Config functions allow end users to execute code in the creation of appropriate config objects. Here's an example: + +```js +export default [ + + // JS config + { + files: ["**/*.js"], + handler: jsHandler + }, + + // JSON configs + function (context) { + return [ + + // match all JSON files + { + name: context.name + " JSON Handler", + files: ["**/*.json"], + handler: jsonHandler + }, + + // match only package.json + { + name: context.name + " package.json Handler", + files: ["package.json"], + handler: packageJsonHandler + } + ]; + } +]; +``` + +When a config array is normalized, each function is executed and replaced in the config array with the return value. + +**Note:** Config functions can also be async. + +### Normalizing Config Arrays + +Once a config array has been created and loaded with all of the raw config data, it must be normalized before it can be used. The normalization process goes through and flattens the config array as well as executing all config functions to get their final values. + +To normalize a config array, call the `normalize()` method and pass in a context object: + +```js +await configs.normalize({ + name: "MyApp" +}); +``` + +The `normalize()` method returns a promise, so be sure to use the `await` operator. The config array instance is normalized in-place, so you don't need to create a new variable. + +If you want to disallow async config functions, you can call `normalizeSync()` instead. This method is completely synchronous and does not require using the `await` operator as it does not return a promise: + +```js +await configs.normalizeSync({ + name: "MyApp" +}); +``` + +**Important:** Once a `ConfigArray` is normalized, it cannot be changed further. You can, however, create a new `ConfigArray` and pass in the normalized instance to create an unnormalized copy. + +### Getting Config for a File + +To get the config for a file, use the `getConfig()` method on a normalized config array and pass in the filename to get a config for: + +```js +// pass in absolute filename +const fileConfig = configs.getConfig(path.resolve(process.cwd(), "package.json")); +``` + +The config array always returns an object, even if there are no configs matching the given filename. You can then inspect the returned config object to determine how to proceed. + +A few things to keep in mind: + +* You must pass in the absolute filename to get a config for. +* The returned config object never has `files`, `ignores`, or `name` properties; the only properties on the object will be the other configuration options specified. +* The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation. +* A config will only be generated if the filename matches an entry in a `files` key. A config will not be generated without matching a `files` key (configs without a `files` key are only applied when another config with a `files` key is applied; configs without `files` are never applied on their own). Any config with a `files` key entry ending with `/**` or `/*` will only be applied if another entry in the same `files` key matches or another config matches. + +## Determining Ignored Paths + +You can determine if a file is ignored by using the `isFileIgnored()` method and passing in the absolute path of any file, as in this example: + +```js +const ignored = configs.isFileIgnored('/foo/bar/baz.txt'); +``` + +A file is considered ignored if any of the following is true: + +* **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/a.js` is considered ignored. +* **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/baz/a.js` is considered ignored. +* **It matches an ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +* **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +* **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored. + +For directories, use the `isDirectoryIgnored()` method and pass in the absolute path of any directory, as in this example: + +```js +const ignored = configs.isDirectoryIgnored('/foo/bar/'); +``` + +A directory is considered ignored if any of the following is true: + +* **It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/baz` is considered ignored. +* **It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/bar/baz/a.js` is considered ignored. +* **It matches and ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +* **If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored. +* **The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored. + +**Important:** A pattern such as `foo/**` means that `foo` and `foo/` are *not* ignored whereas `foo/bar` is ignored. If you want to ignore `foo` and all of its subdirectories, use the pattern `foo` or `foo/` in `ignores`. + +## Caching Mechanisms + +Each `ConfigArray` aggressively caches configuration objects to avoid unnecessary work. This caching occurs in two ways: + +1. **File-based Caching.** For each filename that is passed into a method, the resulting config is cached against that filename so you're always guaranteed to get the same object returned from `getConfig()` whenever you pass the same filename in. +2. **Index-based Caching.** Whenever a config is calculated, the config elements that were used to create the config are also cached. So if a given filename matches elements 1, 5, and 7, the resulting config is cached with a key of `1,5,7`. That way, if another file is passed that matches the same config elements, the result is already known and doesn't have to be recalculated. That means two files that match all the same elements will return the same config from `getConfig()`. + +## Acknowledgements + +The design of this project was influenced by feedback on the ESLint RFC, and incorporates ideas from: + +* Teddy Katz (@not-an-aardvark) +* Toru Nagashima (@mysticatea) +* Kai Cataldo (@kaicataldo) + +## License + +Apache 2.0 diff --git a/node_modules/@humanwhocodes/config-array/api.js b/node_modules/@humanwhocodes/config-array/api.js new file mode 100644 index 000000000..eb95429c8 --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/api.js @@ -0,0 +1,1030 @@ +'use strict'; + +var path = require('path'); +var minimatch = require('minimatch'); +var createDebug = require('debug'); +var objectSchema = require('@humanwhocodes/object-schema'); + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const NOOP_STRATEGY = { + required: false, + merge() { + return undefined; + }, + validate() { } +}; + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The base schema that every ConfigArray uses. + * @type Object + */ +const baseSchema = Object.freeze({ + name: { + required: false, + merge() { + return undefined; + }, + validate(value) { + if (typeof value !== 'string') { + throw new TypeError('Property must be a string.'); + } + } + }, + files: NOOP_STRATEGY, + ignores: NOOP_STRATEGY +}); + +/** + * @fileoverview ConfigSchema + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Asserts that a given value is an array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array. + */ +function assertIsArray(value) { + if (!Array.isArray(value)) { + throw new TypeError('Expected value to be an array.'); + } +} + +/** + * Asserts that a given value is an array containing only strings and functions. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array of strings and functions. + */ +function assertIsArrayOfStringsAndFunctions(value, name) { + assertIsArray(value); + + if (value.some(item => typeof item !== 'string' && typeof item !== 'function')) { + throw new TypeError('Expected array to only contain strings and functions.'); + } +} + +/** + * Asserts that a given value is a non-empty array. + * @param {*} value The value to check. + * @returns {void} + * @throws {TypeError} When the value is not an array or an empty array. + */ +function assertIsNonEmptyArray(value) { + if (!Array.isArray(value) || value.length === 0) { + throw new TypeError('Expected value to be a non-empty array.'); + } +} + +//------------------------------------------------------------------------------ +// Exports +//------------------------------------------------------------------------------ + +/** + * The schema for `files` and `ignores` that every ConfigArray uses. + * @type Object + */ +const filesAndIgnoresSchema = Object.freeze({ + files: { + required: false, + merge() { + return undefined; + }, + validate(value) { + + // first check if it's an array + assertIsNonEmptyArray(value); + + // then check each member + value.forEach(item => { + if (Array.isArray(item)) { + assertIsArrayOfStringsAndFunctions(item); + } else if (typeof item !== 'string' && typeof item !== 'function') { + throw new TypeError('Items must be a string, a function, or an array of strings and functions.'); + } + }); + + } + }, + ignores: { + required: false, + merge() { + return undefined; + }, + validate: assertIsArrayOfStringsAndFunctions + } +}); + +/** + * @fileoverview ConfigArray + * @author Nicholas C. Zakas + */ + + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const Minimatch = minimatch.Minimatch; +const minimatchCache = new Map(); +const negatedMinimatchCache = new Map(); +const debug = createDebug('@hwc/config-array'); + +const MINIMATCH_OPTIONS = { + // matchBase: true, + dot: true +}; + +const CONFIG_TYPES = new Set(['array', 'function']); + +const FILES_AND_IGNORES_SCHEMA = new objectSchema.ObjectSchema(filesAndIgnoresSchema); + +/** + * Shorthand for checking if a value is a string. + * @param {any} value The value to check. + * @returns {boolean} True if a string, false if not. + */ +function isString(value) { + return typeof value === 'string'; +} + +/** + * Asserts that the files and ignores keys of a config object are valid as per base schema. + * @param {object} config The config object to check. + * @returns {void} + * @throws {TypeError} If the files and ignores keys of a config object are not valid. + */ +function assertValidFilesAndIgnores(config) { + if (!config || typeof config !== 'object') { + return; + } + const validateConfig = { }; + if ('files' in config) { + validateConfig.files = config.files; + } + if ('ignores' in config) { + validateConfig.ignores = config.ignores; + } + FILES_AND_IGNORES_SCHEMA.validate(validateConfig); +} + +/** + * Wrapper around minimatch that caches minimatch patterns for + * faster matching speed over multiple file path evaluations. + * @param {string} filepath The file path to match. + * @param {string} pattern The glob pattern to match against. + * @param {object} options The minimatch options to use. + * @returns + */ +function doMatch(filepath, pattern, options = {}) { + + let cache = minimatchCache; + + if (options.flipNegate) { + cache = negatedMinimatchCache; + } + + let matcher = cache.get(pattern); + + if (!matcher) { + matcher = new Minimatch(pattern, Object.assign({}, MINIMATCH_OPTIONS, options)); + cache.set(pattern, matcher); + } + + return matcher.match(filepath); +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @param {Array} extraConfigTypes The config types to check. + * @returns {Promise} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +async function normalize(items, context, extraConfigTypes) { + + const allowFunctions = extraConfigTypes.includes('function'); + const allowArrays = extraConfigTypes.includes('array'); + + async function* flatTraverse(array) { + for (let item of array) { + if (typeof item === 'function') { + if (!allowFunctions) { + throw new TypeError('Unexpected function.'); + } + + item = item(context); + if (item.then) { + item = await item; + } + } + + if (Array.isArray(item)) { + if (!allowArrays) { + throw new TypeError('Unexpected array.'); + } + yield* flatTraverse(item); + } else if (typeof item === 'function') { + throw new TypeError('A config function can only return an object or array.'); + } else { + yield item; + } + } + } + + /* + * Async iterables cannot be used with the spread operator, so we need to manually + * create the array to return. + */ + const asyncIterable = await flatTraverse(items); + const configs = []; + + for await (const config of asyncIterable) { + configs.push(config); + } + + return configs; +} + +/** + * Normalizes a `ConfigArray` by flattening it and executing any functions + * that are found inside. + * @param {Array} items The items in a `ConfigArray`. + * @param {Object} context The context object to pass into any function + * found. + * @param {Array} extraConfigTypes The config types to check. + * @returns {Array} A flattened array containing only config objects. + * @throws {TypeError} When a config function returns a function. + */ +function normalizeSync(items, context, extraConfigTypes) { + + const allowFunctions = extraConfigTypes.includes('function'); + const allowArrays = extraConfigTypes.includes('array'); + + function* flatTraverse(array) { + for (let item of array) { + if (typeof item === 'function') { + + if (!allowFunctions) { + throw new TypeError('Unexpected function.'); + } + + item = item(context); + if (item.then) { + throw new TypeError('Async config functions are not supported.'); + } + } + + if (Array.isArray(item)) { + + if (!allowArrays) { + throw new TypeError('Unexpected array.'); + } + + yield* flatTraverse(item); + } else if (typeof item === 'function') { + throw new TypeError('A config function can only return an object or array.'); + } else { + yield item; + } + } + } + + return [...flatTraverse(items)]; +} + +/** + * Determines if a given file path should be ignored based on the given + * matcher. + * @param {Array boolean>} ignores The ignore patterns to check. + * @param {string} filePath The absolute path of the file to check. + * @param {string} relativeFilePath The relative path of the file to check. + * @returns {boolean} True if the path should be ignored and false if not. + */ +function shouldIgnorePath(ignores, filePath, relativeFilePath) { + + // all files outside of the basePath are ignored + if (relativeFilePath.startsWith('..')) { + return true; + } + + return ignores.reduce((ignored, matcher) => { + + if (!ignored) { + + if (typeof matcher === 'function') { + return matcher(filePath); + } + + // don't check negated patterns because we're not ignored yet + if (!matcher.startsWith('!')) { + return doMatch(relativeFilePath, matcher); + } + + // otherwise we're still not ignored + return false; + + } + + // only need to check negated patterns because we're ignored + if (typeof matcher === 'string' && matcher.startsWith('!')) { + return !doMatch(relativeFilePath, matcher, { + flipNegate: true + }); + } + + return ignored; + + }, false); + +} + +/** + * Determines if a given file path is matched by a config based on + * `ignores` only. + * @param {string} filePath The absolute file path to check. + * @param {string} basePath The base path for the config. + * @param {Object} config The config object to check. + * @returns {boolean} True if the file path is matched by the config, + * false if not. + */ +function pathMatchesIgnores(filePath, basePath, config) { + + /* + * For both files and ignores, functions are passed the absolute + * file path while strings are compared against the relative + * file path. + */ + const relativeFilePath = path.relative(basePath, filePath); + + return Object.keys(config).length > 1 && + !shouldIgnorePath(config.ignores, filePath, relativeFilePath); +} + + +/** + * Determines if a given file path is matched by a config. If the config + * has no `files` field, then it matches; otherwise, if a `files` field + * is present then we match the globs in `files` and exclude any globs in + * `ignores`. + * @param {string} filePath The absolute file path to check. + * @param {string} basePath The base path for the config. + * @param {Object} config The config object to check. + * @returns {boolean} True if the file path is matched by the config, + * false if not. + */ +function pathMatches(filePath, basePath, config) { + + /* + * For both files and ignores, functions are passed the absolute + * file path while strings are compared against the relative + * file path. + */ + const relativeFilePath = path.relative(basePath, filePath); + + // match both strings and functions + const match = pattern => { + + if (isString(pattern)) { + return doMatch(relativeFilePath, pattern); + } + + if (typeof pattern === 'function') { + return pattern(filePath); + } + + throw new TypeError(`Unexpected matcher type ${pattern}.`); + }; + + // check for all matches to config.files + let filePathMatchesPattern = config.files.some(pattern => { + if (Array.isArray(pattern)) { + return pattern.every(match); + } + + return match(pattern); + }); + + /* + * If the file path matches the config.files patterns, then check to see + * if there are any files to ignore. + */ + if (filePathMatchesPattern && config.ignores) { + filePathMatchesPattern = !shouldIgnorePath(config.ignores, filePath, relativeFilePath); + } + + return filePathMatchesPattern; +} + +/** + * Ensures that a ConfigArray has been normalized. + * @param {ConfigArray} configArray The ConfigArray to check. + * @returns {void} + * @throws {Error} When the `ConfigArray` is not normalized. + */ +function assertNormalized(configArray) { + // TODO: Throw more verbose error + if (!configArray.isNormalized()) { + throw new Error('ConfigArray must be normalized to perform this operation.'); + } +} + +/** + * Ensures that config types are valid. + * @param {Array} extraConfigTypes The config types to check. + * @returns {void} + * @throws {Error} When the config types array is invalid. + */ +function assertExtraConfigTypes(extraConfigTypes) { + if (extraConfigTypes.length > 2) { + throw new TypeError('configTypes must be an array with at most two items.'); + } + + for (const configType of extraConfigTypes) { + if (!CONFIG_TYPES.has(configType)) { + throw new TypeError(`Unexpected config type "${configType}" found. Expected one of: "object", "array", "function".`); + } + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +const ConfigArraySymbol = { + isNormalized: Symbol('isNormalized'), + configCache: Symbol('configCache'), + schema: Symbol('schema'), + finalizeConfig: Symbol('finalizeConfig'), + preprocessConfig: Symbol('preprocessConfig') +}; + +// used to store calculate data for faster lookup +const dataCache = new WeakMap(); + +/** + * Represents an array of config objects and provides method for working with + * those config objects. + */ +class ConfigArray extends Array { + + /** + * Creates a new instance of ConfigArray. + * @param {Iterable|Function|Object} configs An iterable yielding config + * objects, or a config function, or a config object. + * @param {string} [options.basePath=""] The path of the config file + * @param {boolean} [options.normalized=false] Flag indicating if the + * configs have already been normalized. + * @param {Object} [options.schema] The additional schema + * definitions to use for the ConfigArray schema. + * @param {Array} [options.configTypes] List of config types supported. + */ + constructor(configs, { + basePath = '', + normalized = false, + schema: customSchema, + extraConfigTypes = [] + } = {} + ) { + super(); + + /** + * Tracks if the array has been normalized. + * @property isNormalized + * @type boolean + * @private + */ + this[ConfigArraySymbol.isNormalized] = normalized; + + /** + * The schema used for validating and merging configs. + * @property schema + * @type ObjectSchema + * @private + */ + this[ConfigArraySymbol.schema] = new objectSchema.ObjectSchema( + Object.assign({}, customSchema, baseSchema) + ); + + /** + * The path of the config file that this array was loaded from. + * This is used to calculate filename matches. + * @property basePath + * @type string + */ + this.basePath = basePath; + + assertExtraConfigTypes(extraConfigTypes); + + /** + * The supported config types. + * @property configTypes + * @type Array + */ + this.extraConfigTypes = Object.freeze([...extraConfigTypes]); + + /** + * A cache to store calculated configs for faster repeat lookup. + * @property configCache + * @type Map + * @private + */ + this[ConfigArraySymbol.configCache] = new Map(); + + // init cache + dataCache.set(this, { + explicitMatches: new Map(), + directoryMatches: new Map(), + files: undefined, + ignores: undefined + }); + + // load the configs into this array + if (Array.isArray(configs)) { + this.push(...configs); + } else { + this.push(configs); + } + + } + + /** + * Prevent normal array methods from creating a new `ConfigArray` instance. + * This is to ensure that methods such as `slice()` won't try to create a + * new instance of `ConfigArray` behind the scenes as doing so may throw + * an error due to the different constructor signature. + * @returns {Function} The `Array` constructor. + */ + static get [Symbol.species]() { + return Array; + } + + /** + * Returns the `files` globs from every config object in the array. + * This can be used to determine which files will be matched by a + * config array or to use as a glob pattern when no patterns are provided + * for a command line interface. + * @returns {Array} An array of matchers. + */ + get files() { + + assertNormalized(this); + + // if this data has been cached, retrieve it + const cache = dataCache.get(this); + + if (cache.files) { + return cache.files; + } + + // otherwise calculate it + + const result = []; + + for (const config of this) { + if (config.files) { + config.files.forEach(filePattern => { + result.push(filePattern); + }); + } + } + + // store result + cache.files = result; + dataCache.set(this, cache); + + return result; + } + + /** + * Returns ignore matchers that should always be ignored regardless of + * the matching `files` fields in any configs. This is necessary to mimic + * the behavior of things like .gitignore and .eslintignore, allowing a + * globbing operation to be faster. + * @returns {string[]} An array of string patterns and functions to be ignored. + */ + get ignores() { + + assertNormalized(this); + + // if this data has been cached, retrieve it + const cache = dataCache.get(this); + + if (cache.ignores) { + return cache.ignores; + } + + // otherwise calculate it + + const result = []; + + for (const config of this) { + + /* + * We only count ignores if there are no other keys in the object. + * In this case, it acts list a globally ignored pattern. If there + * are additional keys, then ignores act like exclusions. + */ + if (config.ignores && Object.keys(config).length === 1) { + result.push(...config.ignores); + } + } + + // store result + cache.ignores = result; + dataCache.set(this, cache); + + return result; + } + + /** + * Indicates if the config array has been normalized. + * @returns {boolean} True if the config array is normalized, false if not. + */ + isNormalized() { + return this[ConfigArraySymbol.isNormalized]; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {ConfigContext} context The context object for config functions. + * @returns {Promise} The current ConfigArray instance. + */ + async normalize(context = {}) { + + if (!this.isNormalized()) { + const normalizedConfigs = await normalize(this, context, this.extraConfigTypes); + this.length = 0; + this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig].bind(this))); + this.forEach(assertValidFilesAndIgnores); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /** + * Normalizes a config array by flattening embedded arrays and executing + * config functions. + * @param {ConfigContext} context The context object for config functions. + * @returns {ConfigArray} The current ConfigArray instance. + */ + normalizeSync(context = {}) { + + if (!this.isNormalized()) { + const normalizedConfigs = normalizeSync(this, context, this.extraConfigTypes); + this.length = 0; + this.push(...normalizedConfigs.map(this[ConfigArraySymbol.preprocessConfig].bind(this))); + this.forEach(assertValidFilesAndIgnores); + this[ConfigArraySymbol.isNormalized] = true; + + // prevent further changes + Object.freeze(this); + } + + return this; + } + + /** + * Finalizes the state of a config before being cached and returned by + * `getConfig()`. Does nothing by default but is provided to be + * overridden by subclasses as necessary. + * @param {Object} config The config to finalize. + * @returns {Object} The finalized config. + */ + [ConfigArraySymbol.finalizeConfig](config) { + return config; + } + + /** + * Preprocesses a config during the normalization process. This is the + * method to override if you want to convert an array item before it is + * validated for the first time. For example, if you want to replace a + * string with an object, this is the method to override. + * @param {Object} config The config to preprocess. + * @returns {Object} The config to use in place of the argument. + */ + [ConfigArraySymbol.preprocessConfig](config) { + return config; + } + + /** + * Determines if a given file path explicitly matches a `files` entry + * and also doesn't match an `ignores` entry. Configs that don't have + * a `files` property are not considered an explicit match. + * @param {string} filePath The complete path of a file to check. + * @returns {boolean} True if the file path matches a `files` entry + * or false if not. + */ + isExplicitMatch(filePath) { + + assertNormalized(this); + + const cache = dataCache.get(this); + + // first check the cache to avoid duplicate work + let result = cache.explicitMatches.get(filePath); + + if (typeof result == 'boolean') { + return result; + } + + // TODO: Maybe move elsewhere? Maybe combine with getConfig() logic? + const relativeFilePath = path.relative(this.basePath, filePath); + + if (shouldIgnorePath(this.ignores, filePath, relativeFilePath)) { + debug(`Ignoring ${filePath}`); + + // cache and return result + cache.explicitMatches.set(filePath, false); + return false; + } + + // filePath isn't automatically ignored, so try to find a match + + for (const config of this) { + + if (!config.files) { + continue; + } + + if (pathMatches(filePath, this.basePath, config)) { + debug(`Matching config found for ${filePath}`); + cache.explicitMatches.set(filePath, true); + return true; + } + } + + return false; + } + + /** + * Returns the config object for a given file path. + * @param {string} filePath The complete path of a file to get a config for. + * @returns {Object} The config object for this file. + */ + getConfig(filePath) { + + assertNormalized(this); + + const cache = this[ConfigArraySymbol.configCache]; + + // first check the cache for a filename match to avoid duplicate work + if (cache.has(filePath)) { + return cache.get(filePath); + } + + let finalConfig; + + // next check to see if the file should be ignored + + // check if this should be ignored due to its directory + if (this.isDirectoryIgnored(path.dirname(filePath))) { + debug(`Ignoring ${filePath} based on directory pattern`); + + // cache and return result - finalConfig is undefined at this point + cache.set(filePath, finalConfig); + return finalConfig; + } + + // TODO: Maybe move elsewhere? + const relativeFilePath = path.relative(this.basePath, filePath); + + if (shouldIgnorePath(this.ignores, filePath, relativeFilePath)) { + debug(`Ignoring ${filePath} based on file pattern`); + + // cache and return result - finalConfig is undefined at this point + cache.set(filePath, finalConfig); + return finalConfig; + } + + // filePath isn't automatically ignored, so try to construct config + + const matchingConfigIndices = []; + let matchFound = false; + const universalPattern = /\/\*{1,2}$/; + + this.forEach((config, index) => { + + if (!config.files) { + + if (!config.ignores) { + debug(`Anonymous universal config found for ${filePath}`); + matchingConfigIndices.push(index); + return; + } + + if (pathMatchesIgnores(filePath, this.basePath, config)) { + debug(`Matching config found for ${filePath} (based on ignores: ${config.ignores})`); + matchingConfigIndices.push(index); + return; + } + + debug(`Skipped config found for ${filePath} (based on ignores: ${config.ignores})`); + return; + } + + /* + * If a config has a files pattern ending in /** or /*, and the + * filePath only matches those patterns, then the config is only + * applied if there is another config where the filePath matches + * a file with a specific extensions such as *.js. + */ + + const universalFiles = config.files.filter( + pattern => universalPattern.test(pattern) + ); + + // universal patterns were found so we need to check the config twice + if (universalFiles.length) { + + debug('Universal files patterns found. Checking carefully.'); + + const nonUniversalFiles = config.files.filter( + pattern => !universalPattern.test(pattern) + ); + + // check that the config matches without the non-universal files first + if ( + nonUniversalFiles.length && + pathMatches( + filePath, this.basePath, + { files: nonUniversalFiles, ignores: config.ignores } + ) + ) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + matchFound = true; + return; + } + + // if there wasn't a match then check if it matches with universal files + if ( + universalFiles.length && + pathMatches( + filePath, this.basePath, + { files: universalFiles, ignores: config.ignores } + ) + ) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + return; + } + + // if we make here, then there was no match + return; + } + + // the normal case + if (pathMatches(filePath, this.basePath, config)) { + debug(`Matching config found for ${filePath}`); + matchingConfigIndices.push(index); + matchFound = true; + return; + } + + }); + + // if matching both files and ignores, there will be no config to create + if (!matchFound) { + debug(`No matching configs found for ${filePath}`); + + // cache and return result - finalConfig is undefined at this point + cache.set(filePath, finalConfig); + return finalConfig; + } + + // check to see if there is a config cached by indices + finalConfig = cache.get(matchingConfigIndices.toString()); + + if (finalConfig) { + + // also store for filename for faster lookup next time + cache.set(filePath, finalConfig); + + return finalConfig; + } + + // otherwise construct the config + + finalConfig = matchingConfigIndices.reduce((result, index) => { + return this[ConfigArraySymbol.schema].merge(result, this[index]); + }, {}, this); + + finalConfig = this[ConfigArraySymbol.finalizeConfig](finalConfig); + + cache.set(filePath, finalConfig); + cache.set(matchingConfigIndices.toString(), finalConfig); + + return finalConfig; + } + + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The complete path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + * @deprecated Use `isFileIgnored` instead. + */ + isIgnored(filePath) { + return this.isFileIgnored(filePath); + } + + /** + * Determines if the given filepath is ignored based on the configs. + * @param {string} filePath The complete path of a file to check. + * @returns {boolean} True if the path is ignored, false if not. + */ + isFileIgnored(filePath) { + return this.getConfig(filePath) === undefined; + } + + /** + * Determines if the given directory is ignored based on the configs. + * This checks only default `ignores` that don't have `files` in the + * same config. A pattern such as `/foo` be considered to ignore the directory + * while a pattern such as `/foo/**` is not considered to ignore the + * directory because it is matching files. + * @param {string} directoryPath The complete path of a directory to check. + * @returns {boolean} True if the directory is ignored, false if not. Will + * return true for any directory that is not inside of `basePath`. + * @throws {Error} When the `ConfigArray` is not normalized. + */ + isDirectoryIgnored(directoryPath) { + + assertNormalized(this); + + const relativeDirectoryPath = path.relative(this.basePath, directoryPath) + .replace(/\\/g, '/'); + + if (relativeDirectoryPath.startsWith('..')) { + return true; + } + + // first check the cache + const cache = dataCache.get(this).directoryMatches; + + if (cache.has(relativeDirectoryPath)) { + return cache.get(relativeDirectoryPath); + } + + const directoryParts = relativeDirectoryPath.split('/'); + let relativeDirectoryToCheck = ''; + let result = false; + + /* + * In order to get the correct gitignore-style ignores, where an + * ignored parent directory cannot have any descendants unignored, + * we need to check every directory starting at the parent all + * the way down to the actual requested directory. + * + * We aggressively cache all of this info to make sure we don't + * have to recalculate everything for every call. + */ + do { + + relativeDirectoryToCheck += directoryParts.shift() + '/'; + + result = shouldIgnorePath( + this.ignores, + path.join(this.basePath, relativeDirectoryToCheck), + relativeDirectoryToCheck + ); + + cache.set(relativeDirectoryToCheck, result); + + } while (!result && directoryParts.length); + + // also cache the result for the requested path + cache.set(relativeDirectoryPath, result); + + return result; + } + +} + +exports.ConfigArray = ConfigArray; +exports.ConfigArraySymbol = ConfigArraySymbol; diff --git a/node_modules/@humanwhocodes/config-array/package.json b/node_modules/@humanwhocodes/config-array/package.json new file mode 100644 index 000000000..0c3beb3cf --- /dev/null +++ b/node_modules/@humanwhocodes/config-array/package.json @@ -0,0 +1,61 @@ +{ + "name": "@humanwhocodes/config-array", + "version": "0.11.14", + "description": "Glob-based configuration matching.", + "author": "Nicholas C. Zakas", + "main": "api.js", + "files": [ + "api.js" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/config-array.git" + }, + "bugs": { + "url": "https://github.com/humanwhocodes/config-array/issues" + }, + "homepage": "https://github.com/humanwhocodes/config-array#readme", + "scripts": { + "build": "rollup -c", + "format": "nitpik", + "lint": "eslint *.config.js src/*.js tests/*.js", + "lint:fix": "eslint --fix *.config.js src/*.js tests/*.js", + "prepublish": "npm run build", + "test:coverage": "nyc --include src/*.js npm run test", + "test": "mocha -r esm tests/ --recursive" + }, + "gitHooks": { + "pre-commit": "lint-staged" + }, + "lint-staged": { + "*.js": [ + "eslint --fix --ignore-pattern '!.eslintrc.js'" + ] + }, + "keywords": [ + "configuration", + "configarray", + "config file" + ], + "license": "Apache-2.0", + "engines": { + "node": ">=10.10.0" + }, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "devDependencies": { + "@nitpik/javascript": "0.4.0", + "@nitpik/node": "0.0.5", + "chai": "4.3.10", + "eslint": "8.52.0", + "esm": "3.2.25", + "lint-staged": "15.0.2", + "mocha": "6.2.3", + "nyc": "15.1.0", + "rollup": "3.28.1", + "yorkie": "2.0.0" + } +} diff --git a/node_modules/@humanwhocodes/module-importer/CHANGELOG.md b/node_modules/@humanwhocodes/module-importer/CHANGELOG.md new file mode 100644 index 000000000..1b442a195 --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +## [1.0.1](https://github.com/humanwhocodes/module-importer/compare/v1.0.0...v1.0.1) (2022-08-18) + + +### Bug Fixes + +* Ensure CommonJS mode works correctly. ([cf54a0b](https://github.com/humanwhocodes/module-importer/commit/cf54a0b998085066fbe1776dd0b4cacd808cc192)), closes [#6](https://github.com/humanwhocodes/module-importer/issues/6) + +## 1.0.0 (2022-08-17) + + +### Features + +* Implement ModuleImporter ([3ce4e82](https://www.github.com/humanwhocodes/module-importer/commit/3ce4e820c30c114e787bfed00a0966ac4772f563)) diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/LICENSE b/node_modules/@humanwhocodes/module-importer/LICENSE similarity index 99% rename from node_modules/eslint-utils/node_modules/eslint-visitor-keys/LICENSE rename to node_modules/@humanwhocodes/module-importer/LICENSE index 17a25538d..261eeb9e9 100644 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +++ b/node_modules/@humanwhocodes/module-importer/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright contributors + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/node_modules/@humanwhocodes/module-importer/README.md b/node_modules/@humanwhocodes/module-importer/README.md new file mode 100644 index 000000000..3de07a7fb --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/README.md @@ -0,0 +1,80 @@ +# ModuleImporter + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). + +## Description + +A utility for seamlessly importing modules in Node.js regardless if they are CommonJS or ESM format. Under the hood, this uses `import()` and relies on Node.js's CommonJS compatibility to work correctly. This ensures that the correct locations and formats are used for CommonJS so you can call one method and not worry about any compatibility issues. + +The problem with the default `import()` is that it always resolves relative to the file location in which it is called. If you want to resolve from a different location, you need to jump through a few hoops to achieve that. This package makes it easy to both resolve and import modules from any directory. + +## Usage + +### Node.js + +Install using [npm][npm] or [yarn][yarn]: + +``` +npm install @humanwhocodes/module-importer + +# or + +yarn add @humanwhocodes/module-importer +``` + +Import into your Node.js project: + +```js +// CommonJS +const { ModuleImporter } = require("@humanwhocodes/module-importer"); + +// ESM +import { ModuleImporter } from "@humanwhocodes/module-importer"; +``` + +### Bun + +Install using this command: + +``` +bun add @humanwhocodes/module-importer +``` + +Import into your Bun project: + +```js +import { ModuleImporter } from "@humanwhocodes/module-importer"; +``` + +## API + +After importing, create a new instance of `ModuleImporter` to start emitting events: + +```js +// cwd can be omitted to use process.cwd() +const importer = new ModuleImporter(cwd); + +// you can resolve the location of any package +const location = importer.resolve("./some-file.cjs"); + +// you can also import directly +const module = importer.import("./some-file.cjs"); +``` + +For both `resolve()` and `import()`, you can pass in package names and filenames. + +## Developer Setup + +1. Fork the repository +2. Clone your fork +3. Run `npm install` to setup dependencies +4. Run `npm test` to run tests + +## License + +Apache 2.0 + +[npm]: https://npmjs.com/ +[yarn]: https://yarnpkg.com/ diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs b/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs new file mode 100644 index 000000000..779e0cf6f --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/dist/module-importer.cjs @@ -0,0 +1,22 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var module$1 = require('module'); +var url = require('url'); +var path = require('path'); + +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('module-importer.cjs', document.baseURI).href))); +const __dirname$1 = path.dirname(__filename$1); +const require$1 = module$1.createRequire(__dirname$1 + "/"); +const { ModuleImporter } = require$1("./module-importer.cjs"); + +exports.ModuleImporter = ModuleImporter; diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts b/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts new file mode 100644 index 000000000..a1acbb6d3 --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.cts @@ -0,0 +1,27 @@ +export class ModuleImporter { + /** + * Creates a new instance. + * @param {string} [cwd] The current working directory to resolve from. + */ + constructor(cwd?: string); + /** + * The base directory from which paths should be resolved. + * @type {string} + */ + cwd: string; + /** + * Resolves a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {string|undefined} The location of the import. + * @throws {Error} If specifier cannot be located. + */ + resolve(specifier: string): string | undefined; + /** + * Imports a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {Promise} The module's object. + */ + import(specifier: string): Promise; +} diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts b/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts new file mode 100644 index 000000000..498f0a246 --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/dist/module-importer.d.ts @@ -0,0 +1,2 @@ +export { ModuleImporter }; +import { ModuleImporter } from "./module-importer.cjs"; diff --git a/node_modules/@humanwhocodes/module-importer/dist/module-importer.js b/node_modules/@humanwhocodes/module-importer/dist/module-importer.js new file mode 100644 index 000000000..26e052da1 --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/dist/module-importer.js @@ -0,0 +1,18 @@ +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const require = createRequire(__dirname + "/"); +const { ModuleImporter } = require("./module-importer.cjs"); + +export { ModuleImporter }; diff --git a/node_modules/@humanwhocodes/module-importer/package.json b/node_modules/@humanwhocodes/module-importer/package.json new file mode 100644 index 000000000..8ece071e9 --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/package.json @@ -0,0 +1,65 @@ +{ + "name": "@humanwhocodes/module-importer", + "version": "1.0.1", + "description": "Universal module importer for Node.js", + "main": "src/module-importer.cjs", + "module": "src/module-importer.js", + "type": "module", + "types": "dist/module-importer.d.ts", + "exports": { + "require": "./src/module-importer.cjs", + "import": "./src/module-importer.js" + }, + "files": [ + "dist", + "src" + ], + "publishConfig": { + "access": "public" + }, + "gitHooks": { + "pre-commit": "lint-staged" + }, + "lint-staged": { + "*.js": [ + "eslint --fix" + ] + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + }, + "scripts": { + "build": "rollup -c && tsc", + "prepare": "npm run build", + "lint": "eslint src/ tests/", + "test:unit": "c8 mocha tests/module-importer.test.js", + "test:build": "node tests/pkg.test.cjs && node tests/pkg.test.mjs", + "test": "npm run test:unit && npm run test:build" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/module-importer.git" + }, + "keywords": [ + "modules", + "esm", + "commonjs" + ], + "engines": { + "node": ">=12.22" + }, + "author": "Nicholas C. Zaks", + "license": "Apache-2.0", + "devDependencies": { + "@types/node": "^18.7.6", + "c8": "7.12.0", + "chai": "4.3.6", + "eslint": "8.22.0", + "lint-staged": "13.0.3", + "mocha": "9.2.2", + "rollup": "2.78.0", + "typescript": "4.7.4", + "yorkie": "2.0.0" + } +} diff --git a/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs b/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs new file mode 100644 index 000000000..3efb095e1 --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/src/module-importer.cjs @@ -0,0 +1,81 @@ +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Imports +//----------------------------------------------------------------------------- + +const { createRequire } = require("module"); +const { pathToFileURL } = require("url"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const SLASHES = new Set(["/", "\\"]); + +/** + * Normalizes directories to have a trailing slash. + * Resolve is pretty finicky -- if the directory name doesn't have + * a trailing slash then it tries to look in the parent directory. + * i.e., if the directory is "/usr/nzakas/foo" it will start the + * search in /usr/nzakas. However, if the directory is "/user/nzakas/foo/", + * then it will start the search in /user/nzakas/foo. + * @param {string} directory The directory to check. + * @returns {string} The normalized directory. + */ +function normalizeDirectory(directory) { + if (!SLASHES.has(directory[directory.length-1])) { + return directory + "/"; + } + + return directory; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Class for importing both CommonJS and ESM modules in Node.js. + */ +exports.ModuleImporter = class ModuleImporter { + + /** + * Creates a new instance. + * @param {string} [cwd] The current working directory to resolve from. + */ + constructor(cwd = process.cwd()) { + + /** + * The base directory from which paths should be resolved. + * @type {string} + */ + this.cwd = normalizeDirectory(cwd); + } + + /** + * Resolves a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {string|undefined} The location of the import. + * @throws {Error} If specifier cannot be located. + */ + resolve(specifier) { + const require = createRequire(this.cwd); + return require.resolve(specifier); + } + + /** + * Imports a module based on its name or location. + * @param {string} specifier Either an npm package name or + * relative file path. + * @returns {Promise} The module's object. + */ + import(specifier) { + const location = this.resolve(specifier); + return import(pathToFileURL(location).href); + } + +} diff --git a/node_modules/@humanwhocodes/module-importer/src/module-importer.js b/node_modules/@humanwhocodes/module-importer/src/module-importer.js new file mode 100644 index 000000000..f5464e18d --- /dev/null +++ b/node_modules/@humanwhocodes/module-importer/src/module-importer.js @@ -0,0 +1,22 @@ +/** + * @fileoverview Universal module importer + */ + +//----------------------------------------------------------------------------- +// Imports +//----------------------------------------------------------------------------- + +import { createRequire } from "module"; +import { fileURLToPath } from "url"; +import { dirname } from "path"; + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const require = createRequire(__dirname + "/"); +const { ModuleImporter } = require("./module-importer.cjs"); + +export { ModuleImporter }; diff --git a/node_modules/@humanwhocodes/object-schema/.eslintrc.js b/node_modules/@humanwhocodes/object-schema/.eslintrc.js new file mode 100644 index 000000000..4934076c4 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/.eslintrc.js @@ -0,0 +1,29 @@ +module.exports = { + "env": { + "commonjs": true, + "es6": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 2018 + }, + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ] + } +}; \ No newline at end of file diff --git a/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml b/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml new file mode 100644 index 000000000..e116514c1 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml @@ -0,0 +1,27 @@ +name: Node CI + +on: [push, pull_request] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [windows-latest, macOS-latest, ubuntu-latest] + node: [18.x, 19.x, 20.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm test + env: + CI: true diff --git a/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml b/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml new file mode 100644 index 000000000..4707f03f6 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml @@ -0,0 +1,39 @@ +on: + push: + branches: + - main +name: release-please +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - uses: GoogleCloudPlatform/release-please-action@v3 + id: release + with: + release-type: node + package-name: object-schema + # The logic below handles the npm publication: + - uses: actions/checkout@v4 + # these if statements ensure that a publication only occurs when + # a new release is created: + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v3 + with: + node-version: 12 + registry-url: 'https://registry.npmjs.org' + if: ${{ steps.release.outputs.release_created }} + - run: npm ci + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }} + + # Tweets out release announcement + - run: 'npx @humanwhocodes/tweet "Object Schema v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released!\n\n${{ github.event.release.html_url }}"' + if: ${{ steps.release.outputs.release_created }} + env: + TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }} + TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }} + TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }} + TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} diff --git a/node_modules/@humanwhocodes/object-schema/CHANGELOG.md b/node_modules/@humanwhocodes/object-schema/CHANGELOG.md new file mode 100644 index 000000000..875f79143 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +## [2.0.2](https://github.com/humanwhocodes/object-schema/compare/v2.0.1...v2.0.2) (2024-01-10) + + +### Bug Fixes + +* WrapperError should be an actual error ([2523f01](https://github.com/humanwhocodes/object-schema/commit/2523f014168167e5a40bb63e0cc03231b2c0f1bf)) + +## [2.0.1](https://github.com/humanwhocodes/object-schema/compare/v2.0.0...v2.0.1) (2023-10-20) + + +### Bug Fixes + +* Custom properties should be available on thrown errors ([6ca80b0](https://github.com/humanwhocodes/object-schema/commit/6ca80b001a4ffb678b9b5544fc53322117374376)) + +## [2.0.0](https://github.com/humanwhocodes/object-schema/compare/v1.2.1...v2.0.0) (2023-10-18) + + +### ⚠ BREAKING CHANGES + +* Throw custom errors instead of generics. + +### Features + +* Throw custom errors instead of generics. ([c6c01d7](https://github.com/humanwhocodes/object-schema/commit/c6c01d71eb354bf7b1fb3e883c40f7bd9b61647c)) + +### [1.2.1](https://www.github.com/humanwhocodes/object-schema/compare/v1.2.0...v1.2.1) (2021-11-02) + + +### Bug Fixes + +* Never return original object from individual config ([5463c5c](https://www.github.com/humanwhocodes/object-schema/commit/5463c5c6d2cb35a7b7948dffc37c899a41d1775f)) diff --git a/node_modules/@humanwhocodes/object-schema/LICENSE b/node_modules/@humanwhocodes/object-schema/LICENSE new file mode 100644 index 000000000..a5e3ae46f --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2019, Human Who Codes +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/@humanwhocodes/object-schema/README.md b/node_modules/@humanwhocodes/object-schema/README.md new file mode 100644 index 000000000..2163797f8 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/README.md @@ -0,0 +1,234 @@ +# JavaScript ObjectSchema Package + +by [Nicholas C. Zakas](https://humanwhocodes.com) + +If you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate). + +## Overview + +A JavaScript object merge/validation utility where you can define a different merge and validation strategy for each key. This is helpful when you need to validate complex data structures and then merge them in a way that is more complex than `Object.assign()`. + +## Installation + +You can install using either npm: + +``` +npm install @humanwhocodes/object-schema +``` + +Or Yarn: + +``` +yarn add @humanwhocodes/object-schema +``` + +## Usage + +Use CommonJS to get access to the `ObjectSchema` constructor: + +```js +const { ObjectSchema } = require("@humanwhocodes/object-schema"); + +const schema = new ObjectSchema({ + + // define a definition for the "downloads" key + downloads: { + required: true, + merge(value1, value2) { + return value1 + value2; + }, + validate(value) { + if (typeof value !== "number") { + throw new Error("Expected downloads to be a number."); + } + } + }, + + // define a strategy for the "versions" key + version: { + required: true, + merge(value1, value2) { + return value1.concat(value2); + }, + validate(value) { + if (!Array.isArray(value)) { + throw new Error("Expected versions to be an array."); + } + } + } +}); + +const record1 = { + downloads: 25, + versions: [ + "v1.0.0", + "v1.1.0", + "v1.2.0" + ] +}; + +const record2 = { + downloads: 125, + versions: [ + "v2.0.0", + "v2.1.0", + "v3.0.0" + ] +}; + +// make sure the records are valid +schema.validate(record1); +schema.validate(record2); + +// merge together (schema.merge() accepts any number of objects) +const result = schema.merge(record1, record2); + +// result looks like this: + +const result = { + downloads: 75, + versions: [ + "v1.0.0", + "v1.1.0", + "v1.2.0", + "v2.0.0", + "v2.1.0", + "v3.0.0" + ] +}; +``` + +## Tips and Tricks + +### Named merge strategies + +Instead of specifying a `merge()` method, you can specify one of the following strings to use a default merge strategy: + +* `"assign"` - use `Object.assign()` to merge the two values into one object. +* `"overwrite"` - the second value always replaces the first. +* `"replace"` - the second value replaces the first if the second is not `undefined`. + +For example: + +```js +const schema = new ObjectSchema({ + name: { + merge: "replace", + validate() {} + } +}); +``` + +### Named validation strategies + +Instead of specifying a `validate()` method, you can specify one of the following strings to use a default validation strategy: + +* `"array"` - value must be an array. +* `"boolean"` - value must be a boolean. +* `"number"` - value must be a number. +* `"object"` - value must be an object. +* `"object?"` - value must be an object or null. +* `"string"` - value must be a string. +* `"string!"` - value must be a non-empty string. + +For example: + +```js +const schema = new ObjectSchema({ + name: { + merge: "replace", + validate: "string" + } +}); +``` + +### Subschemas + +If you are defining a key that is, itself, an object, you can simplify the process by using a subschema. Instead of defining `merge()` and `validate()`, assign a `schema` key that contains a schema definition, like this: + +```js +const schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } +}); + +schema.validate({ + name: { + first: "n", + last: "z" + } +}); +``` + +### Remove Keys During Merge + +If the merge strategy for a key returns `undefined`, then the key will not appear in the final object. For example: + +```js +const schema = new ObjectSchema({ + date: { + merge() { + return undefined; + }, + validate(value) { + Date.parse(value); // throws an error when invalid + } + } +}); + +const object1 = { date: "5/5/2005" }; +const object2 = { date: "6/6/2006" }; + +const result = schema.merge(object1, object2); + +console.log("date" in result); // false +``` + +### Requiring Another Key Be Present + +If you'd like the presence of one key to require the presence of another key, you can use the `requires` property to specify an array of other properties that any key requires. For example: + +```js +const schema = new ObjectSchema(); + +const schema = new ObjectSchema({ + date: { + merge() { + return undefined; + }, + validate(value) { + Date.parse(value); // throws an error when invalid + } + }, + time: { + requires: ["date"], + merge(first, second) { + return second; + }, + validate(value) { + // ... + } + } +}); + +// throws error: Key "time" requires keys "date" +schema.validate({ + time: "13:45" +}); +``` + +In this example, even though `date` is an optional key, it is required to be present whenever `time` is present. + +## License + +BSD 3-Clause diff --git a/node_modules/@humanwhocodes/object-schema/package.json b/node_modules/@humanwhocodes/object-schema/package.json new file mode 100644 index 000000000..a5b57c11f --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/package.json @@ -0,0 +1,33 @@ +{ + "name": "@humanwhocodes/object-schema", + "version": "2.0.2", + "description": "An object schema merger/validator", + "main": "src/index.js", + "directories": { + "test": "tests" + }, + "scripts": { + "test": "mocha tests/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/humanwhocodes/object-schema.git" + }, + "keywords": [ + "object", + "validation", + "schema", + "merge" + ], + "author": "Nicholas C. Zakas", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/humanwhocodes/object-schema/issues" + }, + "homepage": "https://github.com/humanwhocodes/object-schema#readme", + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^5.13.0", + "mocha": "^5.2.0" + } +} diff --git a/node_modules/@humanwhocodes/object-schema/src/index.js b/node_modules/@humanwhocodes/object-schema/src/index.js new file mode 100644 index 000000000..b2bc4fb96 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/index.js @@ -0,0 +1,7 @@ +/** + * @filedescription Object Schema Package + */ + +exports.ObjectSchema = require("./object-schema").ObjectSchema; +exports.MergeStrategy = require("./merge-strategy").MergeStrategy; +exports.ValidationStrategy = require("./validation-strategy").ValidationStrategy; diff --git a/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js b/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js new file mode 100644 index 000000000..821744927 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/merge-strategy.js @@ -0,0 +1,53 @@ +/** + * @filedescription Merge Strategy + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different merge strategies. + */ +class MergeStrategy { + + /** + * Merges two keys by overwriting the first with the second. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value. + */ + static overwrite(value1, value2) { + return value2; + } + + /** + * Merges two keys by replacing the first with the second only if the + * second is defined. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} The second value if it is defined. + */ + static replace(value1, value2) { + if (typeof value2 !== "undefined") { + return value2; + } + + return value1; + } + + /** + * Merges two properties by assigning properties from the second to the first. + * @param {*} value1 The value from the first object key. + * @param {*} value2 The value from the second object key. + * @returns {*} A new object containing properties from both value1 and + * value2. + */ + static assign(value1, value2) { + return Object.assign({}, value1, value2); + } +} + +exports.MergeStrategy = MergeStrategy; diff --git a/node_modules/@humanwhocodes/object-schema/src/object-schema.js b/node_modules/@humanwhocodes/object-schema/src/object-schema.js new file mode 100644 index 000000000..62d198e42 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/object-schema.js @@ -0,0 +1,301 @@ +/** + * @filedescription Object Schema + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const { MergeStrategy } = require("./merge-strategy"); +const { ValidationStrategy } = require("./validation-strategy"); + +//----------------------------------------------------------------------------- +// Private +//----------------------------------------------------------------------------- + +const strategies = Symbol("strategies"); +const requiredKeys = Symbol("requiredKeys"); + +/** + * Validates a schema strategy. + * @param {string} name The name of the key this strategy is for. + * @param {Object} strategy The strategy for the object key. + * @param {boolean} [strategy.required=true] Whether the key is required. + * @param {string[]} [strategy.requires] Other keys that are required when + * this key is present. + * @param {Function} strategy.merge A method to call when merging two objects + * with the same key. + * @param {Function} strategy.validate A method to call when validating an + * object with the key. + * @returns {void} + * @throws {Error} When the strategy is missing a name. + * @throws {Error} When the strategy is missing a merge() method. + * @throws {Error} When the strategy is missing a validate() method. + */ +function validateDefinition(name, strategy) { + + let hasSchema = false; + if (strategy.schema) { + if (typeof strategy.schema === "object") { + hasSchema = true; + } else { + throw new TypeError("Schema must be an object."); + } + } + + if (typeof strategy.merge === "string") { + if (!(strategy.merge in MergeStrategy)) { + throw new TypeError(`Definition for key "${name}" missing valid merge strategy.`); + } + } else if (!hasSchema && typeof strategy.merge !== "function") { + throw new TypeError(`Definition for key "${name}" must have a merge property.`); + } + + if (typeof strategy.validate === "string") { + if (!(strategy.validate in ValidationStrategy)) { + throw new TypeError(`Definition for key "${name}" missing valid validation strategy.`); + } + } else if (!hasSchema && typeof strategy.validate !== "function") { + throw new TypeError(`Definition for key "${name}" must have a validate() method.`); + } +} + +//----------------------------------------------------------------------------- +// Errors +//----------------------------------------------------------------------------- + +/** + * Error when an unexpected key is found. + */ +class UnexpectedKeyError extends Error { + + /** + * Creates a new instance. + * @param {string} key The key that was unexpected. + */ + constructor(key) { + super(`Unexpected key "${key}" found.`); + } +} + +/** + * Error when a required key is missing. + */ +class MissingKeyError extends Error { + + /** + * Creates a new instance. + * @param {string} key The key that was missing. + */ + constructor(key) { + super(`Missing required key "${key}".`); + } +} + +/** + * Error when a key requires other keys that are missing. + */ +class MissingDependentKeysError extends Error { + + /** + * Creates a new instance. + * @param {string} key The key that was unexpected. + * @param {Array} requiredKeys The keys that are required. + */ + constructor(key, requiredKeys) { + super(`Key "${key}" requires keys "${requiredKeys.join("\", \"")}".`); + } +} + +/** + * Wrapper error for errors occuring during a merge or validate operation. + */ +class WrapperError extends Error { + + /** + * Creates a new instance. + * @param {string} key The object key causing the error. + * @param {Error} source The source error. + */ + constructor(key, source) { + super(`Key "${key}": ${source.message}`, { cause: source }); + + // copy over custom properties that aren't represented + for (const key of Object.keys(source)) { + if (!(key in this)) { + this[key] = source[key]; + } + } + } +} + +//----------------------------------------------------------------------------- +// Main +//----------------------------------------------------------------------------- + +/** + * Represents an object validation/merging schema. + */ +class ObjectSchema { + + /** + * Creates a new instance. + */ + constructor(definitions) { + + if (!definitions) { + throw new Error("Schema definitions missing."); + } + + /** + * Track all strategies in the schema by key. + * @type {Map} + * @property strategies + */ + this[strategies] = new Map(); + + /** + * Separately track any keys that are required for faster validation. + * @type {Map} + * @property requiredKeys + */ + this[requiredKeys] = new Map(); + + // add in all strategies + for (const key of Object.keys(definitions)) { + validateDefinition(key, definitions[key]); + + // normalize merge and validate methods if subschema is present + if (typeof definitions[key].schema === "object") { + const schema = new ObjectSchema(definitions[key].schema); + definitions[key] = { + ...definitions[key], + merge(first = {}, second = {}) { + return schema.merge(first, second); + }, + validate(value) { + ValidationStrategy.object(value); + schema.validate(value); + } + }; + } + + // normalize the merge method in case there's a string + if (typeof definitions[key].merge === "string") { + definitions[key] = { + ...definitions[key], + merge: MergeStrategy[definitions[key].merge] + }; + }; + + // normalize the validate method in case there's a string + if (typeof definitions[key].validate === "string") { + definitions[key] = { + ...definitions[key], + validate: ValidationStrategy[definitions[key].validate] + }; + }; + + this[strategies].set(key, definitions[key]); + + if (definitions[key].required) { + this[requiredKeys].set(key, definitions[key]); + } + } + } + + /** + * Determines if a strategy has been registered for the given object key. + * @param {string} key The object key to find a strategy for. + * @returns {boolean} True if the key has a strategy registered, false if not. + */ + hasKey(key) { + return this[strategies].has(key); + } + + /** + * Merges objects together to create a new object comprised of the keys + * of the all objects. Keys are merged based on the each key's merge + * strategy. + * @param {...Object} objects The objects to merge. + * @returns {Object} A new object with a mix of all objects' keys. + * @throws {Error} If any object is invalid. + */ + merge(...objects) { + + // double check arguments + if (objects.length < 2) { + throw new TypeError("merge() requires at least two arguments."); + } + + if (objects.some(object => (object == null || typeof object !== "object"))) { + throw new TypeError("All arguments must be objects."); + } + + return objects.reduce((result, object) => { + + this.validate(object); + + for (const [key, strategy] of this[strategies]) { + try { + if (key in result || key in object) { + const value = strategy.merge.call(this, result[key], object[key]); + if (value !== undefined) { + result[key] = value; + } + } + } catch (ex) { + throw new WrapperError(key, ex); + } + } + return result; + }, {}); + } + + /** + * Validates an object's keys based on the validate strategy for each key. + * @param {Object} object The object to validate. + * @returns {void} + * @throws {Error} When the object is invalid. + */ + validate(object) { + + // check existing keys first + for (const key of Object.keys(object)) { + + // check to see if the key is defined + if (!this.hasKey(key)) { + throw new UnexpectedKeyError(key); + } + + // validate existing keys + const strategy = this[strategies].get(key); + + // first check to see if any other keys are required + if (Array.isArray(strategy.requires)) { + if (!strategy.requires.every(otherKey => otherKey in object)) { + throw new MissingDependentKeysError(key, strategy.requires); + } + } + + // now apply remaining validation strategy + try { + strategy.validate.call(strategy, object[key]); + } catch (ex) { + throw new WrapperError(key, ex); + } + } + + // ensure required keys aren't missing + for (const [key] of this[requiredKeys]) { + if (!(key in object)) { + throw new MissingKeyError(key); + } + } + + } +} + +exports.ObjectSchema = ObjectSchema; diff --git a/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js b/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js new file mode 100644 index 000000000..ecf918bdd --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/src/validation-strategy.js @@ -0,0 +1,102 @@ +/** + * @filedescription Validation Strategy + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +/** + * Container class for several different validation strategies. + */ +class ValidationStrategy { + + /** + * Validates that a value is an array. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static array(value) { + if (!Array.isArray(value)) { + throw new TypeError("Expected an array."); + } + } + + /** + * Validates that a value is a boolean. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static boolean(value) { + if (typeof value !== "boolean") { + throw new TypeError("Expected a Boolean."); + } + } + + /** + * Validates that a value is a number. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static number(value) { + if (typeof value !== "number") { + throw new TypeError("Expected a number."); + } + } + + /** + * Validates that a value is a object. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static object(value) { + if (!value || typeof value !== "object") { + throw new TypeError("Expected an object."); + } + } + + /** + * Validates that a value is a object or null. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "object?"(value) { + if (typeof value !== "object") { + throw new TypeError("Expected an object or null."); + } + } + + /** + * Validates that a value is a string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static string(value) { + if (typeof value !== "string") { + throw new TypeError("Expected a string."); + } + } + + /** + * Validates that a value is a non-empty string. + * @param {*} value The value to validate. + * @returns {void} + * @throws {TypeError} If the value is invalid. + */ + static "string!"(value) { + if (typeof value !== "string" || value.length === 0) { + throw new TypeError("Expected a non-empty string."); + } + } + +} + +exports.ValidationStrategy = ValidationStrategy; diff --git a/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js b/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js new file mode 100644 index 000000000..84032d7e8 --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/tests/merge-strategy.js @@ -0,0 +1,66 @@ +/** + * @filedescription Merge Strategy Tests + */ +/* global it, describe, beforeEach */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const assert = require("chai").assert; +const { MergeStrategy } = require("../src/"); + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +describe("MergeStrategy", () => { + + + describe("overwrite()", () => { + + it("should overwrite the first value with the second when the second is defined", () => { + const result = MergeStrategy.overwrite(1, 2); + assert.strictEqual(result, 2); + }); + + it("should overwrite the first value with the second when the second is undefined", () => { + const result = MergeStrategy.overwrite(1, undefined); + assert.strictEqual(result, undefined); + }); + + }); + + describe("replace()", () => { + + it("should overwrite the first value with the second when the second is defined", () => { + const result = MergeStrategy.replace(1, 2); + assert.strictEqual(result, 2); + }); + + it("should return the first value when the second is undefined", () => { + const result = MergeStrategy.replace(1, undefined); + assert.strictEqual(result, 1); + }); + + }); + + describe("assign()", () => { + + it("should merge properties from two objects when called", () => { + + const object1 = { foo: 1, bar: 3 }; + const object2 = { foo: 2 }; + + const result = MergeStrategy.assign(object1, object2); + assert.deepStrictEqual(result, { + foo: 2, + bar: 3 + }); + }); + + }); + +}); diff --git a/node_modules/@humanwhocodes/object-schema/tests/object-schema.js b/node_modules/@humanwhocodes/object-schema/tests/object-schema.js new file mode 100644 index 000000000..514a071ac --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/tests/object-schema.js @@ -0,0 +1,659 @@ +/** + * @filedescription Object Schema Tests + */ +/* global it, describe, beforeEach */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const assert = require("chai").assert; +const { ObjectSchema } = require("../src/"); + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +describe("ObjectSchema", () => { + + let schema; + + describe("new ObjectSchema()", () => { + + it("should add a new key when a strategy is passed", () => { + schema = new ObjectSchema({ + foo: { + merge() {}, + validate() {} + } + }); + + assert.isTrue(schema.hasKey("foo")); + }); + + it("should throw an error when a strategy is missing a merge() method", () => { + assert.throws(() => { + schema = new ObjectSchema({ + foo: { + validate() { } + } + }); + }, /Definition for key "foo" must have a merge property/); + }); + + it("should throw an error when a strategy is missing a merge() method", () => { + assert.throws(() => { + schema = new ObjectSchema(); + }, /Schema definitions missing/); + }); + + it("should throw an error when a strategy is missing a validate() method", () => { + assert.throws(() => { + schema = new ObjectSchema({ + foo: { + merge() { }, + } + }); + }, /Definition for key "foo" must have a validate\(\) method/); + }); + + it("should throw an error when merge is an invalid string", () => { + assert.throws(() => { + new ObjectSchema({ + foo: { + merge: "bar", + validate() { } + } + }); + }, /key "foo" missing valid merge strategy/); + }); + + it("should throw an error when validate is an invalid string", () => { + assert.throws(() => { + new ObjectSchema({ + foo: { + merge: "assign", + validate: "s" + } + }); + }, /key "foo" missing valid validation strategy/); + }); + + }); + + + describe("merge()", () => { + + it("should throw an error when an unexpected key is found", () => { + let schema = new ObjectSchema({}); + + assert.throws(() => { + schema.merge({ foo: true }, { foo: true }); + }, /Unexpected key "foo"/); + }); + + it("should throw an error when merge() throws an error", () => { + let schema = new ObjectSchema({ + foo: { + merge() { + throw new Error("Boom!"); + }, + validate() {} + } + }); + + assert.throws(() => { + schema.merge({ foo: true }, { foo: true }); + }, /Key "foo": Boom!/); + + }); + + it("should throw an error when merge() throws an error with a readonly message", () => { + let schema = new ObjectSchema({ + foo: { + merge() { + throw { + get message() { + return "Boom!"; + } + }; + }, + validate() {} + } + }); + + assert.throws(() => { + schema.merge({ foo: true }, { foo: true }); + }, /Key "foo": Boom!/); + + }); + + it("should throw an error with custom properties when merge() throws an error with custom properties", () => { + let schema = new ObjectSchema({ + foo: { + merge() { + throw { + get message() { + return "Boom!"; + }, + booya: true + }; + }, + validate() {} + } + }); + + let errorThrown = false; + + try { + schema.merge({ foo: true }, { foo: true }); + } catch (ex) { + errorThrown = true; + assert.isTrue(ex.booya); + } + + assert.isTrue(errorThrown); + + }); + + it("should call the merge() strategy for one key when called", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() {} + } + }); + + const result = schema.merge({ foo: true }, { foo: false }); + assert.propertyVal(result, "foo", "bar"); + }); + + it("should not call the merge() strategy when both objects don't contain the key", () => { + + let called = false; + + schema = new ObjectSchema({ + foo: { + merge() { + called = true; + }, + validate() {} + } + }); + + schema.merge({}, {}); + assert.isFalse(called, "The merge() strategy should not have been called."); + }); + + it("should omit returning the key when the merge() strategy returns undefined", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return undefined; + }, + validate() { } + } + }); + + const result = schema.merge({ foo: true }, { foo: false }); + assert.notProperty(result, "foo"); + }); + + it("should call the merge() strategy for two keys when called", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + bar: { + merge() { + return "baz"; + }, + validate() {} + } + }); + + const result = schema.merge({ foo: true, bar: 1 }, { foo: true, bar: 2 }); + assert.propertyVal(result, "foo", "bar"); + assert.propertyVal(result, "bar", "baz"); + }); + + it("should call the merge() strategy for two keys when called on three objects", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + bar: { + merge() { + return "baz"; + }, + validate() { } + } + }); + + const result = schema.merge( + { foo: true, bar: 1 }, + { foo: true, bar: 3 }, + { foo: false, bar: 2 } + ); + assert.propertyVal(result, "foo", "bar"); + assert.propertyVal(result, "bar", "baz"); + }); + + it("should call the merge() strategy when defined as 'overwrite'", () => { + schema = new ObjectSchema({ + foo: { + merge: "overwrite", + validate() { } + } + }); + + const result = schema.merge( + { foo: true }, + { foo: false } + ); + assert.propertyVal(result, "foo", false); + }); + + it("should call the merge() strategy when defined as 'assign'", () => { + schema = new ObjectSchema({ + foo: { + merge: "assign", + validate() { } + } + }); + + const result = schema.merge( + { foo: { bar: true } }, + { foo: { baz: false } } + ); + + assert.strictEqual(result.foo.bar, true); + assert.strictEqual(result.foo.baz, false); + }); + + it("should call the merge strategy when there's a subschema", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + const result = schema.merge({ + name: { + first: "n", + last: "z" + } + }, { + name: { + first: "g" + } + }); + + assert.strictEqual(result.name.first, "g"); + assert.strictEqual(result.name.last, "z"); + }); + + it("should return separate objects when using subschema", () => { + + schema = new ObjectSchema({ + age: { + merge: "replace", + validate: "number" + }, + address: { + schema: { + street: { + schema: { + number: { + merge: "replace", + validate: "number" + }, + streetName: { + merge: "replace", + validate: "string" + } + } + }, + state: { + merge: "replace", + validate: "string" + } + } + } + }); + + const baseObject = { + address: { + street: { + number: 100, + streetName: "Foo St" + }, + state: "HA" + } + }; + + const result = schema.merge(baseObject, { + age: 29 + }); + + assert.notStrictEqual(result.address.street, baseObject.address.street); + assert.deepStrictEqual(result.address, baseObject.address); + }); + + it("should not error when calling the merge strategy when there's a subschema and no matching key in second object", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + const result = schema.merge({ + name: { + first: "n", + last: "z" + } + }, { + }); + + assert.strictEqual(result.name.first, "n"); + assert.strictEqual(result.name.last, "z"); + }); + + it("should not error when calling the merge strategy when there's multiple subschemas and no matching key in second object", () => { + + schema = new ObjectSchema({ + user: { + schema: { + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + + } + } + }); + + const result = schema.merge({ + user: { + name: { + first: "n", + last: "z" + } + } + }, { + }); + + assert.strictEqual(result.user.name.first, "n"); + assert.strictEqual(result.user.name.last, "z"); + }); + + + }); + + describe("validate()", () => { + + it("should throw an error when an unexpected key is found", () => { + let schema = new ObjectSchema({}); + assert.throws(() => { + schema.validate({ foo: true }); + }, /Unexpected key "foo"/); + }); + + it("should not throw an error when an expected key is found", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() {} + } + }); + + schema.validate({ foo: true }); + }); + + it("should pass the property value into validate() when key is found", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate(value) { + assert.isTrue(value); + } + } + }); + + schema.validate({ foo: true }); + }); + + it("should not throw an error when expected keys are found", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() {} + }, + bar: { + merge() { + return "baz"; + }, + validate() {} + } + }); + + schema.validate({ foo: true, bar: true }); + }); + + it("should not throw an error when expected keys are found with required keys", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + bar: { + requires: ["foo"], + merge() { + return "baz"; + }, + validate() { } + } + }); + + schema.validate({ foo: true, bar: true }); + }); + + it("should throw an error when expected keys are found without required keys", () => { + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { } + }, + baz: { + merge() { + return "baz"; + }, + validate() { } + }, + bar: { + name: "bar", + requires: ["foo", "baz"], + merge() { }, + validate() { } + } + }); + + assert.throws(() => { + schema.validate({ bar: true }); + }, /Key "bar" requires keys "foo", "baz"./); + }); + + + it("should throw an error when an expected key is found but is invalid", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate() { + throw new Error("Invalid key."); + } + } + }); + + assert.throws(() => { + schema.validate({ foo: true }); + }, /Key "foo": Invalid key/); + }); + + it("should throw an error when an expected key is found but is invalid with a string validator", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate: "string" + } + }); + + assert.throws(() => { + schema.validate({ foo: true }); + }, /Key "foo": Expected a string/); + }); + + it("should throw an error when an expected key is found but is invalid with a number validator", () => { + + schema = new ObjectSchema({ + foo: { + merge() { + return "bar"; + }, + validate: "number" + } + }); + + assert.throws(() => { + schema.validate({ foo: true }); + }, /Key "foo": Expected a number/); + }); + + it("should throw an error when a required key is missing", () => { + + schema = new ObjectSchema({ + foo: { + required: true, + merge() { + return "bar"; + }, + validate() {} + } + }); + + assert.throws(() => { + schema.validate({}); + }, /Missing required key "foo"/); + }); + + it("should throw an error when a subschema is provided and the value doesn't validate", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + assert.throws(() => { + schema.validate({ + name: { + first: 123, + last: "z" + } + }); + + }, /Key "name": Key "first": Expected a string/); + }); + + it("should not throw an error when a subschema is provided and the value validates", () => { + + schema = new ObjectSchema({ + name: { + schema: { + first: { + merge: "replace", + validate: "string" + }, + last: { + merge: "replace", + validate: "string" + } + } + } + }); + + schema.validate({ + name: { + first: "n", + last: "z" + } + }); + + }); + + }); + +}); diff --git a/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js b/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js new file mode 100644 index 000000000..5d3e4a24d --- /dev/null +++ b/node_modules/@humanwhocodes/object-schema/tests/validation-strategy.js @@ -0,0 +1,186 @@ +/** + * @filedescription Merge Strategy Tests + */ +/* global it, describe, beforeEach */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const assert = require("chai").assert; +const { ValidationStrategy } = require("../src/"); + +//----------------------------------------------------------------------------- +// Class +//----------------------------------------------------------------------------- + +describe("ValidationStrategy", () => { + + describe("boolean", () => { + it("should not throw an error when the value is a boolean", () => { + ValidationStrategy.boolean(true); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.boolean(null); + }, /Expected a Boolean/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.boolean("foo"); + }, /Expected a Boolean/); + }); + + it("should throw an error when the value is a number", () => { + assert.throws(() => { + ValidationStrategy.boolean(123); + }, /Expected a Boolean/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.boolean({}); + }, /Expected a Boolean/); + }); + }); + + describe("number", () => { + it("should not throw an error when the value is a number", () => { + ValidationStrategy.number(25); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.number(null); + }, /Expected a number/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.number("foo"); + }, /Expected a number/); + }); + + it("should throw an error when the value is a boolean", () => { + assert.throws(() => { + ValidationStrategy.number(true); + }, /Expected a number/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.number({}); + }, /Expected a number/); + }); + }); + + describe("object", () => { + it("should not throw an error when the value is an object", () => { + ValidationStrategy.object({}); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.object(null); + }, /Expected an object/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.object(""); + }, /Expected an object/); + }); + }); + + describe("array", () => { + it("should not throw an error when the value is an array", () => { + ValidationStrategy.array([]); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.array(null); + }, /Expected an array/); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy.array(""); + }, /Expected an array/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.array({}); + }, /Expected an array/); + }); + }); + + describe("object?", () => { + it("should not throw an error when the value is an object", () => { + ValidationStrategy["object?"]({}); + }); + + it("should not throw an error when the value is null", () => { + ValidationStrategy["object?"](null); + }); + + it("should throw an error when the value is a string", () => { + assert.throws(() => { + ValidationStrategy["object?"](""); + }, /Expected an object/); + }); + }); + + describe("string", () => { + it("should not throw an error when the value is a string", () => { + ValidationStrategy.string("foo"); + }); + + it("should not throw an error when the value is an empty string", () => { + ValidationStrategy.string(""); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy.string(null); + }, /Expected a string/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy.string({}); + }, /Expected a string/); + }); + }); + + describe("string!", () => { + it("should not throw an error when the value is an string", () => { + ValidationStrategy["string!"]("foo"); + }); + + it("should throw an error when the value is an empty string", () => { + assert.throws(() => { + ValidationStrategy["string!"](""); + }, /Expected a non-empty string/); + }); + + it("should throw an error when the value is null", () => { + assert.throws(() => { + ValidationStrategy["string!"](null); + }, /Expected a non-empty string/); + }); + + it("should throw an error when the value is an object", () => { + assert.throws(() => { + ValidationStrategy["string!"]({}); + }, /Expected a non-empty string/); + }); + }); + + +}); diff --git a/node_modules/v8-compile-cache/LICENSE b/node_modules/@nodelib/fs.scandir/LICENSE similarity index 96% rename from node_modules/v8-compile-cache/LICENSE rename to node_modules/@nodelib/fs.scandir/LICENSE index b72b67018..65a999460 100644 --- a/node_modules/v8-compile-cache/LICENSE +++ b/node_modules/@nodelib/fs.scandir/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Andres Suarez +Copyright (c) Denis Malinochkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/@nodelib/fs.scandir/README.md b/node_modules/@nodelib/fs.scandir/README.md new file mode 100644 index 000000000..e0b218b9f --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/README.md @@ -0,0 +1,171 @@ +# @nodelib/fs.scandir + +> List files and directories inside the specified directory. + +## :bulb: Highlights + +The package is aimed at obtaining information about entries in the directory. + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :gear: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type. See [`old` and `modern` mode](#old-and-modern-mode). +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.scandir +``` + +## Usage + +```ts +import * as fsScandir from '@nodelib/fs.scandir'; + +fsScandir.scandir('path', (error, stats) => { /* … */ }); +``` + +## API + +### .scandir(path, [optionsOrSettings], callback) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path with standard callback-style. + +```ts +fsScandir.scandir('path', (error, entries) => { /* … */ }); +fsScandir.scandir('path', {}, (error, entries) => { /* … */ }); +fsScandir.scandir('path', new fsScandir.Settings(), (error, entries) => { /* … */ }); +``` + +### .scandirSync(path, [optionsOrSettings]) + +Returns an array of plain objects ([`Entry`](#entry)) with information about entry for provided path. + +```ts +const entries = fsScandir.scandirSync('path'); +const entries = fsScandir.scandirSync('path', {}); +const entries = fsScandir.scandirSync(('path', new fsScandir.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settingsoptions) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsScandir.Settings({ followSymbolicLinks: false }); + +const entries = fsScandir.scandirSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. On Node.js below 10.10 will be emulated by [`DirentFromStats`](./src/utils/fs.ts) class. +* `stats` (optional) — An instance of `fs.Stats` class. + +For example, the `scandir` call for `tools` directory with one directory inside: + +```ts +{ + dirent: Dirent { name: 'typedoc', /* … */ }, + name: 'typedoc', + path: 'tools/typedoc' +} +``` + +## Options + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` without the `withFileTypes` option. ??TODO?? + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely use `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; + readdir?: typeof fs.readdir; + readdirSync?: typeof fs.readdirSync; +} + +const settings = new fsScandir.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## `old` and `modern` mode + +This package has two modes that are used depending on the environment and parameters of use. + +### old + +* Node.js below `10.10` or when the `stats` option is enabled + +When working in the old mode, the directory is read first (`fs.readdir`), then the type of entries is determined (`fs.lstat` and/or `fs.stat` for symbolic links). + +### modern + +* Node.js 10.10+ and the `stats` option is disabled + +In the modern mode, reading the directory (`fs.readdir` with the `withFileTypes` option) is combined with obtaining information about its entries. An additional call for symbolic links (`fs.stat`) is still present. + +This mode makes fewer calls to the file system. It's faster. + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts new file mode 100644 index 000000000..827f1db09 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts @@ -0,0 +1,20 @@ +import type * as fsStat from '@nodelib/fs.stat'; +import type { Dirent, ErrnoException } from '../types'; +export interface ReaddirAsynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }, callback: (error: ErrnoException | null, files: Dirent[]) => void): void; + (filepath: string, callback: (error: ErrnoException | null, files: string[]) => void): void; +} +export interface ReaddirSynchronousMethod { + (filepath: string, options: { + withFileTypes: true; + }): Dirent[]; + (filepath: string): string[]; +} +export declare type FileSystemAdapter = fsStat.FileSystemAdapter & { + readdir: ReaddirAsynchronousMethod; + readdirSync: ReaddirSynchronousMethod; +}; +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/node_modules/@nodelib/fs.scandir/out/adapters/fs.js b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js new file mode 100644 index 000000000..f0fe02202 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/adapters/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync, + readdir: fs.readdir, + readdirSync: fs.readdirSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/node_modules/@nodelib/fs.scandir/out/constants.d.ts b/node_modules/@nodelib/fs.scandir/out/constants.d.ts new file mode 100644 index 000000000..33f17497d --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/constants.d.ts @@ -0,0 +1,4 @@ +/** + * IS `true` for Node.js 10.10 and greater. + */ +export declare const IS_SUPPORT_READDIR_WITH_FILE_TYPES: boolean; diff --git a/node_modules/@nodelib/fs.scandir/out/constants.js b/node_modules/@nodelib/fs.scandir/out/constants.js new file mode 100644 index 000000000..7e3d4411f --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/constants.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; +const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.'); +if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) { + throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); +} +const MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); +const MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); +const SUPPORTED_MAJOR_VERSION = 10; +const SUPPORTED_MINOR_VERSION = 10; +const IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; +const IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; +/** + * IS `true` for Node.js 10.10 and greater. + */ +exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; diff --git a/node_modules/@nodelib/fs.scandir/out/index.d.ts b/node_modules/@nodelib/fs.scandir/out/index.d.ts new file mode 100644 index 000000000..b9da83ed1 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Dirent, Entry } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function scandir(path: string, callback: AsyncCallback): void; +declare function scandir(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace scandir { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function scandirSync(path: string, optionsOrSettings?: Options | Settings): Entry[]; +export { scandir, scandirSync, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, ReaddirAsynchronousMethod, ReaddirSynchronousMethod, Options }; diff --git a/node_modules/@nodelib/fs.scandir/out/index.js b/node_modules/@nodelib/fs.scandir/out/index.js new file mode 100644 index 000000000..99c70d3d6 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.scandirSync = exports.scandir = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function scandir(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.scandir = scandir; +function scandirSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.scandirSync = scandirSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts new file mode 100644 index 000000000..5829676df --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts @@ -0,0 +1,7 @@ +/// +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare type AsyncCallback = (error: NodeJS.ErrnoException, entries: Entry[]) => void; +export declare function read(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdirWithFileTypes(directory: string, settings: Settings, callback: AsyncCallback): void; +export declare function readdir(directory: string, settings: Settings, callback: AsyncCallback): void; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/async.js b/node_modules/@nodelib/fs.scandir/out/providers/async.js new file mode 100644 index 000000000..e8e2f0a9c --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/async.js @@ -0,0 +1,104 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const rpl = require("run-parallel"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings, callback) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + readdirWithFileTypes(directory, settings, callback); + return; + } + readdir(directory, settings, callback); +} +exports.read = read; +function readdirWithFileTypes(directory, settings, callback) { + settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const entries = dirents.map((dirent) => ({ + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + })); + if (!settings.followSymbolicLinks) { + callSuccessCallback(callback, entries); + return; + } + const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); + rpl(tasks, (rplError, rplEntries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, rplEntries); + }); + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function makeRplTaskEntry(entry, settings) { + return (done) => { + if (!entry.dirent.isSymbolicLink()) { + done(null, entry); + return; + } + settings.fs.stat(entry.path, (statError, stats) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + done(statError); + return; + } + done(null, entry); + return; + } + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + done(null, entry); + }); + }; +} +function readdir(directory, settings, callback) { + settings.fs.readdir(directory, (readdirError, names) => { + if (readdirError !== null) { + callFailureCallback(callback, readdirError); + return; + } + const tasks = names.map((name) => { + const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + return (done) => { + fsStat.stat(path, settings.fsStatSettings, (error, stats) => { + if (error !== null) { + done(error); + return; + } + const entry = { + name, + path, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + done(null, entry); + }); + }; + }); + rpl(tasks, (rplError, entries) => { + if (rplError !== null) { + callFailureCallback(callback, rplError); + return; + } + callSuccessCallback(callback, entries); + }); + }); +} +exports.readdir = readdir; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts new file mode 100644 index 000000000..2b4d08b57 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts @@ -0,0 +1 @@ +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/common.js b/node_modules/@nodelib/fs.scandir/out/providers/common.js new file mode 100644 index 000000000..8724cb59a --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/common.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = void 0; +function joinPathSegments(a, b, separator) { + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts new file mode 100644 index 000000000..e05c8f072 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts @@ -0,0 +1,5 @@ +import type Settings from '../settings'; +import type { Entry } from '../types'; +export declare function read(directory: string, settings: Settings): Entry[]; +export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[]; +export declare function readdir(directory: string, settings: Settings): Entry[]; diff --git a/node_modules/@nodelib/fs.scandir/out/providers/sync.js b/node_modules/@nodelib/fs.scandir/out/providers/sync.js new file mode 100644 index 000000000..146db3434 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/providers/sync.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readdir = exports.readdirWithFileTypes = exports.read = void 0; +const fsStat = require("@nodelib/fs.stat"); +const constants_1 = require("../constants"); +const utils = require("../utils"); +const common = require("./common"); +function read(directory, settings) { + if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { + return readdirWithFileTypes(directory, settings); + } + return readdir(directory, settings); +} +exports.read = read; +function readdirWithFileTypes(directory, settings) { + const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); + return dirents.map((dirent) => { + const entry = { + dirent, + name: dirent.name, + path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) + }; + if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { + try { + const stats = settings.fs.statSync(entry.path); + entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); + } + catch (error) { + if (settings.throwErrorOnBrokenSymbolicLink) { + throw error; + } + } + } + return entry; + }); +} +exports.readdirWithFileTypes = readdirWithFileTypes; +function readdir(directory, settings) { + const names = settings.fs.readdirSync(directory); + return names.map((name) => { + const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const stats = fsStat.statSync(entryPath, settings.fsStatSettings); + const entry = { + name, + path: entryPath, + dirent: utils.fs.createDirentFromStats(name, stats) + }; + if (settings.stats) { + entry.stats = stats; + } + return entry; + }); +} +exports.readdir = readdir; diff --git a/node_modules/@nodelib/fs.scandir/out/settings.d.ts b/node_modules/@nodelib/fs.scandir/out/settings.d.ts new file mode 100644 index 000000000..a0db11559 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/settings.d.ts @@ -0,0 +1,20 @@ +import * as fsStat from '@nodelib/fs.stat'; +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLinks: boolean; + readonly fs: fs.FileSystemAdapter; + readonly pathSegmentSeparator: string; + readonly stats: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + readonly fsStatSettings: fsStat.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.scandir/out/settings.js b/node_modules/@nodelib/fs.scandir/out/settings.js new file mode 100644 index 000000000..15a3e8cde --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/settings.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsStat = require("@nodelib/fs.stat"); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.stats = this._getValue(this._options.stats, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + this.fsStatSettings = new fsStat.Settings({ + followSymbolicLink: this.followSymbolicLinks, + fs: this.fs, + throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.scandir/out/types/index.d.ts b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts new file mode 100644 index 000000000..f326c5e5e --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/types/index.d.ts @@ -0,0 +1,20 @@ +/// +import type * as fs from 'fs'; +export interface Entry { + dirent: Dirent; + name: string; + path: string; + stats?: Stats; +} +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; +export interface Dirent { + isBlockDevice: () => boolean; + isCharacterDevice: () => boolean; + isDirectory: () => boolean; + isFIFO: () => boolean; + isFile: () => boolean; + isSocket: () => boolean; + isSymbolicLink: () => boolean; + name: string; +} diff --git a/node_modules/table/node_modules/ajv/dist/types/index.js b/node_modules/@nodelib/fs.scandir/out/types/index.js similarity index 70% rename from node_modules/table/node_modules/ajv/dist/types/index.js rename to node_modules/@nodelib/fs.scandir/out/types/index.js index aa219d8f2..c8ad2e549 100644 --- a/node_modules/table/node_modules/ajv/dist/types/index.js +++ b/node_modules/@nodelib/fs.scandir/out/types/index.js @@ -1,3 +1,2 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts new file mode 100644 index 000000000..bb863f157 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts @@ -0,0 +1,2 @@ +import type { Dirent, Stats } from '../types'; +export declare function createDirentFromStats(name: string, stats: Stats): Dirent; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/fs.js b/node_modules/@nodelib/fs.scandir/out/utils/fs.js new file mode 100644 index 000000000..ace7c74d6 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/fs.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createDirentFromStats = void 0; +class DirentFromStats { + constructor(name, stats) { + this.name = name; + this.isBlockDevice = stats.isBlockDevice.bind(stats); + this.isCharacterDevice = stats.isCharacterDevice.bind(stats); + this.isDirectory = stats.isDirectory.bind(stats); + this.isFIFO = stats.isFIFO.bind(stats); + this.isFile = stats.isFile.bind(stats); + this.isSocket = stats.isSocket.bind(stats); + this.isSymbolicLink = stats.isSymbolicLink.bind(stats); + } +} +function createDirentFromStats(name, stats) { + return new DirentFromStats(name, stats); +} +exports.createDirentFromStats = createDirentFromStats; diff --git a/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts new file mode 100644 index 000000000..1b41954e7 --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts @@ -0,0 +1,2 @@ +import * as fs from './fs'; +export { fs }; diff --git a/node_modules/table/node_modules/ajv/dist/types/json-schema.js b/node_modules/@nodelib/fs.scandir/out/utils/index.js similarity index 53% rename from node_modules/table/node_modules/ajv/dist/types/json-schema.js rename to node_modules/@nodelib/fs.scandir/out/utils/index.js index 2d8f98dc5..f5de129f4 100644 --- a/node_modules/table/node_modules/ajv/dist/types/json-schema.js +++ b/node_modules/@nodelib/fs.scandir/out/utils/index.js @@ -1,3 +1,5 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=json-schema.js.map \ No newline at end of file +exports.fs = void 0; +const fs = require("./fs"); +exports.fs = fs; diff --git a/node_modules/@nodelib/fs.scandir/package.json b/node_modules/@nodelib/fs.scandir/package.json new file mode 100644 index 000000000..d3a89241b --- /dev/null +++ b/node_modules/@nodelib/fs.scandir/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.scandir", + "version": "2.1.5", + "description": "List files and directories inside the specified directory", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.scandir", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "scandir", + "readdir", + "dirent" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4", + "@types/run-parallel": "^1.1.0" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/node_modules/is-string/LICENSE b/node_modules/@nodelib/fs.stat/LICENSE similarity index 96% rename from node_modules/is-string/LICENSE rename to node_modules/@nodelib/fs.stat/LICENSE index b43df444e..65a999460 100644 --- a/node_modules/is-string/LICENSE +++ b/node_modules/@nodelib/fs.stat/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Jordan Harband +Copyright (c) Denis Malinochkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@nodelib/fs.stat/README.md b/node_modules/@nodelib/fs.stat/README.md new file mode 100644 index 000000000..686f0471d --- /dev/null +++ b/node_modules/@nodelib/fs.stat/README.md @@ -0,0 +1,126 @@ +# @nodelib/fs.stat + +> Get the status of a file with some features. + +## :bulb: Highlights + +Wrapper around standard method `fs.lstat` and `fs.stat` with some features. + +* :beginner: Normally follows symbolic link. +* :gear: Can safely work with broken symbolic link. + +## Install + +```console +npm install @nodelib/fs.stat +``` + +## Usage + +```ts +import * as fsStat from '@nodelib/fs.stat'; + +fsStat.stat('path', (error, stats) => { /* … */ }); +``` + +## API + +### .stat(path, [optionsOrSettings], callback) + +Returns an instance of `fs.Stats` class for provided path with standard callback-style. + +```ts +fsStat.stat('path', (error, stats) => { /* … */ }); +fsStat.stat('path', {}, (error, stats) => { /* … */ }); +fsStat.stat('path', new fsStat.Settings(), (error, stats) => { /* … */ }); +``` + +### .statSync(path, [optionsOrSettings]) + +Returns an instance of `fs.Stats` class for provided path. + +```ts +const stats = fsStat.stat('path'); +const stats = fsStat.stat('path', {}); +const stats = fsStat.stat('path', new fsStat.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsStat.Settings({ followSymbolicLink: false }); + +const stats = fsStat.stat('path', settings); +``` + +## Options + +### `followSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Follow symbolic link or not. Call `fs.stat` on symbolic link if `true`. + +### `markSymbolicLink` + +* Type: `boolean` +* Default: `false` + +Mark symbolic link by setting the return value of `isSymbolicLink` function to always `true` (even after `fs.stat`). + +> :book: Can be used if you want to know what is hidden behind a symbolic link, but still continue to know that it is a symbolic link. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `fs` + +* Type: [`FileSystemAdapter`](./src/adapters/fs.ts) +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat?: typeof fs.lstat; + stat?: typeof fs.stat; + lstatSync?: typeof fs.lstatSync; + statSync?: typeof fs.statSync; +} + +const settings = new fsStat.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts new file mode 100644 index 000000000..3af759c95 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts @@ -0,0 +1,13 @@ +/// +import * as fs from 'fs'; +import type { ErrnoException } from '../types'; +export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void; +export declare type StatSynchronousMethod = (path: string) => fs.Stats; +export interface FileSystemAdapter { + lstat: StatAsynchronousMethod; + stat: StatAsynchronousMethod; + lstatSync: StatSynchronousMethod; + statSync: StatSynchronousMethod; +} +export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter; +export declare function createFileSystemAdapter(fsMethods?: Partial): FileSystemAdapter; diff --git a/node_modules/@nodelib/fs.stat/out/adapters/fs.js b/node_modules/@nodelib/fs.stat/out/adapters/fs.js new file mode 100644 index 000000000..8dc08c8ca --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/adapters/fs.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0; +const fs = require("fs"); +exports.FILE_SYSTEM_ADAPTER = { + lstat: fs.lstat, + stat: fs.stat, + lstatSync: fs.lstatSync, + statSync: fs.statSync +}; +function createFileSystemAdapter(fsMethods) { + if (fsMethods === undefined) { + return exports.FILE_SYSTEM_ADAPTER; + } + return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods); +} +exports.createFileSystemAdapter = createFileSystemAdapter; diff --git a/node_modules/@nodelib/fs.stat/out/index.d.ts b/node_modules/@nodelib/fs.stat/out/index.d.ts new file mode 100644 index 000000000..f95db995c --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.d.ts @@ -0,0 +1,12 @@ +import type { FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod } from './adapters/fs'; +import * as async from './providers/async'; +import Settings, { Options } from './settings'; +import type { Stats } from './types'; +declare type AsyncCallback = async.AsyncCallback; +declare function stat(path: string, callback: AsyncCallback): void; +declare function stat(path: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace stat { + function __promisify__(path: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function statSync(path: string, optionsOrSettings?: Options | Settings): Stats; +export { Settings, stat, statSync, AsyncCallback, FileSystemAdapter, StatAsynchronousMethod, StatSynchronousMethod, Options, Stats }; diff --git a/node_modules/@nodelib/fs.stat/out/index.js b/node_modules/@nodelib/fs.stat/out/index.js new file mode 100644 index 000000000..b23f7510d --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.statSync = exports.stat = exports.Settings = void 0; +const async = require("./providers/async"); +const sync = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function stat(path, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + async.read(path, getSettings(), optionsOrSettingsOrCallback); + return; + } + async.read(path, getSettings(optionsOrSettingsOrCallback), callback); +} +exports.stat = stat; +function statSync(path, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + return sync.read(path, settings); +} +exports.statSync = statSync; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.d.ts b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts new file mode 100644 index 000000000..85423ce11 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.d.ts @@ -0,0 +1,4 @@ +import type Settings from '../settings'; +import type { ErrnoException, Stats } from '../types'; +export declare type AsyncCallback = (error: ErrnoException, stats: Stats) => void; +export declare function read(path: string, settings: Settings, callback: AsyncCallback): void; diff --git a/node_modules/@nodelib/fs.stat/out/providers/async.js b/node_modules/@nodelib/fs.stat/out/providers/async.js new file mode 100644 index 000000000..983ff0e6c --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/async.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings, callback) { + settings.fs.lstat(path, (lstatError, lstat) => { + if (lstatError !== null) { + callFailureCallback(callback, lstatError); + return; + } + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + callSuccessCallback(callback, lstat); + return; + } + settings.fs.stat(path, (statError, stat) => { + if (statError !== null) { + if (settings.throwErrorOnBrokenSymbolicLink) { + callFailureCallback(callback, statError); + return; + } + callSuccessCallback(callback, lstat); + return; + } + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + callSuccessCallback(callback, stat); + }); + }); +} +exports.read = read; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, result) { + callback(null, result); +} diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts new file mode 100644 index 000000000..428c3d792 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts @@ -0,0 +1,3 @@ +import type Settings from '../settings'; +import type { Stats } from '../types'; +export declare function read(path: string, settings: Settings): Stats; diff --git a/node_modules/@nodelib/fs.stat/out/providers/sync.js b/node_modules/@nodelib/fs.stat/out/providers/sync.js new file mode 100644 index 000000000..1521c3616 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/providers/sync.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.read = void 0; +function read(path, settings) { + const lstat = settings.fs.lstatSync(path); + if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { + return lstat; + } + try { + const stat = settings.fs.statSync(path); + if (settings.markSymbolicLink) { + stat.isSymbolicLink = () => true; + } + return stat; + } + catch (error) { + if (!settings.throwErrorOnBrokenSymbolicLink) { + return lstat; + } + throw error; + } +} +exports.read = read; diff --git a/node_modules/@nodelib/fs.stat/out/settings.d.ts b/node_modules/@nodelib/fs.stat/out/settings.d.ts new file mode 100644 index 000000000..f4b3d4443 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.d.ts @@ -0,0 +1,16 @@ +import * as fs from './adapters/fs'; +export interface Options { + followSymbolicLink?: boolean; + fs?: Partial; + markSymbolicLink?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly followSymbolicLink: boolean; + readonly fs: fs.FileSystemAdapter; + readonly markSymbolicLink: boolean; + readonly throwErrorOnBrokenSymbolicLink: boolean; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.stat/out/settings.js b/node_modules/@nodelib/fs.stat/out/settings.js new file mode 100644 index 000000000..111ec09ca --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/settings.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = require("./adapters/fs"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); + this.fs = fs.createFileSystemAdapter(this._options.fs); + this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); + this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.stat/out/types/index.d.ts b/node_modules/@nodelib/fs.stat/out/types/index.d.ts new file mode 100644 index 000000000..74c08ed2f --- /dev/null +++ b/node_modules/@nodelib/fs.stat/out/types/index.d.ts @@ -0,0 +1,4 @@ +/// +import type * as fs from 'fs'; +export declare type Stats = fs.Stats; +export declare type ErrnoException = NodeJS.ErrnoException; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/errors.js b/node_modules/@nodelib/fs.stat/out/types/index.js similarity index 69% rename from node_modules/table/node_modules/ajv/dist/vocabularies/errors.js rename to node_modules/@nodelib/fs.stat/out/types/index.js index d4d3fba00..c8ad2e549 100644 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/errors.js +++ b/node_modules/@nodelib/fs.stat/out/types/index.js @@ -1,3 +1,2 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/@nodelib/fs.stat/package.json b/node_modules/@nodelib/fs.stat/package.json new file mode 100644 index 000000000..f2540c289 --- /dev/null +++ b/node_modules/@nodelib/fs.stat/package.json @@ -0,0 +1,37 @@ +{ + "name": "@nodelib/fs.stat", + "version": "2.0.5", + "description": "Get the status of a file with some features", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.stat", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "stat" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "d6a7960d5281d3dd5f8e2efba49bb552d090f562" +} diff --git a/node_modules/is-boolean-object/LICENSE b/node_modules/@nodelib/fs.walk/LICENSE similarity index 96% rename from node_modules/is-boolean-object/LICENSE rename to node_modules/@nodelib/fs.walk/LICENSE index b43df444e..65a999460 100644 --- a/node_modules/is-boolean-object/LICENSE +++ b/node_modules/@nodelib/fs.walk/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Jordan Harband +Copyright (c) Denis Malinochkin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/@nodelib/fs.walk/README.md b/node_modules/@nodelib/fs.walk/README.md new file mode 100644 index 000000000..6ccc08db4 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/README.md @@ -0,0 +1,215 @@ +# @nodelib/fs.walk + +> A library for efficiently walking a directory recursively. + +## :bulb: Highlights + +* :moneybag: Returns useful information: `name`, `path`, `dirent` and `stats` (optional). +* :rocket: On Node.js 10.10+ uses the mechanism without additional calls to determine the entry type for performance reasons. See [`old` and `modern` mode](https://github.com/nodelib/nodelib/blob/master/packages/fs/fs.scandir/README.md#old-and-modern-mode). +* :gear: Built-in directories/files and error filtering system. +* :link: Can safely work with broken symbolic links. + +## Install + +```console +npm install @nodelib/fs.walk +``` + +## Usage + +```ts +import * as fsWalk from '@nodelib/fs.walk'; + +fsWalk.walk('path', (error, entries) => { /* … */ }); +``` + +## API + +### .walk(path, [optionsOrSettings], callback) + +Reads the directory recursively and asynchronously. Requires a callback function. + +> :book: If you want to use the Promise API, use `util.promisify`. + +```ts +fsWalk.walk('path', (error, entries) => { /* … */ }); +fsWalk.walk('path', {}, (error, entries) => { /* … */ }); +fsWalk.walk('path', new fsWalk.Settings(), (error, entries) => { /* … */ }); +``` + +### .walkStream(path, [optionsOrSettings]) + +Reads the directory recursively and asynchronously. [Readable Stream](https://nodejs.org/dist/latest-v12.x/docs/api/stream.html#stream_readable_streams) is used as a provider. + +```ts +const stream = fsWalk.walkStream('path'); +const stream = fsWalk.walkStream('path', {}); +const stream = fsWalk.walkStream('path', new fsWalk.Settings()); +``` + +### .walkSync(path, [optionsOrSettings]) + +Reads the directory recursively and synchronously. Returns an array of entries. + +```ts +const entries = fsWalk.walkSync('path'); +const entries = fsWalk.walkSync('path', {}); +const entries = fsWalk.walkSync('path', new fsWalk.Settings()); +``` + +#### path + +* Required: `true` +* Type: `string | Buffer | URL` + +A path to a file. If a URL is provided, it must use the `file:` protocol. + +#### optionsOrSettings + +* Required: `false` +* Type: `Options | Settings` +* Default: An instance of `Settings` class + +An [`Options`](#options) object or an instance of [`Settings`](#settings) class. + +> :book: When you pass a plain object, an instance of the `Settings` class will be created automatically. If you plan to call the method frequently, use a pre-created instance of the `Settings` class. + +### Settings([options]) + +A class of full settings of the package. + +```ts +const settings = new fsWalk.Settings({ followSymbolicLinks: true }); + +const entries = fsWalk.walkSync('path', settings); +``` + +## Entry + +* `name` — The name of the entry (`unknown.txt`). +* `path` — The path of the entry relative to call directory (`root/unknown.txt`). +* `dirent` — An instance of [`fs.Dirent`](./src/types/index.ts) class. +* [`stats`] — An instance of `fs.Stats` class. + +## Options + +### basePath + +* Type: `string` +* Default: `undefined` + +By default, all paths are built relative to the root path. You can use this option to set custom root path. + +In the example below we read the files from the `root` directory, but in the results the root path will be `custom`. + +```ts +fsWalk.walkSync('root'); // → ['root/file.txt'] +fsWalk.walkSync('root', { basePath: 'custom' }); // → ['custom/file.txt'] +``` + +### concurrency + +* Type: `number` +* Default: `Infinity` + +The maximum number of concurrent calls to `fs.readdir`. + +> :book: The higher the number, the higher performance and the load on the File System. If you want to read in quiet mode, set the value to `4 * os.cpus().length` (4 is default size of [thread pool work scheduling](http://docs.libuv.org/en/v1.x/threadpool.html#thread-pool-work-scheduling)). + +### deepFilter + +* Type: [`DeepFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the directory will be read deep or not. + +```ts +// Skip all directories that starts with `node_modules` +const filter: DeepFilterFunction = (entry) => !entry.path.startsWith('node_modules'); +``` + +### entryFilter + +* Type: [`EntryFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that indicates whether the entry will be included to results or not. + +```ts +// Exclude all `.js` files from results +const filter: EntryFilterFunction = (entry) => !entry.name.endsWith('.js'); +``` + +### errorFilter + +* Type: [`ErrorFilterFunction`](./src/settings.ts) +* Default: `undefined` + +A function that allows you to skip errors that occur when reading directories. + +For example, you can skip `ENOENT` errors if required: + +```ts +// Skip all ENOENT errors +const filter: ErrorFilterFunction = (error) => error.code == 'ENOENT'; +``` + +### stats + +* Type: `boolean` +* Default: `false` + +Adds an instance of `fs.Stats` class to the [`Entry`](#entry). + +> :book: Always use `fs.readdir` with additional `fs.lstat/fs.stat` calls to determine the entry type. + +### followSymbolicLinks + +* Type: `boolean` +* Default: `false` + +Follow symbolic links or not. Call `fs.stat` on symbolic link if `true`. + +### `throwErrorOnBrokenSymbolicLink` + +* Type: `boolean` +* Default: `true` + +Throw an error when symbolic link is broken if `true` or safely return `lstat` call if `false`. + +### `pathSegmentSeparator` + +* Type: `string` +* Default: `path.sep` + +By default, this package uses the correct path separator for your OS (`\` on Windows, `/` on Unix-like systems). But you can set this option to any separator character(s) that you want to use instead. + +### `fs` + +* Type: `FileSystemAdapter` +* Default: A default FS methods + +By default, the built-in Node.js module (`fs`) is used to work with the file system. You can replace any method with your own. + +```ts +interface FileSystemAdapter { + lstat: typeof fs.lstat; + stat: typeof fs.stat; + lstatSync: typeof fs.lstatSync; + statSync: typeof fs.statSync; + readdir: typeof fs.readdir; + readdirSync: typeof fs.readdirSync; +} + +const settings = new fsWalk.Settings({ + fs: { lstat: fakeLstat } +}); +``` + +## Changelog + +See the [Releases section of our GitHub project](https://github.com/nodelib/nodelib/releases) for changelog for each release version. + +## License + +This software is released under the terms of the MIT license. diff --git a/node_modules/@nodelib/fs.walk/out/index.d.ts b/node_modules/@nodelib/fs.walk/out/index.d.ts new file mode 100644 index 000000000..8864c7bff --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/index.d.ts @@ -0,0 +1,14 @@ +/// +import type { Readable } from 'stream'; +import type { Dirent, FileSystemAdapter } from '@nodelib/fs.scandir'; +import { AsyncCallback } from './providers/async'; +import Settings, { DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction, Options } from './settings'; +import type { Entry } from './types'; +declare function walk(directory: string, callback: AsyncCallback): void; +declare function walk(directory: string, optionsOrSettings: Options | Settings, callback: AsyncCallback): void; +declare namespace walk { + function __promisify__(directory: string, optionsOrSettings?: Options | Settings): Promise; +} +declare function walkSync(directory: string, optionsOrSettings?: Options | Settings): Entry[]; +declare function walkStream(directory: string, optionsOrSettings?: Options | Settings): Readable; +export { walk, walkSync, walkStream, Settings, AsyncCallback, Dirent, Entry, FileSystemAdapter, Options, DeepFilterFunction, EntryFilterFunction, ErrorFilterFunction }; diff --git a/node_modules/@nodelib/fs.walk/out/index.js b/node_modules/@nodelib/fs.walk/out/index.js new file mode 100644 index 000000000..15207874a --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/index.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0; +const async_1 = require("./providers/async"); +const stream_1 = require("./providers/stream"); +const sync_1 = require("./providers/sync"); +const settings_1 = require("./settings"); +exports.Settings = settings_1.default; +function walk(directory, optionsOrSettingsOrCallback, callback) { + if (typeof optionsOrSettingsOrCallback === 'function') { + new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); + return; + } + new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); +} +exports.walk = walk; +function walkSync(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new sync_1.default(directory, settings); + return provider.read(); +} +exports.walkSync = walkSync; +function walkStream(directory, optionsOrSettings) { + const settings = getSettings(optionsOrSettings); + const provider = new stream_1.default(directory, settings); + return provider.read(); +} +exports.walkStream = walkStream; +function getSettings(settingsOrOptions = {}) { + if (settingsOrOptions instanceof settings_1.default) { + return settingsOrOptions; + } + return new settings_1.default(settingsOrOptions); +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/async.d.ts b/node_modules/@nodelib/fs.walk/out/providers/async.d.ts new file mode 100644 index 000000000..0f6717d78 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/async.d.ts @@ -0,0 +1,12 @@ +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +export declare type AsyncCallback = (error: Errno, entries: Entry[]) => void; +export default class AsyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + private readonly _storage; + constructor(_root: string, _settings: Settings); + read(callback: AsyncCallback): void; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/async.js b/node_modules/@nodelib/fs.walk/out/providers/async.js new file mode 100644 index 000000000..51d3be51a --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/async.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const async_1 = require("../readers/async"); +class AsyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._storage = []; + } + read(callback) { + this._reader.onError((error) => { + callFailureCallback(callback, error); + }); + this._reader.onEntry((entry) => { + this._storage.push(entry); + }); + this._reader.onEnd(() => { + callSuccessCallback(callback, this._storage); + }); + this._reader.read(); + } +} +exports.default = AsyncProvider; +function callFailureCallback(callback, error) { + callback(error); +} +function callSuccessCallback(callback, entries) { + callback(null, entries); +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/index.d.ts b/node_modules/@nodelib/fs.walk/out/providers/index.d.ts new file mode 100644 index 000000000..874f60c5a --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/index.d.ts @@ -0,0 +1,4 @@ +import AsyncProvider from './async'; +import StreamProvider from './stream'; +import SyncProvider from './sync'; +export { AsyncProvider, StreamProvider, SyncProvider }; diff --git a/node_modules/@nodelib/fs.walk/out/providers/index.js b/node_modules/@nodelib/fs.walk/out/providers/index.js new file mode 100644 index 000000000..4c2529ce8 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SyncProvider = exports.StreamProvider = exports.AsyncProvider = void 0; +const async_1 = require("./async"); +exports.AsyncProvider = async_1.default; +const stream_1 = require("./stream"); +exports.StreamProvider = stream_1.default; +const sync_1 = require("./sync"); +exports.SyncProvider = sync_1.default; diff --git a/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts b/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts new file mode 100644 index 000000000..294185f85 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts @@ -0,0 +1,12 @@ +/// +import { Readable } from 'stream'; +import AsyncReader from '../readers/async'; +import type Settings from '../settings'; +export default class StreamProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: AsyncReader; + protected readonly _stream: Readable; + constructor(_root: string, _settings: Settings); + read(): Readable; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/stream.js b/node_modules/@nodelib/fs.walk/out/providers/stream.js new file mode 100644 index 000000000..51298b0f5 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/stream.js @@ -0,0 +1,34 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +const async_1 = require("../readers/async"); +class StreamProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new async_1.default(this._root, this._settings); + this._stream = new stream_1.Readable({ + objectMode: true, + read: () => { }, + destroy: () => { + if (!this._reader.isDestroyed) { + this._reader.destroy(); + } + } + }); + } + read() { + this._reader.onError((error) => { + this._stream.emit('error', error); + }); + this._reader.onEntry((entry) => { + this._stream.push(entry); + }); + this._reader.onEnd(() => { + this._stream.push(null); + }); + this._reader.read(); + return this._stream; + } +} +exports.default = StreamProvider; diff --git a/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts b/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts new file mode 100644 index 000000000..551c42e41 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts @@ -0,0 +1,10 @@ +import SyncReader from '../readers/sync'; +import type Settings from '../settings'; +import type { Entry } from '../types'; +export default class SyncProvider { + private readonly _root; + private readonly _settings; + protected readonly _reader: SyncReader; + constructor(_root: string, _settings: Settings); + read(): Entry[]; +} diff --git a/node_modules/@nodelib/fs.walk/out/providers/sync.js b/node_modules/@nodelib/fs.walk/out/providers/sync.js new file mode 100644 index 000000000..faab6ca2a --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/providers/sync.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const sync_1 = require("../readers/sync"); +class SyncProvider { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._reader = new sync_1.default(this._root, this._settings); + } + read() { + return this._reader.read(); + } +} +exports.default = SyncProvider; diff --git a/node_modules/@nodelib/fs.walk/out/readers/async.d.ts b/node_modules/@nodelib/fs.walk/out/readers/async.d.ts new file mode 100644 index 000000000..9acf4e6c2 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/async.d.ts @@ -0,0 +1,30 @@ +/// +import { EventEmitter } from 'events'; +import * as fsScandir from '@nodelib/fs.scandir'; +import type Settings from '../settings'; +import type { Entry, Errno } from '../types'; +import Reader from './reader'; +declare type EntryEventCallback = (entry: Entry) => void; +declare type ErrorEventCallback = (error: Errno) => void; +declare type EndEventCallback = () => void; +export default class AsyncReader extends Reader { + protected readonly _settings: Settings; + protected readonly _scandir: typeof fsScandir.scandir; + protected readonly _emitter: EventEmitter; + private readonly _queue; + private _isFatalError; + private _isDestroyed; + constructor(_root: string, _settings: Settings); + read(): EventEmitter; + get isDestroyed(): boolean; + destroy(): void; + onEntry(callback: EntryEventCallback): void; + onError(callback: ErrorEventCallback): void; + onEnd(callback: EndEventCallback): void; + private _pushToQueue; + private _worker; + private _handleError; + private _handleEntry; + private _emitEntry; +} +export {}; diff --git a/node_modules/@nodelib/fs.walk/out/readers/async.js b/node_modules/@nodelib/fs.walk/out/readers/async.js new file mode 100644 index 000000000..ebe8dd573 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/async.js @@ -0,0 +1,97 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const events_1 = require("events"); +const fsScandir = require("@nodelib/fs.scandir"); +const fastq = require("fastq"); +const common = require("./common"); +const reader_1 = require("./reader"); +class AsyncReader extends reader_1.default { + constructor(_root, _settings) { + super(_root, _settings); + this._settings = _settings; + this._scandir = fsScandir.scandir; + this._emitter = new events_1.EventEmitter(); + this._queue = fastq(this._worker.bind(this), this._settings.concurrency); + this._isFatalError = false; + this._isDestroyed = false; + this._queue.drain = () => { + if (!this._isFatalError) { + this._emitter.emit('end'); + } + }; + } + read() { + this._isFatalError = false; + this._isDestroyed = false; + setImmediate(() => { + this._pushToQueue(this._root, this._settings.basePath); + }); + return this._emitter; + } + get isDestroyed() { + return this._isDestroyed; + } + destroy() { + if (this._isDestroyed) { + throw new Error('The reader is already destroyed'); + } + this._isDestroyed = true; + this._queue.killAndDrain(); + } + onEntry(callback) { + this._emitter.on('entry', callback); + } + onError(callback) { + this._emitter.once('error', callback); + } + onEnd(callback) { + this._emitter.once('end', callback); + } + _pushToQueue(directory, base) { + const queueItem = { directory, base }; + this._queue.push(queueItem, (error) => { + if (error !== null) { + this._handleError(error); + } + }); + } + _worker(item, done) { + this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => { + if (error !== null) { + done(error, undefined); + return; + } + for (const entry of entries) { + this._handleEntry(entry, item.base); + } + done(null, undefined); + }); + } + _handleError(error) { + if (this._isDestroyed || !common.isFatalError(this._settings, error)) { + return; + } + this._isFatalError = true; + this._isDestroyed = true; + this._emitter.emit('error', error); + } + _handleEntry(entry, base) { + if (this._isDestroyed || this._isFatalError) { + return; + } + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._emitEntry(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _emitEntry(entry) { + this._emitter.emit('entry', entry); + } +} +exports.default = AsyncReader; diff --git a/node_modules/@nodelib/fs.walk/out/readers/common.d.ts b/node_modules/@nodelib/fs.walk/out/readers/common.d.ts new file mode 100644 index 000000000..5985f97c4 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/common.d.ts @@ -0,0 +1,7 @@ +import type { FilterFunction } from '../settings'; +import type Settings from '../settings'; +import type { Errno } from '../types'; +export declare function isFatalError(settings: Settings, error: Errno): boolean; +export declare function isAppliedFilter(filter: FilterFunction | null, value: T): boolean; +export declare function replacePathSegmentSeparator(filepath: string, separator: string): string; +export declare function joinPathSegments(a: string, b: string, separator: string): string; diff --git a/node_modules/@nodelib/fs.walk/out/readers/common.js b/node_modules/@nodelib/fs.walk/out/readers/common.js new file mode 100644 index 000000000..a93572f48 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/common.js @@ -0,0 +1,31 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0; +function isFatalError(settings, error) { + if (settings.errorFilter === null) { + return true; + } + return !settings.errorFilter(error); +} +exports.isFatalError = isFatalError; +function isAppliedFilter(filter, value) { + return filter === null || filter(value); +} +exports.isAppliedFilter = isAppliedFilter; +function replacePathSegmentSeparator(filepath, separator) { + return filepath.split(/[/\\]/).join(separator); +} +exports.replacePathSegmentSeparator = replacePathSegmentSeparator; +function joinPathSegments(a, b, separator) { + if (a === '') { + return b; + } + /** + * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`). + */ + if (a.endsWith(separator)) { + return a + b; + } + return a + separator + b; +} +exports.joinPathSegments = joinPathSegments; diff --git a/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts b/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts new file mode 100644 index 000000000..e1f383b25 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts @@ -0,0 +1,6 @@ +import type Settings from '../settings'; +export default class Reader { + protected readonly _root: string; + protected readonly _settings: Settings; + constructor(_root: string, _settings: Settings); +} diff --git a/node_modules/@nodelib/fs.walk/out/readers/reader.js b/node_modules/@nodelib/fs.walk/out/readers/reader.js new file mode 100644 index 000000000..782f07cbf --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/reader.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const common = require("./common"); +class Reader { + constructor(_root, _settings) { + this._root = _root; + this._settings = _settings; + this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); + } +} +exports.default = Reader; diff --git a/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts b/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts new file mode 100644 index 000000000..af4103353 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts @@ -0,0 +1,15 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry } from '../types'; +import Reader from './reader'; +export default class SyncReader extends Reader { + protected readonly _scandir: typeof fsScandir.scandirSync; + private readonly _storage; + private readonly _queue; + read(): Entry[]; + private _pushToQueue; + private _handleQueue; + private _handleDirectory; + private _handleError; + private _handleEntry; + private _pushToStorage; +} diff --git a/node_modules/@nodelib/fs.walk/out/readers/sync.js b/node_modules/@nodelib/fs.walk/out/readers/sync.js new file mode 100644 index 000000000..9a8d5a6f1 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/readers/sync.js @@ -0,0 +1,59 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const fsScandir = require("@nodelib/fs.scandir"); +const common = require("./common"); +const reader_1 = require("./reader"); +class SyncReader extends reader_1.default { + constructor() { + super(...arguments); + this._scandir = fsScandir.scandirSync; + this._storage = []; + this._queue = new Set(); + } + read() { + this._pushToQueue(this._root, this._settings.basePath); + this._handleQueue(); + return this._storage; + } + _pushToQueue(directory, base) { + this._queue.add({ directory, base }); + } + _handleQueue() { + for (const item of this._queue.values()) { + this._handleDirectory(item.directory, item.base); + } + } + _handleDirectory(directory, base) { + try { + const entries = this._scandir(directory, this._settings.fsScandirSettings); + for (const entry of entries) { + this._handleEntry(entry, base); + } + } + catch (error) { + this._handleError(error); + } + } + _handleError(error) { + if (!common.isFatalError(this._settings, error)) { + return; + } + throw error; + } + _handleEntry(entry, base) { + const fullpath = entry.path; + if (base !== undefined) { + entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); + } + if (common.isAppliedFilter(this._settings.entryFilter, entry)) { + this._pushToStorage(entry); + } + if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) { + this._pushToQueue(fullpath, base === undefined ? undefined : entry.path); + } + } + _pushToStorage(entry) { + this._storage.push(entry); + } +} +exports.default = SyncReader; diff --git a/node_modules/@nodelib/fs.walk/out/settings.d.ts b/node_modules/@nodelib/fs.walk/out/settings.d.ts new file mode 100644 index 000000000..d1c4b45f6 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/settings.d.ts @@ -0,0 +1,30 @@ +import * as fsScandir from '@nodelib/fs.scandir'; +import type { Entry, Errno } from './types'; +export declare type FilterFunction = (value: T) => boolean; +export declare type DeepFilterFunction = FilterFunction; +export declare type EntryFilterFunction = FilterFunction; +export declare type ErrorFilterFunction = FilterFunction; +export interface Options { + basePath?: string; + concurrency?: number; + deepFilter?: DeepFilterFunction; + entryFilter?: EntryFilterFunction; + errorFilter?: ErrorFilterFunction; + followSymbolicLinks?: boolean; + fs?: Partial; + pathSegmentSeparator?: string; + stats?: boolean; + throwErrorOnBrokenSymbolicLink?: boolean; +} +export default class Settings { + private readonly _options; + readonly basePath?: string; + readonly concurrency: number; + readonly deepFilter: DeepFilterFunction | null; + readonly entryFilter: EntryFilterFunction | null; + readonly errorFilter: ErrorFilterFunction | null; + readonly pathSegmentSeparator: string; + readonly fsScandirSettings: fsScandir.Settings; + constructor(_options?: Options); + private _getValue; +} diff --git a/node_modules/@nodelib/fs.walk/out/settings.js b/node_modules/@nodelib/fs.walk/out/settings.js new file mode 100644 index 000000000..d7a85c81e --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/settings.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fsScandir = require("@nodelib/fs.scandir"); +class Settings { + constructor(_options = {}) { + this._options = _options; + this.basePath = this._getValue(this._options.basePath, undefined); + this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); + this.deepFilter = this._getValue(this._options.deepFilter, null); + this.entryFilter = this._getValue(this._options.entryFilter, null); + this.errorFilter = this._getValue(this._options.errorFilter, null); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep); + this.fsScandirSettings = new fsScandir.Settings({ + followSymbolicLinks: this._options.followSymbolicLinks, + fs: this._options.fs, + pathSegmentSeparator: this._options.pathSegmentSeparator, + stats: this._options.stats, + throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink + }); + } + _getValue(option, value) { + return option !== null && option !== void 0 ? option : value; + } +} +exports.default = Settings; diff --git a/node_modules/@nodelib/fs.walk/out/types/index.d.ts b/node_modules/@nodelib/fs.walk/out/types/index.d.ts new file mode 100644 index 000000000..6ee9bd3f9 --- /dev/null +++ b/node_modules/@nodelib/fs.walk/out/types/index.d.ts @@ -0,0 +1,8 @@ +/// +import type * as scandir from '@nodelib/fs.scandir'; +export declare type Entry = scandir.Entry; +export declare type Errno = NodeJS.ErrnoException; +export interface QueueItem { + directory: string; + base?: string; +} diff --git a/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js b/node_modules/@nodelib/fs.walk/out/types/index.js similarity index 66% rename from node_modules/table/node_modules/ajv/dist/types/jtd-schema.js rename to node_modules/@nodelib/fs.walk/out/types/index.js index 11338aa8a..c8ad2e549 100644 --- a/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js +++ b/node_modules/@nodelib/fs.walk/out/types/index.js @@ -1,3 +1,2 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=jtd-schema.js.map \ No newline at end of file diff --git a/node_modules/@nodelib/fs.walk/package.json b/node_modules/@nodelib/fs.walk/package.json new file mode 100644 index 000000000..86bfce48b --- /dev/null +++ b/node_modules/@nodelib/fs.walk/package.json @@ -0,0 +1,44 @@ +{ + "name": "@nodelib/fs.walk", + "version": "1.2.8", + "description": "A library for efficiently walking a directory recursively", + "license": "MIT", + "repository": "https://github.com/nodelib/nodelib/tree/master/packages/fs/fs.walk", + "keywords": [ + "NodeLib", + "fs", + "FileSystem", + "file system", + "walk", + "scanner", + "crawler" + ], + "engines": { + "node": ">= 8" + }, + "files": [ + "out/**", + "!out/**/*.map", + "!out/**/*.spec.*", + "!out/**/tests/**" + ], + "main": "out/index.js", + "typings": "out/index.d.ts", + "scripts": { + "clean": "rimraf {tsconfig.tsbuildinfo,out}", + "lint": "eslint \"src/**/*.ts\" --cache", + "compile": "tsc -b .", + "compile:watch": "tsc -p . --watch --sourceMap", + "test": "mocha \"out/**/*.spec.js\" -s 0", + "build": "npm run clean && npm run compile && npm run lint && npm test", + "watch": "npm run clean && npm run compile:watch" + }, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "devDependencies": { + "@nodelib/fs.macchiato": "1.0.4" + }, + "gitHead": "1e5bad48565da2b06b8600e744324ea240bf49d8" +} diff --git a/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml b/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml new file mode 100644 index 000000000..73cf8d652 --- /dev/null +++ b/node_modules/@ungap/structured-clone/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - run: npm run coverage --if-present + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/@ungap/structured-clone/LICENSE b/node_modules/@ungap/structured-clone/LICENSE new file mode 100644 index 000000000..48afbe52a --- /dev/null +++ b/node_modules/@ungap/structured-clone/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2021, Andrea Giammarchi, @WebReflection + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/@ungap/structured-clone/README.md b/node_modules/@ungap/structured-clone/README.md new file mode 100644 index 000000000..fab4b37af --- /dev/null +++ b/node_modules/@ungap/structured-clone/README.md @@ -0,0 +1,95 @@ +# structuredClone polyfill + +[![Downloads](https://img.shields.io/npm/dm/@ungap/structured-clone.svg)](https://www.npmjs.com/package/@ungap/structured-clone) [![build status](https://github.com/ungap/structured-clone/actions/workflows/node.js.yml/badge.svg)](https://github.com/ungap/structured-clone/actions) [![Coverage Status](https://coveralls.io/repos/github/ungap/structured-clone/badge.svg?branch=main)](https://coveralls.io/github/ungap/structured-clone?branch=main) + +An env agnostic serializer and deserializer with recursion ability and types beyond *JSON* from the *HTML* standard itself. + + * [Supported Types](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm#supported_types) + * *not supported yet*: Blob, File, FileList, ImageBitmap, ImageData, and ArrayBuffer, but typed arrays are supported without major issues, but u/int8, u/int16, and u/int32 are the only safely suppored (right now). + * *not possible to implement*: the `{transfer: []}` option can be passed but it's completely ignored. + * [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/structuredClone) + * [Serializer](https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal) + * [Deserializer](https://html.spec.whatwg.org/multipage/structured-data.html#structureddeserialize) + +Serialized values can be safely stringified as *JSON* too, and deserialization resurrect all values, even recursive, or more complex than what *JSON* allows. + + +### Examples + +Check the [100% test coverage](./test/index.js) to know even more. + +```js +// as default export +import structuredClone from '@ungap/structured-clone'; +const cloned = structuredClone({any: 'serializable'}); + +// as independent serializer/deserializer +import {serialize, deserialize} from '@ungap/structured-clone'; + +// the result can be stringified as JSON without issues +// even if there is recursive data, bigint values, +// typed arrays, and so on +const serialized = serialize({any: 'serializable'}); + +// the result will be a replica of the original object +const deserialized = deserialize(serialized); +``` + +#### Global Polyfill +Note: Only monkey patch the global if needed. This polyfill works just fine as an explicit import: `import structuredClone from "@ungap/structured-clone"` +```js +// Attach the polyfill as a Global function +import structuredClone from "@ungap/structured-clone"; +if (!("structuredClone" in globalThis)) { + globalThis.structuredClone = structuredClone; +} + +// Or don't monkey patch +import structuredClone from "@ungap/structured-clone" +// Just use it in the file +structuredClone() +``` + +**Note**: Do not attach this module's default export directly to the global scope, whithout a conditional guard to detect a native implementation. In environments where there is a native global implementation of `structuredClone()` already, assignment to the global object will result in an infinite loop when `globalThis.structuredClone()` is called. See the example above for a safe way to provide the polyfill globally in your project. + +### Extra Features + +There is no middle-ground between the structured clone algorithm and JSON: + + * JSON is more relaxed about incompatible values: it just ignores these + * Structured clone is inflexible regarding incompatible values, yet it makes specialized instances impossible to reconstruct, plus it doesn't offer any helper, such as `toJSON()`, to make serialization possible, or better, with specific cases + +This module specialized `serialize` export offers, within the optional extra argument, a **lossy** property to avoid throwing when incompatible types are found down the road (function, symbol, ...), so that it is possible to send with less worrying about thrown errors. + +```js +// as default export +import structuredClone from '@ungap/structured-clone'; +const cloned = structuredClone( + { + method() { + // ignored, won't be cloned + }, + special: Symbol('also ignored') + }, + { + // avoid throwing + lossy: true, + // avoid throwing *and* looks for toJSON + json: true + } +); +``` + +The behavior is the same found in *JSON* when it comes to *Array*, so that unsupported values will result as `null` placeholders instead. + +#### toJSON + +If `lossy` option is not enough, `json` will actually enforce `lossy` and also check for `toJSON` method when objects are parsed. + +Alternative, the `json` exports combines all features: + +```js +import {stringify, parse} from '@ungap/structured-clone/json'; + +parse(stringify({any: 'serializable'})); +``` diff --git a/node_modules/@ungap/structured-clone/cjs/deserialize.js b/node_modules/@ungap/structured-clone/cjs/deserialize.js new file mode 100644 index 000000000..9c0af7ddd --- /dev/null +++ b/node_modules/@ungap/structured-clone/cjs/deserialize.js @@ -0,0 +1,78 @@ +'use strict'; +const { + VOID, PRIMITIVE, ARRAY, OBJECT, DATE, REGEXP, MAP, SET, ERROR, BIGINT +} = require('./types.js'); + +const env = typeof self === 'object' ? self : globalThis; + +const deserializer = ($, _) => { + const as = (out, index) => { + $.set(index, out); + return out; + }; + + const unpair = index => { + if ($.has(index)) + return $.get(index); + + const [type, value] = _[index]; + switch (type) { + case PRIMITIVE: + case VOID: + return as(value, index); + case ARRAY: { + const arr = as([], index); + for (const index of value) + arr.push(unpair(index)); + return arr; + } + case OBJECT: { + const object = as({}, index); + for (const [key, index] of value) + object[unpair(key)] = unpair(index); + return object; + } + case DATE: + return as(new Date(value), index); + case REGEXP: { + const {source, flags} = value; + return as(new RegExp(source, flags), index); + } + case MAP: { + const map = as(new Map, index); + for (const [key, index] of value) + map.set(unpair(key), unpair(index)); + return map; + } + case SET: { + const set = as(new Set, index); + for (const index of value) + set.add(unpair(index)); + return set; + } + case ERROR: { + const {name, message} = value; + return as(new env[name](message), index); + } + case BIGINT: + return as(BigInt(value), index); + case 'BigInt': + return as(Object(BigInt(value)), index); + } + return as(new env[type](value), index); + }; + + return unpair; +}; + +/** + * @typedef {Array} Record a type representation + */ + +/** + * Returns a deserialized value from a serialized array of Records. + * @param {Record[]} serialized a previously serialized value. + * @returns {any} + */ +const deserialize = serialized => deserializer(new Map, serialized)(0); +exports.deserialize = deserialize; diff --git a/node_modules/@ungap/structured-clone/cjs/index.js b/node_modules/@ungap/structured-clone/cjs/index.js new file mode 100644 index 000000000..13d747c59 --- /dev/null +++ b/node_modules/@ungap/structured-clone/cjs/index.js @@ -0,0 +1,27 @@ +'use strict'; +const {deserialize} = require('./deserialize.js'); +const {serialize} = require('./serialize.js'); + +/** + * @typedef {Array} Record a type representation + */ + +/** + * Returns an array of serialized Records. + * @param {any} any a serializable value. + * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with + * a transfer option (ignored when polyfilled) and/or non standard fields that + * fallback to the polyfill if present. + * @returns {Record[]} + */ +Object.defineProperty(exports, '__esModule', {value: true}).default = typeof structuredClone === "function" ? + /* c8 ignore start */ + (any, options) => ( + options && ('json' in options || 'lossy' in options) ? + deserialize(serialize(any, options)) : structuredClone(any) + ) : + (any, options) => deserialize(serialize(any, options)); + /* c8 ignore stop */ + +exports.deserialize = deserialize; +exports.serialize = serialize; diff --git a/node_modules/@ungap/structured-clone/cjs/json.js b/node_modules/@ungap/structured-clone/cjs/json.js new file mode 100644 index 000000000..0038dcf9c --- /dev/null +++ b/node_modules/@ungap/structured-clone/cjs/json.js @@ -0,0 +1,24 @@ +'use strict'; +/*! (c) Andrea Giammarchi - ISC */ + +const {deserialize} = require('./deserialize.js'); +const {serialize} = require('./serialize.js'); + +const {parse: $parse, stringify: $stringify} = JSON; +const options = {json: true, lossy: true}; + +/** + * Revive a previously stringified structured clone. + * @param {string} str previously stringified data as string. + * @returns {any} whatever was previously stringified as clone. + */ +const parse = str => deserialize($parse(str)); +exports.parse = parse; + +/** + * Represent a structured clone value as string. + * @param {any} any some clone-able value to stringify. + * @returns {string} the value stringified. + */ +const stringify = any => $stringify(serialize(any, options)); +exports.stringify = stringify; diff --git a/node_modules/@ungap/structured-clone/cjs/package.json b/node_modules/@ungap/structured-clone/cjs/package.json new file mode 100644 index 000000000..0292b9956 --- /dev/null +++ b/node_modules/@ungap/structured-clone/cjs/package.json @@ -0,0 +1 @@ +{"type":"commonjs"} \ No newline at end of file diff --git a/node_modules/@ungap/structured-clone/cjs/serialize.js b/node_modules/@ungap/structured-clone/cjs/serialize.js new file mode 100644 index 000000000..0379cc6cf --- /dev/null +++ b/node_modules/@ungap/structured-clone/cjs/serialize.js @@ -0,0 +1,160 @@ +'use strict'; +const { + VOID, PRIMITIVE, ARRAY, OBJECT, DATE, REGEXP, MAP, SET, ERROR, BIGINT +} = require('./types.js'); + +const EMPTY = ''; + +const {toString} = {}; +const {keys} = Object; + +const typeOf = value => { + const type = typeof value; + if (type !== 'object' || !value) + return [PRIMITIVE, type]; + + const asString = toString.call(value).slice(8, -1); + switch (asString) { + case 'Array': + return [ARRAY, EMPTY]; + case 'Object': + return [OBJECT, EMPTY]; + case 'Date': + return [DATE, EMPTY]; + case 'RegExp': + return [REGEXP, EMPTY]; + case 'Map': + return [MAP, EMPTY]; + case 'Set': + return [SET, EMPTY]; + } + + if (asString.includes('Array')) + return [ARRAY, asString]; + + if (asString.includes('Error')) + return [ERROR, asString]; + + return [OBJECT, asString]; +}; + +const shouldSkip = ([TYPE, type]) => ( + TYPE === PRIMITIVE && + (type === 'function' || type === 'symbol') +); + +const serializer = (strict, json, $, _) => { + + const as = (out, value) => { + const index = _.push(out) - 1; + $.set(value, index); + return index; + }; + + const pair = value => { + if ($.has(value)) + return $.get(value); + + let [TYPE, type] = typeOf(value); + switch (TYPE) { + case PRIMITIVE: { + let entry = value; + switch (type) { + case 'bigint': + TYPE = BIGINT; + entry = value.toString(); + break; + case 'function': + case 'symbol': + if (strict) + throw new TypeError('unable to serialize ' + type); + entry = null; + break; + case 'undefined': + return as([VOID], value); + } + return as([TYPE, entry], value); + } + case ARRAY: { + if (type) + return as([type, [...value]], value); + + const arr = []; + const index = as([TYPE, arr], value); + for (const entry of value) + arr.push(pair(entry)); + return index; + } + case OBJECT: { + if (type) { + switch (type) { + case 'BigInt': + return as([type, value.toString()], value); + case 'Boolean': + case 'Number': + case 'String': + return as([type, value.valueOf()], value); + } + } + + if (json && ('toJSON' in value)) + return pair(value.toJSON()); + + const entries = []; + const index = as([TYPE, entries], value); + for (const key of keys(value)) { + if (strict || !shouldSkip(typeOf(value[key]))) + entries.push([pair(key), pair(value[key])]); + } + return index; + } + case DATE: + return as([TYPE, value.toISOString()], value); + case REGEXP: { + const {source, flags} = value; + return as([TYPE, {source, flags}], value); + } + case MAP: { + const entries = []; + const index = as([TYPE, entries], value); + for (const [key, entry] of value) { + if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry)))) + entries.push([pair(key), pair(entry)]); + } + return index; + } + case SET: { + const entries = []; + const index = as([TYPE, entries], value); + for (const entry of value) { + if (strict || !shouldSkip(typeOf(entry))) + entries.push(pair(entry)); + } + return index; + } + } + + const {message} = value; + return as([TYPE, {name: type, message}], value); + }; + + return pair; +}; + +/** + * @typedef {Array} Record a type representation + */ + +/** + * Returns an array of serialized Records. + * @param {any} value a serializable value. + * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that, + * if `true`, will not throw errors on incompatible types, and behave more + * like JSON stringify would behave. Symbol and Function will be discarded. + * @returns {Record[]} + */ + const serialize = (value, {json, lossy} = {}) => { + const _ = []; + return serializer(!(json || lossy), !!json, new Map, _)(value), _; +}; +exports.serialize = serialize; diff --git a/node_modules/@ungap/structured-clone/cjs/types.js b/node_modules/@ungap/structured-clone/cjs/types.js new file mode 100644 index 000000000..8284be3d6 --- /dev/null +++ b/node_modules/@ungap/structured-clone/cjs/types.js @@ -0,0 +1,22 @@ +'use strict'; +const VOID = -1; +exports.VOID = VOID; +const PRIMITIVE = 0; +exports.PRIMITIVE = PRIMITIVE; +const ARRAY = 1; +exports.ARRAY = ARRAY; +const OBJECT = 2; +exports.OBJECT = OBJECT; +const DATE = 3; +exports.DATE = DATE; +const REGEXP = 4; +exports.REGEXP = REGEXP; +const MAP = 5; +exports.MAP = MAP; +const SET = 6; +exports.SET = SET; +const ERROR = 7; +exports.ERROR = ERROR; +const BIGINT = 8; +exports.BIGINT = BIGINT; +// export const SYMBOL = 9; diff --git a/node_modules/@ungap/structured-clone/esm/deserialize.js b/node_modules/@ungap/structured-clone/esm/deserialize.js new file mode 100644 index 000000000..0fa70897d --- /dev/null +++ b/node_modules/@ungap/structured-clone/esm/deserialize.js @@ -0,0 +1,79 @@ +import { + VOID, PRIMITIVE, + ARRAY, OBJECT, + DATE, REGEXP, MAP, SET, + ERROR, BIGINT +} from './types.js'; + +const env = typeof self === 'object' ? self : globalThis; + +const deserializer = ($, _) => { + const as = (out, index) => { + $.set(index, out); + return out; + }; + + const unpair = index => { + if ($.has(index)) + return $.get(index); + + const [type, value] = _[index]; + switch (type) { + case PRIMITIVE: + case VOID: + return as(value, index); + case ARRAY: { + const arr = as([], index); + for (const index of value) + arr.push(unpair(index)); + return arr; + } + case OBJECT: { + const object = as({}, index); + for (const [key, index] of value) + object[unpair(key)] = unpair(index); + return object; + } + case DATE: + return as(new Date(value), index); + case REGEXP: { + const {source, flags} = value; + return as(new RegExp(source, flags), index); + } + case MAP: { + const map = as(new Map, index); + for (const [key, index] of value) + map.set(unpair(key), unpair(index)); + return map; + } + case SET: { + const set = as(new Set, index); + for (const index of value) + set.add(unpair(index)); + return set; + } + case ERROR: { + const {name, message} = value; + return as(new env[name](message), index); + } + case BIGINT: + return as(BigInt(value), index); + case 'BigInt': + return as(Object(BigInt(value)), index); + } + return as(new env[type](value), index); + }; + + return unpair; +}; + +/** + * @typedef {Array} Record a type representation + */ + +/** + * Returns a deserialized value from a serialized array of Records. + * @param {Record[]} serialized a previously serialized value. + * @returns {any} + */ +export const deserialize = serialized => deserializer(new Map, serialized)(0); diff --git a/node_modules/@ungap/structured-clone/esm/index.js b/node_modules/@ungap/structured-clone/esm/index.js new file mode 100644 index 000000000..d3b47479a --- /dev/null +++ b/node_modules/@ungap/structured-clone/esm/index.js @@ -0,0 +1,25 @@ +import {deserialize} from './deserialize.js'; +import {serialize} from './serialize.js'; + +/** + * @typedef {Array} Record a type representation + */ + +/** + * Returns an array of serialized Records. + * @param {any} any a serializable value. + * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with + * a transfer option (ignored when polyfilled) and/or non standard fields that + * fallback to the polyfill if present. + * @returns {Record[]} + */ +export default typeof structuredClone === "function" ? + /* c8 ignore start */ + (any, options) => ( + options && ('json' in options || 'lossy' in options) ? + deserialize(serialize(any, options)) : structuredClone(any) + ) : + (any, options) => deserialize(serialize(any, options)); + /* c8 ignore stop */ + +export {deserialize, serialize}; diff --git a/node_modules/@ungap/structured-clone/esm/json.js b/node_modules/@ungap/structured-clone/esm/json.js new file mode 100644 index 000000000..23eb95222 --- /dev/null +++ b/node_modules/@ungap/structured-clone/esm/json.js @@ -0,0 +1,21 @@ +/*! (c) Andrea Giammarchi - ISC */ + +import {deserialize} from './deserialize.js'; +import {serialize} from './serialize.js'; + +const {parse: $parse, stringify: $stringify} = JSON; +const options = {json: true, lossy: true}; + +/** + * Revive a previously stringified structured clone. + * @param {string} str previously stringified data as string. + * @returns {any} whatever was previously stringified as clone. + */ +export const parse = str => deserialize($parse(str)); + +/** + * Represent a structured clone value as string. + * @param {any} any some clone-able value to stringify. + * @returns {string} the value stringified. + */ +export const stringify = any => $stringify(serialize(any, options)); diff --git a/node_modules/@ungap/structured-clone/esm/serialize.js b/node_modules/@ungap/structured-clone/esm/serialize.js new file mode 100644 index 000000000..8e098ddca --- /dev/null +++ b/node_modules/@ungap/structured-clone/esm/serialize.js @@ -0,0 +1,161 @@ +import { + VOID, PRIMITIVE, + ARRAY, OBJECT, + DATE, REGEXP, MAP, SET, + ERROR, BIGINT +} from './types.js'; + +const EMPTY = ''; + +const {toString} = {}; +const {keys} = Object; + +const typeOf = value => { + const type = typeof value; + if (type !== 'object' || !value) + return [PRIMITIVE, type]; + + const asString = toString.call(value).slice(8, -1); + switch (asString) { + case 'Array': + return [ARRAY, EMPTY]; + case 'Object': + return [OBJECT, EMPTY]; + case 'Date': + return [DATE, EMPTY]; + case 'RegExp': + return [REGEXP, EMPTY]; + case 'Map': + return [MAP, EMPTY]; + case 'Set': + return [SET, EMPTY]; + } + + if (asString.includes('Array')) + return [ARRAY, asString]; + + if (asString.includes('Error')) + return [ERROR, asString]; + + return [OBJECT, asString]; +}; + +const shouldSkip = ([TYPE, type]) => ( + TYPE === PRIMITIVE && + (type === 'function' || type === 'symbol') +); + +const serializer = (strict, json, $, _) => { + + const as = (out, value) => { + const index = _.push(out) - 1; + $.set(value, index); + return index; + }; + + const pair = value => { + if ($.has(value)) + return $.get(value); + + let [TYPE, type] = typeOf(value); + switch (TYPE) { + case PRIMITIVE: { + let entry = value; + switch (type) { + case 'bigint': + TYPE = BIGINT; + entry = value.toString(); + break; + case 'function': + case 'symbol': + if (strict) + throw new TypeError('unable to serialize ' + type); + entry = null; + break; + case 'undefined': + return as([VOID], value); + } + return as([TYPE, entry], value); + } + case ARRAY: { + if (type) + return as([type, [...value]], value); + + const arr = []; + const index = as([TYPE, arr], value); + for (const entry of value) + arr.push(pair(entry)); + return index; + } + case OBJECT: { + if (type) { + switch (type) { + case 'BigInt': + return as([type, value.toString()], value); + case 'Boolean': + case 'Number': + case 'String': + return as([type, value.valueOf()], value); + } + } + + if (json && ('toJSON' in value)) + return pair(value.toJSON()); + + const entries = []; + const index = as([TYPE, entries], value); + for (const key of keys(value)) { + if (strict || !shouldSkip(typeOf(value[key]))) + entries.push([pair(key), pair(value[key])]); + } + return index; + } + case DATE: + return as([TYPE, value.toISOString()], value); + case REGEXP: { + const {source, flags} = value; + return as([TYPE, {source, flags}], value); + } + case MAP: { + const entries = []; + const index = as([TYPE, entries], value); + for (const [key, entry] of value) { + if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry)))) + entries.push([pair(key), pair(entry)]); + } + return index; + } + case SET: { + const entries = []; + const index = as([TYPE, entries], value); + for (const entry of value) { + if (strict || !shouldSkip(typeOf(entry))) + entries.push(pair(entry)); + } + return index; + } + } + + const {message} = value; + return as([TYPE, {name: type, message}], value); + }; + + return pair; +}; + +/** + * @typedef {Array} Record a type representation + */ + +/** + * Returns an array of serialized Records. + * @param {any} value a serializable value. + * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that, + * if `true`, will not throw errors on incompatible types, and behave more + * like JSON stringify would behave. Symbol and Function will be discarded. + * @returns {Record[]} + */ + export const serialize = (value, {json, lossy} = {}) => { + const _ = []; + return serializer(!(json || lossy), !!json, new Map, _)(value), _; +}; diff --git a/node_modules/@ungap/structured-clone/esm/types.js b/node_modules/@ungap/structured-clone/esm/types.js new file mode 100644 index 000000000..50e60ca06 --- /dev/null +++ b/node_modules/@ungap/structured-clone/esm/types.js @@ -0,0 +1,11 @@ +export const VOID = -1; +export const PRIMITIVE = 0; +export const ARRAY = 1; +export const OBJECT = 2; +export const DATE = 3; +export const REGEXP = 4; +export const MAP = 5; +export const SET = 6; +export const ERROR = 7; +export const BIGINT = 8; +// export const SYMBOL = 9; diff --git a/node_modules/@ungap/structured-clone/package.json b/node_modules/@ungap/structured-clone/package.json new file mode 100644 index 000000000..ba9f84fa5 --- /dev/null +++ b/node_modules/@ungap/structured-clone/package.json @@ -0,0 +1,53 @@ +{ + "name": "@ungap/structured-clone", + "version": "1.2.0", + "description": "A structuredClone polyfill", + "main": "./cjs/index.js", + "scripts": { + "build": "npm run cjs && npm run rollup:json && npm run test", + "cjs": "ascjs esm cjs", + "coverage": "c8 report --reporter=text-lcov > ./coverage/lcov.info", + "rollup:json": "rollup --config rollup/json.config.js", + "test": "c8 node test/index.js" + }, + "keywords": [ + "recursion", + "structured", + "clone", + "algorithm" + ], + "author": "Andrea Giammarchi", + "license": "ISC", + "devDependencies": { + "@rollup/plugin-node-resolve": "^15.0.2", + "@rollup/plugin-terser": "^0.4.1", + "ascjs": "^5.0.1", + "c8": "^7.13.0", + "coveralls": "^3.1.1", + "rollup": "^3.21.4" + }, + "module": "./esm/index.js", + "type": "module", + "exports": { + ".": { + "import": "./esm/index.js", + "default": "./cjs/index.js" + }, + "./json": { + "import": "./esm/json.js", + "default": "./cjs/json.js" + }, + "./package.json": "./package.json" + }, + "directories": { + "test": "test" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ungap/structured-clone.git" + }, + "bugs": { + "url": "https://github.com/ungap/structured-clone/issues" + }, + "homepage": "https://github.com/ungap/structured-clone#readme" +} diff --git a/node_modules/@ungap/structured-clone/structured-json.js b/node_modules/@ungap/structured-clone/structured-json.js new file mode 100644 index 000000000..44cfe596b --- /dev/null +++ b/node_modules/@ungap/structured-clone/structured-json.js @@ -0,0 +1 @@ +var StructuredJSON=function(e){"use strict";const r="object"==typeof self?self:globalThis,t=e=>((e,t)=>{const s=(r,t)=>(e.set(t,r),r),n=c=>{if(e.has(c))return e.get(c);const[o,a]=t[c];switch(o){case 0:case-1:return s(a,c);case 1:{const e=s([],c);for(const r of a)e.push(n(r));return e}case 2:{const e=s({},c);for(const[r,t]of a)e[n(r)]=n(t);return e}case 3:return s(new Date(a),c);case 4:{const{source:e,flags:r}=a;return s(new RegExp(e,r),c)}case 5:{const e=s(new Map,c);for(const[r,t]of a)e.set(n(r),n(t));return e}case 6:{const e=s(new Set,c);for(const r of a)e.add(n(r));return e}case 7:{const{name:e,message:t}=a;return s(new r[e](t),c)}case 8:return s(BigInt(a),c);case"BigInt":return s(Object(BigInt(a)),c)}return s(new r[o](a),c)};return n})(new Map,e)(0),s="",{toString:n}={},{keys:c}=Object,o=e=>{const r=typeof e;if("object"!==r||!e)return[0,r];const t=n.call(e).slice(8,-1);switch(t){case"Array":return[1,s];case"Object":return[2,s];case"Date":return[3,s];case"RegExp":return[4,s];case"Map":return[5,s];case"Set":return[6,s]}return t.includes("Array")?[1,t]:t.includes("Error")?[7,t]:[2,t]},a=([e,r])=>0===e&&("function"===r||"symbol"===r),u=(e,{json:r,lossy:t}={})=>{const s=[];return((e,r,t,s)=>{const n=(e,r)=>{const n=s.push(e)-1;return t.set(r,n),n},u=s=>{if(t.has(s))return t.get(s);let[i,f]=o(s);switch(i){case 0:{let r=s;switch(f){case"bigint":i=8,r=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);r=null;break;case"undefined":return n([-1],s)}return n([i,r],s)}case 1:{if(f)return n([f,[...s]],s);const e=[],r=n([i,e],s);for(const r of s)e.push(u(r));return r}case 2:{if(f)switch(f){case"BigInt":return n([f,s.toString()],s);case"Boolean":case"Number":case"String":return n([f,s.valueOf()],s)}if(r&&"toJSON"in s)return u(s.toJSON());const t=[],l=n([i,t],s);for(const r of c(s))!e&&a(o(s[r]))||t.push([u(r),u(s[r])]);return l}case 3:return n([i,s.toISOString()],s);case 4:{const{source:e,flags:r}=s;return n([i,{source:e,flags:r}],s)}case 5:{const r=[],t=n([i,r],s);for(const[t,n]of s)(e||!a(o(t))&&!a(o(n)))&&r.push([u(t),u(n)]);return t}case 6:{const r=[],t=n([i,r],s);for(const t of s)!e&&a(o(t))||r.push(u(t));return t}}const{message:l}=s;return n([i,{name:f,message:l}],s)};return u})(!(r||t),!!r,new Map,s)(e),s},{parse:i,stringify:f}=JSON,l={json:!0,lossy:!0};return e.parse=e=>t(i(e)),e.stringify=e=>f(u(e,l)),e}({}); diff --git a/node_modules/acorn-jsx/index.d.ts b/node_modules/acorn-jsx/index.d.ts new file mode 100644 index 000000000..f37b1df4c --- /dev/null +++ b/node_modules/acorn-jsx/index.d.ts @@ -0,0 +1,12 @@ +import { Parser } from 'acorn' + +declare const jsx: (options?: jsx.Options) => (BaseParser: typeof Parser) => typeof Parser; + +declare namespace jsx { + interface Options { + allowNamespacedObjects?: boolean; + allowNamespaces?: boolean; + } +} + +export = jsx; diff --git a/node_modules/acorn-jsx/package.json b/node_modules/acorn-jsx/package.json index 158aec807..6debde9ca 100644 --- a/node_modules/acorn-jsx/package.json +++ b/node_modules/acorn-jsx/package.json @@ -1,55 +1,27 @@ { - "_from": "acorn-jsx@^5.3.1", - "_id": "acorn-jsx@5.3.1", - "_inBundle": false, - "_integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "_location": "/acorn-jsx", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "acorn-jsx@^5.3.1", - "name": "acorn-jsx", - "escapedName": "acorn-jsx", - "rawSpec": "^5.3.1", - "saveSpec": null, - "fetchSpec": "^5.3.1" - }, - "_requiredBy": [ - "/espree" - ], - "_resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "_shasum": "fc8661e11b7ac1539c47dbfea2e72b3af34d267b", - "_spec": "acorn-jsx@^5.3.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/espree", - "bugs": { - "url": "https://github.com/acornjs/acorn-jsx/issues" - }, - "bundleDependencies": false, - "deprecated": false, + "name": "acorn-jsx", "description": "Modern, fast React.js JSX parser", - "devDependencies": { - "acorn": "^8.0.1" - }, "homepage": "https://github.com/acornjs/acorn-jsx", - "license": "MIT", + "version": "5.3.2", "maintainers": [ { "name": "Ingvar Stepanyan", "email": "me@rreverser.com", - "url": "http://rreverser.com/" + "web": "http://rreverser.com/" } ], - "name": "acorn-jsx", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, "repository": { "type": "git", - "url": "git+https://github.com/acornjs/acorn-jsx.git" + "url": "https://github.com/acornjs/acorn-jsx" }, + "license": "MIT", "scripts": { "test": "node test/run.js" }, - "version": "5.3.1" + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "devDependencies": { + "acorn": "^8.0.1" + } } diff --git a/node_modules/ansi-colors/README.md b/node_modules/ansi-colors/README.md deleted file mode 100644 index dcdbcb503..000000000 --- a/node_modules/ansi-colors/README.md +++ /dev/null @@ -1,315 +0,0 @@ -# ansi-colors [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/ansi-colors.svg?style=flat)](https://www.npmjs.com/package/ansi-colors) [![NPM monthly downloads](https://img.shields.io/npm/dm/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![NPM total downloads](https://img.shields.io/npm/dt/ansi-colors.svg?style=flat)](https://npmjs.org/package/ansi-colors) [![Linux Build Status](https://img.shields.io/travis/doowb/ansi-colors.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/ansi-colors) - -> Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs). - -Please consider following this project's author, [Brian Woodward](https://github.com/doowb), and consider starring the project to show your :heart: and support. - -## Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install --save ansi-colors -``` - -![image](https://user-images.githubusercontent.com/383994/39635445-8a98a3a6-4f8b-11e8-89c1-068c45d4fff8.png) - -## Why use this? - -ansi-colors is _the fastest Node.js library for terminal styling_. A more performant drop-in replacement for chalk, with no dependencies. - -* _Blazing fast_ - Fastest terminal styling library in node.js, 10-20x faster than chalk! - -* _Drop-in replacement_ for [chalk](https://github.com/chalk/chalk). -* _No dependencies_ (Chalk has 7 dependencies in its tree!) - -* _Safe_ - Does not modify the `String.prototype` like [colors](https://github.com/Marak/colors.js). -* Supports [nested colors](#nested-colors), **and does not have the [nested styling bug](#nested-styling-bug) that is present in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur)**. -* Supports [chained colors](#chained-colors). -* [Toggle color support](#toggle-color-support) on or off. - -## Usage - -```js -const c = require('ansi-colors'); - -console.log(c.red('This is a red string!')); -console.log(c.green('This is a red string!')); -console.log(c.cyan('This is a cyan string!')); -console.log(c.yellow('This is a yellow string!')); -``` - -![image](https://user-images.githubusercontent.com/383994/39653848-a38e67da-4fc0-11e8-89ae-98c65ebe9dcf.png) - -## Chained colors - -```js -console.log(c.bold.red('this is a bold red message')); -console.log(c.bold.yellow.italic('this is a bold yellow italicized message')); -console.log(c.green.bold.underline('this is a bold green underlined message')); -``` - -![image](https://user-images.githubusercontent.com/383994/39635780-7617246a-4f8c-11e8-89e9-05216cc54e38.png) - -## Nested colors - -```js -console.log(c.yellow(`foo ${c.red.bold('red')} bar ${c.cyan('cyan')} baz`)); -``` - -![image](https://user-images.githubusercontent.com/383994/39635817-8ed93d44-4f8c-11e8-8afd-8c3ea35f5fbe.png) - -### Nested styling bug - -`ansi-colors` does not have the nested styling bug found in [colorette](https://github.com/jorgebucaran/colorette), [chalk](https://github.com/chalk/chalk), and [kleur](https://github.com/lukeed/kleur). - -```js -const { bold, red } = require('ansi-styles'); -console.log(bold(`foo ${red.dim('bar')} baz`)); - -const colorette = require('colorette'); -console.log(colorette.bold(`foo ${colorette.red(colorette.dim('bar'))} baz`)); - -const kleur = require('kleur'); -console.log(kleur.bold(`foo ${kleur.red.dim('bar')} baz`)); - -const chalk = require('chalk'); -console.log(chalk.bold(`foo ${chalk.red.dim('bar')} baz`)); -``` - -**Results in the following** - -(sans icons and labels) - -![image](https://user-images.githubusercontent.com/383994/47280326-d2ee0580-d5a3-11e8-9611-ea6010f0a253.png) - -## Toggle color support - -Easily enable/disable colors. - -```js -const c = require('ansi-colors'); - -// disable colors manually -c.enabled = false; - -// or use a library to automatically detect support -c.enabled = require('color-support').hasBasic; - -console.log(c.red('I will only be colored red if the terminal supports colors')); -``` - -## Strip ANSI codes - -Use the `.unstyle` method to strip ANSI codes from a string. - -```js -console.log(c.unstyle(c.blue.bold('foo bar baz'))); -//=> 'foo bar baz' -``` - -## Available styles - -**Note** that bright and bright-background colors are not always supported. - -| Colors | Background Colors | Bright Colors | Bright Background Colors | -| ------- | ----------------- | ------------- | ------------------------ | -| black | bgBlack | blackBright | bgBlackBright | -| red | bgRed | redBright | bgRedBright | -| green | bgGreen | greenBright | bgGreenBright | -| yellow | bgYellow | yellowBright | bgYellowBright | -| blue | bgBlue | blueBright | bgBlueBright | -| magenta | bgMagenta | magentaBright | bgMagentaBright | -| cyan | bgCyan | cyanBright | bgCyanBright | -| white | bgWhite | whiteBright | bgWhiteBright | -| gray | | | | -| grey | | | | - -_(`gray` is the U.S. spelling, `grey` is more commonly used in the Canada and U.K.)_ - -### Style modifiers - -* dim -* **bold** - -* hidden -* _italic_ - -* underline -* inverse -* ~~strikethrough~~ - -* reset - -## Aliases - -Create custom aliases for styles. - -```js -const colors = require('ansi-colors'); - -colors.alias('primary', colors.yellow); -colors.alias('secondary', colors.bold); - -console.log(colors.primary.secondary('Foo')); -``` - -## Themes - -A theme is an object of custom aliases. - -```js -const colors = require('ansi-colors'); - -colors.theme({ - danger: colors.red, - dark: colors.dim.gray, - disabled: colors.gray, - em: colors.italic, - heading: colors.bold.underline, - info: colors.cyan, - muted: colors.dim, - primary: colors.blue, - strong: colors.bold, - success: colors.green, - underline: colors.underline, - warning: colors.yellow -}); - -// Now, we can use our custom styles alongside the built-in styles! -console.log(colors.danger.strong.em('Error!')); -console.log(colors.warning('Heads up!')); -console.log(colors.info('Did you know...')); -console.log(colors.success.bold('It worked!')); -``` - -## Performance - -**Libraries tested** - -* ansi-colors v3.0.4 -* chalk v2.4.1 - -### Mac - -> MacBook Pro, Intel Core i7, 2.3 GHz, 16 GB. - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.915ms` -* chalk - `12.437ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 173,851 ops/sec ±0.42% (91 runs sampled) - chalk x 9,944 ops/sec ±2.53% (81 runs sampled))) - -# Chained colors - ansi-colors x 20,791 ops/sec ±0.60% (88 runs sampled) - chalk x 2,111 ops/sec ±2.34% (83 runs sampled) - -# Nested colors - ansi-colors x 59,304 ops/sec ±0.98% (92 runs sampled) - chalk x 4,590 ops/sec ±2.08% (82 runs sampled) -``` - -### Windows - -> Windows 10, Intel Core i7-7700k CPU @ 4.2 GHz, 32 GB - -**Load time** - -Time it takes to load the first time `require()` is called: - -* ansi-colors - `1.494ms` -* chalk - `11.523ms` - -**Benchmarks** - -``` -# All Colors - ansi-colors x 193,088 ops/sec ±0.51% (95 runs sampled)) - chalk x 9,612 ops/sec ±3.31% (77 runs sampled))) - -# Chained colors - ansi-colors x 26,093 ops/sec ±1.13% (94 runs sampled) - chalk x 2,267 ops/sec ±2.88% (80 runs sampled)) - -# Nested colors - ansi-colors x 67,747 ops/sec ±0.49% (93 runs sampled) - chalk x 4,446 ops/sec ±3.01% (82 runs sampled)) -``` - -## About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -### Related projects - -You might also be interested in these projects: - -* [ansi-wrap](https://www.npmjs.com/package/ansi-wrap): Create ansi colors by passing the open and close codes. | [homepage](https://github.com/jonschlinkert/ansi-wrap "Create ansi colors by passing the open and close codes.") -* [strip-color](https://www.npmjs.com/package/strip-color): Strip ANSI color codes from a string. No dependencies. | [homepage](https://github.com/jonschlinkert/strip-color "Strip ANSI color codes from a string. No dependencies.") - -### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 48 | [jonschlinkert](https://github.com/jonschlinkert) | -| 42 | [doowb](https://github.com/doowb) | -| 6 | [lukeed](https://github.com/lukeed) | -| 2 | [Silic0nS0ldier](https://github.com/Silic0nS0ldier) | -| 1 | [dwieeb](https://github.com/dwieeb) | -| 1 | [jorgebucaran](https://github.com/jorgebucaran) | -| 1 | [madhavarshney](https://github.com/madhavarshney) | -| 1 | [chapterjason](https://github.com/chapterjason) | - -### Author - -**Brian Woodward** - -* [GitHub Profile](https://github.com/doowb) -* [Twitter Profile](https://twitter.com/doowb) -* [LinkedIn Profile](https://linkedin.com/in/woodwardbrian) - -### License - -Copyright © 2019, [Brian Woodward](https://github.com/doowb). -Released under the [MIT License](LICENSE). - -*** - -_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on July 01, 2019._ \ No newline at end of file diff --git a/node_modules/ansi-colors/index.js b/node_modules/ansi-colors/index.js deleted file mode 100644 index 8e2641904..000000000 --- a/node_modules/ansi-colors/index.js +++ /dev/null @@ -1,177 +0,0 @@ -'use strict'; - -const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val); -const identity = val => val; - -/* eslint-disable no-control-regex */ -// this is a modified version of https://github.com/chalk/ansi-regex (MIT License) -const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g; - -const create = () => { - const colors = { enabled: true, visible: true, styles: {}, keys: {} }; - - if ('FORCE_COLOR' in process.env) { - colors.enabled = process.env.FORCE_COLOR !== '0'; - } - - const ansi = style => { - let open = style.open = `\u001b[${style.codes[0]}m`; - let close = style.close = `\u001b[${style.codes[1]}m`; - let regex = style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g'); - style.wrap = (input, newline) => { - if (input.includes(close)) input = input.replace(regex, close + open); - let output = open + input + close; - // see https://github.com/chalk/chalk/pull/92, thanks to the - // chalk contributors for this fix. However, we've confirmed that - // this issue is also present in Windows terminals - return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output; - }; - return style; - }; - - const wrap = (style, input, newline) => { - return typeof style === 'function' ? style(input) : style.wrap(input, newline); - }; - - const style = (input, stack) => { - if (input === '' || input == null) return ''; - if (colors.enabled === false) return input; - if (colors.visible === false) return ''; - let str = '' + input; - let nl = str.includes('\n'); - let n = stack.length; - if (n > 0 && stack.includes('unstyle')) { - stack = [...new Set(['unstyle', ...stack])].reverse(); - } - while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl); - return str; - }; - - const define = (name, codes, type) => { - colors.styles[name] = ansi({ name, codes }); - let keys = colors.keys[type] || (colors.keys[type] = []); - keys.push(name); - - Reflect.defineProperty(colors, name, { - configurable: true, - enumerable: true, - set(value) { - colors.alias(name, value); - }, - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(name) : [name]; - return color; - } - }); - }; - - define('reset', [0, 0], 'modifier'); - define('bold', [1, 22], 'modifier'); - define('dim', [2, 22], 'modifier'); - define('italic', [3, 23], 'modifier'); - define('underline', [4, 24], 'modifier'); - define('inverse', [7, 27], 'modifier'); - define('hidden', [8, 28], 'modifier'); - define('strikethrough', [9, 29], 'modifier'); - - define('black', [30, 39], 'color'); - define('red', [31, 39], 'color'); - define('green', [32, 39], 'color'); - define('yellow', [33, 39], 'color'); - define('blue', [34, 39], 'color'); - define('magenta', [35, 39], 'color'); - define('cyan', [36, 39], 'color'); - define('white', [37, 39], 'color'); - define('gray', [90, 39], 'color'); - define('grey', [90, 39], 'color'); - - define('bgBlack', [40, 49], 'bg'); - define('bgRed', [41, 49], 'bg'); - define('bgGreen', [42, 49], 'bg'); - define('bgYellow', [43, 49], 'bg'); - define('bgBlue', [44, 49], 'bg'); - define('bgMagenta', [45, 49], 'bg'); - define('bgCyan', [46, 49], 'bg'); - define('bgWhite', [47, 49], 'bg'); - - define('blackBright', [90, 39], 'bright'); - define('redBright', [91, 39], 'bright'); - define('greenBright', [92, 39], 'bright'); - define('yellowBright', [93, 39], 'bright'); - define('blueBright', [94, 39], 'bright'); - define('magentaBright', [95, 39], 'bright'); - define('cyanBright', [96, 39], 'bright'); - define('whiteBright', [97, 39], 'bright'); - - define('bgBlackBright', [100, 49], 'bgBright'); - define('bgRedBright', [101, 49], 'bgBright'); - define('bgGreenBright', [102, 49], 'bgBright'); - define('bgYellowBright', [103, 49], 'bgBright'); - define('bgBlueBright', [104, 49], 'bgBright'); - define('bgMagentaBright', [105, 49], 'bgBright'); - define('bgCyanBright', [106, 49], 'bgBright'); - define('bgWhiteBright', [107, 49], 'bgBright'); - - colors.ansiRegex = ANSI_REGEX; - colors.hasColor = colors.hasAnsi = str => { - colors.ansiRegex.lastIndex = 0; - return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str); - }; - - colors.alias = (name, color) => { - let fn = typeof color === 'string' ? colors[color] : color; - - if (typeof fn !== 'function') { - throw new TypeError('Expected alias to be the name of an existing color (string) or a function'); - } - - if (!fn.stack) { - Reflect.defineProperty(fn, 'name', { value: name }); - colors.styles[name] = fn; - fn.stack = [name]; - } - - Reflect.defineProperty(colors, name, { - configurable: true, - enumerable: true, - set(value) { - colors.alias(name, value); - }, - get() { - let color = input => style(input, color.stack); - Reflect.setPrototypeOf(color, colors); - color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack; - return color; - } - }); - }; - - colors.theme = custom => { - if (!isObject(custom)) throw new TypeError('Expected theme to be an object'); - for (let name of Object.keys(custom)) { - colors.alias(name, custom[name]); - } - return colors; - }; - - colors.alias('unstyle', str => { - if (typeof str === 'string' && str !== '') { - colors.ansiRegex.lastIndex = 0; - return str.replace(colors.ansiRegex, ''); - } - return ''; - }); - - colors.alias('noop', str => str); - colors.none = colors.clear = colors.noop; - - colors.stripColor = colors.unstyle; - colors.symbols = require('./symbols'); - colors.define = define; - return colors; -}; - -module.exports = create(); -module.exports.create = create; diff --git a/node_modules/ansi-colors/package.json b/node_modules/ansi-colors/package.json deleted file mode 100644 index 55197877b..000000000 --- a/node_modules/ansi-colors/package.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "_from": "ansi-colors@^4.1.1", - "_id": "ansi-colors@4.1.1", - "_inBundle": false, - "_integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "_location": "/ansi-colors", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-colors@^4.1.1", - "name": "ansi-colors", - "escapedName": "ansi-colors", - "rawSpec": "^4.1.1", - "saveSpec": null, - "fetchSpec": "^4.1.1" - }, - "_requiredBy": [ - "/enquirer" - ], - "_resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "_shasum": "cbb9ae256bf750af1eab344f229aa27fe94ba348", - "_spec": "ansi-colors@^4.1.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/enquirer", - "author": { - "name": "Brian Woodward", - "url": "https://github.com/doowb" - }, - "bugs": { - "url": "https://github.com/doowb/ansi-colors/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jason Schilling", - "url": "https://sourecode.de" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - }, - { - "name": "Jordan", - "url": "https://github.com/Silic0nS0ldier" - } - ], - "deprecated": false, - "description": "Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).", - "devDependencies": { - "decache": "^4.5.1", - "gulp-format-md": "^2.0.0", - "justified": "^1.0.1", - "mocha": "^6.1.4", - "text-table": "^0.2.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "symbols.js", - "types/index.d.ts" - ], - "homepage": "https://github.com/doowb/ansi-colors", - "keywords": [ - "ansi", - "bgblack", - "bgBlack", - "bgblue", - "bgBlue", - "bgcyan", - "bgCyan", - "bggreen", - "bgGreen", - "bgmagenta", - "bgMagenta", - "bgred", - "bgRed", - "bgwhite", - "bgWhite", - "bgyellow", - "bgYellow", - "black", - "blue", - "bold", - "clorox", - "colors", - "cyan", - "dim", - "gray", - "green", - "grey", - "hidden", - "inverse", - "italic", - "kleur", - "magenta", - "red", - "reset", - "strikethrough", - "underline", - "white", - "yellow" - ], - "license": "MIT", - "main": "index.js", - "name": "ansi-colors", - "repository": { - "type": "git", - "url": "git+https://github.com/doowb/ansi-colors.git" - }, - "scripts": { - "test": "mocha" - }, - "types": "./types/index.d.ts", - "verb": { - "toc": false, - "layout": "default", - "tasks": [ - "readme" - ], - "data": { - "author": { - "linkedin": "woodwardbrian", - "twitter": "doowb" - } - }, - "plugins": [ - "gulp-format-md" - ], - "lint": { - "reflinks": true - }, - "related": { - "list": [ - "ansi-wrap", - "strip-color" - ] - }, - "reflinks": [ - "chalk", - "colorette", - "colors", - "kleur" - ] - }, - "version": "4.1.1" -} diff --git a/node_modules/ansi-colors/symbols.js b/node_modules/ansi-colors/symbols.js deleted file mode 100644 index ee1594573..000000000 --- a/node_modules/ansi-colors/symbols.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -const isHyper = process.env.TERM_PROGRAM === 'Hyper'; -const isWindows = process.platform === 'win32'; -const isLinux = process.platform === 'linux'; - -const common = { - ballotDisabled: '☒', - ballotOff: '☐', - ballotOn: '☑', - bullet: '•', - bulletWhite: '◦', - fullBlock: '█', - heart: '❤', - identicalTo: '≡', - line: '─', - mark: '※', - middot: '·', - minus: '-', - multiplication: '×', - obelus: '÷', - pencilDownRight: '✎', - pencilRight: '✏', - pencilUpRight: '✐', - percent: '%', - pilcrow2: '❡', - pilcrow: '¶', - plusMinus: '±', - section: '§', - starsOff: '☆', - starsOn: '★', - upDownArrow: '↕' -}; - -const windows = Object.assign({}, common, { - check: '√', - cross: '×', - ellipsisLarge: '...', - ellipsis: '...', - info: 'i', - question: '?', - questionSmall: '?', - pointer: '>', - pointerSmall: '»', - radioOff: '( )', - radioOn: '(*)', - warning: '‼' -}); - -const other = Object.assign({}, common, { - ballotCross: '✘', - check: '✔', - cross: '✖', - ellipsisLarge: '⋯', - ellipsis: '…', - info: 'ℹ', - question: '?', - questionFull: '?', - questionSmall: '﹖', - pointer: isLinux ? '▸' : '❯', - pointerSmall: isLinux ? '‣' : '›', - radioOff: '◯', - radioOn: '◉', - warning: '⚠' -}); - -module.exports = (isWindows && !isHyper) ? windows : other; -Reflect.defineProperty(module.exports, 'common', { enumerable: false, value: common }); -Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows }); -Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other }); diff --git a/node_modules/ansi-colors/types/index.d.ts b/node_modules/ansi-colors/types/index.d.ts deleted file mode 100644 index ca2d24acb..000000000 --- a/node_modules/ansi-colors/types/index.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -// Imported from DefinitelyTyped project. -// TypeScript definitions for ansi-colors -// Definitions by: Rogier Schouten -// Integrated by: Jordan Mele - -interface SymbolsType { - check: string; - cross: string; - info: string; - line: string; - pointer: string; - pointerSmall: string; - question: string; - warning: string; -} - -type StyleArrayStructure = [number, number]; -interface StyleArrayProperties { - open: string; - close: string; - closeRe: string; -} - -type StyleType = StyleArrayStructure & StyleArrayProperties; - -export interface StyleFunction extends StylesType { - (s: string): string; -} - -interface StylesType { - // modifiers - reset: T; - bold: T; - dim: T; - italic: T; - underline: T; - inverse: T; - hidden: T; - strikethrough: T; - - // colors - black: T; - red: T; - green: T; - yellow: T; - blue: T; - magenta: T; - cyan: T; - white: T; - gray: T; - grey: T; - - // bright colors - blackBright: T; - redBright: T; - greenBright: T; - yellowBright: T; - blueBright: T; - magentaBright: T; - cyanBright: T; - whiteBright: T; - - // background colors - bgBlack: T; - bgRed: T; - bgGreen: T; - bgYellow: T; - bgBlue: T; - bgMagenta: T; - bgCyan: T; - bgWhite: T; - - // bright background colors - bgBlackBright: T; - bgRedBright: T; - bgGreenBright: T; - bgYellowBright: T; - bgBlueBright: T; - bgMagentaBright: T; - bgCyanBright: T; - bgWhiteBright: T; -} - -// modifiers -export const reset: StyleFunction; -export const bold: StyleFunction; -export const dim: StyleFunction; -export const italic: StyleFunction; -export const underline: StyleFunction; -export const inverse: StyleFunction; -export const hidden: StyleFunction; -export const strikethrough: StyleFunction; - -// colors -export const black: StyleFunction; -export const red: StyleFunction; -export const green: StyleFunction; -export const yellow: StyleFunction; -export const blue: StyleFunction; -export const magenta: StyleFunction; -export const cyan: StyleFunction; -export const white: StyleFunction; -export const gray: StyleFunction; -export const grey: StyleFunction; - -// bright colors -export const blackBright: StyleFunction; -export const redBright: StyleFunction; -export const greenBright: StyleFunction; -export const yellowBright: StyleFunction; -export const blueBright: StyleFunction; -export const magentaBright: StyleFunction; -export const cyanBright: StyleFunction; -export const whiteBright: StyleFunction; - -// background colors -export const bgBlack: StyleFunction; -export const bgRed: StyleFunction; -export const bgGreen: StyleFunction; -export const bgYellow: StyleFunction; -export const bgBlue: StyleFunction; -export const bgMagenta: StyleFunction; -export const bgCyan: StyleFunction; -export const bgWhite: StyleFunction; - -// bright background colors -export const bgBlackBright: StyleFunction; -export const bgRedBright: StyleFunction; -export const bgGreenBright: StyleFunction; -export const bgYellowBright: StyleFunction; -export const bgBlueBright: StyleFunction; -export const bgMagentaBright: StyleFunction; -export const bgCyanBright: StyleFunction; -export const bgWhiteBright: StyleFunction; - -export let enabled: boolean; -export let visible: boolean; -export const ansiRegex: RegExp; - -/** - * Remove styles from string - */ -export function stripColor(s: string): string; - -/** - * Remove styles from string - */ -export function strip(s: string): string; - -/** - * Remove styles from string - */ -export function unstyle(s: string): string; - -export const styles: StylesType; -export const symbols: SymbolsType; - -/** - * Outputs a string with check-symbol as prefix - */ -export function ok(...args: string[]): string; diff --git a/node_modules/ansi-regex/index.js b/node_modules/ansi-regex/index.js index 35054aa67..616ff837d 100644 --- a/node_modules/ansi-regex/index.js +++ b/node_modules/ansi-regex/index.js @@ -2,7 +2,7 @@ module.exports = ({onlyFirst = false} = {}) => { const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); diff --git a/node_modules/ansi-regex/package.json b/node_modules/ansi-regex/package.json index 304d21443..017f53116 100644 --- a/node_modules/ansi-regex/package.json +++ b/node_modules/ansi-regex/package.json @@ -1,88 +1,55 @@ { - "_from": "ansi-regex@^5.0.0", - "_id": "ansi-regex@5.0.0", - "_inBundle": false, - "_integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "_location": "/ansi-regex", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-regex@^5.0.0", - "name": "ansi-regex", - "escapedName": "ansi-regex", - "rawSpec": "^5.0.0", - "saveSpec": null, - "fetchSpec": "^5.0.0" - }, - "_requiredBy": [ - "/pretty-format", - "/strip-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "_shasum": "388539f55179bf39339c81af30a654d69f87cb75", - "_spec": "ansi-regex@^5.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/strip-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching ANSI escape codes", - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/chalk/ansi-regex#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "command-line", - "text", - "regex", - "regexp", - "re", - "match", - "test", - "find", - "pattern" - ], - "license": "MIT", - "name": "ansi-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-regex.git" - }, - "scripts": { - "test": "xo && ava && tsd", - "view-supported": "node fixtures/view-codes.js" - }, - "version": "5.0.0" + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } } diff --git a/node_modules/ansi-regex/readme.md b/node_modules/ansi-regex/readme.md index 3c2b77c43..4d848bc36 100644 --- a/node_modules/ansi-regex/readme.md +++ b/node_modules/ansi-regex/readme.md @@ -1,4 +1,4 @@ -# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) +# ansi-regex > Regular expression for matching [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) diff --git a/node_modules/astral-regex/index.d.ts b/node_modules/astral-regex/index.d.ts deleted file mode 100644 index e81ac3158..000000000 --- a/node_modules/astral-regex/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -declare namespace astralRegex { - interface Options { - /** - Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol. Default: `false` _(Matches any astral symbols in a string)_ - */ - readonly exact?: boolean; - } -} - -/** -Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane). - -@returns A `RegExp` for matching astral symbols. - -@example -``` -import astralRegex = require('astral-regex'); - -astralRegex({exact: true}).test('🦄'); -//=> true - -'foo 🦄 💩 bar'.match(astralRegex()); -//=> ['🦄', '💩'] -``` -*/ -declare function astralRegex(options?: astralRegex.Options): RegExp; - -export = astralRegex; diff --git a/node_modules/astral-regex/index.js b/node_modules/astral-regex/index.js deleted file mode 100644 index 651177d40..000000000 --- a/node_modules/astral-regex/index.js +++ /dev/null @@ -1,6 +0,0 @@ -'use strict'; -const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]'; - -const astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); - -module.exports = astralRegex; diff --git a/node_modules/astral-regex/package.json b/node_modules/astral-regex/package.json deleted file mode 100644 index 34f930020..000000000 --- a/node_modules/astral-regex/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "astral-regex@^2.0.0", - "_id": "astral-regex@2.0.0", - "_inBundle": false, - "_integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "_location": "/astral-regex", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "astral-regex@^2.0.0", - "name": "astral-regex", - "escapedName": "astral-regex", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/slice-ansi" - ], - "_resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "_shasum": "483143c567aeed4785759c0865786dc77d7d2e31", - "_spec": "astral-regex@^2.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/slice-ansi", - "author": { - "name": "Kevin Mårtensson", - "email": "kevinmartensson@gmail.com", - "url": "github.com/kevva" - }, - "bugs": { - "url": "https://github.com/kevva/astral-regex/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Regular expression for matching astral symbols", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/kevva/astral-regex#readme", - "keywords": [ - "astral", - "emoji", - "regex", - "surrogate" - ], - "license": "MIT", - "name": "astral-regex", - "repository": { - "type": "git", - "url": "git+https://github.com/kevva/astral-regex.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "2.0.0" -} diff --git a/node_modules/astral-regex/readme.md b/node_modules/astral-regex/readme.md deleted file mode 100644 index 89d6659a4..000000000 --- a/node_modules/astral-regex/readme.md +++ /dev/null @@ -1,46 +0,0 @@ -# astral-regex [![Build Status](https://travis-ci.org/kevva/astral-regex.svg?branch=master)](https://travis-ci.org/kevva/astral-regex) - -> Regular expression for matching [astral symbols](https://everything2.com/title/astral+plane) - - -## Install - -``` -$ npm install astral-regex -``` - - -## Usage - -```js -const astralRegex = require('astral-regex'); - -astralRegex({exact: true}).test('🦄'); -//=> true - -'foo 🦄 💩 bar'.match(astralRegex()); -//=> ['🦄', '💩'] -``` - - -## API - -### astralRegex([options]) - -Returns a `RegExp` for matching astral symbols. - -#### options - -Type: `Object` - -##### exact - -Type: `boolean`
-Default: `false` *(Matches any astral symbols in a string)* - -Only match an exact string. Useful with `RegExp#test()` to check if a string is a astral symbol. - - -## License - -MIT © [Kevin Mårtensson](https://github.com/kevva) diff --git a/node_modules/call-bind/.eslintignore b/node_modules/call-bind/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/call-bind/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/call-bind/.eslintrc b/node_modules/call-bind/.eslintrc deleted file mode 100644 index e5d3c9a94..000000000 --- a/node_modules/call-bind/.eslintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "id-length": 0, - "new-cap": [2, { - "capIsNewExceptions": [ - "GetIntrinsic", - ], - }], - "no-magic-numbers": 0, - "operator-linebreak": [2, "before"], - }, -} diff --git a/node_modules/call-bind/.github/FUNDING.yml b/node_modules/call-bind/.github/FUNDING.yml deleted file mode 100644 index c70c2ecdb..000000000 --- a/node_modules/call-bind/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/call-bind -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/call-bind/.nycrc b/node_modules/call-bind/.nycrc deleted file mode 100644 index 1826526e0..000000000 --- a/node_modules/call-bind/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/call-bind/CHANGELOG.md b/node_modules/call-bind/CHANGELOG.md deleted file mode 100644 index 62a37279e..000000000 --- a/node_modules/call-bind/CHANGELOG.md +++ /dev/null @@ -1,42 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11 - -### Commits - -- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d) - -## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08 - -### Commits - -- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1) -- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e) -- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb) -- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71) -- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee) -- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2) -- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8) -- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6) - -## v1.0.0 - 2020-10-30 - -### Commits - -- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50) -- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df) -- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65) -- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249) -- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13) -- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4) -- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717) -- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af) -- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650) -- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f) diff --git a/node_modules/call-bind/LICENSE b/node_modules/call-bind/LICENSE deleted file mode 100644 index 48f05d01d..000000000 --- a/node_modules/call-bind/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/call-bind/README.md b/node_modules/call-bind/README.md deleted file mode 100644 index 53649eb46..000000000 --- a/node_modules/call-bind/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# call-bind -Robustly `.call.bind()` a function. diff --git a/node_modules/call-bind/callBound.js b/node_modules/call-bind/callBound.js deleted file mode 100644 index 8374adfd0..000000000 --- a/node_modules/call-bind/callBound.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -var GetIntrinsic = require('get-intrinsic'); - -var callBind = require('./'); - -var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); - -module.exports = function callBoundIntrinsic(name, allowMissing) { - var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { - return callBind(intrinsic); - } - return intrinsic; -}; diff --git a/node_modules/call-bind/index.js b/node_modules/call-bind/index.js deleted file mode 100644 index 6fa3e4af7..000000000 --- a/node_modules/call-bind/index.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); -var GetIntrinsic = require('get-intrinsic'); - -var $apply = GetIntrinsic('%Function.prototype.apply%'); -var $call = GetIntrinsic('%Function.prototype.call%'); -var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); - -var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); -var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); -var $max = GetIntrinsic('%Math.max%'); - -if ($defineProperty) { - try { - $defineProperty({}, 'a', { value: 1 }); - } catch (e) { - // IE 8 has a broken defineProperty - $defineProperty = null; - } -} - -module.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, 'length'); - if (desc.configurable) { - // original length, plus the receiver, minus any additional arguments (after the receiver) - $defineProperty( - func, - 'length', - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } - } - return func; -}; - -var applyBind = function applyBind() { - return $reflectApply(bind, $apply, arguments); -}; - -if ($defineProperty) { - $defineProperty(module.exports, 'apply', { value: applyBind }); -} else { - module.exports.apply = applyBind; -} diff --git a/node_modules/call-bind/package.json b/node_modules/call-bind/package.json deleted file mode 100644 index 4f5c4a794..000000000 --- a/node_modules/call-bind/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_from": "call-bind@^1.0.0", - "_id": "call-bind@1.0.2", - "_inBundle": false, - "_integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "_location": "/call-bind", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "call-bind@^1.0.0", - "name": "call-bind", - "escapedName": "call-bind", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/is-boolean-object" - ], - "_resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "_shasum": "b1d4e89e688119c3c9a903ad30abb2f6a919be3c", - "_spec": "call-bind@^1.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/is-boolean-object", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "bugs": { - "url": "https://github.com/ljharb/call-bind/issues" - }, - "bundleDependencies": false, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "deprecated": false, - "description": "Robustly `.call.bind()` a function", - "devDependencies": { - "@ljharb/eslint-config": "^17.3.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", - "eslint": "^7.17.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.1.1" - }, - "exports": { - ".": [ - { - "default": "./index.js" - }, - "./index.js" - ], - "./callBound": [ - { - "default": "./callBound.js" - }, - "./callBound.js" - ], - "./package.json": "./package.json" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/call-bind#readme", - "keywords": [ - "javascript", - "ecmascript", - "es", - "js", - "callbind", - "callbound", - "call", - "bind", - "bound", - "call-bind", - "call-bound", - "function", - "es-abstract" - ], - "license": "MIT", - "main": "index.js", - "name": "call-bind", - "repository": { - "type": "git", - "url": "git+https://github.com/ljharb/call-bind.git" - }, - "scripts": { - "lint": "eslint --ext=.js,.mjs .", - "posttest": "aud --production", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "nyc tape 'test/*'", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "version": "1.0.2" -} diff --git a/node_modules/call-bind/test/callBound.js b/node_modules/call-bind/test/callBound.js deleted file mode 100644 index 209ce3cc3..000000000 --- a/node_modules/call-bind/test/callBound.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -var test = require('tape'); - -var callBound = require('../callBound'); - -test('callBound', function (t) { - // static primitive - t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself'); - t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself'); - - // static non-function object - t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself'); - t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself'); - t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself'); - t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself'); - - // static function - t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself'); - t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself'); - - // prototype primitive - t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself'); - t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself'); - - // prototype function - t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself'); - t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself'); - t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original'); - t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original'); - - t['throws']( - function () { callBound('does not exist'); }, - SyntaxError, - 'nonexistent intrinsic throws' - ); - t['throws']( - function () { callBound('does not exist', true); }, - SyntaxError, - 'allowMissing arg still throws for unknown intrinsic' - ); - - /* globals WeakRef: false */ - t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) { - st['throws']( - function () { callBound('WeakRef'); }, - TypeError, - 'real but absent intrinsic throws' - ); - st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception'); - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/call-bind/test/index.js b/node_modules/call-bind/test/index.js deleted file mode 100644 index bf6769c7c..000000000 --- a/node_modules/call-bind/test/index.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -var callBind = require('../'); -var bind = require('function-bind'); - -var test = require('tape'); - -/* - * older engines have length nonconfigurable - * in io.js v3, it is configurable except on bound functions, hence the .bind() - */ -var functionsHaveConfigurableLengths = !!( - Object.getOwnPropertyDescriptor - && Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable -); - -test('callBind', function (t) { - var sentinel = { sentinel: true }; - var func = function (a, b) { - // eslint-disable-next-line no-invalid-this - return [this, a, b]; - }; - t.equal(func.length, 2, 'original function length is 2'); - t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); - t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); - t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); - - var bound = callBind(func); - t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); - t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args'); - t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args'); - t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args'); - - var boundR = callBind(func, sentinel); - t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); - t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); - t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); - t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); - - var boundArg = callBind(func, sentinel, 1); - t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); - t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); - t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); - t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); - - t.test('callBind.apply', function (st) { - var aBound = callBind.apply(func); - st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args'); - st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); - st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); - - var aBoundArg = callBind.apply(func); - st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args'); - st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); - st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); - - var aBoundR = callBind.apply(func, sentinel); - st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args'); - st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args'); - st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args'); - - st.end(); - }); - - t.end(); -}); diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE index 658c933d2..1a9820e26 100644 --- a/node_modules/debug/LICENSE +++ b/node_modules/debug/LICENSE @@ -1,19 +1,20 @@ (The MIT License) -Copyright (c) 2014 TJ Holowaychuk +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon -Permission is hereby granted, free of charge, to any person obtaining a copy of this software -and associated documentation files (the 'Software'), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md index 88dae35d9..e9c3e047c 100644 --- a/node_modules/debug/README.md +++ b/node_modules/debug/README.md @@ -1,5 +1,5 @@ # debug -[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug) [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) @@ -241,6 +241,9 @@ setInterval(function(){ }, 1200); ``` +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. + + ## Output streams @@ -351,12 +354,34 @@ if (debug.enabled) { You can also manually toggle this property to force the debug instance to be enabled or disabled. +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + ## Authors - TJ Holowaychuk - Nathan Rajlich - Andrew Rhyne + - Josh Junon ## Backers @@ -434,6 +459,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s (The MIT License) Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json index 23e1e4d19..3bcdc242f 100644 --- a/node_modules/debug/package.json +++ b/node_modules/debug/package.json @@ -1,60 +1,38 @@ { - "_from": "debug@^4.0.1", - "_id": "debug@4.3.1", - "_inBundle": false, - "_integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "_location": "/debug", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "debug@^4.0.1", - "name": "debug", - "escapedName": "debug", - "rawSpec": "^4.0.1", - "saveSpec": null, - "fetchSpec": "^4.0.1" + "name": "debug", + "version": "4.3.4", + "repository": { + "type": "git", + "url": "git://github.com/debug-js/debug.git" }, - "_requiredBy": [ - "/@babel/core", - "/@babel/traverse", - "/@eslint/eslintrc", - "/eslint", - "/istanbul-lib-source-maps" + "description": "Lightweight debugging utility for Node.js and the browser", + "keywords": [ + "debug", + "log", + "debugger" ], - "_resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "_shasum": "f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee", - "_spec": "debug@^4.0.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "browser": "./src/browser.js", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "bundleDependencies": false, + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "Josh Junon ", "contributors": [ - { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net", - "url": "http://n8.io" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - }, - { - "name": "Josh Junon", - "email": "josh@junon.me" - } + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "istanbul cover _mocha -- test.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, "dependencies": { "ms": "2.1.2" }, - "deprecated": false, - "description": "small debugging utility", "devDependencies": { "brfs": "^2.0.1", "browserify": "^16.2.3", @@ -68,38 +46,14 @@ "mocha-lcov-reporter": "^1.2.0", "xo": "^0.23.0" }, - "engines": { - "node": ">=6.0" - }, - "files": [ - "src", - "LICENSE", - "README.md" - ], - "homepage": "https://github.com/visionmedia/debug#readme", - "keywords": [ - "debug", - "log", - "debugger" - ], - "license": "MIT", - "main": "./src/index.js", - "name": "debug", "peerDependenciesMeta": { "supports-color": { "optional": true } }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "scripts": { - "lint": "xo", - "test": "npm run test:node && npm run test:browser && npm run lint", - "test:browser": "karma start --single-run", - "test:coverage": "cat ./coverage/lcov.info | coveralls", - "test:node": "istanbul cover _mocha -- test.js" - }, - "version": "4.3.1" + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + } } diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js index 392a8e005..e3291b20f 100644 --- a/node_modules/debug/src/common.js +++ b/node_modules/debug/src/common.js @@ -34,7 +34,7 @@ function setup(env) { /** * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the for the debug instance to be colored + * @param {String} namespace The namespace string for the debug instance to be colored * @return {Number|String} An ANSI color code for the given namespace * @api private */ @@ -60,6 +60,8 @@ function setup(env) { function createDebug(namespace) { let prevTime; let enableOverride = null; + let namespacesCache; + let enabledCache; function debug(...args) { // Disabled? @@ -120,7 +122,17 @@ function setup(env) { Object.defineProperty(debug, 'enabled', { enumerable: true, configurable: false, - get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, set: v => { enableOverride = v; } @@ -149,6 +161,7 @@ function setup(env) { */ function enable(namespaces) { createDebug.save(namespaces); + createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; @@ -166,7 +179,7 @@ function setup(env) { namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); } else { createDebug.names.push(new RegExp('^' + namespaces + '$')); } diff --git a/node_modules/enquirer/CHANGELOG.md b/node_modules/enquirer/CHANGELOG.md deleted file mode 100644 index c9ec854a2..000000000 --- a/node_modules/enquirer/CHANGELOG.md +++ /dev/null @@ -1,135 +0,0 @@ -# Release history - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -
- Guiding Principles - -- Changelogs are for humans, not machines. -- There should be an entry for every single version. -- The same types of changes should be grouped. -- Versions and sections should be linkable. -- The latest version comes first. -- The release date of each versions is displayed. -- Mention whether you follow Semantic Versioning. - -
- -
- Types of changes - -Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_): - -- `Added` for new features. -- `Changed` for changes in existing functionality. -- `Deprecated` for soon-to-be removed features. -- `Removed` for now removed features. -- `Fixed` for any bug fixes. -- `Security` in case of vulnerabilities. - -
- -## 2.3.6 - 2020-07-02 - -### Changed - -- Upgraded [ansi-colors](https://github.com/doowb/ansi-colors) dependency to v4, thanks to [@trySound](https://github.com/TrySound), [#297](https://github.com/enquirer/enquirer/pull/297). - -## 2.3.5 - 2020-04-07 - -### Fixed - -- PR #259 fixed typing numbers in the autocomplete prompt, which fixes #112, #199, and #237 -- PR #266 add the `template` property to the `SnippetPromptOptions` TypeScript interface - -## 2.3.4 - 2020-01-13 - -### Added - -- `MultiSelectPrompt` new example for `result` option. - -### Fixed - -- Updated typings to use `EventEmitter` class from `events` directly due to changes in `@types/node`. - - -## 2.3.3 - 2020-01-13 - -### Added - -- `BooleanPrompt` new example for `header` option. - -### Fixed - -- using `await` in `keypress` and returning the `number` result in the `array` type fixes an issue with tests failing only on Travis -- `autocomplete` highlighting issue -- Typos in some documentation and example comments. -- Syntax errors in example code on the README.md. - -## 2.3.2 - 2019-09-17 - -### Added - -- `AuthPrompt` type for creating authentication based prompts. -- `BasicAuth` prompt as an example of creating an authentication prompt using basic username/password authentication -- Examples for different authentication prompts. -- `QuizPrompt` - -### Fixed - -- More examples were updated to fix any known bugs. -- Couple of fixes to the editable and autocomplete prompts. -- Documentation updates to highlight options available to some prompts. - -## 2.3.1 - 2019-07-12 - -### Fixed - -- Several examples were updated to align with latest code changes and to fix small bugs found in the implementation of the example. -- Some bugs found from updating examples were fixed. -- Updates to documentation to provide more information on how to use prompts and the options available. - -## 2.1.0 - 2018-11-29 - -### Fixed - -- Several improvements were made for handling custom `format`, `result` and `initial` functions defined on the options. - -## 2.0.7 - 2018-11-14 - -### Fixed - -- `validate` function now properly accepts `false` as a return value, thanks to [@g-plane](https://github.com/g-plane). - -### Added - -- Adds support for ctrl+n to add choices -- Adds support for `options.required` on all prompts. Uses the built-in `validate()` function, allowing this functionality to be overridden or customized. -- Adds support for `options.scroll` to disable scrolling in array prompts. -- Adds support for `options.onRun`, which is called when `prompt.run()` is called, after the readline instance is created. -- Adds support for `options.history` on the `Input` and `Text` prompts. -- Adds support for `options.term` to set the terminal, thanks to [@tunnckoCore](https://github.com/tunnckoCore). At the moment this is only used in a couple of edge cases with the `Survey` and `Scale` prompts to check if the terminal is Hyper. -- `options.skip` may now be a Boolean, thanks to [@tunnckoCore](https://github.com/tunnckoCore) - -## 2.0.0 - 2018-11-07 - -### Changed - -Enquire 2.0 is a bottom-up complete re-write: - -- Several prompts that were previously published as individual packages will be included in Enquirer itself. -- Why? - As users, we didn't like having to add commonly-used prompts as plugins. Enquirer 2.0 will still support custom prompts as plugins, but many prompts will also be built-in. -- Enquirer will only have a single dependency, https://github.com/doowb/ansi-colors, which itself has no other dependencies). This will make Enquirer easier to maintain and faster for users. -- Methods for registering "questions" have been removed. While it was nice to be able to preregister questions that could be called upon later, this is something that is better left to implementors, as it's relatively trivial to do with custom code. -- `options.default` is now `options.initial` - -### Added - -- Many prompts that were previously separate packages are now bundled into Enquirer itself. - - -[Unreleased]: https://github.com/enquirer/enquirer/compare/2.0.2...HEAD -[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog diff --git a/node_modules/enquirer/README.md b/node_modules/enquirer/README.md deleted file mode 100644 index 159874228..000000000 --- a/node_modules/enquirer/README.md +++ /dev/null @@ -1,1752 +0,0 @@ -

Enquirer

- -

- -version - - -travis - - -downloads - -

- -
-
- -

-Stylish CLI prompts that are user-friendly, intuitive and easy to create.
->_ Prompts should be more like conversations than inquisitions▌ -

- -
- -

-(Example shows Enquirer's Survey Prompt) -Enquirer Survey Prompt
-The terminal in all examples is Hyper, theme is hyper-monokai-extended.

-See more prompt examples -

- -
-
- -Created by [jonschlinkert](https://github.com/jonschlinkert) and [doowb](https://github.com/doowb), Enquirer is fast, easy to use, and lightweight enough for small projects, while also being powerful and customizable enough for the most advanced use cases. - -* **Fast** - [Loads in ~4ms](#-performance) (that's about _3-4 times faster than a [single frame of a HD movie](http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php) at 60fps_) -* **Lightweight** - Only one dependency, the excellent [ansi-colors](https://github.com/doowb/ansi-colors) by [Brian Woodward](https://github.com/doowb). -* **Easy to implement** - Uses promises and async/await and sensible defaults to make prompts easy to create and implement. -* **Easy to use** - Thrill your users with a better experience! Navigating around input and choices is a breeze. You can even create [quizzes](examples/fun/countdown.js), or [record](examples/fun/record.js) and [playback](examples/fun/play.js) key bindings to aid with tutorials and videos. -* **Intuitive** - Keypress combos are available to simplify usage. -* **Flexible** - All prompts can be used standalone or chained together. -* **Stylish** - Easily override semantic styles and symbols for any part of the prompt. -* **Extensible** - Easily create and use custom prompts by extending Enquirer's built-in [prompts](#-prompts). -* **Pluggable** - Add advanced features to Enquirer using plugins. -* **Validation** - Optionally validate user input with any prompt. -* **Well tested** - All prompts are well-tested, and tests are easy to create without having to use brittle, hacky solutions to spy on prompts or "inject" values. -* **Examples** - There are numerous [examples](examples) available to help you get started. - -If you like Enquirer, please consider starring or tweeting about this project to show your support. Thanks! - -
- -

->_ Ready to start making prompts your users will love? ▌
-Enquirer Select Prompt with heartbeat example -

- -
-
- -## ❯ Getting started - -Get started with Enquirer, the most powerful and easy-to-use Node.js library for creating interactive CLI prompts. - -* [Install](#-install) -* [Usage](#-usage) -* [Enquirer](#-enquirer) -* [Prompts](#-prompts) - - [Built-in Prompts](#-prompts) - - [Custom Prompts](#-custom-prompts) -* [Key Bindings](#-key-bindings) -* [Options](#-options) -* [Release History](#-release-history) -* [Performance](#-performance) -* [About](#-about) - -
- -## ❯ Install - -Install with [npm](https://www.npmjs.com/): - -```sh -$ npm install enquirer --save -``` -Install with [yarn](https://yarnpkg.com/en/): - -```sh -$ yarn add enquirer -``` - -

-Install Enquirer with NPM -

- -_(Requires Node.js 8.6 or higher. Please let us know if you need support for an earlier version by creating an [issue](../../issues/new).)_ - -
- -## ❯ Usage - -### Single prompt - -The easiest way to get started with enquirer is to pass a [question object](#prompt-options) to the `prompt` method. - -```js -const { prompt } = require('enquirer'); - -const response = await prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); - -console.log(response); // { username: 'jonschlinkert' } -``` - -_(Examples with `await` need to be run inside an `async` function)_ - -### Multiple prompts - -Pass an array of ["question" objects](#prompt-options) to run a series of prompts. - -```js -const response = await prompt([ - { - type: 'input', - name: 'name', - message: 'What is your name?' - }, - { - type: 'input', - name: 'username', - message: 'What is your username?' - } -]); - -console.log(response); // { name: 'Edward Chan', username: 'edwardmchan' } -``` - -### Different ways to run enquirer - -#### 1. By importing the specific `built-in prompt` - -```js -const { Confirm } = require('enquirer'); - -const prompt = new Confirm({ - name: 'question', - message: 'Did you like enquirer?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)); -``` - -#### 2. By passing the options to `prompt` - -```js -const { prompt } = require('enquirer'); - -prompt({ - type: 'confirm', - name: 'question', - message: 'Did you like enquirer?' -}) - .then(answer => console.log('Answer:', answer)); -``` - -**Jump to**: [Getting Started](#-getting-started) · [Prompts](#-prompts) · [Options](#-options) · [Key Bindings](#-key-bindings) - -
- -## ❯ Enquirer - -**Enquirer is a prompt runner** - -Add Enquirer to your JavaScript project with following line of code. - -```js -const Enquirer = require('enquirer'); -``` - -The main export of this library is the `Enquirer` class, which has methods and features designed to simplify running prompts. - -```js -const { prompt } = require('enquirer'); -const question = [ - { - type: 'input', - name: 'username', - message: 'What is your username?' - }, - { - type: 'password', - name: 'password', - message: 'What is your password?' - } -]; - -let answers = await prompt(question); -console.log(answers); -``` - -**Prompts control how values are rendered and returned** - -Each individual prompt is a class with special features and functionality for rendering the types of values you want to show users in the terminal, and subsequently returning the types of values you need to use in your application. - -**How can I customize prompts?** - -Below in this guide you will find information about creating [custom prompts](#-custom-prompts). For now, we'll focus on how to customize an existing prompt. - -All of the individual [prompt classes](#built-in-prompts) in this library are exposed as static properties on Enquirer. This allows them to be used directly without using `enquirer.prompt()`. - -Use this approach if you need to modify a prompt instance, or listen for events on the prompt. - -**Example** - -```js -const { Input } = require('enquirer'); -const prompt = new Input({ - name: 'username', - message: 'What is your username?' -}); - -prompt.run() - .then(answer => console.log('Username:', answer)) - .catch(console.error); -``` - -### [Enquirer](index.js#L20) - -Create an instance of `Enquirer`. - -**Params** - -* `options` **{Object}**: (optional) Options to use with all prompts. -* `answers` **{Object}**: (optional) Answers object to initialize with. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -``` - -### [register()](index.js#L42) - -Register a custom prompt type. - -**Params** - -* `type` **{String}** -* `fn` **{Function|Prompt}**: `Prompt` class, or a function that returns a `Prompt` class. -* `returns` **{Object}**: Returns the Enquirer instance - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -enquirer.register('customType', require('./custom-prompt')); -``` - -### [prompt()](index.js#L78) - -Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. - -**Params** - -* `questions` **{Array|Object}**: Options objects for one or more prompts to run. -* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); - -const response = await enquirer.prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); -console.log(response); -``` - -### [use()](index.js#L160) - -Use an enquirer plugin. - -**Params** - -* `plugin` **{Function}**: Plugin function that takes an instance of Enquirer. -* `returns` **{Object}**: Returns the Enquirer instance. - -**Example** - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -const plugin = enquirer => { - // do stuff to enquire instance -}; -enquirer.use(plugin); -``` - -### [Enquirer#prompt](index.js#L210) - -Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user. - -**Params** - -* `questions` **{Array|Object}**: Options objects for one or more prompts to run. -* `returns` **{Promise}**: Promise that returns an "answers" object with the user's responses. - -**Example** - -```js -const { prompt } = require('enquirer'); -const response = await prompt({ - type: 'input', - name: 'username', - message: 'What is your username?' -}); -console.log(response); -``` - -
- -## ❯ Prompts - -This section is about Enquirer's prompts: what they look like, how they work, how to run them, available options, and how to customize the prompts or create your own prompt concept. - -**Getting started with Enquirer's prompts** - -* [Prompt](#prompt) - The base `Prompt` class used by other prompts - - [Prompt Options](#prompt-options) -* [Built-in prompts](#built-in-prompts) -* [Prompt Types](#prompt-types) - The base `Prompt` class used by other prompts -* [Custom prompts](#%E2%9D%AF-custom-prompts) - Enquirer 2.0 introduced the concept of prompt "types", with the goal of making custom prompts easier than ever to create and use. - -### Prompt - -The base `Prompt` class is used to create all other prompts. - -```js -const { Prompt } = require('enquirer'); -class MyCustomPrompt extends Prompt {} -``` - -See the documentation for [creating custom prompts](#-custom-prompts) to learn more about how this works. - -#### Prompt Options - -Each prompt takes an options object (aka "question" object), that implements the following interface: - -```js -{ - // required - type: string | function, - name: string | function, - message: string | function | async function, - - // optional - skip: boolean | function | async function, - initial: string | function | async function, - format: function | async function, - result: function | async function, - validate: function | async function, -} -``` -Each property of the options object is described below: - -| **Property** | **Required?** | **Type** | **Description** | -| ------------ | ------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | yes | `string\|function` | Enquirer uses this value to determine the type of prompt to run, but it's optional when prompts are run directly. | -| `name` | yes | `string\|function` | Used as the key for the answer on the returned values (answers) object. | -| `message` | yes | `string\|function` | The message to display when the prompt is rendered in the terminal. | -| `skip` | no | `boolean\|function` | If `true` it will not ask that prompt. | -| `initial` | no | `string\|function` | The default value to return if the user does not supply a value. | -| `format` | no | `function` | Function to format user input in the terminal. | -| `result` | no | `function` | Function to format the final submitted value before it's returned. | -| `validate` | no | `function` | Function to validate the submitted value before it's returned. This function may return a boolean or a string. If a string is returned it will be used as the validation error message. | - -**Example usage** - -```js -const { prompt } = require('enquirer'); - -const question = { - type: 'input', - name: 'username', - message: 'What is your username?' -}; - -prompt(question) - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -
- -### Built-in prompts - -* [AutoComplete Prompt](#autocomplete-prompt) -* [BasicAuth Prompt](#basicauth-prompt) -* [Confirm Prompt](#confirm-prompt) -* [Form Prompt](#form-prompt) -* [Input Prompt](#input-prompt) -* [Invisible Prompt](#invisible-prompt) -* [List Prompt](#list-prompt) -* [MultiSelect Prompt](#multiselect-prompt) -* [Numeral Prompt](#numeral-prompt) -* [Password Prompt](#password-prompt) -* [Quiz Prompt](#quiz-prompt) -* [Survey Prompt](#survey-prompt) -* [Scale Prompt](#scale-prompt) -* [Select Prompt](#select-prompt) -* [Sort Prompt](#sort-prompt) -* [Snippet Prompt](#snippet-prompt) -* [Toggle Prompt](#toggle-prompt) - -### AutoComplete Prompt - -Prompt that auto-completes as the user types, and returns the selected value as a string. - -

-Enquirer AutoComplete Prompt -

- -**Example Usage** - -```js -const { AutoComplete } = require('enquirer'); - -const prompt = new AutoComplete({ - name: 'flavor', - message: 'Pick your favorite flavor', - limit: 10, - initial: 2, - choices: [ - 'Almond', - 'Apple', - 'Banana', - 'Blackberry', - 'Blueberry', - 'Cherry', - 'Chocolate', - 'Cinnamon', - 'Coconut', - 'Cranberry', - 'Grape', - 'Nougat', - 'Orange', - 'Pear', - 'Pineapple', - 'Raspberry', - 'Strawberry', - 'Vanilla', - 'Watermelon', - 'Wintergreen' - ] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**AutoComplete Options** - -| Option | Type | Default | Description | -| ----------- | ---------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | -| `highlight` | `function` | `dim` version of primary style | The color to use when "highlighting" characters in the list that match user input. | -| `multiple` | `boolean` | `false` | Allow multiple choices to be selected. | -| `suggest` | `function` | Greedy match, returns true if choice message contains input string. | Function that filters choices. Takes user input and a choices array, and returns a list of matching choices. | -| `initial` | `number` | 0 | Preselected item in the list of choices. | -| `footer` | `function` | None | Function that displays [footer text](https://github.com/enquirer/enquirer/blob/6c2819518a1e2ed284242a99a685655fbaabfa28/examples/autocomplete/option-footer.js#L10) | - -**Related prompts** - -* [Select](#select-prompt) -* [MultiSelect](#multiselect-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### BasicAuth Prompt - -Prompt that asks for username and password to authenticate the user. The default implementation of `authenticate` function in `BasicAuth` prompt is to compare the username and password with the values supplied while running the prompt. The implementer is expected to override the `authenticate` function with a custom logic such as making an API request to a server to authenticate the username and password entered and expect a token back. - -

-Enquirer BasicAuth Prompt -

- -**Example Usage** - -```js -const { BasicAuth } = require('enquirer'); - - const prompt = new BasicAuth({ - name: 'password', - message: 'Please enter your password', - username: 'rajat-sr', - password: '123', - showPassword: true -}); - - prompt - .run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Confirm Prompt - -Prompt that returns `true` or `false`. - -

-Enquirer Confirm Prompt -

- -**Example Usage** - -```js -const { Confirm } = require('enquirer'); - -const prompt = new Confirm({ - name: 'question', - message: 'Want to answer?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Numeral](#numeral-prompt) -* [Password](#password-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Form Prompt - -Prompt that allows the user to enter and submit multiple values on a single terminal screen. - -

-Enquirer Form Prompt -

- -**Example Usage** - -```js -const { Form } = require('enquirer'); - -const prompt = new Form({ - name: 'user', - message: 'Please provide the following information:', - choices: [ - { name: 'firstname', message: 'First Name', initial: 'Jon' }, - { name: 'lastname', message: 'Last Name', initial: 'Schlinkert' }, - { name: 'username', message: 'GitHub username', initial: 'jonschlinkert' } - ] -}); - -prompt.run() - .then(value => console.log('Answer:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Input Prompt - -Prompt that takes user input and returns a string. - -

-Enquirer Input Prompt -

- -**Example Usage** - -```js -const { Input } = require('enquirer'); -const prompt = new Input({ - message: 'What is your username?', - initial: 'jonschlinkert' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.log); -``` - -You can use [data-store](https://github.com/jonschlinkert/data-store) to store [input history](https://github.com/enquirer/enquirer/blob/master/examples/input/option-history.js) that the user can cycle through (see [source](https://github.com/enquirer/enquirer/blob/8407dc3579123df5e6e20215078e33bb605b0c37/lib/prompts/input.js)). - -**Related prompts** - -* [Confirm](#confirm-prompt) -* [Numeral](#numeral-prompt) -* [Password](#password-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Invisible Prompt - -Prompt that takes user input, hides it from the terminal, and returns a string. - -

-Enquirer Invisible Prompt -

- -**Example Usage** - -```js -const { Invisible } = require('enquirer'); -const prompt = new Invisible({ - name: 'secret', - message: 'What is your secret?' -}); - -prompt.run() - .then(answer => console.log('Answer:', { secret: answer })) - .catch(console.error); -``` - -**Related prompts** - -* [Password](#password-prompt) -* [Input](#input-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### List Prompt - -Prompt that returns a list of values, created by splitting the user input. The default split character is `,` with optional trailing whitespace. - -

-Enquirer List Prompt -

- -**Example Usage** - -```js -const { List } = require('enquirer'); -const prompt = new List({ - name: 'keywords', - message: 'Type comma-separated keywords' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Sort](#sort-prompt) -* [Select](#select-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### MultiSelect Prompt - -Prompt that allows the user to select multiple items from a list of options. - -

-Enquirer MultiSelect Prompt -

- -**Example Usage** - -```js -const { MultiSelect } = require('enquirer'); - -const prompt = new MultiSelect({ - name: 'value', - message: 'Pick your favorite colors', - limit: 7, - choices: [ - { name: 'aqua', value: '#00ffff' }, - { name: 'black', value: '#000000' }, - { name: 'blue', value: '#0000ff' }, - { name: 'fuchsia', value: '#ff00ff' }, - { name: 'gray', value: '#808080' }, - { name: 'green', value: '#008000' }, - { name: 'lime', value: '#00ff00' }, - { name: 'maroon', value: '#800000' }, - { name: 'navy', value: '#000080' }, - { name: 'olive', value: '#808000' }, - { name: 'purple', value: '#800080' }, - { name: 'red', value: '#ff0000' }, - { name: 'silver', value: '#c0c0c0' }, - { name: 'teal', value: '#008080' }, - { name: 'white', value: '#ffffff' }, - { name: 'yellow', value: '#ffff00' } - ] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); - -// Answer: ['aqua', 'blue', 'fuchsia'] -``` - -**Example key-value pairs** - -Optionally, pass a `result` function and use the `.map` method to return an object of key-value pairs of the selected names and values: [example](./examples/multiselect/option-result.js) - -```js -const { MultiSelect } = require('enquirer'); - -const prompt = new MultiSelect({ - name: 'value', - message: 'Pick your favorite colors', - limit: 7, - choices: [ - { name: 'aqua', value: '#00ffff' }, - { name: 'black', value: '#000000' }, - { name: 'blue', value: '#0000ff' }, - { name: 'fuchsia', value: '#ff00ff' }, - { name: 'gray', value: '#808080' }, - { name: 'green', value: '#008000' }, - { name: 'lime', value: '#00ff00' }, - { name: 'maroon', value: '#800000' }, - { name: 'navy', value: '#000080' }, - { name: 'olive', value: '#808000' }, - { name: 'purple', value: '#800080' }, - { name: 'red', value: '#ff0000' }, - { name: 'silver', value: '#c0c0c0' }, - { name: 'teal', value: '#008080' }, - { name: 'white', value: '#ffffff' }, - { name: 'yellow', value: '#ffff00' } - ], - result(names) { - return this.map(names); - } -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); - -// Answer: { aqua: '#00ffff', blue: '#0000ff', fuchsia: '#ff00ff' } -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Numeral Prompt - -Prompt that takes a number as input. - -

-Enquirer Numeral Prompt -

- -**Example Usage** - -```js -const { NumberPrompt } = require('enquirer'); - -const prompt = new NumberPrompt({ - name: 'number', - message: 'Please enter a number' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Confirm](#confirm-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Password Prompt - -Prompt that takes user input and masks it in the terminal. Also see the [invisible prompt](#invisible-prompt) - -

-Enquirer Password Prompt -

- -**Example Usage** - -```js -const { Password } = require('enquirer'); - -const prompt = new Password({ - name: 'password', - message: 'What is your password?' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Input](#input-prompt) -* [Invisible](#invisible-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Quiz Prompt - -Prompt that allows the user to play multiple-choice quiz questions. - -

-Enquirer Quiz Prompt -

- -**Example Usage** - -```js -const { Quiz } = require('enquirer'); - - const prompt = new Quiz({ - name: 'countries', - message: 'How many countries are there in the world?', - choices: ['165', '175', '185', '195', '205'], - correctChoice: 3 -}); - - prompt - .run() - .then(answer => { - if (answer.correct) { - console.log('Correct!'); - } else { - console.log(`Wrong! Correct answer is ${answer.correctAnswer}`); - } - }) - .catch(console.error); -``` - -**Quiz Options** - -| Option | Type | Required | Description | -| ----------- | ---------- | ---------- | ------------------------------------------------------------------------------------------------------------ | -| `choices` | `array` | Yes | The list of possible answers to the quiz question. | -| `correctChoice`| `number` | Yes | Index of the correct choice from the `choices` array. | - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Survey Prompt - -Prompt that allows the user to provide feedback for a list of questions. - -

-Enquirer Survey Prompt -

- -**Example Usage** - -```js -const { Survey } = require('enquirer'); - -const prompt = new Survey({ - name: 'experience', - message: 'Please rate your experience', - scale: [ - { name: '1', message: 'Strongly Disagree' }, - { name: '2', message: 'Disagree' }, - { name: '3', message: 'Neutral' }, - { name: '4', message: 'Agree' }, - { name: '5', message: 'Strongly Agree' } - ], - margin: [0, 0, 2, 1], - choices: [ - { - name: 'interface', - message: 'The website has a friendly interface.' - }, - { - name: 'navigation', - message: 'The website is easy to navigate.' - }, - { - name: 'images', - message: 'The website usually has good images.' - }, - { - name: 'upload', - message: 'The website makes it easy to upload images.' - }, - { - name: 'colors', - message: 'The website has a pleasing color palette.' - } - ] -}); - -prompt.run() - .then(value => console.log('ANSWERS:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [Scale](#scale-prompt) -* [Snippet](#snippet-prompt) -* [Select](#select-prompt) - -*** - -### Scale Prompt - -A more compact version of the [Survey prompt](#survey-prompt), the Scale prompt allows the user to quickly provide feedback using a [Likert Scale](https://en.wikipedia.org/wiki/Likert_scale). - -

-Enquirer Scale Prompt -

- -**Example Usage** - -```js -const { Scale } = require('enquirer'); -const prompt = new Scale({ - name: 'experience', - message: 'Please rate your experience', - scale: [ - { name: '1', message: 'Strongly Disagree' }, - { name: '2', message: 'Disagree' }, - { name: '3', message: 'Neutral' }, - { name: '4', message: 'Agree' }, - { name: '5', message: 'Strongly Agree' } - ], - margin: [0, 0, 2, 1], - choices: [ - { - name: 'interface', - message: 'The website has a friendly interface.', - initial: 2 - }, - { - name: 'navigation', - message: 'The website is easy to navigate.', - initial: 2 - }, - { - name: 'images', - message: 'The website usually has good images.', - initial: 2 - }, - { - name: 'upload', - message: 'The website makes it easy to upload images.', - initial: 2 - }, - { - name: 'colors', - message: 'The website has a pleasing color palette.', - initial: 2 - } - ] -}); - -prompt.run() - .then(value => console.log('ANSWERS:', value)) - .catch(console.error); -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Select Prompt - -Prompt that allows the user to select from a list of options. - -

-Enquirer Select Prompt -

- -**Example Usage** - -```js -const { Select } = require('enquirer'); - -const prompt = new Select({ - name: 'color', - message: 'Pick a flavor', - choices: ['apple', 'grape', 'watermelon', 'cherry', 'orange'] -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [AutoComplete](#autocomplete-prompt) -* [MultiSelect](#multiselect-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Sort Prompt - -Prompt that allows the user to sort items in a list. - -**Example** - -In this [example](https://github.com/enquirer/enquirer/raw/master/examples/sort/prompt.js), custom styling is applied to the returned values to make it easier to see what's happening. - -

-Enquirer Sort Prompt -

- -**Example Usage** - -```js -const colors = require('ansi-colors'); -const { Sort } = require('enquirer'); -const prompt = new Sort({ - name: 'colors', - message: 'Sort the colors in order of preference', - hint: 'Top is best, bottom is worst', - numbered: true, - choices: ['red', 'white', 'green', 'cyan', 'yellow'].map(n => ({ - name: n, - message: colors[n](n) - })) -}); - -prompt.run() - .then(function(answer = []) { - console.log(answer); - console.log('Your preferred order of colors is:'); - console.log(answer.map(key => colors[key](key)).join('\n')); - }) - .catch(console.error); -``` - -**Related prompts** - -* [List](#list-prompt) -* [Select](#select-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Snippet Prompt - -Prompt that allows the user to replace placeholders in a snippet of code or text. - -

-Prompts -

- -**Example Usage** - -```js -const semver = require('semver'); -const { Snippet } = require('enquirer'); -const prompt = new Snippet({ - name: 'username', - message: 'Fill out the fields in package.json', - required: true, - fields: [ - { - name: 'author_name', - message: 'Author Name' - }, - { - name: 'version', - validate(value, state, item, index) { - if (item && item.name === 'version' && !semver.valid(value)) { - return prompt.styles.danger('version should be a valid semver value'); - } - return true; - } - } - ], - template: `{ - "name": "\${name}", - "description": "\${description}", - "version": "\${version}", - "homepage": "https://github.com/\${username}/\${name}", - "author": "\${author_name} (https://github.com/\${username})", - "repository": "\${username}/\${name}", - "license": "\${license:ISC}" -} -` -}); - -prompt.run() - .then(answer => console.log('Answer:', answer.result)) - .catch(console.error); -``` - -**Related prompts** - -* [Survey](#survey-prompt) -* [AutoComplete](#autocomplete-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Toggle Prompt - -Prompt that allows the user to toggle between two values then returns `true` or `false`. - -

-Enquirer Toggle Prompt -

- -**Example Usage** - -```js -const { Toggle } = require('enquirer'); - -const prompt = new Toggle({ - message: 'Want to answer?', - enabled: 'Yep', - disabled: 'Nope' -}); - -prompt.run() - .then(answer => console.log('Answer:', answer)) - .catch(console.error); -``` - -**Related prompts** - -* [Confirm](#confirm-prompt) -* [Input](#input-prompt) -* [Sort](#sort-prompt) - -**↑ back to:** [Getting Started](#-getting-started) · [Prompts](#-prompts) - -*** - -### Prompt Types - -There are 5 (soon to be 6!) type classes: - -* [ArrayPrompt](#arrayprompt) - - [Options](#options) - - [Properties](#properties) - - [Methods](#methods) - - [Choices](#choices) - - [Defining choices](#defining-choices) - - [Choice properties](#choice-properties) - - [Related prompts](#related-prompts) -* [AuthPrompt](#authprompt) -* [BooleanPrompt](#booleanprompt) -* DatePrompt (Coming Soon!) -* [NumberPrompt](#numberprompt) -* [StringPrompt](#stringprompt) - -Each type is a low-level class that may be used as a starting point for creating higher level prompts. Continue reading to learn how. - -### ArrayPrompt - -The `ArrayPrompt` class is used for creating prompts that display a list of choices in the terminal. For example, Enquirer uses this class as the basis for the [Select](#select) and [Survey](#survey) prompts. - -#### Options - -In addition to the [options](#options) available to all prompts, Array prompts also support the following options. - -| **Option** | **Required?** | **Type** | **Description** | -| ----------- | ------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | -| `autofocus` | `no` | `string\|number` | The index or name of the choice that should have focus when the prompt loads. Only one choice may have focus at a time. | | -| `stdin` | `no` | `stream` | The input stream to use for emitting keypress events. Defaults to `process.stdin`. | -| `stdout` | `no` | `stream` | The output stream to use for writing the prompt to the terminal. Defaults to `process.stdout`. | -| | - -#### Properties - -Array prompts have the following instance properties and getters. - -| **Property name** | **Type** | **Description** | -| ----------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `choices` | `array` | Array of choices that have been normalized from choices passed on the prompt options. | -| `cursor` | `number` | Position of the cursor relative to the _user input (string)_. | -| `enabled` | `array` | Returns an array of enabled choices. | -| `focused` | `array` | Returns the currently selected choice in the visible list of choices. This is similar to the concept of focus in HTML and CSS. Focused choices are always visible (on-screen). When a list of choices is longer than the list of visible choices, and an off-screen choice is _focused_, the list will scroll to the focused choice and re-render. | -| `focused` | Gets the currently selected choice. Equivalent to `prompt.choices[prompt.index]`. | -| `index` | `number` | Position of the pointer in the _visible list (array) of choices_. | -| `limit` | `number` | The number of choices to display on-screen. | -| `selected` | `array` | Either a list of enabled choices (when `options.multiple` is true) or the currently focused choice. | -| `visible` | `string` | | - -#### Methods - -| **Method** | **Description** | -| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `pointer()` | Returns the visual symbol to use to identify the choice that currently has focus. The `❯` symbol is often used for this. The pointer is not always visible, as with the `autocomplete` prompt. | -| `indicator()` | Returns the visual symbol that indicates whether or not a choice is checked/enabled. | -| `focus()` | Sets focus on a choice, if it can be focused. | - -#### Choices - -Array prompts support the `choices` option, which is the array of choices users will be able to select from when rendered in the terminal. - -**Type**: `string|object` - -**Example** - -```js -const { prompt } = require('enquirer'); - -const questions = [{ - type: 'select', - name: 'color', - message: 'Favorite color?', - initial: 1, - choices: [ - { name: 'red', message: 'Red', value: '#ff0000' }, //<= choice object - { name: 'green', message: 'Green', value: '#00ff00' }, //<= choice object - { name: 'blue', message: 'Blue', value: '#0000ff' } //<= choice object - ] -}]; - -let answers = await prompt(questions); -console.log('Answer:', answers.color); -``` - -#### Defining choices - -Whether defined as a string or object, choices are normalized to the following interface: - -```js -{ - name: string; - message: string | undefined; - value: string | undefined; - hint: string | undefined; - disabled: boolean | string | undefined; -} -``` - -**Example** - -```js -const question = { - name: 'fruit', - message: 'Favorite fruit?', - choices: ['Apple', 'Orange', 'Raspberry'] -}; -``` - -Normalizes to the following when the prompt is run: - -```js -const question = { - name: 'fruit', - message: 'Favorite fruit?', - choices: [ - { name: 'Apple', message: 'Apple', value: 'Apple' }, - { name: 'Orange', message: 'Orange', value: 'Orange' }, - { name: 'Raspberry', message: 'Raspberry', value: 'Raspberry' } - ] -}; -``` - -#### Choice properties - -The following properties are supported on `choice` objects. - -| **Option** | **Type** | **Description** | -| ----------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | The unique key to identify a choice | -| `message` | `string` | The message to display in the terminal. `name` is used when this is undefined. | -| `value` | `string` | Value to associate with the choice. Useful for creating key-value pairs from user choices. `name` is used when this is undefined. | -| `choices` | `array` | Array of "child" choices. | -| `hint` | `string` | Help message to display next to a choice. | -| `role` | `string` | Determines how the choice will be displayed. Currently the only role supported is `separator`. Additional roles may be added in the future (like `heading`, etc). Please create a [feature request] | -| `enabled` | `boolean` | Enabled a choice by default. This is only supported when `options.multiple` is true or on prompts that support multiple choices, like [MultiSelect](#-multiselect). | -| `disabled` | `boolean\|string` | Disable a choice so that it cannot be selected. This value may either be `true`, `false`, or a message to display. | -| `indicator` | `string\|function` | Custom indicator to render for a choice (like a check or radio button). | - -#### Related prompts - -* [AutoComplete](#autocomplete-prompt) -* [Form](#form-prompt) -* [MultiSelect](#multiselect-prompt) -* [Select](#select-prompt) -* [Survey](#survey-prompt) - -*** - -### AuthPrompt - -The `AuthPrompt` is used to create prompts to log in user using any authentication method. For example, Enquirer uses this class as the basis for the [BasicAuth Prompt](#basicauth-prompt). You can also find prompt examples in `examples/auth/` folder that utilizes `AuthPrompt` to create OAuth based authentication prompt or a prompt that authenticates using time-based OTP, among others. - -`AuthPrompt` has a factory function that creates an instance of `AuthPrompt` class and it expects an `authenticate` function, as an argument, which overrides the `authenticate` function of the `AuthPrompt` class. - -#### Methods - -| **Method** | **Description** | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `authenticate()` | Contain all the authentication logic. This function should be overridden to implement custom authentication logic. The default `authenticate` function throws an error if no other function is provided. | - -#### Choices - -Auth prompt supports the `choices` option, which is the similar to the choices used in [Form Prompt](#form-prompt). - -**Example** - -```js -const { AuthPrompt } = require('enquirer'); - -function authenticate(value, state) { - if (value.username === this.options.username && value.password === this.options.password) { - return true; - } - return false; -} - -const CustomAuthPrompt = AuthPrompt.create(authenticate); - -const prompt = new CustomAuthPrompt({ - name: 'password', - message: 'Please enter your password', - username: 'rajat-sr', - password: '1234567', - choices: [ - { name: 'username', message: 'username' }, - { name: 'password', message: 'password' } - ] -}); - -prompt - .run() - .then(answer => console.log('Authenticated?', answer)) - .catch(console.error); -``` - -#### Related prompts - -* [BasicAuth Prompt](#basicauth-prompt) - -*** - -### BooleanPrompt - -The `BooleanPrompt` class is used for creating prompts that display and return a boolean value. - -```js -const { BooleanPrompt } = require('enquirer'); - -const prompt = new BooleanPrompt({ - header: '========================', - message: 'Do you love enquirer?', - footer: '========================', -}); - -prompt.run() - .then(answer => console.log('Selected:', answer)) - .catch(console.error); -``` - -**Returns**: `boolean` - -*** - -### NumberPrompt - -The `NumberPrompt` class is used for creating prompts that display and return a numerical value. - -```js -const { NumberPrompt } = require('enquirer'); - -const prompt = new NumberPrompt({ - header: '************************', - message: 'Input the Numbers:', - footer: '************************', -}); - -prompt.run() - .then(answer => console.log('Numbers are:', answer)) - .catch(console.error); -``` - -**Returns**: `string|number` (number, or number formatted as a string) - -*** - -### StringPrompt - -The `StringPrompt` class is used for creating prompts that display and return a string value. - -```js -const { StringPrompt } = require('enquirer'); - -const prompt = new StringPrompt({ - header: '************************', - message: 'Input the String:', - footer: '************************' -}); - -prompt.run() - .then(answer => console.log('String is:', answer)) - .catch(console.error); -``` - -**Returns**: `string` - -
- -## ❯ Custom prompts - -With Enquirer 2.0, custom prompts are easier than ever to create and use. - -**How do I create a custom prompt?** - -Custom prompts are created by extending either: - -* Enquirer's `Prompt` class -* one of the built-in [prompts](#-prompts), or -* low-level [types](#-types). - - - -```js -const { Prompt } = require('enquirer'); - -class HaiKarate extends Prompt { - constructor(options = {}) { - super(options); - this.value = options.initial || 0; - this.cursorHide(); - } - up() { - this.value++; - this.render(); - } - down() { - this.value--; - this.render(); - } - render() { - this.clear(); // clear previously rendered prompt from the terminal - this.write(`${this.state.message}: ${this.value}`); - } -} - -// Use the prompt by creating an instance of your custom prompt class. -const prompt = new HaiKarate({ - message: 'How many sprays do you want?', - initial: 10 -}); - -prompt.run() - .then(answer => console.log('Sprays:', answer)) - .catch(console.error); -``` - -If you want to be able to specify your prompt by `type` so that it may be used alongside other prompts, you will need to first create an instance of `Enquirer`. - -```js -const Enquirer = require('enquirer'); -const enquirer = new Enquirer(); -``` - -Then use the `.register()` method to add your custom prompt. - -```js -enquirer.register('haikarate', HaiKarate); -``` - -Now you can do the following when defining "questions". - -```js -let spritzer = require('cologne-drone'); -let answers = await enquirer.prompt([ - { - type: 'haikarate', - name: 'cologne', - message: 'How many sprays do you need?', - initial: 10, - async onSubmit(name, value) { - await spritzer.activate(value); //<= activate drone - return value; - } - } -]); -``` - -
- -## ❯ Key Bindings - -### All prompts - -These key combinations may be used with all prompts. - -| **command** | **description** | -| -------------------------------- | -------------------------------------- | -| ctrl + c | Cancel the prompt. | -| ctrl + g | Reset the prompt to its initial state. | - -
- -### Move cursor - -These combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). - -| **command** | **description** | -| ------------------------------ | ---------------------------------------- | -| left | Move the cursor back one character. | -| right | Move the cursor forward one character. | -| ctrl + a | Move cursor to the start of the line | -| ctrl + e | Move cursor to the end of the line | -| ctrl + b | Move cursor back one character | -| ctrl + f | Move cursor forward one character | -| ctrl + x | Toggle between first and cursor position | - -
- -### Edit Input - -These key combinations may be used on prompts that support user input (eg. [input prompt](#input-prompt), [password prompt](#password-prompt), and [invisible prompt](#invisible-prompt)). - -| **command** | **description** | -| ------------------------------ | ---------------------------------------- | -| ctrl + a | Move cursor to the start of the line | -| ctrl + e | Move cursor to the end of the line | -| ctrl + b | Move cursor back one character | -| ctrl + f | Move cursor forward one character | -| ctrl + x | Toggle between first and cursor position | - -
- -| **command (Mac)** | **command (Windows)** | **description** | -| ----------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -| delete | backspace | Delete one character to the left. | -| fn + delete | delete | Delete one character to the right. | -| option + up | alt + up | Scroll to the previous item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | -| option + down | alt + down | Scroll to the next item in history ([Input prompt](#input-prompt) only, when [history is enabled](examples/input/option-history.js)). | - -### Select choices - -These key combinations may be used on prompts that support _multiple_ choices, such as the [multiselect prompt](#multiselect-prompt), or the [select prompt](#select-prompt) when the `multiple` options is true. - -| **command** | **description** | -| ----------------- | -------------------------------------------------------------------------------------------------------------------- | -| space | Toggle the currently selected choice when `options.multiple` is true. | -| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | -| a | Toggle all choices to be enabled or disabled. | -| i | Invert the current selection of choices. | -| g | Toggle the current choice group. | - -
- -### Hide/show choices - -| **command** | **description** | -| ------------------------------- | ---------------------------------------------- | -| fn + up | Decrease the number of visible choices by one. | -| fn + down | Increase the number of visible choices by one. | - -
- -### Move/lock Pointer - -| **command** | **description** | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -| number | Move the pointer to the choice at the given index. Also toggles the selected choice when `options.multiple` is true. | -| up | Move the pointer up. | -| down | Move the pointer down. | -| ctrl + a | Move the pointer to the first _visible_ choice. | -| ctrl + e | Move the pointer to the last _visible_ choice. | -| shift + up | Scroll up one choice without changing pointer position (locks the pointer while scrolling). | -| shift + down | Scroll down one choice without changing pointer position (locks the pointer while scrolling). | - -
- -| **command (Mac)** | **command (Windows)** | **description** | -| -------------------------------- | --------------------- | ---------------------------------------------------------- | -| fn + left | home | Move the pointer to the first choice in the choices array. | -| fn + right | end | Move the pointer to the last choice in the choices array. | - -
- -## ❯ Release History - -Please see [CHANGELOG.md](CHANGELOG.md). - -## ❯ Performance - -### System specs - -MacBook Pro, Intel Core i7, 2.5 GHz, 16 GB. - -### Load time - -Time it takes for the module to load the first time (average of 3 runs): - -``` -enquirer: 4.013ms -inquirer: 286.717ms -``` - -
- -## ❯ About - -
-Contributing - -Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). - -### Todo - -We're currently working on documentation for the following items. Please star and watch the repository for updates! - -* [ ] Customizing symbols -* [ ] Customizing styles (palette) -* [ ] Customizing rendered input -* [ ] Customizing returned values -* [ ] Customizing key bindings -* [ ] Question validation -* [ ] Choice validation -* [ ] Skipping questions -* [ ] Async choices -* [ ] Async timers: loaders, spinners and other animations -* [ ] Links to examples -
- -
-Running Tests - -Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: - -```sh -$ npm install && npm test -``` -```sh -$ yarn && yarn test -``` - -
- -
-Building docs - -_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ - -To generate the readme, run the following command: - -```sh -$ npm install -g verbose/verb#dev verb-generate-readme && verb -``` - -
- -#### Contributors - -| **Commits** | **Contributor** | -| --- | --- | -| 283 | [jonschlinkert](https://github.com/jonschlinkert) | -| 82 | [doowb](https://github.com/doowb) | -| 32 | [rajat-sr](https://github.com/rajat-sr) | -| 20 | [318097](https://github.com/318097) | -| 15 | [g-plane](https://github.com/g-plane) | -| 12 | [pixelass](https://github.com/pixelass) | -| 5 | [adityavyas611](https://github.com/adityavyas611) | -| 5 | [satotake](https://github.com/satotake) | -| 3 | [tunnckoCore](https://github.com/tunnckoCore) | -| 3 | [Ovyerus](https://github.com/Ovyerus) | -| 3 | [sw-yx](https://github.com/sw-yx) | -| 2 | [DanielRuf](https://github.com/DanielRuf) | -| 2 | [GabeL7r](https://github.com/GabeL7r) | -| 1 | [AlCalzone](https://github.com/AlCalzone) | -| 1 | [hipstersmoothie](https://github.com/hipstersmoothie) | -| 1 | [danieldelcore](https://github.com/danieldelcore) | -| 1 | [ImgBotApp](https://github.com/ImgBotApp) | -| 1 | [jsonkao](https://github.com/jsonkao) | -| 1 | [knpwrs](https://github.com/knpwrs) | -| 1 | [yeskunall](https://github.com/yeskunall) | -| 1 | [mischah](https://github.com/mischah) | -| 1 | [renarsvilnis](https://github.com/renarsvilnis) | -| 1 | [sbugert](https://github.com/sbugert) | -| 1 | [stephencweiss](https://github.com/stephencweiss) | -| 1 | [skellock](https://github.com/skellock) | -| 1 | [whxaxes](https://github.com/whxaxes) | - -#### Author - -**Jon Schlinkert** - -* [GitHub Profile](https://github.com/jonschlinkert) -* [Twitter Profile](https://twitter.com/jonschlinkert) -* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) - -#### Credit - -Thanks to [derhuerst](https://github.com/derhuerst), creator of prompt libraries such as [prompt-skeleton](https://github.com/derhuerst/prompt-skeleton), which influenced some of the concepts we used in our prompts. - -#### License - -Copyright © 2018-present, [Jon Schlinkert](https://github.com/jonschlinkert). -Released under the [MIT License](LICENSE). \ No newline at end of file diff --git a/node_modules/enquirer/index.d.ts b/node_modules/enquirer/index.d.ts deleted file mode 100644 index bcc7752a4..000000000 --- a/node_modules/enquirer/index.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { EventEmitter } from "events"; - -interface BasePromptOptions { - name: string | (() => string) - type: string | (() => string) - message: string | (() => string) | (() => Promise) - initial?: any - required?: boolean - format?(value: string): string | Promise - result?(value: string): string | Promise - skip?: ((state: object) => boolean | Promise) | boolean - validate?(value: string): boolean | Promise | string | Promise - onSubmit?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise - onCancel?(name: string, value: any, prompt: Enquirer.Prompt): boolean | Promise - stdin?: NodeJS.ReadStream - stdout?: NodeJS.WriteStream -} - -interface Choice { - name: string - message?: string - value?: string - hint?: string - disabled?: boolean | string -} - -interface ArrayPromptOptions extends BasePromptOptions { - type: - | 'autocomplete' - | 'editable' - | 'form' - | 'multiselect' - | 'select' - | 'survey' - | 'list' - | 'scale' - choices: string[] | Choice[] - maxChoices?: number - muliple?: boolean - initial?: number - delay?: number - separator?: boolean - sort?: boolean - linebreak?: boolean - edgeLength?: number - align?: 'left' | 'right' - scroll?: boolean -} - -interface BooleanPromptOptions extends BasePromptOptions { - type: 'confirm' - initial?: boolean -} - -interface StringPromptOptions extends BasePromptOptions { - type: 'input' | 'invisible' | 'list' | 'password' | 'text' - initial?: string - multiline?: boolean -} - -interface NumberPromptOptions extends BasePromptOptions { - type: 'numeral' - min?: number - max?: number - delay?: number - float?: boolean - round?: boolean - major?: number - minor?: number - initial?: number -} - -interface SnippetPromptOptions extends BasePromptOptions { - type: 'snippet' - newline?: string - template?: string -} - -interface SortPromptOptions extends BasePromptOptions { - type: 'sort' - hint?: string - drag?: boolean - numbered?: boolean -} - -type PromptOptions = - | BasePromptOptions - | ArrayPromptOptions - | BooleanPromptOptions - | StringPromptOptions - | NumberPromptOptions - | SnippetPromptOptions - | SortPromptOptions - -declare class BasePrompt extends EventEmitter { - constructor(options?: PromptOptions); - - render(): void; - - run(): Promise; - } - -declare class Enquirer extends EventEmitter { - constructor(options?: object, answers?: T); - - /** - * Register a custom prompt type. - * - * @param type - * @param fn `Prompt` class, or a function that returns a `Prompt` class. - */ - register(type: string, fn: typeof BasePrompt | (() => typeof BasePrompt)): this; - - /** - * Register a custom prompt type. - */ - register(type: { [key: string]: typeof BasePrompt | (() => typeof BasePrompt) }): this; - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * @param questions Options objects for one or more prompts to run. - */ - prompt( - questions: - | PromptOptions - | ((this: Enquirer) => PromptOptions) - | (PromptOptions | ((this: Enquirer) => PromptOptions))[] - ): Promise; - - /** - * Use an enquirer plugin. - * - * @param plugin Plugin function that takes an instance of Enquirer. - */ - use(plugin: (this: this, enquirer: this) => void): this; -} - -declare namespace Enquirer { - function prompt( - questions: - | PromptOptions - | ((this: Enquirer) => PromptOptions) - | (PromptOptions | ((this: Enquirer) => PromptOptions))[] - ): Promise; - - class Prompt extends BasePrompt {} -} - -export = Enquirer; diff --git a/node_modules/enquirer/index.js b/node_modules/enquirer/index.js deleted file mode 100644 index d0ef3f69b..000000000 --- a/node_modules/enquirer/index.js +++ /dev/null @@ -1,250 +0,0 @@ -'use strict'; - -const assert = require('assert'); -const Events = require('events'); -const utils = require('./lib/utils'); - -/** - * Create an instance of `Enquirer`. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * ``` - * @name Enquirer - * @param {Object} `options` (optional) Options to use with all prompts. - * @param {Object} `answers` (optional) Answers object to initialize with. - * @api public - */ - -class Enquirer extends Events { - constructor(options, answers) { - super(); - this.options = utils.merge({}, options); - this.answers = { ...answers }; - } - - /** - * Register a custom prompt type. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * enquirer.register('customType', require('./custom-prompt')); - * ``` - * @name register() - * @param {String} `type` - * @param {Function|Prompt} `fn` `Prompt` class, or a function that returns a `Prompt` class. - * @return {Object} Returns the Enquirer instance - * @api public - */ - - register(type, fn) { - if (utils.isObject(type)) { - for (let key of Object.keys(type)) this.register(key, type[key]); - return this; - } - assert.equal(typeof fn, 'function', 'expected a function'); - let name = type.toLowerCase(); - if (fn.prototype instanceof this.Prompt) { - this.prompts[name] = fn; - } else { - this.prompts[name] = fn(this.Prompt, this); - } - return this; - } - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * - * const response = await enquirer.prompt({ - * type: 'input', - * name: 'username', - * message: 'What is your username?' - * }); - * console.log(response); - * ``` - * @name prompt() - * @param {Array|Object} `questions` Options objects for one or more prompts to run. - * @return {Promise} Promise that returns an "answers" object with the user's responses. - * @api public - */ - - async prompt(questions = []) { - for (let question of [].concat(questions)) { - try { - if (typeof question === 'function') question = await question.call(this); - await this.ask(utils.merge({}, this.options, question)); - } catch (err) { - return Promise.reject(err); - } - } - return this.answers; - } - - async ask(question) { - if (typeof question === 'function') { - question = await question.call(this); - } - - let opts = utils.merge({}, this.options, question); - let { type, name } = question; - let { set, get } = utils; - - if (typeof type === 'function') { - type = await type.call(this, question, this.answers); - } - - if (!type) return this.answers[name]; - - assert(this.prompts[type], `Prompt "${type}" is not registered`); - - let prompt = new this.prompts[type](opts); - let value = get(this.answers, name); - - prompt.state.answers = this.answers; - prompt.enquirer = this; - - if (name) { - prompt.on('submit', value => { - this.emit('answer', name, value, prompt); - set(this.answers, name, value); - }); - } - - // bubble events - let emit = prompt.emit.bind(prompt); - prompt.emit = (...args) => { - this.emit.call(this, ...args); - return emit(...args); - }; - - this.emit('prompt', prompt, this); - - if (opts.autofill && value != null) { - prompt.value = prompt.input = value; - - // if "autofill=show" render the prompt, otherwise stay "silent" - if (opts.autofill === 'show') { - await prompt.submit(); - } - } else { - value = prompt.value = await prompt.run(); - } - - return value; - } - - /** - * Use an enquirer plugin. - * - * ```js - * const Enquirer = require('enquirer'); - * const enquirer = new Enquirer(); - * const plugin = enquirer => { - * // do stuff to enquire instance - * }; - * enquirer.use(plugin); - * ``` - * @name use() - * @param {Function} `plugin` Plugin function that takes an instance of Enquirer. - * @return {Object} Returns the Enquirer instance. - * @api public - */ - - use(plugin) { - plugin.call(this, this); - return this; - } - - set Prompt(value) { - this._Prompt = value; - } - get Prompt() { - return this._Prompt || this.constructor.Prompt; - } - - get prompts() { - return this.constructor.prompts; - } - - static set Prompt(value) { - this._Prompt = value; - } - static get Prompt() { - return this._Prompt || require('./lib/prompt'); - } - - static get prompts() { - return require('./lib/prompts'); - } - - static get types() { - return require('./lib/types'); - } - - /** - * Prompt function that takes a "question" object or array of question objects, - * and returns an object with responses from the user. - * - * ```js - * const { prompt } = require('enquirer'); - * const response = await prompt({ - * type: 'input', - * name: 'username', - * message: 'What is your username?' - * }); - * console.log(response); - * ``` - * @name Enquirer#prompt - * @param {Array|Object} `questions` Options objects for one or more prompts to run. - * @return {Promise} Promise that returns an "answers" object with the user's responses. - * @api public - */ - - static get prompt() { - const fn = (questions, ...rest) => { - let enquirer = new this(...rest); - let emit = enquirer.emit.bind(enquirer); - enquirer.emit = (...args) => { - fn.emit(...args); - return emit(...args); - }; - return enquirer.prompt(questions); - }; - utils.mixinEmitter(fn, new Events()); - return fn; - } -} - -utils.mixinEmitter(Enquirer, new Events()); -const prompts = Enquirer.prompts; - -for (let name of Object.keys(prompts)) { - let key = name.toLowerCase(); - - let run = options => new prompts[name](options).run(); - Enquirer.prompt[key] = run; - Enquirer[key] = run; - - if (!Enquirer[name]) { - Reflect.defineProperty(Enquirer, name, { get: () => prompts[name] }); - } -} - -const exp = name => { - utils.defineExport(Enquirer, name, () => Enquirer.types[name]); -}; - -exp('ArrayPrompt'); -exp('AuthPrompt'); -exp('BooleanPrompt'); -exp('NumberPrompt'); -exp('StringPrompt'); - -module.exports = Enquirer; diff --git a/node_modules/enquirer/lib/ansi.js b/node_modules/enquirer/lib/ansi.js deleted file mode 100644 index 1ba19813d..000000000 --- a/node_modules/enquirer/lib/ansi.js +++ /dev/null @@ -1,116 +0,0 @@ -'use strict'; - -const isTerm = process.env.TERM_PROGRAM === 'Apple_Terminal'; -const colors = require('ansi-colors'); -const utils = require('./utils'); -const ansi = module.exports = exports; -const ESC = '\u001b['; -const BEL = '\u0007'; -let hidden = false; - -const code = ansi.code = { - bell: BEL, - beep: BEL, - beginning: `${ESC}G`, - down: `${ESC}J`, - esc: ESC, - getPosition: `${ESC}6n`, - hide: `${ESC}?25l`, - line: `${ESC}2K`, - lineEnd: `${ESC}K`, - lineStart: `${ESC}1K`, - restorePosition: ESC + (isTerm ? '8' : 'u'), - savePosition: ESC + (isTerm ? '7' : 's'), - screen: `${ESC}2J`, - show: `${ESC}?25h`, - up: `${ESC}1J` -}; - -const cursor = ansi.cursor = { - get hidden() { - return hidden; - }, - - hide() { - hidden = true; - return code.hide; - }, - show() { - hidden = false; - return code.show; - }, - - forward: (count = 1) => `${ESC}${count}C`, - backward: (count = 1) => `${ESC}${count}D`, - nextLine: (count = 1) => `${ESC}E`.repeat(count), - prevLine: (count = 1) => `${ESC}F`.repeat(count), - - up: (count = 1) => count ? `${ESC}${count}A` : '', - down: (count = 1) => count ? `${ESC}${count}B` : '', - right: (count = 1) => count ? `${ESC}${count}C` : '', - left: (count = 1) => count ? `${ESC}${count}D` : '', - - to(x, y) { - return y ? `${ESC}${y + 1};${x + 1}H` : `${ESC}${x + 1}G`; - }, - - move(x = 0, y = 0) { - let res = ''; - res += (x < 0) ? cursor.left(-x) : (x > 0) ? cursor.right(x) : ''; - res += (y < 0) ? cursor.up(-y) : (y > 0) ? cursor.down(y) : ''; - return res; - }, - - restore(state = {}) { - let { after, cursor, initial, input, prompt, size, value } = state; - initial = utils.isPrimitive(initial) ? String(initial) : ''; - input = utils.isPrimitive(input) ? String(input) : ''; - value = utils.isPrimitive(value) ? String(value) : ''; - - if (size) { - let codes = ansi.cursor.up(size) + ansi.cursor.to(prompt.length); - let diff = input.length - cursor; - if (diff > 0) { - codes += ansi.cursor.left(diff); - } - return codes; - } - - if (value || after) { - let pos = (!input && !!initial) ? -initial.length : -input.length + cursor; - if (after) pos -= after.length; - if (input === '' && initial && !prompt.includes(initial)) { - pos += initial.length; - } - return ansi.cursor.move(pos); - } - } -}; - -const erase = ansi.erase = { - screen: code.screen, - up: code.up, - down: code.down, - line: code.line, - lineEnd: code.lineEnd, - lineStart: code.lineStart, - lines(n) { - let str = ''; - for (let i = 0; i < n; i++) { - str += ansi.erase.line + (i < n - 1 ? ansi.cursor.up(1) : ''); - } - if (n) str += ansi.code.beginning; - return str; - } -}; - -ansi.clear = (input = '', columns = process.stdout.columns) => { - if (!columns) return erase.line + cursor.to(0); - let width = str => [...colors.unstyle(str)].length; - let lines = input.split(/\r?\n/); - let rows = 0; - for (let line of lines) { - rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / columns); - } - return (erase.line + cursor.prevLine()).repeat(rows - 1) + erase.line + cursor.to(0); -}; diff --git a/node_modules/enquirer/lib/combos.js b/node_modules/enquirer/lib/combos.js deleted file mode 100644 index 5b9d86c55..000000000 --- a/node_modules/enquirer/lib/combos.js +++ /dev/null @@ -1,75 +0,0 @@ -'use strict'; - -/** - * Actions are mappings from keypress event names to method names - * in the prompts. - */ - -exports.ctrl = { - a: 'first', - b: 'backward', - c: 'cancel', - d: 'deleteForward', - e: 'last', - f: 'forward', - g: 'reset', - i: 'tab', - k: 'cutForward', - l: 'reset', - n: 'newItem', - m: 'cancel', - j: 'submit', - p: 'search', - r: 'remove', - s: 'save', - u: 'undo', - w: 'cutLeft', - x: 'toggleCursor', - v: 'paste' -}; - -exports.shift = { - up: 'shiftUp', - down: 'shiftDown', - left: 'shiftLeft', - right: 'shiftRight', - tab: 'prev' -}; - -exports.fn = { - up: 'pageUp', - down: 'pageDown', - left: 'pageLeft', - right: 'pageRight', - delete: 'deleteForward' -}; - -// on Windows -exports.option = { - b: 'backward', - f: 'forward', - d: 'cutRight', - left: 'cutLeft', - up: 'altUp', - down: 'altDown' -}; - -exports.keys = { - pageup: 'pageUp', // + (mac), (windows) - pagedown: 'pageDown', // + (mac), (windows) - home: 'home', // + (mac), (windows) - end: 'end', // + (mac), (windows) - cancel: 'cancel', - delete: 'deleteForward', - backspace: 'delete', - down: 'down', - enter: 'submit', - escape: 'cancel', - left: 'left', - space: 'space', - number: 'number', - return: 'submit', - right: 'right', - tab: 'next', - up: 'up' -}; diff --git a/node_modules/enquirer/lib/completer.js b/node_modules/enquirer/lib/completer.js deleted file mode 100644 index 4a50af0a1..000000000 --- a/node_modules/enquirer/lib/completer.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -const unique = arr => arr.filter((v, i) => arr.lastIndexOf(v) === i); -const compact = arr => unique(arr).filter(Boolean); - -module.exports = (action, data = {}, value = '') => { - let { past = [], present = '' } = data; - let rest, prev; - - switch (action) { - case 'prev': - case 'undo': - rest = past.slice(0, past.length - 1); - prev = past[past.length - 1] || ''; - return { - past: compact([value, ...rest]), - present: prev - }; - - case 'next': - case 'redo': - rest = past.slice(1); - prev = past[0] || ''; - return { - past: compact([...rest, value]), - present: prev - }; - - case 'save': - return { - past: compact([...past, value]), - present: '' - }; - - case 'remove': - prev = compact(past.filter(v => v !== value)); - present = ''; - - if (prev.length) { - present = prev.pop(); - } - - return { - past: prev, - present - }; - - default: { - throw new Error(`Invalid action: "${action}"`); - } - } -}; diff --git a/node_modules/enquirer/lib/interpolate.js b/node_modules/enquirer/lib/interpolate.js deleted file mode 100644 index c3d9b3f3f..000000000 --- a/node_modules/enquirer/lib/interpolate.js +++ /dev/null @@ -1,266 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const clean = (str = '') => { - return typeof str === 'string' ? str.replace(/^['"]|['"]$/g, '') : ''; -}; - -/** - * This file contains the interpolation and rendering logic for - * the Snippet prompt. - */ - -class Item { - constructor(token) { - this.name = token.key; - this.field = token.field || {}; - this.value = clean(token.initial || this.field.initial || ''); - this.message = token.message || this.name; - this.cursor = 0; - this.input = ''; - this.lines = []; - } -} - -const tokenize = async(options = {}, defaults = {}, fn = token => token) => { - let unique = new Set(); - let fields = options.fields || []; - let input = options.template; - let tabstops = []; - let items = []; - let keys = []; - let line = 1; - - if (typeof input === 'function') { - input = await input(); - } - - let i = -1; - let next = () => input[++i]; - let peek = () => input[i + 1]; - let push = token => { - token.line = line; - tabstops.push(token); - }; - - push({ type: 'bos', value: '' }); - - while (i < input.length - 1) { - let value = next(); - - if (/^[^\S\n ]$/.test(value)) { - push({ type: 'text', value }); - continue; - } - - if (value === '\n') { - push({ type: 'newline', value }); - line++; - continue; - } - - if (value === '\\') { - value += next(); - push({ type: 'text', value }); - continue; - } - - if ((value === '$' || value === '#' || value === '{') && peek() === '{') { - let n = next(); - value += n; - - let token = { type: 'template', open: value, inner: '', close: '', value }; - let ch; - - while ((ch = next())) { - if (ch === '}') { - if (peek() === '}') ch += next(); - token.value += ch; - token.close = ch; - break; - } - - if (ch === ':') { - token.initial = ''; - token.key = token.inner; - } else if (token.initial !== void 0) { - token.initial += ch; - } - - token.value += ch; - token.inner += ch; - } - - token.template = token.open + (token.initial || token.inner) + token.close; - token.key = token.key || token.inner; - - if (defaults.hasOwnProperty(token.key)) { - token.initial = defaults[token.key]; - } - - token = fn(token); - push(token); - - keys.push(token.key); - unique.add(token.key); - - let item = items.find(item => item.name === token.key); - token.field = fields.find(ch => ch.name === token.key); - - if (!item) { - item = new Item(token); - items.push(item); - } - - item.lines.push(token.line - 1); - continue; - } - - let last = tabstops[tabstops.length - 1]; - if (last.type === 'text' && last.line === line) { - last.value += value; - } else { - push({ type: 'text', value }); - } - } - - push({ type: 'eos', value: '' }); - return { input, tabstops, unique, keys, items }; -}; - -module.exports = async prompt => { - let options = prompt.options; - let required = new Set(options.required === true ? [] : (options.required || [])); - let defaults = { ...options.values, ...options.initial }; - let { tabstops, items, keys } = await tokenize(options, defaults); - - let result = createFn('result', prompt, options); - let format = createFn('format', prompt, options); - let isValid = createFn('validate', prompt, options, true); - let isVal = prompt.isValue.bind(prompt); - - return async(state = {}, submitted = false) => { - let index = 0; - - state.required = required; - state.items = items; - state.keys = keys; - state.output = ''; - - let validate = async(value, state, item, index) => { - let error = await isValid(value, state, item, index); - if (error === false) { - return 'Invalid field ' + item.name; - } - return error; - }; - - for (let token of tabstops) { - let value = token.value; - let key = token.key; - - if (token.type !== 'template') { - if (value) state.output += value; - continue; - } - - if (token.type === 'template') { - let item = items.find(ch => ch.name === key); - - if (options.required === true) { - state.required.add(item.name); - } - - let val = [item.input, state.values[item.value], item.value, value].find(isVal); - let field = item.field || {}; - let message = field.message || token.inner; - - if (submitted) { - let error = await validate(state.values[key], state, item, index); - if ((error && typeof error === 'string') || error === false) { - state.invalid.set(key, error); - continue; - } - - state.invalid.delete(key); - let res = await result(state.values[key], state, item, index); - state.output += colors.unstyle(res); - continue; - } - - item.placeholder = false; - - let before = value; - value = await format(value, state, item, index); - - if (val !== value) { - state.values[key] = val; - value = prompt.styles.typing(val); - state.missing.delete(message); - - } else { - state.values[key] = void 0; - val = `<${message}>`; - value = prompt.styles.primary(val); - item.placeholder = true; - - if (state.required.has(key)) { - state.missing.add(message); - } - } - - if (state.missing.has(message) && state.validating) { - value = prompt.styles.warning(val); - } - - if (state.invalid.has(key) && state.validating) { - value = prompt.styles.danger(val); - } - - if (index === state.index) { - if (before !== value) { - value = prompt.styles.underline(value); - } else { - value = prompt.styles.heading(colors.unstyle(value)); - } - } - - index++; - } - - if (value) { - state.output += value; - } - } - - let lines = state.output.split('\n').map(l => ' ' + l); - let len = items.length; - let done = 0; - - for (let item of items) { - if (state.invalid.has(item.name)) { - item.lines.forEach(i => { - if (lines[i][0] !== ' ') return; - lines[i] = state.styles.danger(state.symbols.bullet) + lines[i].slice(1); - }); - } - - if (prompt.isValue(state.values[item.name])) { - done++; - } - } - - state.completed = ((done / len) * 100).toFixed(0); - state.output = lines.join('\n'); - return state.output; - }; -}; - -function createFn(prop, prompt, options, fallback) { - return (value, state, item, index) => { - if (typeof item.field[prop] === 'function') { - return item.field[prop].call(prompt, value, state, item, index); - } - return [fallback, value].find(v => prompt.isValue(v)); - }; -} diff --git a/node_modules/enquirer/lib/keypress.js b/node_modules/enquirer/lib/keypress.js deleted file mode 100644 index 15d731497..000000000 --- a/node_modules/enquirer/lib/keypress.js +++ /dev/null @@ -1,243 +0,0 @@ -'use strict'; - -const readline = require('readline'); -const combos = require('./combos'); - -/* eslint-disable no-control-regex */ -const metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/; -const fnKeyRe = /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/; -const keyName = { - /* xterm/gnome ESC O letter */ - 'OP': 'f1', - 'OQ': 'f2', - 'OR': 'f3', - 'OS': 'f4', - /* xterm/rxvt ESC [ number ~ */ - '[11~': 'f1', - '[12~': 'f2', - '[13~': 'f3', - '[14~': 'f4', - /* from Cygwin and used in libuv */ - '[[A': 'f1', - '[[B': 'f2', - '[[C': 'f3', - '[[D': 'f4', - '[[E': 'f5', - /* common */ - '[15~': 'f5', - '[17~': 'f6', - '[18~': 'f7', - '[19~': 'f8', - '[20~': 'f9', - '[21~': 'f10', - '[23~': 'f11', - '[24~': 'f12', - /* xterm ESC [ letter */ - '[A': 'up', - '[B': 'down', - '[C': 'right', - '[D': 'left', - '[E': 'clear', - '[F': 'end', - '[H': 'home', - /* xterm/gnome ESC O letter */ - 'OA': 'up', - 'OB': 'down', - 'OC': 'right', - 'OD': 'left', - 'OE': 'clear', - 'OF': 'end', - 'OH': 'home', - /* xterm/rxvt ESC [ number ~ */ - '[1~': 'home', - '[2~': 'insert', - '[3~': 'delete', - '[4~': 'end', - '[5~': 'pageup', - '[6~': 'pagedown', - /* putty */ - '[[5~': 'pageup', - '[[6~': 'pagedown', - /* rxvt */ - '[7~': 'home', - '[8~': 'end', - /* rxvt keys with modifiers */ - '[a': 'up', - '[b': 'down', - '[c': 'right', - '[d': 'left', - '[e': 'clear', - - '[2$': 'insert', - '[3$': 'delete', - '[5$': 'pageup', - '[6$': 'pagedown', - '[7$': 'home', - '[8$': 'end', - - 'Oa': 'up', - 'Ob': 'down', - 'Oc': 'right', - 'Od': 'left', - 'Oe': 'clear', - - '[2^': 'insert', - '[3^': 'delete', - '[5^': 'pageup', - '[6^': 'pagedown', - '[7^': 'home', - '[8^': 'end', - /* misc. */ - '[Z': 'tab', -} - -function isShiftKey(code) { - return ['[a', '[b', '[c', '[d', '[e', '[2$', '[3$', '[5$', '[6$', '[7$', '[8$', '[Z'].includes(code) -} - -function isCtrlKey(code) { - return [ 'Oa', 'Ob', 'Oc', 'Od', 'Oe', '[2^', '[3^', '[5^', '[6^', '[7^', '[8^'].includes(code) -} - -const keypress = (s = '', event = {}) => { - let parts; - let key = { - name: event.name, - ctrl: false, - meta: false, - shift: false, - option: false, - sequence: s, - raw: s, - ...event - }; - - if (Buffer.isBuffer(s)) { - if (s[0] > 127 && s[1] === void 0) { - s[0] -= 128; - s = '\x1b' + String(s); - } else { - s = String(s); - } - } else if (s !== void 0 && typeof s !== 'string') { - s = String(s); - } else if (!s) { - s = key.sequence || ''; - } - - key.sequence = key.sequence || s || key.name; - - if (s === '\r') { - // carriage return - key.raw = void 0; - key.name = 'return'; - } else if (s === '\n') { - // enter, should have been called linefeed - key.name = 'enter'; - } else if (s === '\t') { - // tab - key.name = 'tab'; - } else if (s === '\b' || s === '\x7f' || s === '\x1b\x7f' || s === '\x1b\b') { - // backspace or ctrl+h - key.name = 'backspace'; - key.meta = s.charAt(0) === '\x1b'; - } else if (s === '\x1b' || s === '\x1b\x1b') { - // escape key - key.name = 'escape'; - key.meta = s.length === 2; - } else if (s === ' ' || s === '\x1b ') { - key.name = 'space'; - key.meta = s.length === 2; - } else if (s <= '\x1a') { - // ctrl+letter - key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1); - key.ctrl = true; - } else if (s.length === 1 && s >= '0' && s <= '9') { - // number - key.name = 'number'; - } else if (s.length === 1 && s >= 'a' && s <= 'z') { - // lowercase letter - key.name = s; - } else if (s.length === 1 && s >= 'A' && s <= 'Z') { - // shift+letter - key.name = s.toLowerCase(); - key.shift = true; - } else if ((parts = metaKeyCodeRe.exec(s))) { - // meta+character key - key.meta = true; - key.shift = /^[A-Z]$/.test(parts[1]); - } else if ((parts = fnKeyRe.exec(s))) { - let segs = [...s]; - - if (segs[0] === '\u001b' && segs[1] === '\u001b') { - key.option = true; - } - - // ansi escape sequence - // reassemble the key code leaving out leading \x1b's, - // the modifier key bitflag and any meaningless "1;" sequence - let code = [parts[1], parts[2], parts[4], parts[6]].filter(Boolean).join(''); - let modifier = (parts[3] || parts[5] || 1) - 1; - - // Parse the key modifier - key.ctrl = !!(modifier & 4); - key.meta = !!(modifier & 10); - key.shift = !!(modifier & 1); - key.code = code; - - key.name = keyName[code]; - key.shift = isShiftKey(code) || key.shift; - key.ctrl = isCtrlKey(code) || key.ctrl; - } - return key; -}; - -keypress.listen = (options = {}, onKeypress) => { - let { stdin } = options; - - if (!stdin || (stdin !== process.stdin && !stdin.isTTY)) { - throw new Error('Invalid stream passed'); - } - - let rl = readline.createInterface({ terminal: true, input: stdin }); - readline.emitKeypressEvents(stdin, rl); - - let on = (buf, key) => onKeypress(buf, keypress(buf, key), rl); - let isRaw = stdin.isRaw; - - if (stdin.isTTY) stdin.setRawMode(true); - stdin.on('keypress', on); - rl.resume(); - - let off = () => { - if (stdin.isTTY) stdin.setRawMode(isRaw); - stdin.removeListener('keypress', on); - rl.pause(); - rl.close(); - }; - - return off; -}; - -keypress.action = (buf, key, customActions) => { - let obj = { ...combos, ...customActions }; - if (key.ctrl) { - key.action = obj.ctrl[key.name]; - return key; - } - - if (key.option && obj.option) { - key.action = obj.option[key.name]; - return key; - } - - if (key.shift) { - key.action = obj.shift[key.name]; - return key; - } - - key.action = obj.keys[key.name]; - return key; -}; - -module.exports = keypress; diff --git a/node_modules/enquirer/lib/placeholder.js b/node_modules/enquirer/lib/placeholder.js deleted file mode 100644 index ae2af1cff..000000000 --- a/node_modules/enquirer/lib/placeholder.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -const utils = require('./utils'); - -/** - * Render a placeholder value with cursor and styling based on the - * position of the cursor. - * - * @param {Object} `prompt` Prompt instance. - * @param {String} `input` Input string. - * @param {String} `initial` The initial user-provided value. - * @param {Number} `pos` Current cursor position. - * @param {Boolean} `showCursor` Render a simulated cursor using the inverse primary style. - * @return {String} Returns the styled placeholder string. - * @api public - */ - -module.exports = (prompt, options = {}) => { - prompt.cursorHide(); - - let { input = '', initial = '', pos, showCursor = true, color } = options; - let style = color || prompt.styles.placeholder; - let inverse = utils.inverse(prompt.styles.primary); - let blinker = str => inverse(prompt.styles.black(str)); - let output = input; - let char = ' '; - let reverse = blinker(char); - - if (prompt.blink && prompt.blink.off === true) { - blinker = str => str; - reverse = ''; - } - - if (showCursor && pos === 0 && initial === '' && input === '') { - return blinker(char); - } - - if (showCursor && pos === 0 && (input === initial || input === '')) { - return blinker(initial[0]) + style(initial.slice(1)); - } - - initial = utils.isPrimitive(initial) ? `${initial}` : ''; - input = utils.isPrimitive(input) ? `${input}` : ''; - - let placeholder = initial && initial.startsWith(input) && initial !== input; - let cursor = placeholder ? blinker(initial[input.length]) : reverse; - - if (pos !== input.length && showCursor === true) { - output = input.slice(0, pos) + blinker(input[pos]) + input.slice(pos + 1); - cursor = ''; - } - - if (showCursor === false) { - cursor = ''; - } - - if (placeholder) { - let raw = prompt.styles.unstyle(output + cursor); - return output + cursor + style(initial.slice(raw.length)); - } - - return output + cursor; -}; diff --git a/node_modules/enquirer/lib/prompt.js b/node_modules/enquirer/lib/prompt.js deleted file mode 100644 index 65f7bdd1e..000000000 --- a/node_modules/enquirer/lib/prompt.js +++ /dev/null @@ -1,485 +0,0 @@ -'use strict'; - -const Events = require('events'); -const colors = require('ansi-colors'); -const keypress = require('./keypress'); -const timer = require('./timer'); -const State = require('./state'); -const theme = require('./theme'); -const utils = require('./utils'); -const ansi = require('./ansi'); - -/** - * Base class for creating a new Prompt. - * @param {Object} `options` Question object. - */ - -class Prompt extends Events { - constructor(options = {}) { - super(); - this.name = options.name; - this.type = options.type; - this.options = options; - theme(this); - timer(this); - this.state = new State(this); - this.initial = [options.initial, options.default].find(v => v != null); - this.stdout = options.stdout || process.stdout; - this.stdin = options.stdin || process.stdin; - this.scale = options.scale || 1; - this.term = this.options.term || process.env.TERM_PROGRAM; - this.margin = margin(this.options.margin); - this.setMaxListeners(0); - setOptions(this); - } - - async keypress(input, event = {}) { - this.keypressed = true; - let key = keypress.action(input, keypress(input, event), this.options.actions); - this.state.keypress = key; - this.emit('keypress', input, key); - this.emit('state', this.state.clone()); - let fn = this.options[key.action] || this[key.action] || this.dispatch; - if (typeof fn === 'function') { - return await fn.call(this, input, key); - } - this.alert(); - } - - alert() { - delete this.state.alert; - if (this.options.show === false) { - this.emit('alert'); - } else { - this.stdout.write(ansi.code.beep); - } - } - - cursorHide() { - this.stdout.write(ansi.cursor.hide()); - utils.onExit(() => this.cursorShow()); - } - - cursorShow() { - this.stdout.write(ansi.cursor.show()); - } - - write(str) { - if (!str) return; - if (this.stdout && this.state.show !== false) { - this.stdout.write(str); - } - this.state.buffer += str; - } - - clear(lines = 0) { - let buffer = this.state.buffer; - this.state.buffer = ''; - if ((!buffer && !lines) || this.options.show === false) return; - this.stdout.write(ansi.cursor.down(lines) + ansi.clear(buffer, this.width)); - } - - restore() { - if (this.state.closed || this.options.show === false) return; - - let { prompt, after, rest } = this.sections(); - let { cursor, initial = '', input = '', value = '' } = this; - - let size = this.state.size = rest.length; - let state = { after, cursor, initial, input, prompt, size, value }; - let codes = ansi.cursor.restore(state); - if (codes) { - this.stdout.write(codes); - } - } - - sections() { - let { buffer, input, prompt } = this.state; - prompt = colors.unstyle(prompt); - let buf = colors.unstyle(buffer); - let idx = buf.indexOf(prompt); - let header = buf.slice(0, idx); - let rest = buf.slice(idx); - let lines = rest.split('\n'); - let first = lines[0]; - let last = lines[lines.length - 1]; - let promptLine = prompt + (input ? ' ' + input : ''); - let len = promptLine.length; - let after = len < first.length ? first.slice(len + 1) : ''; - return { header, prompt: first, after, rest: lines.slice(1), last }; - } - - async submit() { - this.state.submitted = true; - this.state.validating = true; - - // this will only be called when the prompt is directly submitted - // without initializing, i.e. when the prompt is skipped, etc. Otherwize, - // "options.onSubmit" is will be handled by the "initialize()" method. - if (this.options.onSubmit) { - await this.options.onSubmit.call(this, this.name, this.value, this); - } - - let result = this.state.error || await this.validate(this.value, this.state); - if (result !== true) { - let error = '\n' + this.symbols.pointer + ' '; - - if (typeof result === 'string') { - error += result.trim(); - } else { - error += 'Invalid input'; - } - - this.state.error = '\n' + this.styles.danger(error); - this.state.submitted = false; - await this.render(); - await this.alert(); - this.state.validating = false; - this.state.error = void 0; - return; - } - - this.state.validating = false; - await this.render(); - await this.close(); - - this.value = await this.result(this.value); - this.emit('submit', this.value); - } - - async cancel(err) { - this.state.cancelled = this.state.submitted = true; - - await this.render(); - await this.close(); - - if (typeof this.options.onCancel === 'function') { - await this.options.onCancel.call(this, this.name, this.value, this); - } - - this.emit('cancel', await this.error(err)); - } - - async close() { - this.state.closed = true; - - try { - let sections = this.sections(); - let lines = Math.ceil(sections.prompt.length / this.width); - if (sections.rest) { - this.write(ansi.cursor.down(sections.rest.length)); - } - this.write('\n'.repeat(lines)); - } catch (err) { /* do nothing */ } - - this.emit('close'); - } - - start() { - if (!this.stop && this.options.show !== false) { - this.stop = keypress.listen(this, this.keypress.bind(this)); - this.once('close', this.stop); - } - } - - async skip() { - this.skipped = this.options.skip === true; - if (typeof this.options.skip === 'function') { - this.skipped = await this.options.skip.call(this, this.name, this.value); - } - return this.skipped; - } - - async initialize() { - let { format, options, result } = this; - - this.format = () => format.call(this, this.value); - this.result = () => result.call(this, this.value); - - if (typeof options.initial === 'function') { - this.initial = await options.initial.call(this, this); - } - - if (typeof options.onRun === 'function') { - await options.onRun.call(this, this); - } - - // if "options.onSubmit" is defined, we wrap the "submit" method to guarantee - // that "onSubmit" will always called first thing inside the submit - // method, regardless of how it's handled in inheriting prompts. - if (typeof options.onSubmit === 'function') { - let onSubmit = options.onSubmit.bind(this); - let submit = this.submit.bind(this); - delete this.options.onSubmit; - this.submit = async() => { - await onSubmit(this.name, this.value, this); - return submit(); - }; - } - - await this.start(); - await this.render(); - } - - render() { - throw new Error('expected prompt to have a custom render method'); - } - - run() { - return new Promise(async(resolve, reject) => { - this.once('submit', resolve); - this.once('cancel', reject); - if (await this.skip()) { - this.render = () => {}; - return this.submit(); - } - await this.initialize(); - this.emit('run'); - }); - } - - async element(name, choice, i) { - let { options, state, symbols, timers } = this; - let timer = timers && timers[name]; - state.timer = timer; - let value = options[name] || state[name] || symbols[name]; - let val = choice && choice[name] != null ? choice[name] : await value; - if (val === '') return val; - - let res = await this.resolve(val, state, choice, i); - if (!res && choice && choice[name]) { - return this.resolve(value, state, choice, i); - } - return res; - } - - async prefix() { - let element = await this.element('prefix') || this.symbols; - let timer = this.timers && this.timers.prefix; - let state = this.state; - state.timer = timer; - if (utils.isObject(element)) element = element[state.status] || element.pending; - if (!utils.hasColor(element)) { - let style = this.styles[state.status] || this.styles.pending; - return style(element); - } - return element; - } - - async message() { - let message = await this.element('message'); - if (!utils.hasColor(message)) { - return this.styles.strong(message); - } - return message; - } - - async separator() { - let element = await this.element('separator') || this.symbols; - let timer = this.timers && this.timers.separator; - let state = this.state; - state.timer = timer; - let value = element[state.status] || element.pending || state.separator; - let ele = await this.resolve(value, state); - if (utils.isObject(ele)) ele = ele[state.status] || ele.pending; - if (!utils.hasColor(ele)) { - return this.styles.muted(ele); - } - return ele; - } - - async pointer(choice, i) { - let val = await this.element('pointer', choice, i); - - if (typeof val === 'string' && utils.hasColor(val)) { - return val; - } - - if (val) { - let styles = this.styles; - let focused = this.index === i; - let style = focused ? styles.primary : val => val; - let ele = await this.resolve(val[focused ? 'on' : 'off'] || val, this.state); - let styled = !utils.hasColor(ele) ? style(ele) : ele; - return focused ? styled : ' '.repeat(ele.length); - } - } - - async indicator(choice, i) { - let val = await this.element('indicator', choice, i); - if (typeof val === 'string' && utils.hasColor(val)) { - return val; - } - if (val) { - let styles = this.styles; - let enabled = choice.enabled === true; - let style = enabled ? styles.success : styles.dark; - let ele = val[enabled ? 'on' : 'off'] || val; - return !utils.hasColor(ele) ? style(ele) : ele; - } - return ''; - } - - body() { - return null; - } - - footer() { - if (this.state.status === 'pending') { - return this.element('footer'); - } - } - - header() { - if (this.state.status === 'pending') { - return this.element('header'); - } - } - - async hint() { - if (this.state.status === 'pending' && !this.isValue(this.state.input)) { - let hint = await this.element('hint'); - if (!utils.hasColor(hint)) { - return this.styles.muted(hint); - } - return hint; - } - } - - error(err) { - return !this.state.submitted ? (err || this.state.error) : ''; - } - - format(value) { - return value; - } - - result(value) { - return value; - } - - validate(value) { - if (this.options.required === true) { - return this.isValue(value); - } - return true; - } - - isValue(value) { - return value != null && value !== ''; - } - - resolve(value, ...args) { - return utils.resolve(this, value, ...args); - } - - get base() { - return Prompt.prototype; - } - - get style() { - return this.styles[this.state.status]; - } - - get height() { - return this.options.rows || utils.height(this.stdout, 25); - } - get width() { - return this.options.columns || utils.width(this.stdout, 80); - } - get size() { - return { width: this.width, height: this.height }; - } - - set cursor(value) { - this.state.cursor = value; - } - get cursor() { - return this.state.cursor; - } - - set input(value) { - this.state.input = value; - } - get input() { - return this.state.input; - } - - set value(value) { - this.state.value = value; - } - get value() { - let { input, value } = this.state; - let result = [value, input].find(this.isValue.bind(this)); - return this.isValue(result) ? result : this.initial; - } - - static get prompt() { - return options => new this(options).run(); - } -} - -function setOptions(prompt) { - let isValidKey = key => { - return prompt[key] === void 0 || typeof prompt[key] === 'function'; - }; - - let ignore = [ - 'actions', - 'choices', - 'initial', - 'margin', - 'roles', - 'styles', - 'symbols', - 'theme', - 'timers', - 'value' - ]; - - let ignoreFn = [ - 'body', - 'footer', - 'error', - 'header', - 'hint', - 'indicator', - 'message', - 'prefix', - 'separator', - 'skip' - ]; - - for (let key of Object.keys(prompt.options)) { - if (ignore.includes(key)) continue; - if (/^on[A-Z]/.test(key)) continue; - let option = prompt.options[key]; - if (typeof option === 'function' && isValidKey(key)) { - if (!ignoreFn.includes(key)) { - prompt[key] = option.bind(prompt); - } - } else if (typeof prompt[key] !== 'function') { - prompt[key] = option; - } - } -} - -function margin(value) { - if (typeof value === 'number') { - value = [value, value, value, value]; - } - let arr = [].concat(value || []); - let pad = i => i % 2 === 0 ? '\n' : ' '; - let res = []; - for (let i = 0; i < 4; i++) { - let char = pad(i); - if (arr[i]) { - res.push(char.repeat(arr[i])); - } else { - res.push(''); - } - } - return res; -} - -module.exports = Prompt; diff --git a/node_modules/enquirer/lib/prompts/autocomplete.js b/node_modules/enquirer/lib/prompts/autocomplete.js deleted file mode 100644 index daa4a16af..000000000 --- a/node_modules/enquirer/lib/prompts/autocomplete.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict'; - -const Select = require('./select'); - -const highlight = (input, color) => { - let val = input.toLowerCase(); - return str => { - let s = str.toLowerCase(); - let i = s.indexOf(val); - let colored = color(str.slice(i, i + val.length)); - return i >= 0 ? str.slice(0, i) + colored + str.slice(i + val.length) : str; - }; -}; - -class AutoComplete extends Select { - constructor(options) { - super(options); - this.cursorShow(); - } - - moveCursor(n) { - this.state.cursor += n; - } - - dispatch(ch) { - return this.append(ch); - } - - space(ch) { - return this.options.multiple ? super.space(ch) : this.append(ch); - } - - append(ch) { - let { cursor, input } = this.state; - this.input = input.slice(0, cursor) + ch + input.slice(cursor); - this.moveCursor(1); - return this.complete(); - } - - delete() { - let { cursor, input } = this.state; - if (!input) return this.alert(); - this.input = input.slice(0, cursor - 1) + input.slice(cursor); - this.moveCursor(-1); - return this.complete(); - } - - deleteForward() { - let { cursor, input } = this.state; - if (input[cursor] === void 0) return this.alert(); - this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - return this.complete(); - } - - number(ch) { - return this.append(ch); - } - - async complete() { - this.completing = true; - this.choices = await this.suggest(this.input, this.state._choices); - this.state.limit = void 0; // allow getter/setter to reset limit - this.index = Math.min(Math.max(this.visible.length - 1, 0), this.index); - await this.render(); - this.completing = false; - } - - suggest(input = this.input, choices = this.state._choices) { - if (typeof this.options.suggest === 'function') { - return this.options.suggest.call(this, input, choices); - } - let str = input.toLowerCase(); - return choices.filter(ch => ch.message.toLowerCase().includes(str)); - } - - pointer() { - return ''; - } - - format() { - if (!this.focused) return this.input; - if (this.options.multiple && this.state.submitted) { - return this.selected.map(ch => this.styles.primary(ch.message)).join(', '); - } - if (this.state.submitted) { - let value = this.value = this.input = this.focused.value; - return this.styles.primary(value); - } - return this.input; - } - - async render() { - if (this.state.status !== 'pending') return super.render(); - let style = this.options.highlight - ? this.options.highlight.bind(this) - : this.styles.placeholder; - - let color = highlight(this.input, style); - let choices = this.choices; - this.choices = choices.map(ch => ({ ...ch, message: color(ch.message) })); - await super.render(); - this.choices = choices; - } - - submit() { - if (this.options.multiple) { - this.value = this.selected.map(ch => ch.name); - } - return super.submit(); - } -} - -module.exports = AutoComplete; diff --git a/node_modules/enquirer/lib/prompts/basicauth.js b/node_modules/enquirer/lib/prompts/basicauth.js deleted file mode 100644 index 54c5ea77b..000000000 --- a/node_modules/enquirer/lib/prompts/basicauth.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const AuthPrompt = require('../types/auth'); - -function defaultAuthenticate(value, state) { - if (value.username === this.options.username && value.password === this.options.password) { - return true; - } - return false; -} - -const factory = (authenticate = defaultAuthenticate) => { - const choices = [ - { name: 'username', message: 'username' }, - { - name: 'password', - message: 'password', - format(input) { - if (this.options.showPassword) { - return input; - } - let color = this.state.submitted ? this.styles.primary : this.styles.muted; - return color(this.symbols.asterisk.repeat(input.length)); - } - } - ]; - - class BasicAuthPrompt extends AuthPrompt.create(authenticate) { - constructor(options) { - super({ ...options, choices }); - } - - static create(authenticate) { - return factory(authenticate); - } - } - - return BasicAuthPrompt; -}; - -module.exports = factory(); diff --git a/node_modules/enquirer/lib/prompts/confirm.js b/node_modules/enquirer/lib/prompts/confirm.js deleted file mode 100644 index 61eae7ad9..000000000 --- a/node_modules/enquirer/lib/prompts/confirm.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -const BooleanPrompt = require('../types/boolean'); - -class ConfirmPrompt extends BooleanPrompt { - constructor(options) { - super(options); - this.default = this.options.default || (this.initial ? '(Y/n)' : '(y/N)'); - } -} - -module.exports = ConfirmPrompt; - diff --git a/node_modules/enquirer/lib/prompts/editable.js b/node_modules/enquirer/lib/prompts/editable.js deleted file mode 100644 index 042e4c9d0..000000000 --- a/node_modules/enquirer/lib/prompts/editable.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -const Select = require('./select'); -const Form = require('./form'); -const form = Form.prototype; - -class Editable extends Select { - constructor(options) { - super({ ...options, multiple: true }); - this.align = [this.options.align, 'left'].find(v => v != null); - this.emptyError = ''; - this.values = {}; - } - - dispatch(char, key) { - let choice = this.focused; - let parent = choice.parent || {}; - if (!choice.editable && !parent.editable) { - if (char === 'a' || char === 'i') return super[char](); - } - return form.dispatch.call(this, char, key); - } - - append(char, key) { - return form.append.call(this, char, key); - } - - delete(char, key) { - return form.delete.call(this, char, key); - } - - space(char) { - return this.focused.editable ? this.append(char) : super.space(); - } - - number(char) { - return this.focused.editable ? this.append(char) : super.number(char); - } - - next() { - return this.focused.editable ? form.next.call(this) : super.next(); - } - - prev() { - return this.focused.editable ? form.prev.call(this) : super.prev(); - } - - async indicator(choice, i) { - let symbol = choice.indicator || ''; - let value = choice.editable ? symbol : super.indicator(choice, i); - return await this.resolve(value, this.state, choice, i) || ''; - } - - indent(choice) { - return choice.role === 'heading' ? '' : (choice.editable ? ' ' : ' '); - } - - async renderChoice(choice, i) { - choice.indent = ''; - if (choice.editable) return form.renderChoice.call(this, choice, i); - return super.renderChoice(choice, i); - } - - error() { - return ''; - } - - footer() { - return this.state.error; - } - - async validate() { - let result = true; - - for (let choice of this.choices) { - if (typeof choice.validate !== 'function') { - continue; - } - - if (choice.role === 'heading') { - continue; - } - - let val = choice.parent ? this.value[choice.parent.name] : this.value; - - if (choice.editable) { - val = choice.value === choice.name ? choice.initial || '' : choice.value; - } else if (!this.isDisabled(choice)) { - val = choice.enabled === true; - } - - result = await choice.validate(val, this.state); - - if (result !== true) { - break; - } - } - - if (result !== true) { - this.state.error = typeof result === 'string' ? result : 'Invalid Input'; - } - - return result; - } - - submit() { - if (this.focused.newChoice === true) return super.submit(); - if (this.choices.some(ch => ch.newChoice)) { - return this.alert(); - } - - this.value = {}; - - for (let choice of this.choices) { - let val = choice.parent ? this.value[choice.parent.name] : this.value; - - if (choice.role === 'heading') { - this.value[choice.name] = {}; - continue; - } - - if (choice.editable) { - val[choice.name] = choice.value === choice.name - ? (choice.initial || '') - : choice.value; - - } else if (!this.isDisabled(choice)) { - val[choice.name] = choice.enabled === true; - } - } - - return this.base.submit.call(this); - } -} - -module.exports = Editable; diff --git a/node_modules/enquirer/lib/prompts/form.js b/node_modules/enquirer/lib/prompts/form.js deleted file mode 100644 index aad4c6c6f..000000000 --- a/node_modules/enquirer/lib/prompts/form.js +++ /dev/null @@ -1,196 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const SelectPrompt = require('./select'); -const placeholder = require('../placeholder'); - -class FormPrompt extends SelectPrompt { - constructor(options) { - super({ ...options, multiple: true }); - this.type = 'form'; - this.initial = this.options.initial; - this.align = [this.options.align, 'right'].find(v => v != null); - this.emptyError = ''; - this.values = {}; - } - - async reset(first) { - await super.reset(); - if (first === true) this._index = this.index; - this.index = this._index; - this.values = {}; - this.choices.forEach(choice => choice.reset && choice.reset()); - return this.render(); - } - - dispatch(char) { - return !!char && this.append(char); - } - - append(char) { - let choice = this.focused; - if (!choice) return this.alert(); - let { cursor, input } = choice; - choice.value = choice.input = input.slice(0, cursor) + char + input.slice(cursor); - choice.cursor++; - return this.render(); - } - - delete() { - let choice = this.focused; - if (!choice || choice.cursor <= 0) return this.alert(); - let { cursor, input } = choice; - choice.value = choice.input = input.slice(0, cursor - 1) + input.slice(cursor); - choice.cursor--; - return this.render(); - } - - deleteForward() { - let choice = this.focused; - if (!choice) return this.alert(); - let { cursor, input } = choice; - if (input[cursor] === void 0) return this.alert(); - let str = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - choice.value = choice.input = str; - return this.render(); - } - - right() { - let choice = this.focused; - if (!choice) return this.alert(); - if (choice.cursor >= choice.input.length) return this.alert(); - choice.cursor++; - return this.render(); - } - - left() { - let choice = this.focused; - if (!choice) return this.alert(); - if (choice.cursor <= 0) return this.alert(); - choice.cursor--; - return this.render(); - } - - space(ch, key) { - return this.dispatch(ch, key); - } - - number(ch, key) { - return this.dispatch(ch, key); - } - - next() { - let ch = this.focused; - if (!ch) return this.alert(); - let { initial, input } = ch; - if (initial && initial.startsWith(input) && input !== initial) { - ch.value = ch.input = initial; - ch.cursor = ch.value.length; - return this.render(); - } - return super.next(); - } - - prev() { - let ch = this.focused; - if (!ch) return this.alert(); - if (ch.cursor === 0) return super.prev(); - ch.value = ch.input = ''; - ch.cursor = 0; - return this.render(); - } - - separator() { - return ''; - } - - format(value) { - return !this.state.submitted ? super.format(value) : ''; - } - - pointer() { - return ''; - } - - indicator(choice) { - return choice.input ? '⦿' : '⊙'; - } - - async choiceSeparator(choice, i) { - let sep = await this.resolve(choice.separator, this.state, choice, i) || ':'; - return sep ? ' ' + this.styles.disabled(sep) : ''; - } - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let { state, styles } = this; - let { cursor, initial = '', name, hint, input = '' } = choice; - let { muted, submitted, primary, danger } = styles; - - let help = hint; - let focused = this.index === i; - let validate = choice.validate || (() => true); - let sep = await this.choiceSeparator(choice, i); - let msg = choice.message; - - if (this.align === 'right') msg = msg.padStart(this.longest + 1, ' '); - if (this.align === 'left') msg = msg.padEnd(this.longest + 1, ' '); - - // re-populate the form values (answers) object - let value = this.values[name] = (input || initial); - let color = input ? 'success' : 'dark'; - - if ((await validate.call(choice, value, this.state)) !== true) { - color = 'danger'; - } - - let style = styles[color]; - let indicator = style(await this.indicator(choice, i)) + (choice.pad || ''); - - let indent = this.indent(choice); - let line = () => [indent, indicator, msg + sep, input, help].filter(Boolean).join(' '); - - if (state.submitted) { - msg = colors.unstyle(msg); - input = submitted(input); - help = ''; - return line(); - } - - if (choice.format) { - input = await choice.format.call(this, input, choice, i); - } else { - let color = this.styles.muted; - let options = { input, initial, pos: cursor, showCursor: focused, color }; - input = placeholder(this, options); - } - - if (!this.isValue(input)) { - input = this.styles.muted(this.symbols.ellipsis); - } - - if (choice.result) { - this.values[name] = await choice.result.call(this, value, choice, i); - } - - if (focused) { - msg = primary(msg); - } - - if (choice.error) { - input += (input ? ' ' : '') + danger(choice.error.trim()); - } else if (choice.hint) { - input += (input ? ' ' : '') + muted(choice.hint.trim()); - } - - return line(); - } - - async submit() { - this.value = this.values; - return super.base.submit.call(this); - } -} - -module.exports = FormPrompt; diff --git a/node_modules/enquirer/lib/prompts/index.js b/node_modules/enquirer/lib/prompts/index.js deleted file mode 100644 index a82fbfb4a..000000000 --- a/node_modules/enquirer/lib/prompts/index.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -const utils = require('../utils'); - -const define = (key, fn) => { - utils.defineExport(exports, key, fn); - utils.defineExport(exports, key.toLowerCase(), fn); -}; - -define('AutoComplete', () => require('./autocomplete')); -define('BasicAuth', () => require('./basicauth')); -define('Confirm', () => require('./confirm')); -define('Editable', () => require('./editable')); -define('Form', () => require('./form')); -define('Input', () => require('./input')); -define('Invisible', () => require('./invisible')); -define('List', () => require('./list')); -define('MultiSelect', () => require('./multiselect')); -define('Numeral', () => require('./numeral')); -define('Password', () => require('./password')); -define('Scale', () => require('./scale')); -define('Select', () => require('./select')); -define('Snippet', () => require('./snippet')); -define('Sort', () => require('./sort')); -define('Survey', () => require('./survey')); -define('Text', () => require('./text')); -define('Toggle', () => require('./toggle')); -define('Quiz', () => require('./quiz')); diff --git a/node_modules/enquirer/lib/prompts/input.js b/node_modules/enquirer/lib/prompts/input.js deleted file mode 100644 index 80ba193b4..000000000 --- a/node_modules/enquirer/lib/prompts/input.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict'; - -const Prompt = require('../types/string'); -const completer = require('../completer'); - -class Input extends Prompt { - constructor(options) { - super(options); - let history = this.options.history; - if (history && history.store) { - let initial = history.values || this.initial; - this.autosave = !!history.autosave; - this.store = history.store; - this.data = this.store.get('values') || { past: [], present: initial }; - this.initial = this.data.present || this.data.past[this.data.past.length - 1]; - } - } - - completion(action) { - if (!this.store) return this.alert(); - this.data = completer(action, this.data, this.input); - if (!this.data.present) return this.alert(); - this.input = this.data.present; - this.cursor = this.input.length; - return this.render(); - } - - altUp() { - return this.completion('prev'); - } - - altDown() { - return this.completion('next'); - } - - prev() { - this.save(); - return super.prev(); - } - - save() { - if (!this.store) return; - this.data = completer('save', this.data, this.input); - this.store.set('values', this.data); - } - - submit() { - if (this.store && this.autosave === true) { - this.save(); - } - return super.submit(); - } -} - -module.exports = Input; diff --git a/node_modules/enquirer/lib/prompts/invisible.js b/node_modules/enquirer/lib/prompts/invisible.js deleted file mode 100644 index 548106243..000000000 --- a/node_modules/enquirer/lib/prompts/invisible.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class InvisiblePrompt extends StringPrompt { - format() { - return ''; - } -} - -module.exports = InvisiblePrompt; diff --git a/node_modules/enquirer/lib/prompts/list.js b/node_modules/enquirer/lib/prompts/list.js deleted file mode 100644 index 7657c7fff..000000000 --- a/node_modules/enquirer/lib/prompts/list.js +++ /dev/null @@ -1,36 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class ListPrompt extends StringPrompt { - constructor(options = {}) { - super(options); - this.sep = this.options.separator || /, */; - this.initial = options.initial || ''; - } - - split(input = this.value) { - return input ? String(input).split(this.sep) : []; - } - - format() { - let style = this.state.submitted ? this.styles.primary : val => val; - return this.list.map(style).join(', '); - } - - async submit(value) { - let result = this.state.error || await this.validate(this.list, this.state); - if (result !== true) { - this.state.error = result; - return super.submit(); - } - this.value = this.list; - return super.submit(); - } - - get list() { - return this.split(); - } -} - -module.exports = ListPrompt; diff --git a/node_modules/enquirer/lib/prompts/multiselect.js b/node_modules/enquirer/lib/prompts/multiselect.js deleted file mode 100644 index f64fcd582..000000000 --- a/node_modules/enquirer/lib/prompts/multiselect.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const Select = require('./select'); - -class MultiSelect extends Select { - constructor(options) { - super({ ...options, multiple: true }); - } -} - -module.exports = MultiSelect; diff --git a/node_modules/enquirer/lib/prompts/numeral.js b/node_modules/enquirer/lib/prompts/numeral.js deleted file mode 100644 index 2a81fdd26..000000000 --- a/node_modules/enquirer/lib/prompts/numeral.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../types/number'); diff --git a/node_modules/enquirer/lib/prompts/password.js b/node_modules/enquirer/lib/prompts/password.js deleted file mode 100644 index 46df22d28..000000000 --- a/node_modules/enquirer/lib/prompts/password.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -const StringPrompt = require('../types/string'); - -class PasswordPrompt extends StringPrompt { - constructor(options) { - super(options); - this.cursorShow(); - } - - format(input = this.input) { - if (!this.keypressed) return ''; - let color = this.state.submitted ? this.styles.primary : this.styles.muted; - return color(this.symbols.asterisk.repeat(input.length)); - } -} - -module.exports = PasswordPrompt; diff --git a/node_modules/enquirer/lib/prompts/quiz.js b/node_modules/enquirer/lib/prompts/quiz.js deleted file mode 100644 index 2be455184..000000000 --- a/node_modules/enquirer/lib/prompts/quiz.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const SelectPrompt = require('./select'); - -class Quiz extends SelectPrompt { - constructor(options) { - super(options); - if (typeof this.options.correctChoice !== 'number' || this.options.correctChoice < 0) { - throw new Error('Please specify the index of the correct answer from the list of choices'); - } - } - - async toChoices(value, parent) { - let choices = await super.toChoices(value, parent); - if (choices.length < 2) { - throw new Error('Please give at least two choices to the user'); - } - if (this.options.correctChoice > choices.length) { - throw new Error('Please specify the index of the correct answer from the list of choices'); - } - return choices; - } - - check(state) { - return state.index === this.options.correctChoice; - } - - async result(selected) { - return { - selectedAnswer: selected, - correctAnswer: this.options.choices[this.options.correctChoice].value, - correct: await this.check(this.state) - }; - } -} - -module.exports = Quiz; diff --git a/node_modules/enquirer/lib/prompts/scale.js b/node_modules/enquirer/lib/prompts/scale.js deleted file mode 100644 index 29d682964..000000000 --- a/node_modules/enquirer/lib/prompts/scale.js +++ /dev/null @@ -1,237 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const ArrayPrompt = require('../types/array'); -const utils = require('../utils'); - -class LikertScale extends ArrayPrompt { - constructor(options = {}) { - super(options); - this.widths = [].concat(options.messageWidth || 50); - this.align = [].concat(options.align || 'left'); - this.linebreak = options.linebreak || false; - this.edgeLength = options.edgeLength || 3; - this.newline = options.newline || '\n '; - let start = options.startNumber || 1; - if (typeof this.scale === 'number') { - this.scaleKey = false; - this.scale = Array(this.scale).fill(0).map((v, i) => ({ name: i + start })); - } - } - - async reset() { - this.tableized = false; - await super.reset(); - return this.render(); - } - - tableize() { - if (this.tableized === true) return; - this.tableized = true; - let longest = 0; - - for (let ch of this.choices) { - longest = Math.max(longest, ch.message.length); - ch.scaleIndex = ch.initial || 2; - ch.scale = []; - - for (let i = 0; i < this.scale.length; i++) { - ch.scale.push({ index: i }); - } - } - this.widths[0] = Math.min(this.widths[0], longest + 3); - } - - async dispatch(s, key) { - if (this.multiple) { - return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); - } - this.alert(); - } - - heading(msg, item, i) { - return this.styles.strong(msg); - } - - separator() { - return this.styles.muted(this.symbols.ellipsis); - } - - right() { - let choice = this.focused; - if (choice.scaleIndex >= this.scale.length - 1) return this.alert(); - choice.scaleIndex++; - return this.render(); - } - - left() { - let choice = this.focused; - if (choice.scaleIndex <= 0) return this.alert(); - choice.scaleIndex--; - return this.render(); - } - - indent() { - return ''; - } - - format() { - if (this.state.submitted) { - let values = this.choices.map(ch => this.styles.info(ch.index)); - return values.join(', '); - } - return ''; - } - - pointer() { - return ''; - } - - /** - * Render the scale "Key". Something like: - * @return {String} - */ - - renderScaleKey() { - if (this.scaleKey === false) return ''; - if (this.state.submitted) return ''; - let scale = this.scale.map(item => ` ${item.name} - ${item.message}`); - let key = ['', ...scale].map(item => this.styles.muted(item)); - return key.join('\n'); - } - - /** - * Render the heading row for the scale. - * @return {String} - */ - - renderScaleHeading(max) { - let keys = this.scale.map(ele => ele.name); - if (typeof this.options.renderScaleHeading === 'function') { - keys = this.options.renderScaleHeading.call(this, max); - } - let diff = this.scaleLength - keys.join('').length; - let spacing = Math.round(diff / (keys.length - 1)); - let names = keys.map(key => this.styles.strong(key)); - let headings = names.join(' '.repeat(spacing)); - let padding = ' '.repeat(this.widths[0]); - return this.margin[3] + padding + this.margin[1] + headings; - } - - /** - * Render a scale indicator => ◯ or ◉ by default - */ - - scaleIndicator(choice, item, i) { - if (typeof this.options.scaleIndicator === 'function') { - return this.options.scaleIndicator.call(this, choice, item, i); - } - let enabled = choice.scaleIndex === item.index; - if (item.disabled) return this.styles.hint(this.symbols.radio.disabled); - if (enabled) return this.styles.success(this.symbols.radio.on); - return this.symbols.radio.off; - } - - /** - * Render the actual scale => ◯────◯────◉────◯────◯ - */ - - renderScale(choice, i) { - let scale = choice.scale.map(item => this.scaleIndicator(choice, item, i)); - let padding = this.term === 'Hyper' ? '' : ' '; - return scale.join(padding + this.symbols.line.repeat(this.edgeLength)); - } - - /** - * Render a choice, including scale => - * "The website is easy to navigate. ◯───◯───◉───◯───◯" - */ - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let focused = this.index === i; - let pointer = await this.pointer(choice, i); - let hint = await choice.hint; - - if (hint && !utils.hasColor(hint)) { - hint = this.styles.muted(hint); - } - - let pad = str => this.margin[3] + str.replace(/\s+$/, '').padEnd(this.widths[0], ' '); - let newline = this.newline; - let ind = this.indent(choice); - let message = await this.resolve(choice.message, this.state, choice, i); - let scale = await this.renderScale(choice, i); - let margin = this.margin[1] + this.margin[3]; - this.scaleLength = colors.unstyle(scale).length; - this.widths[0] = Math.min(this.widths[0], this.width - this.scaleLength - margin.length); - let msg = utils.wordWrap(message, { width: this.widths[0], newline }); - let lines = msg.split('\n').map(line => pad(line) + this.margin[1]); - - if (focused) { - scale = this.styles.info(scale); - lines = lines.map(line => this.styles.info(line)); - } - - lines[0] += scale; - - if (this.linebreak) lines.push(''); - return [ind + pointer, lines.join('\n')].filter(Boolean); - } - - async renderChoices() { - if (this.state.submitted) return ''; - this.tableize(); - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - let heading = await this.renderScaleHeading(); - return this.margin[0] + [heading, ...visible.map(v => v.join(' '))].join('\n'); - } - - async render() { - let { submitted, size } = this.state; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = ''; - if (this.options.promptLine !== false) { - prompt = [prefix, message, separator, ''].join(' '); - this.state.prompt = prompt; - } - - let header = await this.header(); - let output = await this.format(); - let key = await this.renderScaleKey(); - let help = await this.error() || await this.hint(); - let body = await this.renderChoices(); - let footer = await this.footer(); - let err = this.emptyError; - - if (output) prompt += output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body.trim() && this.multiple && err != null) { - prompt += this.styles.danger(err); - } - - this.clear(size); - this.write([header, prompt, key, body, footer].filter(Boolean).join('\n')); - if (!this.state.submitted) { - this.write(this.margin[2]); - } - this.restore(); - } - - submit() { - this.value = {}; - for (let choice of this.choices) { - this.value[choice.name] = choice.scaleIndex; - } - return this.base.submit.call(this); - } -} - -module.exports = LikertScale; diff --git a/node_modules/enquirer/lib/prompts/select.js b/node_modules/enquirer/lib/prompts/select.js deleted file mode 100644 index 5d3ad3703..000000000 --- a/node_modules/enquirer/lib/prompts/select.js +++ /dev/null @@ -1,139 +0,0 @@ -'use strict'; - -const ArrayPrompt = require('../types/array'); -const utils = require('../utils'); - -class SelectPrompt extends ArrayPrompt { - constructor(options) { - super(options); - this.emptyError = this.options.emptyError || 'No items were selected'; - } - - async dispatch(s, key) { - if (this.multiple) { - return this[key.name] ? await this[key.name](s, key) : await super.dispatch(s, key); - } - this.alert(); - } - - separator() { - if (this.options.separator) return super.separator(); - let sep = this.styles.muted(this.symbols.ellipsis); - return this.state.submitted ? super.separator() : sep; - } - - pointer(choice, i) { - return (!this.multiple || this.options.pointer) ? super.pointer(choice, i) : ''; - } - - indicator(choice, i) { - return this.multiple ? super.indicator(choice, i) : ''; - } - - choiceMessage(choice, i) { - let message = this.resolve(choice.message, this.state, choice, i); - if (choice.role === 'heading' && !utils.hasColor(message)) { - message = this.styles.strong(message); - } - return this.resolve(message, this.state, choice, i); - } - - choiceSeparator() { - return ':'; - } - - async renderChoice(choice, i) { - await this.onChoice(choice, i); - - let focused = this.index === i; - let pointer = await this.pointer(choice, i); - let check = await this.indicator(choice, i) + (choice.pad || ''); - let hint = await this.resolve(choice.hint, this.state, choice, i); - - if (hint && !utils.hasColor(hint)) { - hint = this.styles.muted(hint); - } - - let ind = this.indent(choice); - let msg = await this.choiceMessage(choice, i); - let line = () => [this.margin[3], ind + pointer + check, msg, this.margin[1], hint].filter(Boolean).join(' '); - - if (choice.role === 'heading') { - return line(); - } - - if (choice.disabled) { - if (!utils.hasColor(msg)) { - msg = this.styles.disabled(msg); - } - return line(); - } - - if (focused) { - msg = this.styles.em(msg); - } - - return line(); - } - - async renderChoices() { - if (this.state.loading === 'choices') { - return this.styles.warning('Loading choices'); - } - - if (this.state.submitted) return ''; - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - if (!visible.length) visible.push(this.styles.danger('No matching choices')); - let result = this.margin[0] + visible.join('\n'); - let header; - - if (this.options.choicesHeader) { - header = await this.resolve(this.options.choicesHeader, this.state); - } - - return [header, result].filter(Boolean).join('\n'); - } - - format() { - if (!this.state.submitted || this.state.cancelled) return ''; - if (Array.isArray(this.selected)) { - return this.selected.map(choice => this.styles.primary(choice.name)).join(', '); - } - return this.styles.primary(this.selected.name); - } - - async render() { - let { submitted, size } = this.state; - - let prompt = ''; - let header = await this.header(); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - if (this.options.promptLine !== false) { - prompt = [prefix, message, separator, ''].join(' '); - this.state.prompt = prompt; - } - - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let body = await this.renderChoices(); - let footer = await this.footer(); - - if (output) prompt += output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body.trim() && this.multiple && this.emptyError != null) { - prompt += this.styles.danger(this.emptyError); - } - - this.clear(size); - this.write([header, prompt, body, footer].filter(Boolean).join('\n')); - this.write(this.margin[2]); - this.restore(); - } -} - -module.exports = SelectPrompt; diff --git a/node_modules/enquirer/lib/prompts/snippet.js b/node_modules/enquirer/lib/prompts/snippet.js deleted file mode 100644 index eec6cc3ab..000000000 --- a/node_modules/enquirer/lib/prompts/snippet.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const interpolate = require('../interpolate'); -const Prompt = require('../prompt'); - -class SnippetPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - this.reset(true); - } - - async initialize() { - this.interpolate = await interpolate(this); - await super.initialize(); - } - - async reset(first) { - this.state.keys = []; - this.state.invalid = new Map(); - this.state.missing = new Set(); - this.state.completed = 0; - this.state.values = {}; - - if (first !== true) { - await this.initialize(); - await this.render(); - } - } - - moveCursor(n) { - let item = this.getItem(); - this.cursor += n; - item.cursor += n; - } - - dispatch(ch, key) { - if (!key.code && !key.ctrl && ch != null && this.getItem()) { - this.append(ch, key); - return; - } - this.alert(); - } - - append(ch, key) { - let item = this.getItem(); - let prefix = item.input.slice(0, this.cursor); - let suffix = item.input.slice(this.cursor); - this.input = item.input = `${prefix}${ch}${suffix}`; - this.moveCursor(1); - this.render(); - } - - delete() { - let item = this.getItem(); - if (this.cursor <= 0 || !item.input) return this.alert(); - let suffix = item.input.slice(this.cursor); - let prefix = item.input.slice(0, this.cursor - 1); - this.input = item.input = `${prefix}${suffix}`; - this.moveCursor(-1); - this.render(); - } - - increment(i) { - return i >= this.state.keys.length - 1 ? 0 : i + 1; - } - - decrement(i) { - return i <= 0 ? this.state.keys.length - 1 : i - 1; - } - - first() { - this.state.index = 0; - this.render(); - } - - last() { - this.state.index = this.state.keys.length - 1; - this.render(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.moveCursor(1); - this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.moveCursor(-1); - this.render(); - } - - prev() { - this.state.index = this.decrement(this.state.index); - this.getItem(); - this.render(); - } - - next() { - this.state.index = this.increment(this.state.index); - this.getItem(); - this.render(); - } - - up() { - this.prev(); - } - - down() { - this.next(); - } - - format(value) { - let color = this.state.completed < 100 ? this.styles.warning : this.styles.success; - if (this.state.submitted === true && this.state.completed !== 100) { - color = this.styles.danger; - } - return color(`${this.state.completed}% completed`); - } - - async render() { - let { index, keys = [], submitted, size } = this.state; - - let newline = [this.options.newline, '\n'].find(v => v != null); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let error = (await this.error()) || ''; - let hint = (await this.hint()) || ''; - let body = submitted ? '' : await this.interpolate(this.state); - - let key = this.state.key = keys[index] || ''; - let input = await this.format(key); - let footer = await this.footer(); - if (input) prompt += ' ' + input; - if (hint && !input && this.state.completed === 0) prompt += ' ' + hint; - - this.clear(size); - let lines = [header, prompt, body, footer, error.trim()]; - this.write(lines.filter(Boolean).join(newline)); - this.restore(); - } - - getItem(name) { - let { items, keys, index } = this.state; - let item = items.find(ch => ch.name === keys[index]); - if (item && item.input != null) { - this.input = item.input; - this.cursor = item.cursor; - } - return item; - } - - async submit() { - if (typeof this.interpolate !== 'function') await this.initialize(); - await this.interpolate(this.state, true); - - let { invalid, missing, output, values } = this.state; - if (invalid.size) { - let err = ''; - for (let [key, value] of invalid) err += `Invalid ${key}: ${value}\n`; - this.state.error = err; - return super.submit(); - } - - if (missing.size) { - this.state.error = 'Required: ' + [...missing.keys()].join(', '); - return super.submit(); - } - - let lines = colors.unstyle(output).split('\n'); - let result = lines.map(v => v.slice(1)).join('\n'); - this.value = { values, result }; - return super.submit(); - } -} - -module.exports = SnippetPrompt; diff --git a/node_modules/enquirer/lib/prompts/sort.js b/node_modules/enquirer/lib/prompts/sort.js deleted file mode 100644 index b779b9b24..000000000 --- a/node_modules/enquirer/lib/prompts/sort.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -const hint = '(Use + to sort)'; -const Prompt = require('./select'); - -class Sort extends Prompt { - constructor(options) { - super({ ...options, reorder: false, sort: true, multiple: true }); - this.state.hint = [this.options.hint, hint].find(this.isValue.bind(this)); - } - - indicator() { - return ''; - } - - async renderChoice(choice, i) { - let str = await super.renderChoice(choice, i); - let sym = this.symbols.identicalTo + ' '; - let pre = (this.index === i && this.sorting) ? this.styles.muted(sym) : ' '; - if (this.options.drag === false) pre = ''; - if (this.options.numbered === true) { - return pre + `${i + 1} - ` + str; - } - return pre + str; - } - - get selected() { - return this.choices; - } - - submit() { - this.value = this.choices.map(choice => choice.value); - return super.submit(); - } -} - -module.exports = Sort; diff --git a/node_modules/enquirer/lib/prompts/survey.js b/node_modules/enquirer/lib/prompts/survey.js deleted file mode 100644 index 5d39f6bd2..000000000 --- a/node_modules/enquirer/lib/prompts/survey.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const ArrayPrompt = require('../types/array'); - -class Survey extends ArrayPrompt { - constructor(options = {}) { - super(options); - this.emptyError = options.emptyError || 'No items were selected'; - this.term = process.env.TERM_PROGRAM; - - if (!this.options.header) { - let header = ['', '4 - Strongly Agree', '3 - Agree', '2 - Neutral', '1 - Disagree', '0 - Strongly Disagree', '']; - header = header.map(ele => this.styles.muted(ele)); - this.state.header = header.join('\n '); - } - } - - async toChoices(...args) { - if (this.createdScales) return false; - this.createdScales = true; - let choices = await super.toChoices(...args); - for (let choice of choices) { - choice.scale = createScale(5, this.options); - choice.scaleIdx = 2; - } - return choices; - } - - dispatch() { - this.alert(); - } - - space() { - let choice = this.focused; - let ele = choice.scale[choice.scaleIdx]; - let selected = ele.selected; - choice.scale.forEach(e => (e.selected = false)); - ele.selected = !selected; - return this.render(); - } - - indicator() { - return ''; - } - - pointer() { - return ''; - } - - separator() { - return this.styles.muted(this.symbols.ellipsis); - } - - right() { - let choice = this.focused; - if (choice.scaleIdx >= choice.scale.length - 1) return this.alert(); - choice.scaleIdx++; - return this.render(); - } - - left() { - let choice = this.focused; - if (choice.scaleIdx <= 0) return this.alert(); - choice.scaleIdx--; - return this.render(); - } - - indent() { - return ' '; - } - - async renderChoice(item, i) { - await this.onChoice(item, i); - let focused = this.index === i; - let isHyper = this.term === 'Hyper'; - let n = !isHyper ? 8 : 9; - let s = !isHyper ? ' ' : ''; - let ln = this.symbols.line.repeat(n); - let sp = ' '.repeat(n + (isHyper ? 0 : 1)); - let dot = enabled => (enabled ? this.styles.success('◉') : '◯') + s; - - let num = i + 1 + '.'; - let color = focused ? this.styles.heading : this.styles.noop; - let msg = await this.resolve(item.message, this.state, item, i); - let indent = this.indent(item); - let scale = indent + item.scale.map((e, i) => dot(i === item.scaleIdx)).join(ln); - let val = i => i === item.scaleIdx ? color(i) : i; - let next = indent + item.scale.map((e, i) => val(i)).join(sp); - - let line = () => [num, msg].filter(Boolean).join(' '); - let lines = () => [line(), scale, next, ' '].filter(Boolean).join('\n'); - - if (focused) { - scale = this.styles.cyan(scale); - next = this.styles.cyan(next); - } - - return lines(); - } - - async renderChoices() { - if (this.state.submitted) return ''; - let choices = this.visible.map(async(ch, i) => await this.renderChoice(ch, i)); - let visible = await Promise.all(choices); - if (!visible.length) visible.push(this.styles.danger('No matching choices')); - return visible.join('\n'); - } - - format() { - if (this.state.submitted) { - let values = this.choices.map(ch => this.styles.info(ch.scaleIdx)); - return values.join(', '); - } - return ''; - } - - async render() { - let { submitted, size } = this.state; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let output = await this.format(); - let help = await this.error() || await this.hint(); - let body = await this.renderChoices(); - let footer = await this.footer(); - - if (output || !help) prompt += ' ' + output; - if (help && !prompt.includes(help)) prompt += ' ' + help; - - if (submitted && !output && !body && this.multiple && this.type !== 'form') { - prompt += this.styles.danger(this.emptyError); - } - - this.clear(size); - this.write([prompt, header, body, footer].filter(Boolean).join('\n')); - this.restore(); - } - - submit() { - this.value = {}; - for (let choice of this.choices) { - this.value[choice.name] = choice.scaleIdx; - } - return this.base.submit.call(this); - } -} - -function createScale(n, options = {}) { - if (Array.isArray(options.scale)) { - return options.scale.map(ele => ({ ...ele })); - } - let scale = []; - for (let i = 1; i < n + 1; i++) scale.push({ i, selected: false }); - return scale; -} - -module.exports = Survey; diff --git a/node_modules/enquirer/lib/prompts/text.js b/node_modules/enquirer/lib/prompts/text.js deleted file mode 100644 index 556e1db44..000000000 --- a/node_modules/enquirer/lib/prompts/text.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./input'); diff --git a/node_modules/enquirer/lib/prompts/toggle.js b/node_modules/enquirer/lib/prompts/toggle.js deleted file mode 100644 index 26d33945e..000000000 --- a/node_modules/enquirer/lib/prompts/toggle.js +++ /dev/null @@ -1,109 +0,0 @@ -'use strict'; - -const BooleanPrompt = require('../types/boolean'); - -class TogglePrompt extends BooleanPrompt { - async initialize() { - await super.initialize(); - this.value = this.initial = !!this.options.initial; - this.disabled = this.options.disabled || 'no'; - this.enabled = this.options.enabled || 'yes'; - await this.render(); - } - - reset() { - this.value = this.initial; - this.render(); - } - - delete() { - this.alert(); - } - - toggle() { - this.value = !this.value; - this.render(); - } - - enable() { - if (this.value === true) return this.alert(); - this.value = true; - this.render(); - } - disable() { - if (this.value === false) return this.alert(); - this.value = false; - this.render(); - } - - up() { - this.toggle(); - } - down() { - this.toggle(); - } - right() { - this.toggle(); - } - left() { - this.toggle(); - } - next() { - this.toggle(); - } - prev() { - this.toggle(); - } - - dispatch(ch = '', key) { - switch (ch.toLowerCase()) { - case ' ': - return this.toggle(); - case '1': - case 'y': - case 't': - return this.enable(); - case '0': - case 'n': - case 'f': - return this.disable(); - default: { - return this.alert(); - } - } - } - - format() { - let active = str => this.styles.primary.underline(str); - let value = [ - this.value ? this.disabled : active(this.disabled), - this.value ? active(this.enabled) : this.enabled - ]; - return value.join(this.styles.muted(' / ')); - } - - async render() { - let { size } = this.state; - - let header = await this.header(); - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - let prompt = [prefix, message, separator, output].join(' '); - this.state.prompt = prompt; - - if (help && !prompt.includes(help)) prompt += ' ' + help; - - this.clear(size); - this.write([header, prompt, footer].filter(Boolean).join('\n')); - this.write(this.margin[2]); - this.restore(); - } -} - -module.exports = TogglePrompt; diff --git a/node_modules/enquirer/lib/render.js b/node_modules/enquirer/lib/render.js deleted file mode 100644 index 6a6df4a24..000000000 --- a/node_modules/enquirer/lib/render.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -module.exports = async(value, prompt, context = {}) => { - let { choices, multiple } = prompt.options; - let { size, submitted } = prompt.state; - - let prefix = context.prefix || await prompt.prefix(); - let separator = context.separator || await prompt.separator(); - let message = context.message || await prompt.message(); - - // ? Select your favorite colors > - // ^ ^ ^ - // prefix message separator - let promptLine = [prefix, message, separator].filter(Boolean).join(' '); - prompt.state.prompt = promptLine; - - let header = context.header || await prompt.header(); - let output = context.format || await prompt.format(value); - let help = context.help || await prompt.error() || await prompt.hint(); - let body = context.body || await prompt.body(); - let footer = context.footer || await prompt.footer(); - - if (output || !help) promptLine += ' ' + output; - if (help && !promptLine.includes(help)) promptLine += ' ' + help; - - if (submitted && choices && multiple && !output && !body) { - promptLine += prompt.styles.danger('No items were selected'); - } - - prompt.clear(size); - prompt.write([header, promptLine, body, footer].filter(Boolean).join('\n')); - prompt.restore(); -}; diff --git a/node_modules/enquirer/lib/roles.js b/node_modules/enquirer/lib/roles.js deleted file mode 100644 index 1d663d22d..000000000 --- a/node_modules/enquirer/lib/roles.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const roles = { - default(prompt, choice) { - return choice; - }, - checkbox(prompt, choice) { - throw new Error('checkbox role is not implemented yet'); - }, - editable(prompt, choice) { - throw new Error('editable role is not implemented yet'); - }, - expandable(prompt, choice) { - throw new Error('expandable role is not implemented yet'); - }, - heading(prompt, choice) { - choice.disabled = ''; - choice.indicator = [choice.indicator, ' '].find(v => v != null); - choice.message = choice.message || ''; - return choice; - }, - input(prompt, choice) { - throw new Error('input role is not implemented yet'); - }, - option(prompt, choice) { - return roles.default(prompt, choice); - }, - radio(prompt, choice) { - throw new Error('radio role is not implemented yet'); - }, - separator(prompt, choice) { - choice.disabled = ''; - choice.indicator = [choice.indicator, ' '].find(v => v != null); - choice.message = choice.message || prompt.symbols.line.repeat(5); - return choice; - }, - spacer(prompt, choice) { - return choice; - } -}; - -module.exports = (name, options = {}) => { - let role = utils.merge({}, roles, options.roles); - return role[name] || role.default; -}; diff --git a/node_modules/enquirer/lib/state.js b/node_modules/enquirer/lib/state.js deleted file mode 100644 index 501890b8e..000000000 --- a/node_modules/enquirer/lib/state.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -const { define, width } = require('./utils'); - -class State { - constructor(prompt) { - let options = prompt.options; - define(this, '_prompt', prompt); - this.type = prompt.type; - this.name = prompt.name; - this.message = ''; - this.header = ''; - this.footer = ''; - this.error = ''; - this.hint = ''; - this.input = ''; - this.cursor = 0; - this.index = 0; - this.lines = 0; - this.tick = 0; - this.prompt = ''; - this.buffer = ''; - this.width = width(options.stdout || process.stdout); - Object.assign(this, options); - this.name = this.name || this.message; - this.message = this.message || this.name; - this.symbols = prompt.symbols; - this.styles = prompt.styles; - this.required = new Set(); - this.cancelled = false; - this.submitted = false; - } - - clone() { - let state = { ...this }; - state.status = this.status; - state.buffer = Buffer.from(state.buffer); - delete state.clone; - return state; - } - - set color(val) { - this._color = val; - } - get color() { - let styles = this.prompt.styles; - if (this.cancelled) return styles.cancelled; - if (this.submitted) return styles.submitted; - let color = this._color || styles[this.status]; - return typeof color === 'function' ? color : styles.pending; - } - - set loading(value) { - this._loading = value; - } - get loading() { - if (typeof this._loading === 'boolean') return this._loading; - if (this.loadingChoices) return 'choices'; - return false; - } - - get status() { - if (this.cancelled) return 'cancelled'; - if (this.submitted) return 'submitted'; - return 'pending'; - } -} - -module.exports = State; diff --git a/node_modules/enquirer/lib/styles.js b/node_modules/enquirer/lib/styles.js deleted file mode 100644 index 0a177f429..000000000 --- a/node_modules/enquirer/lib/styles.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict'; - -const utils = require('./utils'); -const colors = require('ansi-colors'); - -const styles = { - default: colors.noop, - noop: colors.noop, - - /** - * Modifiers - */ - - set inverse(custom) { - this._inverse = custom; - }, - get inverse() { - return this._inverse || utils.inverse(this.primary); - }, - - set complement(custom) { - this._complement = custom; - }, - get complement() { - return this._complement || utils.complement(this.primary); - }, - - /** - * Main color - */ - - primary: colors.cyan, - - /** - * Main palette - */ - - success: colors.green, - danger: colors.magenta, - strong: colors.bold, - warning: colors.yellow, - muted: colors.dim, - disabled: colors.gray, - dark: colors.dim.gray, - underline: colors.underline, - - set info(custom) { - this._info = custom; - }, - get info() { - return this._info || this.primary; - }, - - set em(custom) { - this._em = custom; - }, - get em() { - return this._em || this.primary.underline; - }, - - set heading(custom) { - this._heading = custom; - }, - get heading() { - return this._heading || this.muted.underline; - }, - - /** - * Statuses - */ - - set pending(custom) { - this._pending = custom; - }, - get pending() { - return this._pending || this.primary; - }, - - set submitted(custom) { - this._submitted = custom; - }, - get submitted() { - return this._submitted || this.success; - }, - - set cancelled(custom) { - this._cancelled = custom; - }, - get cancelled() { - return this._cancelled || this.danger; - }, - - /** - * Special styling - */ - - set typing(custom) { - this._typing = custom; - }, - get typing() { - return this._typing || this.dim; - }, - - set placeholder(custom) { - this._placeholder = custom; - }, - get placeholder() { - return this._placeholder || this.primary.dim; - }, - - set highlight(custom) { - this._highlight = custom; - }, - get highlight() { - return this._highlight || this.inverse; - } -}; - -styles.merge = (options = {}) => { - if (options.styles && typeof options.styles.enabled === 'boolean') { - colors.enabled = options.styles.enabled; - } - if (options.styles && typeof options.styles.visible === 'boolean') { - colors.visible = options.styles.visible; - } - - let result = utils.merge({}, styles, options.styles); - delete result.merge; - - for (let key of Object.keys(colors)) { - if (!result.hasOwnProperty(key)) { - Reflect.defineProperty(result, key, { get: () => colors[key] }); - } - } - - for (let key of Object.keys(colors.styles)) { - if (!result.hasOwnProperty(key)) { - Reflect.defineProperty(result, key, { get: () => colors[key] }); - } - } - return result; -}; - -module.exports = styles; diff --git a/node_modules/enquirer/lib/symbols.js b/node_modules/enquirer/lib/symbols.js deleted file mode 100644 index 16adb8690..000000000 --- a/node_modules/enquirer/lib/symbols.js +++ /dev/null @@ -1,66 +0,0 @@ -'use strict'; - -const isWindows = process.platform === 'win32'; -const colors = require('ansi-colors'); -const utils = require('./utils'); - -const symbols = { - ...colors.symbols, - upDownDoubleArrow: '⇕', - upDownDoubleArrow2: '⬍', - upDownArrow: '↕', - asterisk: '*', - asterism: '⁂', - bulletWhite: '◦', - electricArrow: '⌁', - ellipsisLarge: '⋯', - ellipsisSmall: '…', - fullBlock: '█', - identicalTo: '≡', - indicator: colors.symbols.check, - leftAngle: '‹', - mark: '※', - minus: '−', - multiplication: '×', - obelus: '÷', - percent: '%', - pilcrow: '¶', - pilcrow2: '❡', - pencilUpRight: '✐', - pencilDownRight: '✎', - pencilRight: '✏', - plus: '+', - plusMinus: '±', - pointRight: '☞', - rightAngle: '›', - section: '§', - hexagon: { off: '⬡', on: '⬢', disabled: '⬢' }, - ballot: { on: '☑', off: '☐', disabled: '☒' }, - stars: { on: '★', off: '☆', disabled: '☆' }, - folder: { on: '▼', off: '▶', disabled: '▶' }, - prefix: { - pending: colors.symbols.question, - submitted: colors.symbols.check, - cancelled: colors.symbols.cross - }, - separator: { - pending: colors.symbols.pointerSmall, - submitted: colors.symbols.middot, - cancelled: colors.symbols.middot - }, - radio: { - off: isWindows ? '( )' : '◯', - on: isWindows ? '(*)' : '◉', - disabled: isWindows ? '(|)' : 'Ⓘ' - }, - numbers: ['⓪', '①', '②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⑪', '⑫', '⑬', '⑭', '⑮', '⑯', '⑰', '⑱', '⑲', '⑳', '㉑', '㉒', '㉓', '㉔', '㉕', '㉖', '㉗', '㉘', '㉙', '㉚', '㉛', '㉜', '㉝', '㉞', '㉟', '㊱', '㊲', '㊳', '㊴', '㊵', '㊶', '㊷', '㊸', '㊹', '㊺', '㊻', '㊼', '㊽', '㊾', '㊿'] -}; - -symbols.merge = options => { - let result = utils.merge({}, colors.symbols, symbols, options.symbols); - delete result.merge; - return result; -}; - -module.exports = symbols; - diff --git a/node_modules/enquirer/lib/theme.js b/node_modules/enquirer/lib/theme.js deleted file mode 100644 index f9c642ac5..000000000 --- a/node_modules/enquirer/lib/theme.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -const styles = require('./styles'); -const symbols = require('./symbols'); -const utils = require('./utils'); - -module.exports = prompt => { - prompt.options = utils.merge({}, prompt.options.theme, prompt.options); - prompt.symbols = symbols.merge(prompt.options); - prompt.styles = styles.merge(prompt.options); -}; diff --git a/node_modules/enquirer/lib/timer.js b/node_modules/enquirer/lib/timer.js deleted file mode 100644 index 564998b3a..000000000 --- a/node_modules/enquirer/lib/timer.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -module.exports = prompt => { - prompt.timers = prompt.timers || {}; - - let timers = prompt.options.timers; - if (!timers) return; - - for (let key of Object.keys(timers)) { - let opts = timers[key]; - if (typeof opts === 'number') { - opts = { interval: opts }; - } - create(prompt, key, opts); - } -}; - -function create(prompt, name, options = {}) { - let timer = prompt.timers[name] = { name, start: Date.now(), ms: 0, tick: 0 }; - let ms = options.interval || 120; - timer.frames = options.frames || []; - timer.loading = true; - - let interval = setInterval(() => { - timer.ms = Date.now() - timer.start; - timer.tick++; - prompt.render(); - }, ms); - - timer.stop = () => { - timer.loading = false; - clearInterval(interval); - }; - - Reflect.defineProperty(timer, 'interval', { value: interval }); - prompt.once('close', () => timer.stop()); - return timer.stop; -} diff --git a/node_modules/enquirer/lib/types/array.js b/node_modules/enquirer/lib/types/array.js deleted file mode 100644 index 0a522cb20..000000000 --- a/node_modules/enquirer/lib/types/array.js +++ /dev/null @@ -1,658 +0,0 @@ -'use strict'; - -const colors = require('ansi-colors'); -const Prompt = require('../prompt'); -const roles = require('../roles'); -const utils = require('../utils'); -const { reorder, scrollUp, scrollDown, isObject, swap } = utils; - -class ArrayPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - this.maxSelected = options.maxSelected || Infinity; - this.multiple = options.multiple || false; - this.initial = options.initial || 0; - this.delay = options.delay || 0; - this.longest = 0; - this.num = ''; - } - - async initialize() { - if (typeof this.options.initial === 'function') { - this.initial = await this.options.initial.call(this); - } - await this.reset(true); - await super.initialize(); - } - - async reset() { - let { choices, initial, autofocus, suggest } = this.options; - this.state._choices = []; - this.state.choices = []; - - this.choices = await Promise.all(await this.toChoices(choices)); - this.choices.forEach(ch => (ch.enabled = false)); - - if (typeof suggest !== 'function' && this.selectable.length === 0) { - throw new Error('At least one choice must be selectable'); - } - - if (isObject(initial)) initial = Object.keys(initial); - if (Array.isArray(initial)) { - if (autofocus != null) this.index = this.findIndex(autofocus); - initial.forEach(v => this.enable(this.find(v))); - await this.render(); - } else { - if (autofocus != null) initial = autofocus; - if (typeof initial === 'string') initial = this.findIndex(initial); - if (typeof initial === 'number' && initial > -1) { - this.index = Math.max(0, Math.min(initial, this.choices.length)); - this.enable(this.find(this.index)); - } - } - - if (this.isDisabled(this.focused)) { - await this.down(); - } - } - - async toChoices(value, parent) { - this.state.loadingChoices = true; - let choices = []; - let index = 0; - - let toChoices = async(items, parent) => { - if (typeof items === 'function') items = await items.call(this); - if (items instanceof Promise) items = await items; - - for (let i = 0; i < items.length; i++) { - let choice = items[i] = await this.toChoice(items[i], index++, parent); - choices.push(choice); - - if (choice.choices) { - await toChoices(choice.choices, choice); - } - } - return choices; - }; - - return toChoices(value, parent) - .then(choices => { - this.state.loadingChoices = false; - return choices; - }); - } - - async toChoice(ele, i, parent) { - if (typeof ele === 'function') ele = await ele.call(this, this); - if (ele instanceof Promise) ele = await ele; - if (typeof ele === 'string') ele = { name: ele }; - - if (ele.normalized) return ele; - ele.normalized = true; - - let origVal = ele.value; - let role = roles(ele.role, this.options); - ele = role(this, ele); - - if (typeof ele.disabled === 'string' && !ele.hint) { - ele.hint = ele.disabled; - ele.disabled = true; - } - - if (ele.disabled === true && ele.hint == null) { - ele.hint = '(disabled)'; - } - - // if the choice was already normalized, return it - if (ele.index != null) return ele; - ele.name = ele.name || ele.key || ele.title || ele.value || ele.message; - ele.message = ele.message || ele.name || ''; - ele.value = [ele.value, ele.name].find(this.isValue.bind(this)); - - ele.input = ''; - ele.index = i; - ele.cursor = 0; - - utils.define(ele, 'parent', parent); - ele.level = parent ? parent.level + 1 : 1; - if (ele.indent == null) { - ele.indent = parent ? parent.indent + ' ' : (ele.indent || ''); - } - - ele.path = parent ? parent.path + '.' + ele.name : ele.name; - ele.enabled = !!(this.multiple && !this.isDisabled(ele) && (ele.enabled || this.isSelected(ele))); - - if (!this.isDisabled(ele)) { - this.longest = Math.max(this.longest, colors.unstyle(ele.message).length); - } - - // shallow clone the choice first - let choice = { ...ele }; - - // then allow the choice to be reset using the "original" values - ele.reset = (input = choice.input, value = choice.value) => { - for (let key of Object.keys(choice)) ele[key] = choice[key]; - ele.input = input; - ele.value = value; - }; - - if (origVal == null && typeof ele.initial === 'function') { - ele.input = await ele.initial.call(this, this.state, ele, i); - } - - return ele; - } - - async onChoice(choice, i) { - this.emit('choice', choice, i, this); - - if (typeof choice.onChoice === 'function') { - await choice.onChoice.call(this, this.state, choice, i); - } - } - - async addChoice(ele, i, parent) { - let choice = await this.toChoice(ele, i, parent); - this.choices.push(choice); - this.index = this.choices.length - 1; - this.limit = this.choices.length; - return choice; - } - - async newItem(item, i, parent) { - let ele = { name: 'New choice name?', editable: true, newChoice: true, ...item }; - let choice = await this.addChoice(ele, i, parent); - - choice.updateChoice = () => { - delete choice.newChoice; - choice.name = choice.message = choice.input; - choice.input = ''; - choice.cursor = 0; - }; - - return this.render(); - } - - indent(choice) { - if (choice.indent == null) { - return choice.level > 1 ? ' '.repeat(choice.level - 1) : ''; - } - return choice.indent; - } - - dispatch(s, key) { - if (this.multiple && this[key.name]) return this[key.name](); - this.alert(); - } - - focus(choice, enabled) { - if (typeof enabled !== 'boolean') enabled = choice.enabled; - if (enabled && !choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - this.index = choice.index; - choice.enabled = enabled && !this.isDisabled(choice); - return choice; - } - - space() { - if (!this.multiple) return this.alert(); - this.toggle(this.focused); - return this.render(); - } - - a() { - if (this.maxSelected < this.choices.length) return this.alert(); - let enabled = this.selectable.every(ch => ch.enabled); - this.choices.forEach(ch => (ch.enabled = !enabled)); - return this.render(); - } - - i() { - // don't allow choices to be inverted if it will result in - // more than the maximum number of allowed selected items. - if (this.choices.length - this.selected.length > this.maxSelected) { - return this.alert(); - } - this.choices.forEach(ch => (ch.enabled = !ch.enabled)); - return this.render(); - } - - g(choice = this.focused) { - if (!this.choices.some(ch => !!ch.parent)) return this.a(); - this.toggle((choice.parent && !choice.choices) ? choice.parent : choice); - return this.render(); - } - - toggle(choice, enabled) { - if (!choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - - if (typeof enabled !== 'boolean') enabled = !choice.enabled; - choice.enabled = enabled; - - if (choice.choices) { - choice.choices.forEach(ch => this.toggle(ch, enabled)); - } - - let parent = choice.parent; - while (parent) { - let choices = parent.choices.filter(ch => this.isDisabled(ch)); - parent.enabled = choices.every(ch => ch.enabled === true); - parent = parent.parent; - } - - reset(this, this.choices); - this.emit('toggle', choice, this); - return choice; - } - - enable(choice) { - if (this.selected.length >= this.maxSelected) return this.alert(); - choice.enabled = !this.isDisabled(choice); - choice.choices && choice.choices.forEach(this.enable.bind(this)); - return choice; - } - - disable(choice) { - choice.enabled = false; - choice.choices && choice.choices.forEach(this.disable.bind(this)); - return choice; - } - - number(n) { - this.num += n; - - let number = num => { - let i = Number(num); - if (i > this.choices.length - 1) return this.alert(); - - let focused = this.focused; - let choice = this.choices.find(ch => i === ch.index); - - if (!choice.enabled && this.selected.length >= this.maxSelected) { - return this.alert(); - } - - if (this.visible.indexOf(choice) === -1) { - let choices = reorder(this.choices); - let actualIdx = choices.indexOf(choice); - - if (focused.index > actualIdx) { - let start = choices.slice(actualIdx, actualIdx + this.limit); - let end = choices.filter(ch => !start.includes(ch)); - this.choices = start.concat(end); - } else { - let pos = actualIdx - this.limit + 1; - this.choices = choices.slice(pos).concat(choices.slice(0, pos)); - } - } - - this.index = this.choices.indexOf(choice); - this.toggle(this.focused); - return this.render(); - }; - - clearTimeout(this.numberTimeout); - - return new Promise(resolve => { - let len = this.choices.length; - let num = this.num; - - let handle = (val = false, res) => { - clearTimeout(this.numberTimeout); - if (val) res = number(num); - this.num = ''; - resolve(res); - }; - - if (num === '0' || (num.length === 1 && Number(num + '0') > len)) { - return handle(true); - } - - if (Number(num) > len) { - return handle(false, this.alert()); - } - - this.numberTimeout = setTimeout(() => handle(true), this.delay); - }); - } - - home() { - this.choices = reorder(this.choices); - this.index = 0; - return this.render(); - } - - end() { - let pos = this.choices.length - this.limit; - let choices = reorder(this.choices); - this.choices = choices.slice(pos).concat(choices.slice(0, pos)); - this.index = this.limit - 1; - return this.render(); - } - - first() { - this.index = 0; - return this.render(); - } - - last() { - this.index = this.visible.length - 1; - return this.render(); - } - - prev() { - if (this.visible.length <= 1) return this.alert(); - return this.up(); - } - - next() { - if (this.visible.length <= 1) return this.alert(); - return this.down(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.cursor++; - return this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.cursor--; - return this.render(); - } - - up() { - let len = this.choices.length; - let vis = this.visible.length; - let idx = this.index; - if (this.options.scroll === false && idx === 0) { - return this.alert(); - } - if (len > vis && idx === 0) { - return this.scrollUp(); - } - this.index = ((idx - 1 % len) + len) % len; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - down() { - let len = this.choices.length; - let vis = this.visible.length; - let idx = this.index; - if (this.options.scroll === false && idx === vis - 1) { - return this.alert(); - } - if (len > vis && idx === vis - 1) { - return this.scrollDown(); - } - this.index = (idx + 1) % len; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - scrollUp(i = 0) { - this.choices = scrollUp(this.choices); - this.index = i; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - scrollDown(i = this.visible.length - 1) { - this.choices = scrollDown(this.choices); - this.index = i; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - async shiftUp() { - if (this.options.sort === true) { - this.sorting = true; - this.swap(this.index - 1); - await this.up(); - this.sorting = false; - return; - } - return this.scrollUp(this.index); - } - - async shiftDown() { - if (this.options.sort === true) { - this.sorting = true; - this.swap(this.index + 1); - await this.down(); - this.sorting = false; - return; - } - return this.scrollDown(this.index); - } - - pageUp() { - if (this.visible.length <= 1) return this.alert(); - this.limit = Math.max(this.limit - 1, 0); - this.index = Math.min(this.limit - 1, this.index); - this._limit = this.limit; - if (this.isDisabled()) { - return this.up(); - } - return this.render(); - } - - pageDown() { - if (this.visible.length >= this.choices.length) return this.alert(); - this.index = Math.max(0, this.index); - this.limit = Math.min(this.limit + 1, this.choices.length); - this._limit = this.limit; - if (this.isDisabled()) { - return this.down(); - } - return this.render(); - } - - swap(pos) { - swap(this.choices, this.index, pos); - } - - isDisabled(choice = this.focused) { - let keys = ['disabled', 'collapsed', 'hidden', 'completing', 'readonly']; - if (choice && keys.some(key => choice[key] === true)) { - return true; - } - return choice && choice.role === 'heading'; - } - - isEnabled(choice = this.focused) { - if (Array.isArray(choice)) return choice.every(ch => this.isEnabled(ch)); - if (choice.choices) { - let choices = choice.choices.filter(ch => !this.isDisabled(ch)); - return choice.enabled && choices.every(ch => this.isEnabled(ch)); - } - return choice.enabled && !this.isDisabled(choice); - } - - isChoice(choice, value) { - return choice.name === value || choice.index === Number(value); - } - - isSelected(choice) { - if (Array.isArray(this.initial)) { - return this.initial.some(value => this.isChoice(choice, value)); - } - return this.isChoice(choice, this.initial); - } - - map(names = [], prop = 'value') { - return [].concat(names || []).reduce((acc, name) => { - acc[name] = this.find(name, prop); - return acc; - }, {}); - } - - filter(value, prop) { - let isChoice = (ele, i) => [ele.name, i].includes(value); - let fn = typeof value === 'function' ? value : isChoice; - let choices = this.options.multiple ? this.state._choices : this.choices; - let result = choices.filter(fn); - if (prop) { - return result.map(ch => ch[prop]); - } - return result; - } - - find(value, prop) { - if (isObject(value)) return prop ? value[prop] : value; - let isChoice = (ele, i) => [ele.name, i].includes(value); - let fn = typeof value === 'function' ? value : isChoice; - let choice = this.choices.find(fn); - if (choice) { - return prop ? choice[prop] : choice; - } - } - - findIndex(value) { - return this.choices.indexOf(this.find(value)); - } - - async submit() { - let choice = this.focused; - if (!choice) return this.alert(); - - if (choice.newChoice) { - if (!choice.input) return this.alert(); - choice.updateChoice(); - return this.render(); - } - - if (this.choices.some(ch => ch.newChoice)) { - return this.alert(); - } - - let { reorder, sort } = this.options; - let multi = this.multiple === true; - let value = this.selected; - if (value === void 0) { - return this.alert(); - } - - // re-sort choices to original order - if (Array.isArray(value) && reorder !== false && sort !== true) { - value = utils.reorder(value); - } - - this.value = multi ? value.map(ch => ch.name) : value.name; - return super.submit(); - } - - set choices(choices = []) { - this.state._choices = this.state._choices || []; - this.state.choices = choices; - - for (let choice of choices) { - if (!this.state._choices.some(ch => ch.name === choice.name)) { - this.state._choices.push(choice); - } - } - - if (!this._initial && this.options.initial) { - this._initial = true; - let init = this.initial; - if (typeof init === 'string' || typeof init === 'number') { - let choice = this.find(init); - if (choice) { - this.initial = choice.index; - this.focus(choice, true); - } - } - } - } - get choices() { - return reset(this, this.state.choices || []); - } - - set visible(visible) { - this.state.visible = visible; - } - get visible() { - return (this.state.visible || this.choices).slice(0, this.limit); - } - - set limit(num) { - this.state.limit = num; - } - get limit() { - let { state, options, choices } = this; - let limit = state.limit || this._limit || options.limit || choices.length; - return Math.min(limit, this.height); - } - - set value(value) { - super.value = value; - } - get value() { - if (typeof super.value !== 'string' && super.value === this.initial) { - return this.input; - } - return super.value; - } - - set index(i) { - this.state.index = i; - } - get index() { - return Math.max(0, this.state ? this.state.index : 0); - } - - get enabled() { - return this.filter(this.isEnabled.bind(this)); - } - - get focused() { - let choice = this.choices[this.index]; - if (choice && this.state.submitted && this.multiple !== true) { - choice.enabled = true; - } - return choice; - } - - get selectable() { - return this.choices.filter(choice => !this.isDisabled(choice)); - } - - get selected() { - return this.multiple ? this.enabled : this.focused; - } -} - -function reset(prompt, choices) { - if (choices instanceof Promise) return choices; - if (typeof choices === 'function') { - if (utils.isAsyncFn(choices)) return choices; - choices = choices.call(prompt, prompt); - } - for (let choice of choices) { - if (Array.isArray(choice.choices)) { - let items = choice.choices.filter(ch => !prompt.isDisabled(ch)); - choice.enabled = items.every(ch => ch.enabled === true); - } - if (prompt.isDisabled(choice) === true) { - delete choice.enabled; - } - } - return choices; -} - -module.exports = ArrayPrompt; diff --git a/node_modules/enquirer/lib/types/auth.js b/node_modules/enquirer/lib/types/auth.js deleted file mode 100644 index c2c66fae9..000000000 --- a/node_modules/enquirer/lib/types/auth.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const FormPrompt = require('../prompts/form'); - -const defaultAuthenticate = () => { - throw new Error('expected prompt to have a custom authenticate method'); -}; - -const factory = (authenticate = defaultAuthenticate) => { - - class AuthPrompt extends FormPrompt { - constructor(options) { - super(options); - } - - async submit() { - this.value = await authenticate.call(this, this.values, this.state); - super.base.submit.call(this); - } - - static create(authenticate) { - return factory(authenticate); - } - } - - return AuthPrompt; -}; - -module.exports = factory(); diff --git a/node_modules/enquirer/lib/types/boolean.js b/node_modules/enquirer/lib/types/boolean.js deleted file mode 100644 index d3e7f3408..000000000 --- a/node_modules/enquirer/lib/types/boolean.js +++ /dev/null @@ -1,88 +0,0 @@ -'use strict'; - -const Prompt = require('../prompt'); -const { isPrimitive, hasColor } = require('../utils'); - -class BooleanPrompt extends Prompt { - constructor(options) { - super(options); - this.cursorHide(); - } - - async initialize() { - let initial = await this.resolve(this.initial, this.state); - this.input = await this.cast(initial); - await super.initialize(); - } - - dispatch(ch) { - if (!this.isValue(ch)) return this.alert(); - this.input = ch; - return this.submit(); - } - - format(value) { - let { styles, state } = this; - return !state.submitted ? styles.primary(value) : styles.success(value); - } - - cast(input) { - return this.isTrue(input); - } - - isTrue(input) { - return /^[ty1]/i.test(input); - } - - isFalse(input) { - return /^[fn0]/i.test(input); - } - - isValue(value) { - return isPrimitive(value) && (this.isTrue(value) || this.isFalse(value)); - } - - async hint() { - if (this.state.status === 'pending') { - let hint = await this.element('hint'); - if (!hasColor(hint)) { - return this.styles.muted(hint); - } - return hint; - } - } - - async render() { - let { input, size } = this.state; - - let prefix = await this.prefix(); - let sep = await this.separator(); - let msg = await this.message(); - let hint = this.styles.muted(this.default); - - let promptLine = [prefix, msg, hint, sep].filter(Boolean).join(' '); - this.state.prompt = promptLine; - - let header = await this.header(); - let value = this.value = this.cast(input); - let output = await this.format(value); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - if (help && !promptLine.includes(help)) output += ' ' + help; - promptLine += ' ' + output; - - this.clear(size); - this.write([header, promptLine, footer].filter(Boolean).join('\n')); - this.restore(); - } - - set value(value) { - super.value = value; - } - get value() { - return this.cast(super.value); - } -} - -module.exports = BooleanPrompt; diff --git a/node_modules/enquirer/lib/types/index.js b/node_modules/enquirer/lib/types/index.js deleted file mode 100644 index b3a2300d8..000000000 --- a/node_modules/enquirer/lib/types/index.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - ArrayPrompt: require('./array'), - AuthPrompt: require('./auth'), - BooleanPrompt: require('./boolean'), - NumberPrompt: require('./number'), - StringPrompt: require('./string') -}; diff --git a/node_modules/enquirer/lib/types/number.js b/node_modules/enquirer/lib/types/number.js deleted file mode 100644 index 199a7c99a..000000000 --- a/node_modules/enquirer/lib/types/number.js +++ /dev/null @@ -1,86 +0,0 @@ -'use strict'; - -const StringPrompt = require('./string'); - -class NumberPrompt extends StringPrompt { - constructor(options = {}) { - super({ style: 'number', ...options }); - this.min = this.isValue(options.min) ? this.toNumber(options.min) : -Infinity; - this.max = this.isValue(options.max) ? this.toNumber(options.max) : Infinity; - this.delay = options.delay != null ? options.delay : 1000; - this.float = options.float !== false; - this.round = options.round === true || options.float === false; - this.major = options.major || 10; - this.minor = options.minor || 1; - this.initial = options.initial != null ? options.initial : ''; - this.input = String(this.initial); - this.cursor = this.input.length; - this.cursorShow(); - } - - append(ch) { - if (!/[-+.]/.test(ch) || (ch === '.' && this.input.includes('.'))) { - return this.alert('invalid number'); - } - return super.append(ch); - } - - number(ch) { - return super.append(ch); - } - - next() { - if (this.input && this.input !== this.initial) return this.alert(); - if (!this.isValue(this.initial)) return this.alert(); - this.input = this.initial; - this.cursor = String(this.initial).length; - return this.render(); - } - - up(number) { - let step = number || this.minor; - let num = this.toNumber(this.input); - if (num > this.max + step) return this.alert(); - this.input = `${num + step}`; - return this.render(); - } - - down(number) { - let step = number || this.minor; - let num = this.toNumber(this.input); - if (num < this.min - step) return this.alert(); - this.input = `${num - step}`; - return this.render(); - } - - shiftDown() { - return this.down(this.major); - } - - shiftUp() { - return this.up(this.major); - } - - format(input = this.input) { - if (typeof this.options.format === 'function') { - return this.options.format.call(this, input); - } - return this.styles.info(input); - } - - toNumber(value = '') { - return this.float ? +value : Math.round(+value); - } - - isValue(value) { - return /^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(value); - } - - submit() { - let value = [this.input, this.initial].find(v => this.isValue(v)); - this.value = this.toNumber(value || 0); - return super.submit(); - } -} - -module.exports = NumberPrompt; diff --git a/node_modules/enquirer/lib/types/string.js b/node_modules/enquirer/lib/types/string.js deleted file mode 100644 index d4e0ce9ad..000000000 --- a/node_modules/enquirer/lib/types/string.js +++ /dev/null @@ -1,185 +0,0 @@ -'use strict'; - -const Prompt = require('../prompt'); -const placeholder = require('../placeholder'); -const { isPrimitive } = require('../utils'); - -class StringPrompt extends Prompt { - constructor(options) { - super(options); - this.initial = isPrimitive(this.initial) ? String(this.initial) : ''; - if (this.initial) this.cursorHide(); - this.state.prevCursor = 0; - this.state.clipboard = []; - } - - async keypress(input, key = {}) { - let prev = this.state.prevKeypress; - this.state.prevKeypress = key; - if (this.options.multiline === true && key.name === 'return') { - if (!prev || prev.name !== 'return') { - return this.append('\n', key); - } - } - return super.keypress(input, key); - } - - moveCursor(n) { - this.cursor += n; - } - - reset() { - this.input = this.value = ''; - this.cursor = 0; - return this.render(); - } - - dispatch(ch, key) { - if (!ch || key.ctrl || key.code) return this.alert(); - this.append(ch); - } - - append(ch) { - let { cursor, input } = this.state; - this.input = `${input}`.slice(0, cursor) + ch + `${input}`.slice(cursor); - this.moveCursor(String(ch).length); - this.render(); - } - - insert(str) { - this.append(str); - } - - delete() { - let { cursor, input } = this.state; - if (cursor <= 0) return this.alert(); - this.input = `${input}`.slice(0, cursor - 1) + `${input}`.slice(cursor); - this.moveCursor(-1); - this.render(); - } - - deleteForward() { - let { cursor, input } = this.state; - if (input[cursor] === void 0) return this.alert(); - this.input = `${input}`.slice(0, cursor) + `${input}`.slice(cursor + 1); - this.render(); - } - - cutForward() { - let pos = this.cursor; - if (this.input.length <= pos) return this.alert(); - this.state.clipboard.push(this.input.slice(pos)); - this.input = this.input.slice(0, pos); - this.render(); - } - - cutLeft() { - let pos = this.cursor; - if (pos === 0) return this.alert(); - let before = this.input.slice(0, pos); - let after = this.input.slice(pos); - let words = before.split(' '); - this.state.clipboard.push(words.pop()); - this.input = words.join(' '); - this.cursor = this.input.length; - this.input += after; - this.render(); - } - - paste() { - if (!this.state.clipboard.length) return this.alert(); - this.insert(this.state.clipboard.pop()); - this.render(); - } - - toggleCursor() { - if (this.state.prevCursor) { - this.cursor = this.state.prevCursor; - this.state.prevCursor = 0; - } else { - this.state.prevCursor = this.cursor; - this.cursor = 0; - } - this.render(); - } - - first() { - this.cursor = 0; - this.render(); - } - - last() { - this.cursor = this.input.length - 1; - this.render(); - } - - next() { - let init = this.initial != null ? String(this.initial) : ''; - if (!init || !init.startsWith(this.input)) return this.alert(); - this.input = this.initial; - this.cursor = this.initial.length; - this.render(); - } - - prev() { - if (!this.input) return this.alert(); - this.reset(); - } - - backward() { - return this.left(); - } - - forward() { - return this.right(); - } - - right() { - if (this.cursor >= this.input.length) return this.alert(); - this.moveCursor(1); - return this.render(); - } - - left() { - if (this.cursor <= 0) return this.alert(); - this.moveCursor(-1); - return this.render(); - } - - isValue(value) { - return !!value; - } - - async format(input = this.value) { - let initial = await this.resolve(this.initial, this.state); - if (!this.state.submitted) { - return placeholder(this, { input, initial, pos: this.cursor }); - } - return this.styles.submitted(input || initial); - } - - async render() { - let size = this.state.size; - - let prefix = await this.prefix(); - let separator = await this.separator(); - let message = await this.message(); - - let prompt = [prefix, message, separator].filter(Boolean).join(' '); - this.state.prompt = prompt; - - let header = await this.header(); - let output = await this.format(); - let help = (await this.error()) || (await this.hint()); - let footer = await this.footer(); - - if (help && !output.includes(help)) output += ' ' + help; - prompt += ' ' + output; - - this.clear(size); - this.write([header, prompt, footer].filter(Boolean).join('\n')); - this.restore(); - } -} - -module.exports = StringPrompt; diff --git a/node_modules/enquirer/lib/utils.js b/node_modules/enquirer/lib/utils.js deleted file mode 100644 index 7493c0d53..000000000 --- a/node_modules/enquirer/lib/utils.js +++ /dev/null @@ -1,268 +0,0 @@ -'use strict'; - -const toString = Object.prototype.toString; -const colors = require('ansi-colors'); -let called = false; -let fns = []; - -const complements = { - 'yellow': 'blue', - 'cyan': 'red', - 'green': 'magenta', - 'black': 'white', - 'blue': 'yellow', - 'red': 'cyan', - 'magenta': 'green', - 'white': 'black' -}; - -exports.longest = (arr, prop) => { - return arr.reduce((a, v) => Math.max(a, prop ? v[prop].length : v.length), 0); -}; - -exports.hasColor = str => !!str && colors.hasColor(str); - -const isObject = exports.isObject = val => { - return val !== null && typeof val === 'object' && !Array.isArray(val); -}; - -exports.nativeType = val => { - return toString.call(val).slice(8, -1).toLowerCase().replace(/\s/g, ''); -}; - -exports.isAsyncFn = val => { - return exports.nativeType(val) === 'asyncfunction'; -}; - -exports.isPrimitive = val => { - return val != null && typeof val !== 'object' && typeof val !== 'function'; -}; - -exports.resolve = (context, value, ...rest) => { - if (typeof value === 'function') { - return value.call(context, ...rest); - } - return value; -}; - -exports.scrollDown = (choices = []) => [...choices.slice(1), choices[0]]; -exports.scrollUp = (choices = []) => [choices.pop(), ...choices]; - -exports.reorder = (arr = []) => { - let res = arr.slice(); - res.sort((a, b) => { - if (a.index > b.index) return 1; - if (a.index < b.index) return -1; - return 0; - }); - return res; -}; - -exports.swap = (arr, index, pos) => { - let len = arr.length; - let idx = pos === len ? 0 : pos < 0 ? len - 1 : pos; - let choice = arr[index]; - arr[index] = arr[idx]; - arr[idx] = choice; -}; - -exports.width = (stream, fallback = 80) => { - let columns = (stream && stream.columns) ? stream.columns : fallback; - if (stream && typeof stream.getWindowSize === 'function') { - columns = stream.getWindowSize()[0]; - } - if (process.platform === 'win32') { - return columns - 1; - } - return columns; -}; - -exports.height = (stream, fallback = 20) => { - let rows = (stream && stream.rows) ? stream.rows : fallback; - if (stream && typeof stream.getWindowSize === 'function') { - rows = stream.getWindowSize()[1]; - } - return rows; -}; - -exports.wordWrap = (str, options = {}) => { - if (!str) return str; - - if (typeof options === 'number') { - options = { width: options }; - } - - let { indent = '', newline = ('\n' + indent), width = 80 } = options; - let spaces = (newline + indent).match(/[^\S\n]/g) || []; - width -= spaces.length; - let source = `.{1,${width}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`; - let output = str.trim(); - let regex = new RegExp(source, 'g'); - let lines = output.match(regex) || []; - lines = lines.map(line => line.replace(/\n$/, '')); - if (options.padEnd) lines = lines.map(line => line.padEnd(width, ' ')); - if (options.padStart) lines = lines.map(line => line.padStart(width, ' ')); - return indent + lines.join(newline); -}; - -exports.unmute = color => { - let name = color.stack.find(n => colors.keys.color.includes(n)); - if (name) { - return colors[name]; - } - let bg = color.stack.find(n => n.slice(2) === 'bg'); - if (bg) { - return colors[name.slice(2)]; - } - return str => str; -}; - -exports.pascal = str => str ? str[0].toUpperCase() + str.slice(1) : ''; - -exports.inverse = color => { - if (!color || !color.stack) return color; - let name = color.stack.find(n => colors.keys.color.includes(n)); - if (name) { - let col = colors['bg' + exports.pascal(name)]; - return col ? col.black : color; - } - let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); - if (bg) { - return colors[bg.slice(2).toLowerCase()] || color; - } - return colors.none; -}; - -exports.complement = color => { - if (!color || !color.stack) return color; - let name = color.stack.find(n => colors.keys.color.includes(n)); - let bg = color.stack.find(n => n.slice(0, 2) === 'bg'); - if (name && !bg) { - return colors[complements[name] || name]; - } - if (bg) { - let lower = bg.slice(2).toLowerCase(); - let comp = complements[lower]; - if (!comp) return color; - return colors['bg' + exports.pascal(comp)] || color; - } - return colors.none; -}; - -exports.meridiem = date => { - let hours = date.getHours(); - let minutes = date.getMinutes(); - let ampm = hours >= 12 ? 'pm' : 'am'; - hours = hours % 12; - let hrs = hours === 0 ? 12 : hours; - let min = minutes < 10 ? '0' + minutes : minutes; - return hrs + ':' + min + ' ' + ampm; -}; - -/** - * Set a value on the given object. - * @param {Object} obj - * @param {String} prop - * @param {any} value - */ - -exports.set = (obj = {}, prop = '', val) => { - return prop.split('.').reduce((acc, k, i, arr) => { - let value = arr.length - 1 > i ? (acc[k] || {}) : val; - if (!exports.isObject(value) && i < arr.length - 1) value = {}; - return (acc[k] = value); - }, obj); -}; - -/** - * Get a value from the given object. - * @param {Object} obj - * @param {String} prop - */ - -exports.get = (obj = {}, prop = '', fallback) => { - let value = obj[prop] == null - ? prop.split('.').reduce((acc, k) => acc && acc[k], obj) - : obj[prop]; - return value == null ? fallback : value; -}; - -exports.mixin = (target, b) => { - if (!isObject(target)) return b; - if (!isObject(b)) return target; - for (let key of Object.keys(b)) { - let desc = Object.getOwnPropertyDescriptor(b, key); - if (desc.hasOwnProperty('value')) { - if (target.hasOwnProperty(key) && isObject(desc.value)) { - let existing = Object.getOwnPropertyDescriptor(target, key); - if (isObject(existing.value)) { - target[key] = exports.merge({}, target[key], b[key]); - } else { - Reflect.defineProperty(target, key, desc); - } - } else { - Reflect.defineProperty(target, key, desc); - } - } else { - Reflect.defineProperty(target, key, desc); - } - } - return target; -}; - -exports.merge = (...args) => { - let target = {}; - for (let ele of args) exports.mixin(target, ele); - return target; -}; - -exports.mixinEmitter = (obj, emitter) => { - let proto = emitter.constructor.prototype; - for (let key of Object.keys(proto)) { - let val = proto[key]; - if (typeof val === 'function') { - exports.define(obj, key, val.bind(emitter)); - } else { - exports.define(obj, key, val); - } - } -}; - -exports.onExit = callback => { - const onExit = (quit, code) => { - if (called) return; - - called = true; - fns.forEach(fn => fn()); - - if (quit === true) { - process.exit(128 + code); - } - }; - - if (fns.length === 0) { - process.once('SIGTERM', onExit.bind(null, true, 15)); - process.once('SIGINT', onExit.bind(null, true, 2)); - process.once('exit', onExit); - } - - fns.push(callback); -}; - -exports.define = (obj, key, value) => { - Reflect.defineProperty(obj, key, { value }); -}; - -exports.defineExport = (obj, key, fn) => { - let custom; - Reflect.defineProperty(obj, key, { - enumerable: true, - configurable: true, - set(val) { - custom = val; - }, - get() { - return custom ? custom() : fn(); - } - }); -}; diff --git a/node_modules/enquirer/package.json b/node_modules/enquirer/package.json deleted file mode 100644 index 69e5c0e86..000000000 --- a/node_modules/enquirer/package.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "_from": "enquirer@^2.3.5", - "_id": "enquirer@2.3.6", - "_inBundle": false, - "_integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "_location": "/enquirer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "enquirer@^2.3.5", - "name": "enquirer", - "escapedName": "enquirer", - "rawSpec": "^2.3.5", - "saveSpec": null, - "fetchSpec": "^2.3.5" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "_shasum": "2a7fe5dd634a1e4125a975ec994ff5456dc3734d", - "_spec": "enquirer@^2.3.5", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, - "bugs": { - "url": "https://github.com/enquirer/enquirer/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } - ], - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "deprecated": false, - "description": "Stylish, intuitive and user-friendly prompt system. Fast and lightweight enough for small projects, powerful and extensible enough for the most advanced use cases.", - "devDependencies": { - "@types/node": "^8", - "gulp-format-md": "^2.0.0", - "inquirer": "^6.2.0", - "mocha": "^5.2.0", - "nyc": "^13.1.0", - "prompts": "^1.2.1", - "time-require": "github:jonschlinkert/time-require", - "typescript": "^3.1.6" - }, - "engines": { - "node": ">=8.6" - }, - "files": [ - "index.js", - "index.d.ts", - "lib" - ], - "homepage": "https://github.com/enquirer/enquirer", - "keywords": [ - "answer", - "answers", - "ask", - "base", - "cli", - "command", - "command-line", - "confirm", - "enquirer", - "generator", - "generate", - "hyper", - "input", - "inquire", - "inquirer", - "interface", - "iterm", - "javascript", - "node", - "nodejs", - "prompt", - "prompts", - "promptly", - "question", - "readline", - "scaffold", - "scaffolding", - "scaffolder", - "stdin", - "stdout", - "terminal", - "tty", - "ui", - "yeoman", - "yo", - "zsh" - ], - "license": "MIT", - "lintDeps": { - "devDependencies": { - "files": { - "patterns": [ - "examples/**/*.js", - "perf/*.js", - "recipes/*.js" - ] - } - } - }, - "main": "index.js", - "name": "enquirer", - "repository": { - "type": "git", - "url": "git+https://github.com/enquirer/enquirer.git" - }, - "scripts": { - "cover": "nyc --reporter=text --reporter=html mocha", - "test": "mocha && tsc -p ./test/types" - }, - "verb": { - "toc": false, - "layout": false, - "tasks": [ - "readme" - ], - "plugins": [ - "gulp-format-md" - ], - "helpers": [ - "./docs/helpers.js" - ], - "lint": { - "reflinks": true - }, - "reflinks": [ - "inquirer", - "prompt-skeleton" - ] - }, - "version": "2.3.6" -} diff --git a/node_modules/escodegen/node_modules/estraverse/.jshintrc b/node_modules/escodegen/node_modules/estraverse/.jshintrc deleted file mode 100644 index f642dae76..000000000 --- a/node_modules/escodegen/node_modules/estraverse/.jshintrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "curly": true, - "eqeqeq": true, - "immed": true, - "eqnull": true, - "latedef": true, - "noarg": true, - "noempty": true, - "quotmark": "single", - "undef": true, - "unused": true, - "strict": true, - "trailing": true, - - "node": true -} diff --git a/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD b/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD deleted file mode 100644 index 3e580c355..000000000 --- a/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +++ /dev/null @@ -1,19 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/escodegen/node_modules/estraverse/README.md b/node_modules/escodegen/node_modules/estraverse/README.md deleted file mode 100644 index ccd3377f3..000000000 --- a/node_modules/escodegen/node_modules/estraverse/README.md +++ /dev/null @@ -1,153 +0,0 @@ -### Estraverse [![Build Status](https://secure.travis-ci.org/estools/estraverse.svg)](http://travis-ci.org/estools/estraverse) - -Estraverse ([estraverse](http://github.com/estools/estraverse)) is -[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) -traversal functions from [esmangle project](http://github.com/estools/esmangle). - -### Documentation - -You can find usage docs at [wiki page](https://github.com/estools/estraverse/wiki/Usage). - -### Example Usage - -The following code will output all variables declared at the root of a file. - -```javascript -estraverse.traverse(ast, { - enter: function (node, parent) { - if (node.type == 'FunctionExpression' || node.type == 'FunctionDeclaration') - return estraverse.VisitorOption.Skip; - }, - leave: function (node, parent) { - if (node.type == 'VariableDeclarator') - console.log(node.id.name); - } -}); -``` - -We can use `this.skip`, `this.remove` and `this.break` functions instead of using Skip, Remove and Break. - -```javascript -estraverse.traverse(ast, { - enter: function (node) { - this.break(); - } -}); -``` - -And estraverse provides `estraverse.replace` function. When returning node from `enter`/`leave`, current node is replaced with it. - -```javascript -result = estraverse.replace(tree, { - enter: function (node) { - // Replace it with replaced. - if (node.type === 'Literal') - return replaced; - } -}); -``` - -By passing `visitor.keys` mapping, we can extend estraverse traversing functionality. - -```javascript -// This tree contains a user-defined `TestExpression` node. -var tree = { - type: 'TestExpression', - - // This 'argument' is the property containing the other **node**. - argument: { - type: 'Literal', - value: 20 - }, - - // This 'extended' is the property not containing the other **node**. - extended: true -}; -estraverse.traverse(tree, { - enter: function (node) { }, - - // Extending the existing traversing rules. - keys: { - // TargetNodeName: [ 'keys', 'containing', 'the', 'other', '**node**' ] - TestExpression: ['argument'] - } -}); -``` - -By passing `visitor.fallback` option, we can control the behavior when encountering unknown nodes. - -```javascript -// This tree contains a user-defined `TestExpression` node. -var tree = { - type: 'TestExpression', - - // This 'argument' is the property containing the other **node**. - argument: { - type: 'Literal', - value: 20 - }, - - // This 'extended' is the property not containing the other **node**. - extended: true -}; -estraverse.traverse(tree, { - enter: function (node) { }, - - // Iterating the child **nodes** of unknown nodes. - fallback: 'iteration' -}); -``` - -When `visitor.fallback` is a function, we can determine which keys to visit on each node. - -```javascript -// This tree contains a user-defined `TestExpression` node. -var tree = { - type: 'TestExpression', - - // This 'argument' is the property containing the other **node**. - argument: { - type: 'Literal', - value: 20 - }, - - // This 'extended' is the property not containing the other **node**. - extended: true -}; -estraverse.traverse(tree, { - enter: function (node) { }, - - // Skip the `argument` property of each node - fallback: function(node) { - return Object.keys(node).filter(function(key) { - return key !== 'argument'; - }); - } -}); -``` - -### License - -Copyright (C) 2012-2016 [Yusuke Suzuki](http://github.com/Constellation) - (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/escodegen/node_modules/estraverse/estraverse.js b/node_modules/escodegen/node_modules/estraverse/estraverse.js deleted file mode 100644 index 93225bb0c..000000000 --- a/node_modules/escodegen/node_modules/estraverse/estraverse.js +++ /dev/null @@ -1,801 +0,0 @@ -/* - Copyright (C) 2012-2013 Yusuke Suzuki - Copyright (C) 2012 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -/*jslint vars:false, bitwise:true*/ -/*jshint indent:4*/ -/*global exports:true*/ -(function clone(exports) { - 'use strict'; - - var Syntax, - VisitorOption, - VisitorKeys, - BREAK, - SKIP, - REMOVE; - - function deepCopy(obj) { - var ret = {}, key, val; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - val = obj[key]; - if (typeof val === 'object' && val !== null) { - ret[key] = deepCopy(val); - } else { - ret[key] = val; - } - } - } - return ret; - } - - // based on LLVM libc++ upper_bound / lower_bound - // MIT License - - function upperBound(array, func) { - var diff, len, i, current; - - len = array.length; - i = 0; - - while (len) { - diff = len >>> 1; - current = i + diff; - if (func(array[current])) { - len = diff; - } else { - i = current + 1; - len -= diff + 1; - } - } - return i; - } - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AwaitExpression: 'AwaitExpression', // CAUTION: It's deferred to ES7. - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ChainExpression: 'ChainExpression', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ComprehensionBlock: 'ComprehensionBlock', // CAUTION: It's deferred to ES7. - ComprehensionExpression: 'ComprehensionExpression', // CAUTION: It's deferred to ES7. - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DebuggerStatement: 'DebuggerStatement', - DirectiveStatement: 'DirectiveStatement', - DoWhileStatement: 'DoWhileStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - ForOfStatement: 'ForOfStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - GeneratorExpression: 'GeneratorExpression', // CAUTION: It's deferred to ES7. - Identifier: 'Identifier', - IfStatement: 'IfStatement', - ImportExpression: 'ImportExpression', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - ModuleSpecifier: 'ModuleSpecifier', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' - }; - - VisitorKeys = { - AssignmentExpression: ['left', 'right'], - AssignmentPattern: ['left', 'right'], - ArrayExpression: ['elements'], - ArrayPattern: ['elements'], - ArrowFunctionExpression: ['params', 'body'], - AwaitExpression: ['argument'], // CAUTION: It's deferred to ES7. - BlockStatement: ['body'], - BinaryExpression: ['left', 'right'], - BreakStatement: ['label'], - CallExpression: ['callee', 'arguments'], - CatchClause: ['param', 'body'], - ChainExpression: ['expression'], - ClassBody: ['body'], - ClassDeclaration: ['id', 'superClass', 'body'], - ClassExpression: ['id', 'superClass', 'body'], - ComprehensionBlock: ['left', 'right'], // CAUTION: It's deferred to ES7. - ComprehensionExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - ConditionalExpression: ['test', 'consequent', 'alternate'], - ContinueStatement: ['label'], - DebuggerStatement: [], - DirectiveStatement: [], - DoWhileStatement: ['body', 'test'], - EmptyStatement: [], - ExportAllDeclaration: ['source'], - ExportDefaultDeclaration: ['declaration'], - ExportNamedDeclaration: ['declaration', 'specifiers', 'source'], - ExportSpecifier: ['exported', 'local'], - ExpressionStatement: ['expression'], - ForStatement: ['init', 'test', 'update', 'body'], - ForInStatement: ['left', 'right', 'body'], - ForOfStatement: ['left', 'right', 'body'], - FunctionDeclaration: ['id', 'params', 'body'], - FunctionExpression: ['id', 'params', 'body'], - GeneratorExpression: ['blocks', 'filter', 'body'], // CAUTION: It's deferred to ES7. - Identifier: [], - IfStatement: ['test', 'consequent', 'alternate'], - ImportExpression: ['source'], - ImportDeclaration: ['specifiers', 'source'], - ImportDefaultSpecifier: ['local'], - ImportNamespaceSpecifier: ['local'], - ImportSpecifier: ['imported', 'local'], - Literal: [], - LabeledStatement: ['label', 'body'], - LogicalExpression: ['left', 'right'], - MemberExpression: ['object', 'property'], - MetaProperty: ['meta', 'property'], - MethodDefinition: ['key', 'value'], - ModuleSpecifier: [], - NewExpression: ['callee', 'arguments'], - ObjectExpression: ['properties'], - ObjectPattern: ['properties'], - Program: ['body'], - Property: ['key', 'value'], - RestElement: [ 'argument' ], - ReturnStatement: ['argument'], - SequenceExpression: ['expressions'], - SpreadElement: ['argument'], - Super: [], - SwitchStatement: ['discriminant', 'cases'], - SwitchCase: ['test', 'consequent'], - TaggedTemplateExpression: ['tag', 'quasi'], - TemplateElement: [], - TemplateLiteral: ['quasis', 'expressions'], - ThisExpression: [], - ThrowStatement: ['argument'], - TryStatement: ['block', 'handler', 'finalizer'], - UnaryExpression: ['argument'], - UpdateExpression: ['argument'], - VariableDeclaration: ['declarations'], - VariableDeclarator: ['id', 'init'], - WhileStatement: ['test', 'body'], - WithStatement: ['object', 'body'], - YieldExpression: ['argument'] - }; - - // unique id - BREAK = {}; - SKIP = {}; - REMOVE = {}; - - VisitorOption = { - Break: BREAK, - Skip: SKIP, - Remove: REMOVE - }; - - function Reference(parent, key) { - this.parent = parent; - this.key = key; - } - - Reference.prototype.replace = function replace(node) { - this.parent[this.key] = node; - }; - - Reference.prototype.remove = function remove() { - if (Array.isArray(this.parent)) { - this.parent.splice(this.key, 1); - return true; - } else { - this.replace(null); - return false; - } - }; - - function Element(node, path, wrap, ref) { - this.node = node; - this.path = path; - this.wrap = wrap; - this.ref = ref; - } - - function Controller() { } - - // API: - // return property path array from root to current node - Controller.prototype.path = function path() { - var i, iz, j, jz, result, element; - - function addToPath(result, path) { - if (Array.isArray(path)) { - for (j = 0, jz = path.length; j < jz; ++j) { - result.push(path[j]); - } - } else { - result.push(path); - } - } - - // root node - if (!this.__current.path) { - return null; - } - - // first node is sentinel, second node is root element - result = []; - for (i = 2, iz = this.__leavelist.length; i < iz; ++i) { - element = this.__leavelist[i]; - addToPath(result, element.path); - } - addToPath(result, this.__current.path); - return result; - }; - - // API: - // return type of current node - Controller.prototype.type = function () { - var node = this.current(); - return node.type || this.__current.wrap; - }; - - // API: - // return array of parent elements - Controller.prototype.parents = function parents() { - var i, iz, result; - - // first node is sentinel - result = []; - for (i = 1, iz = this.__leavelist.length; i < iz; ++i) { - result.push(this.__leavelist[i].node); - } - - return result; - }; - - // API: - // return current node - Controller.prototype.current = function current() { - return this.__current.node; - }; - - Controller.prototype.__execute = function __execute(callback, element) { - var previous, result; - - result = undefined; - - previous = this.__current; - this.__current = element; - this.__state = null; - if (callback) { - result = callback.call(this, element.node, this.__leavelist[this.__leavelist.length - 1].node); - } - this.__current = previous; - - return result; - }; - - // API: - // notify control skip / break - Controller.prototype.notify = function notify(flag) { - this.__state = flag; - }; - - // API: - // skip child nodes of current node - Controller.prototype.skip = function () { - this.notify(SKIP); - }; - - // API: - // break traversals - Controller.prototype['break'] = function () { - this.notify(BREAK); - }; - - // API: - // remove node - Controller.prototype.remove = function () { - this.notify(REMOVE); - }; - - Controller.prototype.__initialize = function(root, visitor) { - this.visitor = visitor; - this.root = root; - this.__worklist = []; - this.__leavelist = []; - this.__current = null; - this.__state = null; - this.__fallback = null; - if (visitor.fallback === 'iteration') { - this.__fallback = Object.keys; - } else if (typeof visitor.fallback === 'function') { - this.__fallback = visitor.fallback; - } - - this.__keys = VisitorKeys; - if (visitor.keys) { - this.__keys = Object.assign(Object.create(this.__keys), visitor.keys); - } - }; - - function isNode(node) { - if (node == null) { - return false; - } - return typeof node === 'object' && typeof node.type === 'string'; - } - - function isProperty(nodeType, key) { - return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key; - } - - function candidateExistsInLeaveList(leavelist, candidate) { - for (var i = leavelist.length - 1; i >= 0; --i) { - if (leavelist[i].node === candidate) { - return true; - } - } - return false; - } - - Controller.prototype.traverse = function traverse(root, visitor) { - var worklist, - leavelist, - element, - node, - nodeType, - ret, - key, - current, - current2, - candidates, - candidate, - sentinel; - - this.__initialize(root, visitor); - - sentinel = {}; - - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; - - // initialize - worklist.push(new Element(root, null, null, null)); - leavelist.push(new Element(null, null, null, null)); - - while (worklist.length) { - element = worklist.pop(); - - if (element === sentinel) { - element = leavelist.pop(); - - ret = this.__execute(visitor.leave, element); - - if (this.__state === BREAK || ret === BREAK) { - return; - } - continue; - } - - if (element.node) { - - ret = this.__execute(visitor.enter, element); - - if (this.__state === BREAK || ret === BREAK) { - return; - } - - worklist.push(sentinel); - leavelist.push(element); - - if (this.__state === SKIP || ret === SKIP) { - continue; - } - - node = element.node; - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - - if (candidateExistsInLeaveList(leavelist, candidate[current2])) { - continue; - } - - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', null); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, null); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - if (candidateExistsInLeaveList(leavelist, candidate)) { - continue; - } - - worklist.push(new Element(candidate, key, null, null)); - } - } - } - } - }; - - Controller.prototype.replace = function replace(root, visitor) { - var worklist, - leavelist, - node, - nodeType, - target, - element, - current, - current2, - candidates, - candidate, - sentinel, - outer, - key; - - function removeElem(element) { - var i, - key, - nextElem, - parent; - - if (element.ref.remove()) { - // When the reference is an element of an array. - key = element.ref.key; - parent = element.ref.parent; - - // If removed from array, then decrease following items' keys. - i = worklist.length; - while (i--) { - nextElem = worklist[i]; - if (nextElem.ref && nextElem.ref.parent === parent) { - if (nextElem.ref.key < key) { - break; - } - --nextElem.ref.key; - } - } - } - } - - this.__initialize(root, visitor); - - sentinel = {}; - - // reference - worklist = this.__worklist; - leavelist = this.__leavelist; - - // initialize - outer = { - root: root - }; - element = new Element(root, null, null, new Reference(outer, 'root')); - worklist.push(element); - leavelist.push(element); - - while (worklist.length) { - element = worklist.pop(); - - if (element === sentinel) { - element = leavelist.pop(); - - target = this.__execute(visitor.leave, element); - - // node may be replaced with null, - // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - // replace - element.ref.replace(target); - } - - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - } - - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - continue; - } - - target = this.__execute(visitor.enter, element); - - // node may be replaced with null, - // so distinguish between undefined and null in this place - if (target !== undefined && target !== BREAK && target !== SKIP && target !== REMOVE) { - // replace - element.ref.replace(target); - element.node = target; - } - - if (this.__state === REMOVE || target === REMOVE) { - removeElem(element); - element.node = null; - } - - if (this.__state === BREAK || target === BREAK) { - return outer.root; - } - - // node may be null - node = element.node; - if (!node) { - continue; - } - - worklist.push(sentinel); - leavelist.push(element); - - if (this.__state === SKIP || target === SKIP) { - continue; - } - - nodeType = node.type || element.wrap; - candidates = this.__keys[nodeType]; - if (!candidates) { - if (this.__fallback) { - candidates = this.__fallback(node); - } else { - throw new Error('Unknown node type ' + nodeType + '.'); - } - } - - current = candidates.length; - while ((current -= 1) >= 0) { - key = candidates[current]; - candidate = node[key]; - if (!candidate) { - continue; - } - - if (Array.isArray(candidate)) { - current2 = candidate.length; - while ((current2 -= 1) >= 0) { - if (!candidate[current2]) { - continue; - } - if (isProperty(nodeType, candidates[current])) { - element = new Element(candidate[current2], [key, current2], 'Property', new Reference(candidate, current2)); - } else if (isNode(candidate[current2])) { - element = new Element(candidate[current2], [key, current2], null, new Reference(candidate, current2)); - } else { - continue; - } - worklist.push(element); - } - } else if (isNode(candidate)) { - worklist.push(new Element(candidate, key, null, new Reference(node, key))); - } - } - } - - return outer.root; - }; - - function traverse(root, visitor) { - var controller = new Controller(); - return controller.traverse(root, visitor); - } - - function replace(root, visitor) { - var controller = new Controller(); - return controller.replace(root, visitor); - } - - function extendCommentRange(comment, tokens) { - var target; - - target = upperBound(tokens, function search(token) { - return token.range[0] > comment.range[0]; - }); - - comment.extendedRange = [comment.range[0], comment.range[1]]; - - if (target !== tokens.length) { - comment.extendedRange[1] = tokens[target].range[0]; - } - - target -= 1; - if (target >= 0) { - comment.extendedRange[0] = tokens[target].range[1]; - } - - return comment; - } - - function attachComments(tree, providedComments, tokens) { - // At first, we should calculate extended comment ranges. - var comments = [], comment, len, i, cursor; - - if (!tree.range) { - throw new Error('attachComments needs range information'); - } - - // tokens array is empty, we attach comments to tree as 'leadingComments' - if (!tokens.length) { - if (providedComments.length) { - for (i = 0, len = providedComments.length; i < len; i += 1) { - comment = deepCopy(providedComments[i]); - comment.extendedRange = [0, tree.range[0]]; - comments.push(comment); - } - tree.leadingComments = comments; - } - return tree; - } - - for (i = 0, len = providedComments.length; i < len; i += 1) { - comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); - } - - // This is based on John Freeman's implementation. - cursor = 0; - traverse(tree, { - enter: function (node) { - var comment; - - while (cursor < comments.length) { - comment = comments[cursor]; - if (comment.extendedRange[1] > node.range[0]) { - break; - } - - if (comment.extendedRange[1] === node.range[0]) { - if (!node.leadingComments) { - node.leadingComments = []; - } - node.leadingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } - - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - - cursor = 0; - traverse(tree, { - leave: function (node) { - var comment; - - while (cursor < comments.length) { - comment = comments[cursor]; - if (node.range[1] < comment.extendedRange[0]) { - break; - } - - if (node.range[1] === comment.extendedRange[0]) { - if (!node.trailingComments) { - node.trailingComments = []; - } - node.trailingComments.push(comment); - comments.splice(cursor, 1); - } else { - cursor += 1; - } - } - - // already out of owned node - if (cursor === comments.length) { - return VisitorOption.Break; - } - - if (comments[cursor].extendedRange[0] > node.range[1]) { - return VisitorOption.Skip; - } - } - }); - - return tree; - } - - exports.Syntax = Syntax; - exports.traverse = traverse; - exports.replace = replace; - exports.attachComments = attachComments; - exports.VisitorKeys = VisitorKeys; - exports.VisitorOption = VisitorOption; - exports.Controller = Controller; - exports.cloneEnvironment = function () { return clone({}); }; - - return exports; -}(exports)); -/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/escodegen/node_modules/estraverse/gulpfile.js b/node_modules/escodegen/node_modules/estraverse/gulpfile.js deleted file mode 100644 index 8772bbcca..000000000 --- a/node_modules/escodegen/node_modules/estraverse/gulpfile.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (C) 2014 Yusuke Suzuki - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -'use strict'; - -var gulp = require('gulp'), - git = require('gulp-git'), - bump = require('gulp-bump'), - filter = require('gulp-filter'), - tagVersion = require('gulp-tag-version'); - -var TEST = [ 'test/*.js' ]; -var POWERED = [ 'powered-test/*.js' ]; -var SOURCE = [ 'src/**/*.js' ]; - -/** - * Bumping version number and tagging the repository with it. - * Please read http://semver.org/ - * - * You can use the commands - * - * gulp patch # makes v0.1.0 -> v0.1.1 - * gulp feature # makes v0.1.1 -> v0.2.0 - * gulp release # makes v0.2.1 -> v1.0.0 - * - * To bump the version numbers accordingly after you did a patch, - * introduced a feature or made a backwards-incompatible release. - */ - -function inc(importance) { - // get all the files to bump version in - return gulp.src(['./package.json']) - // bump the version number in those files - .pipe(bump({type: importance})) - // save it back to filesystem - .pipe(gulp.dest('./')) - // commit the changed version number - .pipe(git.commit('Bumps package version')) - // read only one file to get the version number - .pipe(filter('package.json')) - // **tag it in the repository** - .pipe(tagVersion({ - prefix: '' - })); -} - -gulp.task('patch', [ ], function () { return inc('patch'); }) -gulp.task('minor', [ ], function () { return inc('minor'); }) -gulp.task('major', [ ], function () { return inc('major'); }) diff --git a/node_modules/escodegen/node_modules/estraverse/package.json b/node_modules/escodegen/node_modules/estraverse/package.json deleted file mode 100644 index 4cd1ebd93..000000000 --- a/node_modules/escodegen/node_modules/estraverse/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "estraverse@^5.2.0", - "_id": "estraverse@5.2.0", - "_inBundle": false, - "_integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "_location": "/escodegen/estraverse", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "estraverse@^5.2.0", - "name": "estraverse", - "escapedName": "estraverse", - "rawSpec": "^5.2.0", - "saveSpec": null, - "fetchSpec": "^5.2.0" - }, - "_requiredBy": [ - "/escodegen" - ], - "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "_shasum": "307df42547e6cc7324d3cf03c155d5cdb8c53880", - "_spec": "estraverse@^5.2.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/escodegen", - "bugs": { - "url": "https://github.com/estools/estraverse/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "ECMAScript JS AST traversal functions", - "devDependencies": { - "babel-preset-env": "^1.6.1", - "babel-register": "^6.3.13", - "chai": "^2.1.1", - "espree": "^1.11.0", - "gulp": "^3.8.10", - "gulp-bump": "^0.2.2", - "gulp-filter": "^2.0.0", - "gulp-git": "^1.0.1", - "gulp-tag-version": "^1.3.0", - "jshint": "^2.5.6", - "mocha": "^2.1.0" - }, - "engines": { - "node": ">=4.0" - }, - "homepage": "https://github.com/estools/estraverse", - "license": "BSD-2-Clause", - "main": "estraverse.js", - "maintainers": [ - { - "name": "Yusuke Suzuki", - "email": "utatane.tea@gmail.com", - "url": "http://github.com/Constellation" - } - ], - "name": "estraverse", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/estools/estraverse.git" - }, - "scripts": { - "lint": "jshint estraverse.js", - "test": "npm run-script lint && npm run-script unit-test", - "unit-test": "mocha --compilers js:babel-register" - }, - "version": "5.2.0" -} diff --git a/node_modules/eslint-scope/CHANGELOG.md b/node_modules/eslint-scope/CHANGELOG.md deleted file mode 100644 index cc07de01c..000000000 --- a/node_modules/eslint-scope/CHANGELOG.md +++ /dev/null @@ -1,70 +0,0 @@ -v5.1.1 - September 12, 2020 - -* [`9b528d7`](https://github.com/eslint/eslint-scope/commit/9b528d778c381718c12dabfb7f1c0e0dc6b36e49) Upgrade: esrecurse version to ^4.3.0 (#64) (Timofey Kachalov) -* [`f758bbc`](https://github.com/eslint/eslint-scope/commit/f758bbc3d49b9b9ea2289a5d6a6bba8dcf2c4903) Chore: fix definiton -> definition typo in comments (#63) (Kevin Kirsche) -* [`7513734`](https://github.com/eslint/eslint-scope/commit/751373473375b3f2edc4eaf1c8d2763d8435bb72) Chore: move to GitHub Actions (#62) (Kai Cataldo) - -v5.1.0 - June 4, 2020 - -* [`d4a3764`](https://github.com/eslint/eslint-scope/commit/d4a376434b16289c1a428d7e304576e997520873) Update: support new export syntax (#56) (Toru Nagashima) - -v5.0.0 - July 20, 2019 - -* [`e9fa22e`](https://github.com/eslint/eslint-scope/commit/e9fa22ea412c26cf2761fa98af7e715644bdb464) Upgrade: update dependencies after dropping support for Node <8 (#53) (Kai Cataldo) -* [`ee9f7c1`](https://github.com/eslint/eslint-scope/commit/ee9f7c12721aa195ba7e0e69551f49bfdb479951) Breaking: drop support for Node v6 (#54) (Kai Cataldo) - -v4.0.3 - March 15, 2019 - -* [`299df64`](https://github.com/eslint/eslint-scope/commit/299df64bdafb30b4d9372e4b7af0cf51a3818c4a) Fix: arrow function scope strictness (take 2) (#52) (futpib) - -v4.0.2 - March 1, 2019 - -* [`c925600`](https://github.com/eslint/eslint-scope/commit/c925600a684ae0f71b96f85339437a43b4d50d99) Revert "Fix: Arrow function scope strictness (fixes #49) (#50)" (#51) (Teddy Katz) - -v4.0.1 - March 1, 2019 - -* [`2533966`](https://github.com/eslint/eslint-scope/commit/2533966faf317df5a3847fab937ba462c16808b8) Fix: Arrow function scope strictness (fixes #49) (#50) (futpib) -* [`0cbeea5`](https://github.com/eslint/eslint-scope/commit/0cbeea51dfb66ab88ea34b0e3b4ad5e6cc210f2f) Chore: add supported Node.js versions to CI (#47) (Kai Cataldo) -* [`b423057`](https://github.com/eslint/eslint-scope/commit/b42305760638b8edf4667acf1445e450869bd983) Upgrade: eslint-release@1.0.0 (#46) (Teddy Katz) - -v4.0.0 - June 21, 2018 - - - -v4.0.0-rc.0 - June 9, 2018 - -* 3b919b8 Build: Adding rc release script to package.json (#38) (Kevin Partington) -* 137732a Chore: avoid creating package-lock.json files (#37) (Teddy Katz) - -v4.0.0-alpha.0 - April 27, 2018 - -* 7cc3769 Upgrade: eslint-release ^0.11.1 (#36) (Teddy Katz) -* c9f6967 Breaking: remove TDZScope (refs eslint/eslint#10245) (#35) (Toru Nagashima) -* 982a71f Fix: wrong resolution about default parameters (#33) (Toru Nagashima) -* 57889f1 Docs: Remove extra header line from LICENSE (#32) (Gyandeep Singh) - -v3.7.1 - April 12, 2017 - -* ced6262 Fix: restore previous Scope API exports from escope (#31) (Vitor Balocco) -* 5c3d966 Fix: Remove and Modify tests that contain invalid ES6 syntax (#29) (Reyad Attiyat) - -v3.7.0 - March 17, 2017 - -* 9e27835 Chore: Add files section to package.json (#24) (Ilya Volodin) -* 3e4d123 Upgrade: eslint-config-eslint to 4.0.0 (#21) (Teddy Katz) -* 38c50fb Chore: Rename src to lib and test to tests (#20) (Corbin Uselton) -* f4cd920 Chore: Remove esprima (#19) (Corbin Uselton) -* f81fad5 Revert "Chore: Remove esprima" (#18) (James Henry) -* 31b0085 Chore: Remove es6-map and es6-weakmap as they are included in node4 (#10) (#13) (Corbin Uselton) -* 12a1ca1 Add Makefile.js and eslint (#15) (Reyad Attiyat) -* 7d23f8e Chore: Remove es6-map and es6-weakmap as they are included in node4 (#10) (Corbin Uselton) -* 019441e Chore: Convert to ES6 that is supported on Node 4, commonjs modules and remove Babel (#14) (Corbin Uselton) -* c647f65 Update: Add check for node.body in referencer (#2) (Corbin Uselton) -* eb5c9db Remove browserify and jsdoc (#12) (Corbin Uselton) -* cf38df0 Chore: Update README.md (#3) (James Henry) -* 8a142ca Chore: Add eslint-release scripts (#6) (James Henry) -* e60d8cb Chore: Remove unused bower.json (#5) (James Henry) -* 049c545 Chore: Fix tests for eslint-scope (#4) (James Henry) -* f026aab Chore: Update package.json for eslint fork (#1) (James Henry) -* a94d281 Chore: Update license with JSF copyright (Nicholas C. Zakas) - diff --git a/node_modules/eslint-scope/README.md b/node_modules/eslint-scope/README.md index 7e7ce0d34..110baaf83 100644 --- a/node_modules/eslint-scope/README.md +++ b/node_modules/eslint-scope/README.md @@ -1,36 +1,52 @@ +[![npm version](https://img.shields.io/npm/v/eslint-scope.svg)](https://www.npmjs.com/package/eslint-scope) +[![Downloads](https://img.shields.io/npm/dm/eslint-scope.svg)](https://www.npmjs.com/package/eslint-scope) +[![Build Status](https://github.com/eslint/eslint-scope/workflows/CI/badge.svg)](https://github.com/eslint/eslint-scope/actions) + # ESLint Scope ESLint Scope is the [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) scope analyzer used in ESLint. It is a fork of [escope](http://github.com/estools/escope). -## Usage - -Install: +## Install ``` npm i eslint-scope --save ``` +## 📖 Usage + +To use in an ESM file: + +```js +import * as eslintScope from 'eslint-scope'; +``` + +To use in a CommonJS file: + +```js +const eslintScope = require('eslint-scope'); +``` + Example: ```js -var eslintScope = require('eslint-scope'); -var espree = require('espree'); -var estraverse = require('estraverse'); +import * as eslintScope from 'eslint-scope'; +import * as espree from 'espree'; +import estraverse from 'estraverse'; -var ast = espree.parse(code); -var scopeManager = eslintScope.analyze(ast); +const ast = espree.parse(code, { range: true }); +const scopeManager = eslintScope.analyze(ast); -var currentScope = scopeManager.acquire(ast); // global scope +const currentScope = scopeManager.acquire(ast); // global scope estraverse.traverse(ast, { - enter: function(node, parent) { + enter (node, parent) { // do stuff if (/Function/.test(node.type)) { currentScope = scopeManager.acquire(node); // get current function scope } }, - leave: function(node, parent) { + leave(node, parent) { if (/Function/.test(node.type)) { currentScope = currentScope.upper; // set to parent scope } diff --git a/node_modules/eslint-scope/dist/eslint-scope.cjs b/node_modules/eslint-scope/dist/eslint-scope.cjs new file mode 100644 index 000000000..291fcdcdc --- /dev/null +++ b/node_modules/eslint-scope/dist/eslint-scope.cjs @@ -0,0 +1,2240 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var assert = require('assert'); +var estraverse = require('estraverse'); +var esrecurse = require('esrecurse'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var assert__default = /*#__PURE__*/_interopDefaultLegacy(assert); +var estraverse__default = /*#__PURE__*/_interopDefaultLegacy(estraverse); +var esrecurse__default = /*#__PURE__*/_interopDefaultLegacy(esrecurse); + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +const READ = 0x1; +const WRITE = 0x2; +const RW = READ | WRITE; + +/** + * A Reference represents a single occurrence of an identifier in code. + * @constructor Reference + */ +class Reference { + constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) { + + /** + * Identifier syntax node. + * @member {espreeIdentifier} Reference#identifier + */ + this.identifier = ident; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Reference#from + */ + this.from = scope; + + /** + * Whether the reference comes from a dynamic scope (such as 'eval', + * 'with', etc.), and may be trapped by dynamic scopes. + * @member {boolean} Reference#tainted + */ + this.tainted = false; + + /** + * The variable this reference is resolved with. + * @member {Variable} Reference#resolved + */ + this.resolved = null; + + /** + * The read-write mode of the reference. (Value is one of {@link + * Reference.READ}, {@link Reference.RW}, {@link Reference.WRITE}). + * @member {number} Reference#flag + * @private + */ + this.flag = flag; + if (this.isWrite()) { + + /** + * If reference is writeable, this is the tree being written to it. + * @member {espreeNode} Reference#writeExpr + */ + this.writeExpr = writeExpr; + + /** + * Whether the Reference might refer to a partial value of writeExpr. + * @member {boolean} Reference#partial + */ + this.partial = partial; + + /** + * Whether the Reference is to write of initialization. + * @member {boolean} Reference#init + */ + this.init = init; + } + this.__maybeImplicitGlobal = maybeImplicitGlobal; + } + + /** + * Whether the reference is static. + * @function Reference#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.tainted && this.resolved && this.resolved.scope.isStatic(); + } + + /** + * Whether the reference is writeable. + * @function Reference#isWrite + * @returns {boolean} write + */ + isWrite() { + return !!(this.flag & Reference.WRITE); + } + + /** + * Whether the reference is readable. + * @function Reference#isRead + * @returns {boolean} read + */ + isRead() { + return !!(this.flag & Reference.READ); + } + + /** + * Whether the reference is read-only. + * @function Reference#isReadOnly + * @returns {boolean} read only + */ + isReadOnly() { + return this.flag === Reference.READ; + } + + /** + * Whether the reference is write-only. + * @function Reference#isWriteOnly + * @returns {boolean} write only + */ + isWriteOnly() { + return this.flag === Reference.WRITE; + } + + /** + * Whether the reference is read-write. + * @function Reference#isReadWrite + * @returns {boolean} read write + */ + isReadWrite() { + return this.flag === Reference.RW; + } +} + +/** + * @constant Reference.READ + * @private + */ +Reference.READ = READ; + +/** + * @constant Reference.WRITE + * @private + */ +Reference.WRITE = WRITE; + +/** + * @constant Reference.RW + * @private + */ +Reference.RW = RW; + +/* vim: set sw=4 ts=4 et tw=80 : */ + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * A Variable represents a locally scoped identifier. These include arguments to + * functions. + * @constructor Variable + */ +class Variable { + constructor(name, scope) { + + /** + * The variable name, as given in the source code. + * @member {string} Variable#name + */ + this.name = name; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as AST nodes. + * @member {espree.Identifier[]} Variable#identifiers + */ + this.identifiers = []; + + /** + * List of {@link Reference|references} of this variable (excluding parameter entries) + * in its defining scope and all nested scopes. For defining + * occurrences only see {@link Variable#defs}. + * @member {Reference[]} Variable#references + */ + this.references = []; + + /** + * List of defining occurrences of this variable (like in 'var ...' + * statements or as parameter), as custom objects. + * @member {Definition[]} Variable#defs + */ + this.defs = []; + + this.tainted = false; + + /** + * Whether this is a stack variable. + * @member {boolean} Variable#stack + */ + this.stack = true; + + /** + * Reference to the enclosing Scope. + * @member {Scope} Variable#scope + */ + this.scope = scope; + } +} + +Variable.CatchClause = "CatchClause"; +Variable.Parameter = "Parameter"; +Variable.FunctionName = "FunctionName"; +Variable.ClassName = "ClassName"; +Variable.Variable = "Variable"; +Variable.ImportBinding = "ImportBinding"; +Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable"; + +/* vim: set sw=4 ts=4 et tw=80 : */ + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * @constructor Definition + */ +class Definition { + constructor(type, name, node, parent, index, kind) { + + /** + * @member {string} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). + */ + this.type = type; + + /** + * @member {espree.Identifier} Definition#name - the identifier AST node of the occurrence. + */ + this.name = name; + + /** + * @member {espree.Node} Definition#node - the enclosing node of the identifier. + */ + this.node = node; + + /** + * @member {espree.Node?} Definition#parent - the enclosing statement node of the identifier. + */ + this.parent = parent; + + /** + * @member {number?} Definition#index - the index in the declaration statement. + */ + this.index = index; + + /** + * @member {string?} Definition#kind - the kind of the declaration statement. + */ + this.kind = kind; + } +} + +/** + * @constructor ParameterDefinition + */ +class ParameterDefinition extends Definition { + constructor(name, node, index, rest) { + super(Variable.Parameter, name, node, null, index, null); + + /** + * Whether the parameter definition is a part of a rest parameter. + * @member {boolean} ParameterDefinition#rest + */ + this.rest = rest; + } +} + +/* vim: set sw=4 ts=4 et tw=80 : */ + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +const { Syntax: Syntax$2 } = estraverse__default["default"]; + +/** + * Test if scope is struct + * @param {Scope} scope scope + * @param {Block} block block + * @param {boolean} isMethodDefinition is method definition + * @param {boolean} useDirective use directive + * @returns {boolean} is strict scope + */ +function isStrictScope(scope, block, isMethodDefinition, useDirective) { + let body; + + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper && scope.upper.isStrict) { + return true; + } + + if (isMethodDefinition) { + return true; + } + + if (scope.type === "class" || scope.type === "module") { + return true; + } + + if (scope.type === "block" || scope.type === "switch") { + return false; + } + + if (scope.type === "function") { + if (block.type === Syntax$2.ArrowFunctionExpression && block.body.type !== Syntax$2.BlockStatement) { + return false; + } + + if (block.type === Syntax$2.Program) { + body = block; + } else { + body = block.body; + } + + if (!body) { + return false; + } + } else if (scope.type === "global") { + body = block; + } else { + return false; + } + + // Search 'use strict' directive. + if (useDirective) { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax$2.DirectiveStatement) { + break; + } + if (stmt.raw === "\"use strict\"" || stmt.raw === "'use strict'") { + return true; + } + } + } else { + for (let i = 0, iz = body.body.length; i < iz; ++i) { + const stmt = body.body[i]; + + if (stmt.type !== Syntax$2.ExpressionStatement) { + break; + } + const expr = stmt.expression; + + if (expr.type !== Syntax$2.Literal || typeof expr.value !== "string") { + break; + } + if (expr.raw !== null && expr.raw !== undefined) { + if (expr.raw === "\"use strict\"" || expr.raw === "'use strict'") { + return true; + } + } else { + if (expr.value === "use strict") { + return true; + } + } + } + } + return false; +} + +/** + * Register scope + * @param {ScopeManager} scopeManager scope manager + * @param {Scope} scope scope + * @returns {void} + */ +function registerScope(scopeManager, scope) { + scopeManager.scopes.push(scope); + + const scopes = scopeManager.__nodeToScope.get(scope.block); + + if (scopes) { + scopes.push(scope); + } else { + scopeManager.__nodeToScope.set(scope.block, [scope]); + } +} + +/** + * Should be statically + * @param {Object} def def + * @returns {boolean} should be statically + */ +function shouldBeStatically(def) { + return ( + (def.type === Variable.ClassName) || + (def.type === Variable.Variable && def.parent.kind !== "var") + ); +} + +/** + * @constructor Scope + */ +class Scope { + constructor(scopeManager, type, upperScope, block, isMethodDefinition) { + + /** + * One of "global", "module", "function", "function-expression-name", "block", "switch", "catch", "with", "for", + * "class", "class-field-initializer", "class-static-block". + * @member {string} Scope#type + */ + this.type = type; + + /** + * The scoped {@link Variable}s of this scope, as { Variable.name + * : Variable }. + * @member {Map} Scope#set + */ + this.set = new Map(); + + /** + * The tainted variables of this scope, as { Variable.name : + * boolean }. + * @member {Map} Scope#taints */ + this.taints = new Map(); + + /** + * Generally, through the lexical scoping of JS you can always know + * which variable an identifier in the source code refers to. There are + * a few exceptions to this rule. With 'global' and 'with' scopes you + * can only decide at runtime which variable a reference refers to. + * Moreover, if 'eval()' is used in a scope, it might introduce new + * bindings in this or its parent scopes. + * All those scopes are considered 'dynamic'. + * @member {boolean} Scope#dynamic + */ + this.dynamic = this.type === "global" || this.type === "with"; + + /** + * A reference to the scope-defining syntax node. + * @member {espree.Node} Scope#block + */ + this.block = block; + + /** + * The {@link Reference|references} that are not resolved with this scope. + * @member {Reference[]} Scope#through + */ + this.through = []; + + /** + * The scoped {@link Variable}s of this scope. In the case of a + * 'function' scope this includes the automatic argument arguments as + * its first element, as well as all further formal arguments. + * @member {Variable[]} Scope#variables + */ + this.variables = []; + + /** + * Any variable {@link Reference|reference} found in this scope. This + * includes occurrences of local variables as well as variables from + * parent scopes (including the global scope). For local variables + * this also includes defining occurrences (like in a 'var' statement). + * In a 'function' scope this does not include the occurrences of the + * formal parameter in the parameter list. + * @member {Reference[]} Scope#references + */ + this.references = []; + + /** + * For 'global' and 'function' scopes, this is a self-reference. For + * other scope types this is the variableScope value of the + * parent scope. + * @member {Scope} Scope#variableScope + */ + this.variableScope = + this.type === "global" || + this.type === "module" || + this.type === "function" || + this.type === "class-field-initializer" || + this.type === "class-static-block" + ? this + : upperScope.variableScope; + + /** + * Whether this scope is created by a FunctionExpression. + * @member {boolean} Scope#functionExpressionScope + */ + this.functionExpressionScope = false; + + /** + * Whether this is a scope that contains an 'eval()' invocation. + * @member {boolean} Scope#directCallToEvalScope + */ + this.directCallToEvalScope = false; + + /** + * @member {boolean} Scope#thisFound + */ + this.thisFound = false; + + this.__left = []; + + /** + * Reference to the parent {@link Scope|scope}. + * @member {Scope} Scope#upper + */ + this.upper = upperScope; + + /** + * Whether 'use strict' is in effect in this scope. + * @member {boolean} Scope#isStrict + */ + this.isStrict = scopeManager.isStrictModeSupported() + ? isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()) + : false; + + /** + * List of nested {@link Scope}s. + * @member {Scope[]} Scope#childScopes + */ + this.childScopes = []; + if (this.upper) { + this.upper.childScopes.push(this); + } + + this.__declaredVariables = scopeManager.__declaredVariables; + + registerScope(scopeManager, this); + } + + __shouldStaticallyClose(scopeManager) { + return (!this.dynamic || scopeManager.__isOptimistic()); + } + + __shouldStaticallyCloseForGlobal(ref) { + + // On global scope, let/const/class declarations should be resolved statically. + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + + const variable = this.set.get(name); + const defs = variable.defs; + + return defs.length > 0 && defs.every(shouldBeStatically); + } + + __staticCloseRef(ref) { + if (!this.__resolve(ref)) { + this.__delegateToUpperScope(ref); + } + } + + __dynamicCloseRef(ref) { + + // notify all names are through to global + let current = this; + + do { + current.through.push(ref); + current = current.upper; + } while (current); + } + + __globalCloseRef(ref) { + + // let/const/class declarations should be resolved statically. + // others should be resolved dynamically. + if (this.__shouldStaticallyCloseForGlobal(ref)) { + this.__staticCloseRef(ref); + } else { + this.__dynamicCloseRef(ref); + } + } + + __close(scopeManager) { + let closeRef; + + if (this.__shouldStaticallyClose(scopeManager)) { + closeRef = this.__staticCloseRef; + } else if (this.type !== "global") { + closeRef = this.__dynamicCloseRef; + } else { + closeRef = this.__globalCloseRef; + } + + // Try Resolving all references in this scope. + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + closeRef.call(this, ref); + } + this.__left = null; + + return this.upper; + } + + // To override by function scopes. + // References in default parameters isn't resolved to variables which are in their function body. + __isValidResolution(ref, variable) { // eslint-disable-line class-methods-use-this, no-unused-vars + return true; + } + + __resolve(ref) { + const name = ref.identifier.name; + + if (!this.set.has(name)) { + return false; + } + const variable = this.set.get(name); + + if (!this.__isValidResolution(ref, variable)) { + return false; + } + variable.references.push(ref); + variable.stack = variable.stack && ref.from.variableScope === this.variableScope; + if (ref.tainted) { + variable.tainted = true; + this.taints.set(variable.name, true); + } + ref.resolved = variable; + + return true; + } + + __delegateToUpperScope(ref) { + if (this.upper) { + this.upper.__left.push(ref); + } + this.through.push(ref); + } + + __addDeclaredVariablesOfNode(variable, node) { + if (node === null || node === undefined) { + return; + } + + let variables = this.__declaredVariables.get(node); + + if (variables === null || variables === undefined) { + variables = []; + this.__declaredVariables.set(node, variables); + } + if (variables.indexOf(variable) === -1) { + variables.push(variable); + } + } + + __defineGeneric(name, set, variables, node, def) { + let variable; + + variable = set.get(name); + if (!variable) { + variable = new Variable(name, this); + set.set(name, variable); + variables.push(variable); + } + + if (def) { + variable.defs.push(def); + this.__addDeclaredVariablesOfNode(variable, def.node); + this.__addDeclaredVariablesOfNode(variable, def.parent); + } + if (node) { + variable.identifiers.push(node); + } + } + + __define(node, def) { + if (node && node.type === Syntax$2.Identifier) { + this.__defineGeneric( + node.name, + this.set, + this.variables, + node, + def + ); + } + } + + __referencing(node, assign, writeExpr, maybeImplicitGlobal, partial, init) { + + // because Array element may be null + if (!node || node.type !== Syntax$2.Identifier) { + return; + } + + // Specially handle like `this`. + if (node.name === "super") { + return; + } + + const ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal, !!partial, !!init); + + this.references.push(ref); + this.__left.push(ref); + } + + __detectEval() { + let current = this; + + this.directCallToEvalScope = true; + do { + current.dynamic = true; + current = current.upper; + } while (current); + } + + __detectThis() { + this.thisFound = true; + } + + __isClosed() { + return this.__left === null; + } + + /** + * returns resolved {Reference} + * @function Scope#resolve + * @param {Espree.Identifier} ident identifier to be resolved. + * @returns {Reference} reference + */ + resolve(ident) { + let ref, i, iz; + + assert__default["default"](this.__isClosed(), "Scope should be closed."); + assert__default["default"](ident.type === Syntax$2.Identifier, "Target should be identifier."); + for (i = 0, iz = this.references.length; i < iz; ++i) { + ref = this.references[i]; + if (ref.identifier === ident) { + return ref; + } + } + return null; + } + + /** + * returns this scope is static + * @function Scope#isStatic + * @returns {boolean} static + */ + isStatic() { + return !this.dynamic; + } + + /** + * returns this scope has materialized arguments + * @function Scope#isArgumentsMaterialized + * @returns {boolean} arguemnts materialized + */ + isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + /** + * returns this scope has materialized `this` reference + * @function Scope#isThisMaterialized + * @returns {boolean} this materialized + */ + isThisMaterialized() { // eslint-disable-line class-methods-use-this + return true; + } + + isUsedName(name) { + if (this.set.has(name)) { + return true; + } + for (let i = 0, iz = this.through.length; i < iz; ++i) { + if (this.through[i].identifier.name === name) { + return true; + } + } + return false; + } +} + +class GlobalScope extends Scope { + constructor(scopeManager, block) { + super(scopeManager, "global", null, block, false); + this.implicit = { + set: new Map(), + variables: [], + + /** + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + * @member {Reference[]} Scope#implicit#left + */ + left: [] + }; + } + + __close(scopeManager) { + const implicit = []; + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + if (ref.__maybeImplicitGlobal && !this.set.has(ref.identifier.name)) { + implicit.push(ref.__maybeImplicitGlobal); + } + } + + // create an implicit global variable from assignment expression + for (let i = 0, iz = implicit.length; i < iz; ++i) { + const info = implicit[i]; + + this.__defineImplicit(info.pattern, + new Definition( + Variable.ImplicitGlobalVariable, + info.pattern, + info.node, + null, + null, + null + )); + + } + + this.implicit.left = this.__left; + + return super.__close(scopeManager); + } + + __defineImplicit(node, def) { + if (node && node.type === Syntax$2.Identifier) { + this.__defineGeneric( + node.name, + this.implicit.set, + this.implicit.variables, + node, + def + ); + } + } +} + +class ModuleScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "module", upperScope, block, false); + } +} + +class FunctionExpressionNameScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "function-expression-name", upperScope, block, false); + this.__define(block.id, + new Definition( + Variable.FunctionName, + block.id, + block, + null, + null, + null + )); + this.functionExpressionScope = true; + } +} + +class CatchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "catch", upperScope, block, false); + } +} + +class WithScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "with", upperScope, block, false); + } + + __close(scopeManager) { + if (this.__shouldStaticallyClose(scopeManager)) { + return super.__close(scopeManager); + } + + for (let i = 0, iz = this.__left.length; i < iz; ++i) { + const ref = this.__left[i]; + + ref.tainted = true; + this.__delegateToUpperScope(ref); + } + this.__left = null; + + return this.upper; + } +} + +class BlockScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "block", upperScope, block, false); + } +} + +class SwitchScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "switch", upperScope, block, false); + } +} + +class FunctionScope extends Scope { + constructor(scopeManager, upperScope, block, isMethodDefinition) { + super(scopeManager, "function", upperScope, block, isMethodDefinition); + + // section 9.2.13, FunctionDeclarationInstantiation. + // NOTE Arrow functions never have an arguments objects. + if (this.block.type !== Syntax$2.ArrowFunctionExpression) { + this.__defineArguments(); + } + } + + isArgumentsMaterialized() { + + // TODO(Constellation) + // We can more aggressive on this condition like this. + // + // function t() { + // // arguments of t is always hidden. + // function arguments() { + // } + // } + if (this.block.type === Syntax$2.ArrowFunctionExpression) { + return false; + } + + if (!this.isStatic()) { + return true; + } + + const variable = this.set.get("arguments"); + + assert__default["default"](variable, "Always have arguments variable."); + return variable.tainted || variable.references.length !== 0; + } + + isThisMaterialized() { + if (!this.isStatic()) { + return true; + } + return this.thisFound; + } + + __defineArguments() { + this.__defineGeneric( + "arguments", + this.set, + this.variables, + null, + null + ); + this.taints.set("arguments", true); + } + + // References in default parameters isn't resolved to variables which are in their function body. + // const x = 1 + // function f(a = x) { // This `x` is resolved to the `x` in the outer scope. + // const x = 2 + // console.log(a) + // } + __isValidResolution(ref, variable) { + + // If `options.nodejsScope` is true, `this.block` becomes a Program node. + if (this.block.type === "Program") { + return true; + } + + const bodyStart = this.block.body.range[0]; + + // It's invalid resolution in the following case: + return !( + variable.scope === this && + ref.identifier.range[0] < bodyStart && // the reference is in the parameter part. + variable.defs.every(d => d.name.range[0] >= bodyStart) // the variable is in the body. + ); + } +} + +class ForScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "for", upperScope, block, false); + } +} + +class ClassScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class", upperScope, block, false); + } +} + +class ClassFieldInitializerScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class-field-initializer", upperScope, block, true); + } +} + +class ClassStaticBlockScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class-static-block", upperScope, block, true); + } +} + +/* vim: set sw=4 ts=4 et tw=80 : */ + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * @constructor ScopeManager + */ +class ScopeManager { + constructor(options) { + this.scopes = []; + this.globalScope = null; + this.__nodeToScope = new WeakMap(); + this.__currentScope = null; + this.__options = options; + this.__declaredVariables = new WeakMap(); + } + + __useDirective() { + return this.__options.directive; + } + + __isOptimistic() { + return this.__options.optimistic; + } + + __ignoreEval() { + return this.__options.ignoreEval; + } + + isGlobalReturn() { + return this.__options.nodejsScope || this.__options.sourceType === "commonjs"; + } + + isModule() { + return this.__options.sourceType === "module"; + } + + isImpliedStrict() { + return this.__options.impliedStrict; + } + + isStrictModeSupported() { + return this.__options.ecmaVersion >= 5; + } + + // Returns appropriate scope for this node. + __get(node) { + return this.__nodeToScope.get(node); + } + + /** + * Get variables that are declared by the node. + * + * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`. + * If the node declares nothing, this method returns an empty array. + * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details. + * @param {Espree.Node} node a node to get. + * @returns {Variable[]} variables that declared by the node. + */ + getDeclaredVariables(node) { + return this.__declaredVariables.get(node) || []; + } + + /** + * acquire scope from node. + * @function ScopeManager#acquire + * @param {Espree.Node} node node for the acquired scope. + * @param {?boolean} [inner=false] look up the most inner scope, default value is false. + * @returns {Scope?} Scope from node + */ + acquire(node, inner) { + + /** + * predicate + * @param {Scope} testScope scope to test + * @returns {boolean} predicate + */ + function predicate(testScope) { + if (testScope.type === "function" && testScope.functionExpressionScope) { + return false; + } + return true; + } + + const scopes = this.__get(node); + + if (!scopes || scopes.length === 0) { + return null; + } + + // Heuristic selection from all scopes. + // If you would like to get all scopes, please use ScopeManager#acquireAll. + if (scopes.length === 1) { + return scopes[0]; + } + + if (inner) { + for (let i = scopes.length - 1; i >= 0; --i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } else { + for (let i = 0, iz = scopes.length; i < iz; ++i) { + const scope = scopes[i]; + + if (predicate(scope)) { + return scope; + } + } + } + + return null; + } + + /** + * acquire all scopes from node. + * @function ScopeManager#acquireAll + * @param {Espree.Node} node node for the acquired scope. + * @returns {Scopes?} Scope array + */ + acquireAll(node) { + return this.__get(node); + } + + /** + * release the node. + * @function ScopeManager#release + * @param {Espree.Node} node releasing node. + * @param {?boolean} [inner=false] look up the most inner scope, default value is false. + * @returns {Scope?} upper scope for the node. + */ + release(node, inner) { + const scopes = this.__get(node); + + if (scopes && scopes.length) { + const scope = scopes[0].upper; + + if (!scope) { + return null; + } + return this.acquire(scope.block, inner); + } + return null; + } + + attach() { } // eslint-disable-line class-methods-use-this + + detach() { } // eslint-disable-line class-methods-use-this + + __nestScope(scope) { + if (scope instanceof GlobalScope) { + assert__default["default"](this.__currentScope === null); + this.globalScope = scope; + } + this.__currentScope = scope; + return scope; + } + + __nestGlobalScope(node) { + return this.__nestScope(new GlobalScope(this, node)); + } + + __nestBlockScope(node) { + return this.__nestScope(new BlockScope(this, this.__currentScope, node)); + } + + __nestFunctionScope(node, isMethodDefinition) { + return this.__nestScope(new FunctionScope(this, this.__currentScope, node, isMethodDefinition)); + } + + __nestForScope(node) { + return this.__nestScope(new ForScope(this, this.__currentScope, node)); + } + + __nestCatchScope(node) { + return this.__nestScope(new CatchScope(this, this.__currentScope, node)); + } + + __nestWithScope(node) { + return this.__nestScope(new WithScope(this, this.__currentScope, node)); + } + + __nestClassScope(node) { + return this.__nestScope(new ClassScope(this, this.__currentScope, node)); + } + + __nestClassFieldInitializerScope(node) { + return this.__nestScope(new ClassFieldInitializerScope(this, this.__currentScope, node)); + } + + __nestClassStaticBlockScope(node) { + return this.__nestScope(new ClassStaticBlockScope(this, this.__currentScope, node)); + } + + __nestSwitchScope(node) { + return this.__nestScope(new SwitchScope(this, this.__currentScope, node)); + } + + __nestModuleScope(node) { + return this.__nestScope(new ModuleScope(this, this.__currentScope, node)); + } + + __nestFunctionExpressionNameScope(node) { + return this.__nestScope(new FunctionExpressionNameScope(this, this.__currentScope, node)); + } + + __isES6() { + return this.__options.ecmaVersion >= 6; + } +} + +/* vim: set sw=4 ts=4 et tw=80 : */ + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +const { Syntax: Syntax$1 } = estraverse__default["default"]; + +/** + * Get last array element + * @param {Array} xs array + * @returns {any} Last elment + */ +function getLast(xs) { + return xs[xs.length - 1] || null; +} + +class PatternVisitor extends esrecurse__default["default"].Visitor { + static isPattern(node) { + const nodeType = node.type; + + return ( + nodeType === Syntax$1.Identifier || + nodeType === Syntax$1.ObjectPattern || + nodeType === Syntax$1.ArrayPattern || + nodeType === Syntax$1.SpreadElement || + nodeType === Syntax$1.RestElement || + nodeType === Syntax$1.AssignmentPattern + ); + } + + constructor(options, rootPattern, callback) { + super(null, options); + this.rootPattern = rootPattern; + this.callback = callback; + this.assignments = []; + this.rightHandNodes = []; + this.restElements = []; + } + + Identifier(pattern) { + const lastRestElement = getLast(this.restElements); + + this.callback(pattern, { + topLevel: pattern === this.rootPattern, + rest: lastRestElement !== null && lastRestElement !== undefined && lastRestElement.argument === pattern, + assignments: this.assignments + }); + } + + Property(property) { + + // Computed property's key is a right hand node. + if (property.computed) { + this.rightHandNodes.push(property.key); + } + + // If it's shorthand, its key is same as its value. + // If it's shorthand and has its default value, its key is same as its value.left (the value is AssignmentPattern). + // If it's not shorthand, the name of new variable is its value's. + this.visit(property.value); + } + + ArrayPattern(pattern) { + for (let i = 0, iz = pattern.elements.length; i < iz; ++i) { + const element = pattern.elements[i]; + + this.visit(element); + } + } + + AssignmentPattern(pattern) { + this.assignments.push(pattern); + this.visit(pattern.left); + this.rightHandNodes.push(pattern.right); + this.assignments.pop(); + } + + RestElement(pattern) { + this.restElements.push(pattern); + this.visit(pattern.argument); + this.restElements.pop(); + } + + MemberExpression(node) { + + // Computed property's key is a right hand node. + if (node.computed) { + this.rightHandNodes.push(node.property); + } + + // the object is only read, write to its property. + this.rightHandNodes.push(node.object); + } + + // + // ForInStatement.left and AssignmentExpression.left are LeftHandSideExpression. + // By spec, LeftHandSideExpression is Pattern or MemberExpression. + // (see also: https://github.com/estree/estree/pull/20#issuecomment-74584758) + // But espree 2.0 parses to ArrayExpression, ObjectExpression, etc... + // + + SpreadElement(node) { + this.visit(node.argument); + } + + ArrayExpression(node) { + node.elements.forEach(this.visit, this); + } + + AssignmentExpression(node) { + this.assignments.push(node); + this.visit(node.left); + this.rightHandNodes.push(node.right); + this.assignments.pop(); + } + + CallExpression(node) { + + // arguments are right hand nodes. + node.arguments.forEach(a => { + this.rightHandNodes.push(a); + }); + this.visit(node.callee); + } +} + +/* vim: set sw=4 ts=4 et tw=80 : */ + +/* + Copyright (C) 2015 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +const { Syntax } = estraverse__default["default"]; + +/** + * Traverse identifier in pattern + * @param {Object} options options + * @param {pattern} rootPattern root pattern + * @param {Refencer} referencer referencer + * @param {callback} callback callback + * @returns {void} + */ +function traverseIdentifierInPattern(options, rootPattern, referencer, callback) { + + // Call the callback at left hand identifier nodes, and Collect right hand nodes. + const visitor = new PatternVisitor(options, rootPattern, callback); + + visitor.visit(rootPattern); + + // Process the right hand nodes recursively. + if (referencer !== null && referencer !== undefined) { + visitor.rightHandNodes.forEach(referencer.visit, referencer); + } +} + +// Importing ImportDeclaration. +// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-moduledeclarationinstantiation +// https://github.com/estree/estree/blob/master/es6.md#importdeclaration +// FIXME: Now, we don't create module environment, because the context is +// implementation dependent. + +class Importer extends esrecurse__default["default"].Visitor { + constructor(declaration, referencer) { + super(null, referencer.options); + this.declaration = declaration; + this.referencer = referencer; + } + + visitImport(id, specifier) { + this.referencer.visitPattern(id, pattern => { + this.referencer.currentScope().__define(pattern, + new Definition( + Variable.ImportBinding, + pattern, + specifier, + this.declaration, + null, + null + )); + }); + } + + ImportNamespaceSpecifier(node) { + const local = (node.local || node.id); + + if (local) { + this.visitImport(local, node); + } + } + + ImportDefaultSpecifier(node) { + const local = (node.local || node.id); + + this.visitImport(local, node); + } + + ImportSpecifier(node) { + const local = (node.local || node.id); + + if (node.name) { + this.visitImport(node.name, node); + } else { + this.visitImport(local, node); + } + } +} + +// Referencing variables and creating bindings. +class Referencer extends esrecurse__default["default"].Visitor { + constructor(options, scopeManager) { + super(null, options); + this.options = options; + this.scopeManager = scopeManager; + this.parent = null; + this.isInnerMethodDefinition = false; + } + + currentScope() { + return this.scopeManager.__currentScope; + } + + close(node) { + while (this.currentScope() && node === this.currentScope().block) { + this.scopeManager.__currentScope = this.currentScope().__close(this.scopeManager); + } + } + + pushInnerMethodDefinition(isInnerMethodDefinition) { + const previous = this.isInnerMethodDefinition; + + this.isInnerMethodDefinition = isInnerMethodDefinition; + return previous; + } + + popInnerMethodDefinition(isInnerMethodDefinition) { + this.isInnerMethodDefinition = isInnerMethodDefinition; + } + + referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) { + const scope = this.currentScope(); + + assignments.forEach(assignment => { + scope.__referencing( + pattern, + Reference.WRITE, + assignment.right, + maybeImplicitGlobal, + pattern !== assignment.left, + init + ); + }); + } + + visitPattern(node, options, callback) { + let visitPatternOptions = options; + let visitPatternCallback = callback; + + if (typeof options === "function") { + visitPatternCallback = options; + visitPatternOptions = { processRightHandNodes: false }; + } + + traverseIdentifierInPattern( + this.options, + node, + visitPatternOptions.processRightHandNodes ? this : null, + visitPatternCallback + ); + } + + visitFunction(node) { + let i, iz; + + // FunctionDeclaration name is defined in upper scope + // NOTE: Not referring variableScope. It is intended. + // Since + // in ES5, FunctionDeclaration should be in FunctionBody. + // in ES6, FunctionDeclaration should be block scoped. + + if (node.type === Syntax.FunctionDeclaration) { + + // id is defined in upper scope + this.currentScope().__define(node.id, + new Definition( + Variable.FunctionName, + node.id, + node, + null, + null, + null + )); + } + + // FunctionExpression with name creates its special scope; + // FunctionExpressionNameScope. + if (node.type === Syntax.FunctionExpression && node.id) { + this.scopeManager.__nestFunctionExpressionNameScope(node); + } + + // Consider this function is in the MethodDefinition. + this.scopeManager.__nestFunctionScope(node, this.isInnerMethodDefinition); + + const that = this; + + /** + * Visit pattern callback + * @param {pattern} pattern pattern + * @param {Object} info info + * @returns {void} + */ + function visitPatternCallback(pattern, info) { + that.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + i, + info.rest + )); + + that.referencingDefaultValue(pattern, info.assignments, null, true); + } + + // Process parameter declarations. + for (i = 0, iz = node.params.length; i < iz; ++i) { + this.visitPattern(node.params[i], { processRightHandNodes: true }, visitPatternCallback); + } + + // if there's a rest argument, add that + if (node.rest) { + this.visitPattern({ + type: "RestElement", + argument: node.rest + }, pattern => { + this.currentScope().__define(pattern, + new ParameterDefinition( + pattern, + node, + node.params.length, + true + )); + }); + } + + // In TypeScript there are a number of function-like constructs which have no body, + // so check it exists before traversing + if (node.body) { + + // Skip BlockStatement to prevent creating BlockStatement scope. + if (node.body.type === Syntax.BlockStatement) { + this.visitChildren(node.body); + } else { + this.visit(node.body); + } + } + + this.close(node); + } + + visitClass(node) { + if (node.type === Syntax.ClassDeclaration) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node, + null, + null, + null + )); + } + + this.visit(node.superClass); + + this.scopeManager.__nestClassScope(node); + + if (node.id) { + this.currentScope().__define(node.id, + new Definition( + Variable.ClassName, + node.id, + node + )); + } + this.visit(node.body); + + this.close(node); + } + + visitProperty(node) { + let previous; + + if (node.computed) { + this.visit(node.key); + } + + const isMethodDefinition = node.type === Syntax.MethodDefinition; + + if (isMethodDefinition) { + previous = this.pushInnerMethodDefinition(true); + } + this.visit(node.value); + if (isMethodDefinition) { + this.popInnerMethodDefinition(previous); + } + } + + visitForIn(node) { + if (node.left.type === Syntax.VariableDeclaration && node.left.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + if (node.left.type === Syntax.VariableDeclaration) { + this.visit(node.left); + this.visitPattern(node.left.declarations[0].id, pattern => { + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, null, true, true); + }); + } else { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, true, false); + }); + } + this.visit(node.right); + this.visit(node.body); + + this.close(node); + } + + visitVariableDeclaration(variableTargetScope, type, node, index) { + + const decl = node.declarations[index]; + const init = decl.init; + + this.visitPattern(decl.id, { processRightHandNodes: true }, (pattern, info) => { + variableTargetScope.__define( + pattern, + new Definition( + type, + pattern, + decl, + node, + index, + node.kind + ) + ); + + this.referencingDefaultValue(pattern, info.assignments, null, true); + if (init) { + this.currentScope().__referencing(pattern, Reference.WRITE, init, null, !info.topLevel, true); + } + }); + } + + AssignmentExpression(node) { + if (PatternVisitor.isPattern(node.left)) { + if (node.operator === "=") { + this.visitPattern(node.left, { processRightHandNodes: true }, (pattern, info) => { + let maybeImplicitGlobal = null; + + if (!this.currentScope().isStrict) { + maybeImplicitGlobal = { + pattern, + node + }; + } + this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false); + this.currentScope().__referencing(pattern, Reference.WRITE, node.right, maybeImplicitGlobal, !info.topLevel, false); + }); + } else { + this.currentScope().__referencing(node.left, Reference.RW, node.right); + } + } else { + this.visit(node.left); + } + this.visit(node.right); + } + + CatchClause(node) { + this.scopeManager.__nestCatchScope(node); + + this.visitPattern(node.param, { processRightHandNodes: true }, (pattern, info) => { + this.currentScope().__define(pattern, + new Definition( + Variable.CatchClause, + node.param, + node, + null, + null, + null + )); + this.referencingDefaultValue(pattern, info.assignments, null, true); + }); + this.visit(node.body); + + this.close(node); + } + + Program(node) { + this.scopeManager.__nestGlobalScope(node); + + if (this.scopeManager.isGlobalReturn()) { + + // Force strictness of GlobalScope to false when using node.js scope. + this.currentScope().isStrict = false; + this.scopeManager.__nestFunctionScope(node, false); + } + + if (this.scopeManager.__isES6() && this.scopeManager.isModule()) { + this.scopeManager.__nestModuleScope(node); + } + + if (this.scopeManager.isStrictModeSupported() && this.scopeManager.isImpliedStrict()) { + this.currentScope().isStrict = true; + } + + this.visitChildren(node); + this.close(node); + } + + Identifier(node) { + this.currentScope().__referencing(node); + } + + // eslint-disable-next-line class-methods-use-this + PrivateIdentifier() { + + // Do nothing. + } + + UpdateExpression(node) { + if (PatternVisitor.isPattern(node.argument)) { + this.currentScope().__referencing(node.argument, Reference.RW, null); + } else { + this.visitChildren(node); + } + } + + MemberExpression(node) { + this.visit(node.object); + if (node.computed) { + this.visit(node.property); + } + } + + Property(node) { + this.visitProperty(node); + } + + PropertyDefinition(node) { + const { computed, key, value } = node; + + if (computed) { + this.visit(key); + } + if (value) { + this.scopeManager.__nestClassFieldInitializerScope(value); + this.visit(value); + this.close(value); + } + } + + StaticBlock(node) { + this.scopeManager.__nestClassStaticBlockScope(node); + + this.visitChildren(node); + + this.close(node); + } + + MethodDefinition(node) { + this.visitProperty(node); + } + + BreakStatement() {} // eslint-disable-line class-methods-use-this + + ContinueStatement() {} // eslint-disable-line class-methods-use-this + + LabeledStatement(node) { + this.visit(node.body); + } + + ForStatement(node) { + + // Create ForStatement declaration. + // NOTE: In ES6, ForStatement dynamically generates + // per iteration environment. However, escope is + // a static analyzer, we only generate one scope for ForStatement. + if (node.init && node.init.type === Syntax.VariableDeclaration && node.init.kind !== "var") { + this.scopeManager.__nestForScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ClassExpression(node) { + this.visitClass(node); + } + + ClassDeclaration(node) { + this.visitClass(node); + } + + CallExpression(node) { + + // Check this is direct call to eval + if (!this.scopeManager.__ignoreEval() && node.callee.type === Syntax.Identifier && node.callee.name === "eval") { + + // NOTE: This should be `variableScope`. Since direct eval call always creates Lexical environment and + // let / const should be enclosed into it. Only VariableDeclaration affects on the caller's environment. + this.currentScope().variableScope.__detectEval(); + } + this.visitChildren(node); + } + + BlockStatement(node) { + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestBlockScope(node); + } + + this.visitChildren(node); + + this.close(node); + } + + ThisExpression() { + this.currentScope().variableScope.__detectThis(); + } + + WithStatement(node) { + this.visit(node.object); + + // Then nest scope for WithStatement. + this.scopeManager.__nestWithScope(node); + + this.visit(node.body); + + this.close(node); + } + + VariableDeclaration(node) { + const variableTargetScope = (node.kind === "var") ? this.currentScope().variableScope : this.currentScope(); + + for (let i = 0, iz = node.declarations.length; i < iz; ++i) { + const decl = node.declarations[i]; + + this.visitVariableDeclaration(variableTargetScope, Variable.Variable, node, i); + if (decl.init) { + this.visit(decl.init); + } + } + } + + // sec 13.11.8 + SwitchStatement(node) { + this.visit(node.discriminant); + + if (this.scopeManager.__isES6()) { + this.scopeManager.__nestSwitchScope(node); + } + + for (let i = 0, iz = node.cases.length; i < iz; ++i) { + this.visit(node.cases[i]); + } + + this.close(node); + } + + FunctionDeclaration(node) { + this.visitFunction(node); + } + + FunctionExpression(node) { + this.visitFunction(node); + } + + ForOfStatement(node) { + this.visitForIn(node); + } + + ForInStatement(node) { + this.visitForIn(node); + } + + ArrowFunctionExpression(node) { + this.visitFunction(node); + } + + ImportDeclaration(node) { + assert__default["default"](this.scopeManager.__isES6() && this.scopeManager.isModule(), "ImportDeclaration should appear when the mode is ES6 and in the module context."); + + const importer = new Importer(node, this); + + importer.visit(node); + } + + visitExportDeclaration(node) { + if (node.source) { + return; + } + if (node.declaration) { + this.visit(node.declaration); + return; + } + + this.visitChildren(node); + } + + // TODO: ExportDeclaration doesn't exist. for bc? + ExportDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportAllDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportDefaultDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportNamedDeclaration(node) { + this.visitExportDeclaration(node); + } + + ExportSpecifier(node) { + + // TODO: `node.id` doesn't exist. for bc? + const local = (node.id || node.local); + + this.visit(local); + } + + MetaProperty() { // eslint-disable-line class-methods-use-this + + // do nothing. + } +} + +/* vim: set sw=4 ts=4 et tw=80 : */ + +const version = "7.2.2"; + +/* + Copyright (C) 2012-2014 Yusuke Suzuki + Copyright (C) 2013 Alex Seville + Copyright (C) 2014 Thiago de Arruda + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * Set the default options + * @returns {Object} options + */ +function defaultOptions() { + return { + optimistic: false, + directive: false, + nodejsScope: false, + impliedStrict: false, + sourceType: "script", // one of ['script', 'module', 'commonjs'] + ecmaVersion: 5, + childVisitorKeys: null, + fallback: "iteration" + }; +} + +/** + * Preform deep update on option object + * @param {Object} target Options + * @param {Object} override Updates + * @returns {Object} Updated options + */ +function updateDeeply(target, override) { + + /** + * Is hash object + * @param {Object} value Test value + * @returns {boolean} Result + */ + function isHashObject(value) { + return typeof value === "object" && value instanceof Object && !(value instanceof Array) && !(value instanceof RegExp); + } + + for (const key in override) { + if (Object.prototype.hasOwnProperty.call(override, key)) { + const val = override[key]; + + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; +} + +/** + * Main interface function. Takes an Espree syntax tree and returns the + * analyzed scopes. + * @function analyze + * @param {espree.Tree} tree Abstract Syntax Tree + * @param {Object} providedOptions Options that tailor the scope analysis + * @param {boolean} [providedOptions.optimistic=false] the optimistic flag + * @param {boolean} [providedOptions.directive=false] the directive flag + * @param {boolean} [providedOptions.ignoreEval=false] whether to check 'eval()' calls + * @param {boolean} [providedOptions.nodejsScope=false] whether the whole + * script is executed under node.js environment. When enabled, escope adds + * a function scope immediately following the global scope. + * @param {boolean} [providedOptions.impliedStrict=false] implied strict mode + * (if ecmaVersion >= 5). + * @param {string} [providedOptions.sourceType='script'] the source type of the script. one of 'script', 'module', and 'commonjs' + * @param {number} [providedOptions.ecmaVersion=5] which ECMAScript version is considered + * @param {Object} [providedOptions.childVisitorKeys=null] Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. + * @param {string} [providedOptions.fallback='iteration'] A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. + * @returns {ScopeManager} ScopeManager + */ +function analyze(tree, providedOptions) { + const options = updateDeeply(defaultOptions(), providedOptions); + const scopeManager = new ScopeManager(options); + const referencer = new Referencer(options, scopeManager); + + referencer.visit(tree); + + assert__default["default"](scopeManager.__currentScope === null, "currentScope should be null."); + + return scopeManager; +} + +/* vim: set sw=4 ts=4 et tw=80 : */ + +exports.Definition = Definition; +exports.PatternVisitor = PatternVisitor; +exports.Reference = Reference; +exports.Referencer = Referencer; +exports.Scope = Scope; +exports.ScopeManager = ScopeManager; +exports.Variable = Variable; +exports.analyze = analyze; +exports.version = version; +//# sourceMappingURL=eslint-scope.cjs.map diff --git a/node_modules/eslint-scope/lib/definition.js b/node_modules/eslint-scope/lib/definition.js index 172bfe23b..9744ef48b 100644 --- a/node_modules/eslint-scope/lib/definition.js +++ b/node_modules/eslint-scope/lib/definition.js @@ -21,18 +21,17 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; -const Variable = require("./variable"); +import Variable from "./variable.js"; /** - * @class Definition + * @constructor Definition */ class Definition { constructor(type, name, node, parent, index, kind) { /** - * @member {String} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). + * @member {string} Definition#type - type of the occurrence (e.g. "Parameter", "Variable", ...). */ this.type = type; @@ -52,19 +51,19 @@ class Definition { this.parent = parent; /** - * @member {Number?} Definition#index - the index in the declaration statement. + * @member {number?} Definition#index - the index in the declaration statement. */ this.index = index; /** - * @member {String?} Definition#kind - the kind of the declaration statement. + * @member {string?} Definition#kind - the kind of the declaration statement. */ this.kind = kind; } } /** - * @class ParameterDefinition + * @constructor ParameterDefinition */ class ParameterDefinition extends Definition { constructor(name, node, index, rest) { @@ -78,7 +77,7 @@ class ParameterDefinition extends Definition { } } -module.exports = { +export { ParameterDefinition, Definition }; diff --git a/node_modules/eslint-scope/lib/index.js b/node_modules/eslint-scope/lib/index.js index 0f16fa40f..cd0678d2e 100644 --- a/node_modules/eslint-scope/lib/index.js +++ b/node_modules/eslint-scope/lib/index.js @@ -45,18 +45,16 @@ * The main interface is the {@link analyze} function. * @module escope */ -"use strict"; - /* eslint no-underscore-dangle: ["error", { "allow": ["__currentScope"] }] */ -const assert = require("assert"); +import assert from "assert"; + +import ScopeManager from "./scope-manager.js"; +import Referencer from "./referencer.js"; +import Reference from "./reference.js"; +import Variable from "./variable.js"; -const ScopeManager = require("./scope-manager"); -const Referencer = require("./referencer"); -const Reference = require("./reference"); -const Variable = require("./variable"); -const Scope = require("./scope").Scope; -const version = require("../package.json").version; +import eslintScopeVersion from "./version.js"; /** * Set the default options @@ -68,7 +66,7 @@ function defaultOptions() { directive: false, nodejsScope: false, impliedStrict: false, - sourceType: "script", // one of ['script', 'module'] + sourceType: "script", // one of ['script', 'module', 'commonjs'] ecmaVersion: 5, childVisitorKeys: null, fallback: "iteration" @@ -77,15 +75,15 @@ function defaultOptions() { /** * Preform deep update on option object - * @param {Object} target - Options - * @param {Object} override - Updates + * @param {Object} target Options + * @param {Object} override Updates * @returns {Object} Updated options */ function updateDeeply(target, override) { /** * Is hash object - * @param {Object} value - Test value + * @param {Object} value Test value * @returns {boolean} Result */ function isHashObject(value) { @@ -114,20 +112,20 @@ function updateDeeply(target, override) { * Main interface function. Takes an Espree syntax tree and returns the * analyzed scopes. * @function analyze - * @param {espree.Tree} tree - Abstract Syntax Tree - * @param {Object} providedOptions - Options that tailor the scope analysis - * @param {boolean} [providedOptions.optimistic=false] - the optimistic flag - * @param {boolean} [providedOptions.directive=false]- the directive flag - * @param {boolean} [providedOptions.ignoreEval=false]- whether to check 'eval()' calls - * @param {boolean} [providedOptions.nodejsScope=false]- whether the whole + * @param {espree.Tree} tree Abstract Syntax Tree + * @param {Object} providedOptions Options that tailor the scope analysis + * @param {boolean} [providedOptions.optimistic=false] the optimistic flag + * @param {boolean} [providedOptions.directive=false] the directive flag + * @param {boolean} [providedOptions.ignoreEval=false] whether to check 'eval()' calls + * @param {boolean} [providedOptions.nodejsScope=false] whether the whole * script is executed under node.js environment. When enabled, escope adds * a function scope immediately following the global scope. - * @param {boolean} [providedOptions.impliedStrict=false]- implied strict mode + * @param {boolean} [providedOptions.impliedStrict=false] implied strict mode * (if ecmaVersion >= 5). - * @param {string} [providedOptions.sourceType='script']- the source type of the script. one of 'script' and 'module' - * @param {number} [providedOptions.ecmaVersion=5]- which ECMAScript version is considered - * @param {Object} [providedOptions.childVisitorKeys=null] - Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. - * @param {string} [providedOptions.fallback='iteration'] - A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. + * @param {string} [providedOptions.sourceType='script'] the source type of the script. one of 'script', 'module', and 'commonjs' + * @param {number} [providedOptions.ecmaVersion=5] which ECMAScript version is considered + * @param {Object} [providedOptions.childVisitorKeys=null] Additional known visitor keys. See [esrecurse](https://github.com/estools/esrecurse)'s the `childVisitorKeys` option. + * @param {string} [providedOptions.fallback='iteration'] A kind of the fallback in order to encounter with unknown node. See [esrecurse](https://github.com/estools/esrecurse)'s the `fallback` option. * @returns {ScopeManager} ScopeManager */ function analyze(tree, providedOptions) { @@ -142,10 +140,10 @@ function analyze(tree, providedOptions) { return scopeManager; } -module.exports = { +export { /** @name module:escope.version */ - version, + eslintScopeVersion as version, /** @name module:escope.Reference */ Reference, @@ -153,13 +151,22 @@ module.exports = { /** @name module:escope.Variable */ Variable, - /** @name module:escope.Scope */ - Scope, - /** @name module:escope.ScopeManager */ ScopeManager, + + /** @name module:escope.Referencer */ + Referencer, + analyze }; +/** @name module:escope.Definition */ +export { Definition } from "./definition.js"; + +/** @name module:escope.PatternVisitor */ +export { default as PatternVisitor } from "./pattern-visitor.js"; + +/** @name module:escope.Scope */ +export { Scope } from "./scope.js"; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/pattern-visitor.js b/node_modules/eslint-scope/lib/pattern-visitor.js index afa629173..a9ff48e50 100644 --- a/node_modules/eslint-scope/lib/pattern-visitor.js +++ b/node_modules/eslint-scope/lib/pattern-visitor.js @@ -21,16 +21,17 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; /* eslint-disable no-undefined */ -const Syntax = require("estraverse").Syntax; -const esrecurse = require("esrecurse"); +import estraverse from "estraverse"; +import esrecurse from "esrecurse"; + +const { Syntax } = estraverse; /** * Get last array element - * @param {array} xs - array + * @param {Array} xs array * @returns {any} Last elment */ function getLast(xs) { @@ -147,6 +148,6 @@ class PatternVisitor extends esrecurse.Visitor { } } -module.exports = PatternVisitor; +export default PatternVisitor; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/reference.js b/node_modules/eslint-scope/lib/reference.js index 9529827fe..e657d6286 100644 --- a/node_modules/eslint-scope/lib/reference.js +++ b/node_modules/eslint-scope/lib/reference.js @@ -21,7 +21,6 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; const READ = 0x1; const WRITE = 0x2; @@ -29,7 +28,7 @@ const RW = READ | WRITE; /** * A Reference represents a single occurrence of an identifier in code. - * @class Reference + * @constructor Reference */ class Reference { constructor(ident, scope, flag, writeExpr, maybeImplicitGlobal, partial, init) { @@ -91,7 +90,7 @@ class Reference { /** * Whether the reference is static. - * @method Reference#isStatic + * @function Reference#isStatic * @returns {boolean} static */ isStatic() { @@ -100,7 +99,7 @@ class Reference { /** * Whether the reference is writeable. - * @method Reference#isWrite + * @function Reference#isWrite * @returns {boolean} write */ isWrite() { @@ -109,7 +108,7 @@ class Reference { /** * Whether the reference is readable. - * @method Reference#isRead + * @function Reference#isRead * @returns {boolean} read */ isRead() { @@ -118,7 +117,7 @@ class Reference { /** * Whether the reference is read-only. - * @method Reference#isReadOnly + * @function Reference#isReadOnly * @returns {boolean} read only */ isReadOnly() { @@ -127,7 +126,7 @@ class Reference { /** * Whether the reference is write-only. - * @method Reference#isWriteOnly + * @function Reference#isWriteOnly * @returns {boolean} write only */ isWriteOnly() { @@ -136,7 +135,7 @@ class Reference { /** * Whether the reference is read-write. - * @method Reference#isReadWrite + * @function Reference#isReadWrite * @returns {boolean} read write */ isReadWrite() { @@ -162,6 +161,6 @@ Reference.WRITE = WRITE; */ Reference.RW = RW; -module.exports = Reference; +export default Reference; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/referencer.js b/node_modules/eslint-scope/lib/referencer.js index 63d1935b3..6a5da5214 100644 --- a/node_modules/eslint-scope/lib/referencer.js +++ b/node_modules/eslint-scope/lib/referencer.js @@ -21,28 +21,26 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; /* eslint-disable no-underscore-dangle */ /* eslint-disable no-undefined */ -const Syntax = require("estraverse").Syntax; -const esrecurse = require("esrecurse"); -const Reference = require("./reference"); -const Variable = require("./variable"); -const PatternVisitor = require("./pattern-visitor"); -const definition = require("./definition"); -const assert = require("assert"); +import estraverse from "estraverse"; +import esrecurse from "esrecurse"; +import Reference from "./reference.js"; +import Variable from "./variable.js"; +import PatternVisitor from "./pattern-visitor.js"; +import { Definition, ParameterDefinition } from "./definition.js"; +import assert from "assert"; -const ParameterDefinition = definition.ParameterDefinition; -const Definition = definition.Definition; +const { Syntax } = estraverse; /** * Traverse identifier in pattern - * @param {Object} options - options - * @param {pattern} rootPattern - root pattern - * @param {Refencer} referencer - referencer - * @param {callback} callback - callback + * @param {Object} options options + * @param {pattern} rootPattern root pattern + * @param {Refencer} referencer referencer + * @param {callback} callback callback * @returns {void} */ function traverseIdentifierInPattern(options, rootPattern, referencer, callback) { @@ -209,8 +207,8 @@ class Referencer extends esrecurse.Visitor { /** * Visit pattern callback - * @param {pattern} pattern - pattern - * @param {Object} info - info + * @param {pattern} pattern pattern + * @param {Object} info info * @returns {void} */ function visitPatternCallback(pattern, info) { @@ -411,7 +409,7 @@ class Referencer extends esrecurse.Visitor { Program(node) { this.scopeManager.__nestGlobalScope(node); - if (this.scopeManager.__isNodejsScope()) { + if (this.scopeManager.isGlobalReturn()) { // Force strictness of GlobalScope to false when using node.js scope. this.currentScope().isStrict = false; @@ -434,6 +432,12 @@ class Referencer extends esrecurse.Visitor { this.currentScope().__referencing(node); } + // eslint-disable-next-line class-methods-use-this + PrivateIdentifier() { + + // Do nothing. + } + UpdateExpression(node) { if (PatternVisitor.isPattern(node.argument)) { this.currentScope().__referencing(node.argument, Reference.RW, null); @@ -453,6 +457,27 @@ class Referencer extends esrecurse.Visitor { this.visitProperty(node); } + PropertyDefinition(node) { + const { computed, key, value } = node; + + if (computed) { + this.visit(key); + } + if (value) { + this.scopeManager.__nestClassFieldInitializerScope(value); + this.visit(value); + this.close(value); + } + } + + StaticBlock(node) { + this.scopeManager.__nestClassStaticBlockScope(node); + + this.visitChildren(node); + + this.close(node); + } + MethodDefinition(node) { this.visitProperty(node); } @@ -624,6 +649,6 @@ class Referencer extends esrecurse.Visitor { } } -module.exports = Referencer; +export default Referencer; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/scope-manager.js b/node_modules/eslint-scope/lib/scope-manager.js index c1927994b..d2270f1f9 100644 --- a/node_modules/eslint-scope/lib/scope-manager.js +++ b/node_modules/eslint-scope/lib/scope-manager.js @@ -21,26 +21,27 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; /* eslint-disable no-underscore-dangle */ -const Scope = require("./scope"); -const assert = require("assert"); - -const GlobalScope = Scope.GlobalScope; -const CatchScope = Scope.CatchScope; -const WithScope = Scope.WithScope; -const ModuleScope = Scope.ModuleScope; -const ClassScope = Scope.ClassScope; -const SwitchScope = Scope.SwitchScope; -const FunctionScope = Scope.FunctionScope; -const ForScope = Scope.ForScope; -const FunctionExpressionNameScope = Scope.FunctionExpressionNameScope; -const BlockScope = Scope.BlockScope; +import { + BlockScope, + CatchScope, + ClassFieldInitializerScope, + ClassStaticBlockScope, + ClassScope, + ForScope, + FunctionExpressionNameScope, + FunctionScope, + GlobalScope, + ModuleScope, + SwitchScope, + WithScope +} from "./scope.js"; +import assert from "assert"; /** - * @class ScopeManager + * @constructor ScopeManager */ class ScopeManager { constructor(options) { @@ -64,8 +65,8 @@ class ScopeManager { return this.__options.ignoreEval; } - __isNodejsScope() { - return this.__options.nodejsScope; + isGlobalReturn() { + return this.__options.nodejsScope || this.__options.sourceType === "commonjs"; } isModule() { @@ -91,8 +92,7 @@ class ScopeManager { * "are declared by the node" means the node is same as `Variable.defs[].node` or `Variable.defs[].parent`. * If the node declares nothing, this method returns an empty array. * CAUTION: This API is experimental. See https://github.com/estools/escope/pull/69 for more details. - * - * @param {Espree.Node} node - a node to get. + * @param {Espree.Node} node a node to get. * @returns {Variable[]} variables that declared by the node. */ getDeclaredVariables(node) { @@ -101,16 +101,16 @@ class ScopeManager { /** * acquire scope from node. - * @method ScopeManager#acquire - * @param {Espree.Node} node - node for the acquired scope. - * @param {boolean=} inner - look up the most inner scope, default value is false. + * @function ScopeManager#acquire + * @param {Espree.Node} node node for the acquired scope. + * @param {?boolean} [inner=false] look up the most inner scope, default value is false. * @returns {Scope?} Scope from node */ acquire(node, inner) { /** * predicate - * @param {Scope} testScope - scope to test + * @param {Scope} testScope scope to test * @returns {boolean} predicate */ function predicate(testScope) { @@ -155,8 +155,8 @@ class ScopeManager { /** * acquire all scopes from node. - * @method ScopeManager#acquireAll - * @param {Espree.Node} node - node for the acquired scope. + * @function ScopeManager#acquireAll + * @param {Espree.Node} node node for the acquired scope. * @returns {Scopes?} Scope array */ acquireAll(node) { @@ -165,9 +165,9 @@ class ScopeManager { /** * release the node. - * @method ScopeManager#release - * @param {Espree.Node} node - releasing node. - * @param {boolean=} inner - look up the most inner scope, default value is false. + * @function ScopeManager#release + * @param {Espree.Node} node releasing node. + * @param {?boolean} [inner=false] look up the most inner scope, default value is false. * @returns {Scope?} upper scope for the node. */ release(node, inner) { @@ -225,6 +225,14 @@ class ScopeManager { return this.__nestScope(new ClassScope(this, this.__currentScope, node)); } + __nestClassFieldInitializerScope(node) { + return this.__nestScope(new ClassFieldInitializerScope(this, this.__currentScope, node)); + } + + __nestClassStaticBlockScope(node) { + return this.__nestScope(new ClassStaticBlockScope(this, this.__currentScope, node)); + } + __nestSwitchScope(node) { return this.__nestScope(new SwitchScope(this, this.__currentScope, node)); } @@ -242,6 +250,6 @@ class ScopeManager { } } -module.exports = ScopeManager; +export default ScopeManager; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/scope.js b/node_modules/eslint-scope/lib/scope.js index bdb5f637f..0619b9068 100644 --- a/node_modules/eslint-scope/lib/scope.js +++ b/node_modules/eslint-scope/lib/scope.js @@ -21,24 +21,25 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; /* eslint-disable no-underscore-dangle */ /* eslint-disable no-undefined */ -const Syntax = require("estraverse").Syntax; +import estraverse from "estraverse"; -const Reference = require("./reference"); -const Variable = require("./variable"); -const Definition = require("./definition").Definition; -const assert = require("assert"); +import Reference from "./reference.js"; +import Variable from "./variable.js"; +import { Definition } from "./definition.js"; +import assert from "assert"; + +const { Syntax } = estraverse; /** * Test if scope is struct - * @param {Scope} scope - scope - * @param {Block} block - block - * @param {boolean} isMethodDefinition - is method definition - * @param {boolean} useDirective - use directive + * @param {Scope} scope scope + * @param {Block} block block + * @param {boolean} isMethodDefinition is method definition + * @param {boolean} useDirective use directive * @returns {boolean} is strict scope */ function isStrictScope(scope, block, isMethodDefinition, useDirective) { @@ -121,8 +122,8 @@ function isStrictScope(scope, block, isMethodDefinition, useDirective) { /** * Register scope - * @param {ScopeManager} scopeManager - scope manager - * @param {Scope} scope - scope + * @param {ScopeManager} scopeManager scope manager + * @param {Scope} scope scope * @returns {void} */ function registerScope(scopeManager, scope) { @@ -139,7 +140,7 @@ function registerScope(scopeManager, scope) { /** * Should be statically - * @param {Object} def - def + * @param {Object} def def * @returns {boolean} should be statically */ function shouldBeStatically(def) { @@ -150,14 +151,15 @@ function shouldBeStatically(def) { } /** - * @class Scope + * @constructor Scope */ class Scope { constructor(scopeManager, type, upperScope, block, isMethodDefinition) { /** - * One of 'module', 'block', 'switch', 'function', 'catch', 'with', 'function', 'class', 'global'. - * @member {String} Scope#type + * One of "global", "module", "function", "function-expression-name", "block", "switch", "catch", "with", "for", + * "class", "class-field-initializer", "class-static-block". + * @member {string} Scope#type */ this.type = type; @@ -224,7 +226,13 @@ class Scope { * @member {Scope} Scope#variableScope */ this.variableScope = - (this.type === "global" || this.type === "function" || this.type === "module") ? this : upperScope.variableScope; + this.type === "global" || + this.type === "module" || + this.type === "function" || + this.type === "class-field-initializer" || + this.type === "class-static-block" + ? this + : upperScope.variableScope; /** * Whether this scope is created by a FunctionExpression. @@ -255,7 +263,9 @@ class Scope { * Whether 'use strict' is in effect in this scope. * @member {boolean} Scope#isStrict */ - this.isStrict = isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()); + this.isStrict = scopeManager.isStrictModeSupported() + ? isStrictScope(this, block, isMethodDefinition, scopeManager.__useDirective()) + : false; /** * List of nested {@link Scope}s. @@ -461,8 +471,8 @@ class Scope { /** * returns resolved {Reference} - * @method Scope#resolve - * @param {Espree.Identifier} ident - identifier to be resolved. + * @function Scope#resolve + * @param {Espree.Identifier} ident identifier to be resolved. * @returns {Reference} reference */ resolve(ident) { @@ -481,7 +491,7 @@ class Scope { /** * returns this scope is static - * @method Scope#isStatic + * @function Scope#isStatic * @returns {boolean} static */ isStatic() { @@ -490,7 +500,7 @@ class Scope { /** * returns this scope has materialized arguments - * @method Scope#isArgumentsMaterialized + * @function Scope#isArgumentsMaterialized * @returns {boolean} arguemnts materialized */ isArgumentsMaterialized() { // eslint-disable-line class-methods-use-this @@ -499,7 +509,7 @@ class Scope { /** * returns this scope has materialized `this` reference - * @method Scope#isThisMaterialized + * @function Scope#isThisMaterialized * @returns {boolean} this materialized */ isThisMaterialized() { // eslint-disable-line class-methods-use-this @@ -527,10 +537,10 @@ class GlobalScope extends Scope { variables: [], /** - * List of {@link Reference}s that are left to be resolved (i.e. which - * need to be linked to the variable they refer to). - * @member {Reference[]} Scope#implicit#left - */ + * List of {@link Reference}s that are left to be resolved (i.e. which + * need to be linked to the variable they refer to). + * @member {Reference[]} Scope#implicit#left + */ left: [] }; } @@ -731,7 +741,19 @@ class ClassScope extends Scope { } } -module.exports = { +class ClassFieldInitializerScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class-field-initializer", upperScope, block, true); + } +} + +class ClassStaticBlockScope extends Scope { + constructor(scopeManager, upperScope, block) { + super(scopeManager, "class-static-block", upperScope, block, true); + } +} + +export { Scope, GlobalScope, ModuleScope, @@ -742,7 +764,9 @@ module.exports = { SwitchScope, FunctionScope, ForScope, - ClassScope + ClassScope, + ClassFieldInitializerScope, + ClassStaticBlockScope }; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/variable.js b/node_modules/eslint-scope/lib/variable.js index 702c4780a..286202f72 100644 --- a/node_modules/eslint-scope/lib/variable.js +++ b/node_modules/eslint-scope/lib/variable.js @@ -21,19 +21,18 @@ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -"use strict"; /** * A Variable represents a locally scoped identifier. These include arguments to * functions. - * @class Variable + * @constructor Variable */ class Variable { constructor(name, scope) { /** * The variable name, as given in the source code. - * @member {String} Variable#name + * @member {string} Variable#name */ this.name = name; @@ -83,6 +82,6 @@ Variable.Variable = "Variable"; Variable.ImportBinding = "ImportBinding"; Variable.ImplicitGlobalVariable = "ImplicitGlobalVariable"; -module.exports = Variable; +export default Variable; /* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/node_modules/eslint-scope/lib/version.js b/node_modules/eslint-scope/lib/version.js new file mode 100644 index 000000000..7e7f65220 --- /dev/null +++ b/node_modules/eslint-scope/lib/version.js @@ -0,0 +1,3 @@ +const version = "7.2.2"; + +export default version; diff --git a/node_modules/eslint-scope/package.json b/node_modules/eslint-scope/package.json index 4b7b5fdb5..0aae36d38 100644 --- a/node_modules/eslint-scope/package.json +++ b/node_modules/eslint-scope/package.json @@ -1,76 +1,63 @@ { - "_from": "eslint-scope@^5.1.1", - "_id": "eslint-scope@5.1.1", - "_inBundle": false, - "_integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "_location": "/eslint-scope", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "eslint-scope@^5.1.1", - "name": "eslint-scope", - "escapedName": "eslint-scope", - "rawSpec": "^5.1.1", - "saveSpec": null, - "fetchSpec": "^5.1.1" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "_shasum": "e786e59a66cb92b3f6c1fb0d508aab174848f48c", - "_spec": "eslint-scope@^5.1.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "bugs": { - "url": "https://github.com/eslint/eslint-scope/issues" - }, - "bundleDependencies": false, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "deprecated": false, + "name": "eslint-scope", "description": "ECMAScript scope analyzer for ESLint", - "devDependencies": { - "@typescript-eslint/parser": "^1.11.0", - "chai": "^4.2.0", - "eslint": "^6.0.1", - "eslint-config-eslint": "^5.0.1", - "eslint-plugin-node": "^9.1.0", - "eslint-release": "^1.0.0", - "eslint-visitor-keys": "^1.2.0", - "espree": "^7.1.0", - "istanbul": "^0.4.5", - "mocha": "^6.1.4", - "npm-license": "^0.3.3", - "shelljs": "^0.8.3", - "typescript": "^3.5.2" + "homepage": "http://github.com/eslint/eslint-scope", + "main": "./dist/eslint-scope.cjs", + "type": "module", + "exports": { + ".": { + "import": "./lib/index.js", + "require": "./dist/eslint-scope.cjs" + }, + "./package.json": "./package.json" }, + "version": "7.2.2", "engines": { - "node": ">=8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "files": [ - "LICENSE", - "README.md", - "lib" - ], - "homepage": "http://github.com/eslint/eslint-scope", - "license": "BSD-2-Clause", - "main": "lib/index.js", - "name": "eslint-scope", - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint-scope.git" + "repository": "eslint/eslint-scope", + "funding": "https://opencollective.com/eslint", + "bugs": { + "url": "https://github.com/eslint/eslint-scope/issues" }, + "license": "BSD-2-Clause", "scripts": { + "build": "rollup -c", + "lint": "npm run build && node Makefile.js lint", + "update-version": "node tools/update-version.js", + "test": "npm run build && node Makefile.js test", + "prepublishOnly": "npm run update-version && npm run build", + "generate-release": "eslint-generate-release", "generate-alpharelease": "eslint-generate-prerelease alpha", "generate-betarelease": "eslint-generate-prerelease beta", "generate-rcrelease": "eslint-generate-prerelease rc", - "generate-release": "eslint-generate-release", - "lint": "node Makefile.js lint", - "publish-release": "eslint-publish-release", - "test": "node Makefile.js test" + "publish-release": "eslint-publish-release" + }, + "files": [ + "LICENSE", + "README.md", + "lib", + "dist/eslint-scope.cjs" + ], + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, - "version": "5.1.1" + "devDependencies": { + "@typescript-eslint/parser": "^4.28.1", + "c8": "^7.7.3", + "chai": "^4.3.4", + "eslint": "^7.29.0", + "eslint-config-eslint": "^7.0.0", + "eslint-plugin-jsdoc": "^35.4.1", + "eslint-plugin-node": "^11.1.0", + "eslint-release": "^3.2.0", + "eslint-visitor-keys": "^3.3.0", + "espree": "^9.3.1", + "mocha": "^9.0.1", + "npm-license": "^0.3.3", + "rollup": "^2.52.7", + "shelljs": "^0.8.4", + "typescript": "^4.3.5" + } } diff --git a/node_modules/eslint-utils/README.md b/node_modules/eslint-utils/README.md deleted file mode 100644 index 0b917591b..000000000 --- a/node_modules/eslint-utils/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# eslint-utils - -[![npm version](https://img.shields.io/npm/v/eslint-utils.svg)](https://www.npmjs.com/package/eslint-utils) -[![Downloads/month](https://img.shields.io/npm/dm/eslint-utils.svg)](http://www.npmtrends.com/eslint-utils) -[![Build Status](https://github.com/mysticatea/eslint-utils/workflows/CI/badge.svg)](https://github.com/mysticatea/eslint-utils/actions) -[![Coverage Status](https://codecov.io/gh/mysticatea/eslint-utils/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/eslint-utils) -[![Dependency Status](https://david-dm.org/mysticatea/eslint-utils.svg)](https://david-dm.org/mysticatea/eslint-utils) - -## 🏁 Goal - -This package provides utility functions and classes for make ESLint custom rules. - -For examples: - -- [getStaticValue](https://eslint-utils.mysticatea.dev/api/ast-utils.html#getstaticvalue) evaluates static value on AST. -- [ReferenceTracker](https://eslint-utils.mysticatea.dev/api/scope-utils.html#referencetracker-class) checks the members of modules/globals as handling assignments and destructuring. - -## 📖 Usage - -See [documentation](https://eslint-utils.mysticatea.dev/). - -## 📰 Changelog - -See [releases](https://github.com/mysticatea/eslint-utils/releases). - -## ❤️ Contributing - -Welcome contributing! - -Please use GitHub's Issues/PRs. - -### Development Tools - -- `npm test` runs tests and measures coverage. -- `npm run clean` removes the coverage result of `npm test` command. -- `npm run coverage` shows the coverage result of the last `npm test` command. -- `npm run lint` runs ESLint. -- `npm run watch` runs tests on each file change. diff --git a/node_modules/eslint-utils/index.js.map b/node_modules/eslint-utils/index.js.map deleted file mode 100644 index 5fab2d406..000000000 --- a/node_modules/eslint-utils/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sources":["src/get-innermost-scope.js","src/find-variable.js","src/token-predicate.js","src/get-function-head-location.js","src/get-static-value.js","src/get-string-if-constant.js","src/get-property-name.js","src/get-function-name-with-kind.js","src/has-side-effect.js","src/is-parenthesized.js","src/pattern-matcher.js","src/reference-tracker.js","src/index.js"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return token.value === \"=>\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return token.value === \",\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return token.value === \";\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return token.value === \":\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return token.value === \"(\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return token.value === \")\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return token.value === \"[\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return token.value === \"]\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return token.value === \"{\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return token.value === \"}\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return (\n token.type === \"Line\" ||\n token.type === \"Block\" ||\n token.type === \"Shebang\"\n )\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: Object.assign({}, start),\n end: Object.assign({}, end),\n }\n}\n","/* globals BigInt, globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable\"\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ])\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n ...Object.getOwnPropertyNames(Math)\n .map(k => Math[k])\n .filter(f => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n Symbol,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter(f => typeof f === \"function\")\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: Math.pow(left.value, right.value) }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = calleeNode.computed\n ? getStaticValueR(calleeNode.property, initialScope)\n : { value: calleeNode.property.name }\n\n if (property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n ) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.parent.kind === \"const\" &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = node.computed\n ? getStaticValueR(node.property, initialScope)\n : { value: node.property.name }\n\n if (property != null && !isGetter(object.value, property.value)) {\n return { value: object.value[property.value] }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = propertyNode.computed\n ? getStaticValueR(propertyNode.key, initialScope)\n : { value: propertyNode.key.name }\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map(q => q.value.cooked)\n strings.raw = node.quasi.quasis.map(q => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @returns {string} The name and kind of the function node.\n */\nexport function getFunctionNameWithKind(node) {\n const parent = node.parent\n const tokens = []\n\n if (parent.type === \"MethodDefinition\" && parent.static) {\n tokens.push(\"static\")\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\", \"function\")\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else {\n tokens.push(\"function\")\n }\n\n if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else {\n const name = getPropertyName(parent)\n\n if (name) {\n tokens.push(`'${name}'`)\n }\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n }\n if (\n parent.type === \"AssignmentExpression\" &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n }\n }\n\n return tokens.join(\" \")\n}\n","import evk from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ])\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || evk.getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n })\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {}\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || evk.KEYS\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (node == null) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some(r => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {boolean} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = node.parent\n\n switch (parent && parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return parent.expressions[parent.expressions.length - 1] === node\n case \"ChainExpression\":\n return true\n\n default:\n return false\n }\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = {}\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? Object.assign(\n { default: nextTraceMap },\n nextTraceMap\n )\n : { default: nextTraceMap }\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind\"\nimport { getInnermostScope } from \"./get-innermost-scope\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStaticValue } from \"./get-static-value\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\nimport { hasSideEffect } from \"./has-side-effect\"\nimport { isParenthesized } from \"./is-parenthesized\"\nimport { PatternMatcher } from \"./pattern-matcher\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,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gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/eslint-utils/index.mjs.map b/node_modules/eslint-utils/index.mjs.map deleted file mode 100644 index 0af151944..000000000 --- a/node_modules/eslint-utils/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs","sources":["src/get-innermost-scope.js","src/find-variable.js","src/token-predicate.js","src/get-function-head-location.js","src/get-static-value.js","src/get-string-if-constant.js","src/get-property-name.js","src/get-function-name-with-kind.js","src/has-side-effect.js","src/is-parenthesized.js","src/pattern-matcher.js","src/reference-tracker.js","src/index.js"],"sourcesContent":["/**\n * Get the innermost scope which contains a given location.\n * @param {Scope} initialScope The initial scope to search.\n * @param {Node} node The location to search.\n * @returns {Scope} The innermost scope.\n */\nexport function getInnermostScope(initialScope, node) {\n const location = node.range[0]\n\n let scope = initialScope\n let found = false\n do {\n found = false\n for (const childScope of scope.childScopes) {\n const range = childScope.block.range\n\n if (range[0] <= location && location < range[1]) {\n scope = childScope\n found = true\n break\n }\n }\n } while (found)\n\n return scope\n}\n","import { getInnermostScope } from \"./get-innermost-scope\"\n\n/**\n * Find the variable of a given name.\n * @param {Scope} initialScope The scope to start finding.\n * @param {string|Node} nameOrNode The variable name to find. If this is a Node object then it should be an Identifier node.\n * @returns {Variable|null} The found variable or null.\n */\nexport function findVariable(initialScope, nameOrNode) {\n let name = \"\"\n let scope = initialScope\n\n if (typeof nameOrNode === \"string\") {\n name = nameOrNode\n } else {\n name = nameOrNode.name\n scope = getInnermostScope(scope, nameOrNode)\n }\n\n while (scope != null) {\n const variable = scope.set.get(name)\n if (variable != null) {\n return variable\n }\n scope = scope.upper\n }\n\n return null\n}\n","/**\n * Negate the result of `this` calling.\n * @param {Token} token The token to check.\n * @returns {boolean} `true` if the result of `this(token)` is `false`.\n */\nfunction negate0(token) {\n return !this(token) //eslint-disable-line no-invalid-this\n}\n\n/**\n * Creates the negate function of the given function.\n * @param {function(Token):boolean} f - The function to negate.\n * @returns {function(Token):boolean} Negated function.\n */\nfunction negate(f) {\n return negate0.bind(f)\n}\n\n/**\n * Checks if the given token is an arrow token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an arrow token.\n */\nexport function isArrowToken(token) {\n return token.value === \"=>\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comma token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comma token.\n */\nexport function isCommaToken(token) {\n return token.value === \",\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a semicolon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a semicolon token.\n */\nexport function isSemicolonToken(token) {\n return token.value === \";\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a colon token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a colon token.\n */\nexport function isColonToken(token) {\n return token.value === \":\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening parenthesis token.\n */\nexport function isOpeningParenToken(token) {\n return token.value === \"(\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing parenthesis token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing parenthesis token.\n */\nexport function isClosingParenToken(token) {\n return token.value === \")\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening square bracket token.\n */\nexport function isOpeningBracketToken(token) {\n return token.value === \"[\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing square bracket token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing square bracket token.\n */\nexport function isClosingBracketToken(token) {\n return token.value === \"]\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is an opening brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is an opening brace token.\n */\nexport function isOpeningBraceToken(token) {\n return token.value === \"{\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a closing brace token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a closing brace token.\n */\nexport function isClosingBraceToken(token) {\n return token.value === \"}\" && token.type === \"Punctuator\"\n}\n\n/**\n * Checks if the given token is a comment token or not.\n * @param {Token} token - The token to check.\n * @returns {boolean} `true` if the token is a comment token.\n */\nexport function isCommentToken(token) {\n return (\n token.type === \"Line\" ||\n token.type === \"Block\" ||\n token.type === \"Shebang\"\n )\n}\n\nexport const isNotArrowToken = negate(isArrowToken)\nexport const isNotCommaToken = negate(isCommaToken)\nexport const isNotSemicolonToken = negate(isSemicolonToken)\nexport const isNotColonToken = negate(isColonToken)\nexport const isNotOpeningParenToken = negate(isOpeningParenToken)\nexport const isNotClosingParenToken = negate(isClosingParenToken)\nexport const isNotOpeningBracketToken = negate(isOpeningBracketToken)\nexport const isNotClosingBracketToken = negate(isClosingBracketToken)\nexport const isNotOpeningBraceToken = negate(isOpeningBraceToken)\nexport const isNotClosingBraceToken = negate(isClosingBraceToken)\nexport const isNotCommentToken = negate(isCommentToken)\n","import { isArrowToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the `(` token of the given function node.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {Token} `(` token.\n */\nfunction getOpeningParenOfParams(node, sourceCode) {\n return node.id\n ? sourceCode.getTokenAfter(node.id, isOpeningParenToken)\n : sourceCode.getFirstToken(node, isOpeningParenToken)\n}\n\n/**\n * Get the location of the given function node for reporting.\n * @param {Node} node - The function node to get.\n * @param {SourceCode} sourceCode - The source code object to get tokens.\n * @returns {string} The location of the function node for reporting.\n */\nexport function getFunctionHeadLocation(node, sourceCode) {\n const parent = node.parent\n let start = null\n let end = null\n\n if (node.type === \"ArrowFunctionExpression\") {\n const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken)\n\n start = arrowToken.loc.start\n end = arrowToken.loc.end\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n start = parent.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n } else {\n start = node.loc.start\n end = getOpeningParenOfParams(node, sourceCode).loc.start\n }\n\n return {\n start: Object.assign({}, start),\n end: Object.assign({}, end),\n }\n}\n","/* globals BigInt, globalThis, global, self, window */\n\nimport { findVariable } from \"./find-variable\"\n\nconst globalObject =\n typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {}\n\nconst builtinNames = Object.freeze(\n new Set([\n \"Array\",\n \"ArrayBuffer\",\n \"BigInt\",\n \"BigInt64Array\",\n \"BigUint64Array\",\n \"Boolean\",\n \"DataView\",\n \"Date\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"Float32Array\",\n \"Float64Array\",\n \"Function\",\n \"Infinity\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"isFinite\",\n \"isNaN\",\n \"isPrototypeOf\",\n \"JSON\",\n \"Map\",\n \"Math\",\n \"NaN\",\n \"Number\",\n \"Object\",\n \"parseFloat\",\n \"parseInt\",\n \"Promise\",\n \"Proxy\",\n \"Reflect\",\n \"RegExp\",\n \"Set\",\n \"String\",\n \"Symbol\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"undefined\",\n \"unescape\",\n \"WeakMap\",\n \"WeakSet\",\n ])\n)\nconst callAllowed = new Set(\n [\n Array.isArray,\n typeof BigInt === \"function\" ? BigInt : undefined,\n Boolean,\n Date,\n Date.parse,\n decodeURI,\n decodeURIComponent,\n encodeURI,\n encodeURIComponent,\n escape,\n isFinite,\n isNaN,\n isPrototypeOf,\n ...Object.getOwnPropertyNames(Math)\n .map(k => Math[k])\n .filter(f => typeof f === \"function\"),\n Number,\n Number.isFinite,\n Number.isNaN,\n Number.parseFloat,\n Number.parseInt,\n Object,\n Object.entries,\n Object.is,\n Object.isExtensible,\n Object.isFrozen,\n Object.isSealed,\n Object.keys,\n Object.values,\n parseFloat,\n parseInt,\n RegExp,\n String,\n String.fromCharCode,\n String.fromCodePoint,\n String.raw,\n Symbol,\n Symbol.for,\n Symbol.keyFor,\n unescape,\n ].filter(f => typeof f === \"function\")\n)\nconst callPassThrough = new Set([\n Object.freeze,\n Object.preventExtensions,\n Object.seal,\n])\n\n/**\n * Get the property descriptor.\n * @param {object} object The object to get.\n * @param {string|number|symbol} name The property name to get.\n */\nfunction getPropertyDescriptor(object, name) {\n let x = object\n while ((typeof x === \"object\" || typeof x === \"function\") && x !== null) {\n const d = Object.getOwnPropertyDescriptor(x, name)\n if (d) {\n return d\n }\n x = Object.getPrototypeOf(x)\n }\n return null\n}\n\n/**\n * Check if a property is getter or not.\n * @param {object} object The object to check.\n * @param {string|number|symbol} name The property name to check.\n */\nfunction isGetter(object, name) {\n const d = getPropertyDescriptor(object, name)\n return d != null && d.get != null\n}\n\n/**\n * Get the element values of a given node list.\n * @param {Node[]} nodeList The node list to get values.\n * @param {Scope|undefined} initialScope The initial scope to find variables.\n * @returns {any[]|null} The value list if all nodes are constant. Otherwise, null.\n */\nfunction getElementValues(nodeList, initialScope) {\n const valueList = []\n\n for (let i = 0; i < nodeList.length; ++i) {\n const elementNode = nodeList[i]\n\n if (elementNode == null) {\n valueList.length = i + 1\n } else if (elementNode.type === \"SpreadElement\") {\n const argument = getStaticValueR(elementNode.argument, initialScope)\n if (argument == null) {\n return null\n }\n valueList.push(...argument.value)\n } else {\n const element = getStaticValueR(elementNode, initialScope)\n if (element == null) {\n return null\n }\n valueList.push(element.value)\n }\n }\n\n return valueList\n}\n\nconst operations = Object.freeze({\n ArrayExpression(node, initialScope) {\n const elements = getElementValues(node.elements, initialScope)\n return elements != null ? { value: elements } : null\n },\n\n AssignmentExpression(node, initialScope) {\n if (node.operator === \"=\") {\n return getStaticValueR(node.right, initialScope)\n }\n return null\n },\n\n //eslint-disable-next-line complexity\n BinaryExpression(node, initialScope) {\n if (node.operator === \"in\" || node.operator === \"instanceof\") {\n // Not supported.\n return null\n }\n\n const left = getStaticValueR(node.left, initialScope)\n const right = getStaticValueR(node.right, initialScope)\n if (left != null && right != null) {\n switch (node.operator) {\n case \"==\":\n return { value: left.value == right.value } //eslint-disable-line eqeqeq\n case \"!=\":\n return { value: left.value != right.value } //eslint-disable-line eqeqeq\n case \"===\":\n return { value: left.value === right.value }\n case \"!==\":\n return { value: left.value !== right.value }\n case \"<\":\n return { value: left.value < right.value }\n case \"<=\":\n return { value: left.value <= right.value }\n case \">\":\n return { value: left.value > right.value }\n case \">=\":\n return { value: left.value >= right.value }\n case \"<<\":\n return { value: left.value << right.value }\n case \">>\":\n return { value: left.value >> right.value }\n case \">>>\":\n return { value: left.value >>> right.value }\n case \"+\":\n return { value: left.value + right.value }\n case \"-\":\n return { value: left.value - right.value }\n case \"*\":\n return { value: left.value * right.value }\n case \"/\":\n return { value: left.value / right.value }\n case \"%\":\n return { value: left.value % right.value }\n case \"**\":\n return { value: Math.pow(left.value, right.value) }\n case \"|\":\n return { value: left.value | right.value }\n case \"^\":\n return { value: left.value ^ right.value }\n case \"&\":\n return { value: left.value & right.value }\n\n // no default\n }\n }\n\n return null\n },\n\n CallExpression(node, initialScope) {\n const calleeNode = node.callee\n const args = getElementValues(node.arguments, initialScope)\n\n if (args != null) {\n if (calleeNode.type === \"MemberExpression\") {\n const object = getStaticValueR(calleeNode.object, initialScope)\n if (object != null) {\n if (\n object.value == null &&\n (object.optional || node.optional)\n ) {\n return { value: undefined, optional: true }\n }\n const property = calleeNode.computed\n ? getStaticValueR(calleeNode.property, initialScope)\n : { value: calleeNode.property.name }\n\n if (property != null) {\n const receiver = object.value\n const methodName = property.value\n if (callAllowed.has(receiver[methodName])) {\n return { value: receiver[methodName](...args) }\n }\n if (callPassThrough.has(receiver[methodName])) {\n return { value: args[0] }\n }\n }\n }\n } else {\n const callee = getStaticValueR(calleeNode, initialScope)\n if (callee != null) {\n if (callee.value == null && node.optional) {\n return { value: undefined, optional: true }\n }\n const func = callee.value\n if (callAllowed.has(func)) {\n return { value: func(...args) }\n }\n if (callPassThrough.has(func)) {\n return { value: args[0] }\n }\n }\n }\n }\n\n return null\n },\n\n ConditionalExpression(node, initialScope) {\n const test = getStaticValueR(node.test, initialScope)\n if (test != null) {\n return test.value\n ? getStaticValueR(node.consequent, initialScope)\n : getStaticValueR(node.alternate, initialScope)\n }\n return null\n },\n\n ExpressionStatement(node, initialScope) {\n return getStaticValueR(node.expression, initialScope)\n },\n\n Identifier(node, initialScope) {\n if (initialScope != null) {\n const variable = findVariable(initialScope, node)\n\n // Built-in globals.\n if (\n variable != null &&\n variable.defs.length === 0 &&\n builtinNames.has(variable.name) &&\n variable.name in globalObject\n ) {\n return { value: globalObject[variable.name] }\n }\n\n // Constants.\n if (variable != null && variable.defs.length === 1) {\n const def = variable.defs[0]\n if (\n def.parent &&\n def.parent.kind === \"const\" &&\n // TODO(mysticatea): don't support destructuring here.\n def.node.id.type === \"Identifier\"\n ) {\n return getStaticValueR(def.node.init, initialScope)\n }\n }\n }\n return null\n },\n\n Literal(node) {\n //istanbul ignore if : this is implementation-specific behavior.\n if ((node.regex != null || node.bigint != null) && node.value == null) {\n // It was a RegExp/BigInt literal, but Node.js didn't support it.\n return null\n }\n return { value: node.value }\n },\n\n LogicalExpression(node, initialScope) {\n const left = getStaticValueR(node.left, initialScope)\n if (left != null) {\n if (\n (node.operator === \"||\" && Boolean(left.value) === true) ||\n (node.operator === \"&&\" && Boolean(left.value) === false) ||\n (node.operator === \"??\" && left.value != null)\n ) {\n return left\n }\n\n const right = getStaticValueR(node.right, initialScope)\n if (right != null) {\n return right\n }\n }\n\n return null\n },\n\n MemberExpression(node, initialScope) {\n const object = getStaticValueR(node.object, initialScope)\n if (object != null) {\n if (object.value == null && (object.optional || node.optional)) {\n return { value: undefined, optional: true }\n }\n const property = node.computed\n ? getStaticValueR(node.property, initialScope)\n : { value: node.property.name }\n\n if (property != null && !isGetter(object.value, property.value)) {\n return { value: object.value[property.value] }\n }\n }\n return null\n },\n\n ChainExpression(node, initialScope) {\n const expression = getStaticValueR(node.expression, initialScope)\n if (expression != null) {\n return { value: expression.value }\n }\n return null\n },\n\n NewExpression(node, initialScope) {\n const callee = getStaticValueR(node.callee, initialScope)\n const args = getElementValues(node.arguments, initialScope)\n\n if (callee != null && args != null) {\n const Func = callee.value\n if (callAllowed.has(Func)) {\n return { value: new Func(...args) }\n }\n }\n\n return null\n },\n\n ObjectExpression(node, initialScope) {\n const object = {}\n\n for (const propertyNode of node.properties) {\n if (propertyNode.type === \"Property\") {\n if (propertyNode.kind !== \"init\") {\n return null\n }\n const key = propertyNode.computed\n ? getStaticValueR(propertyNode.key, initialScope)\n : { value: propertyNode.key.name }\n const value = getStaticValueR(propertyNode.value, initialScope)\n if (key == null || value == null) {\n return null\n }\n object[key.value] = value.value\n } else if (\n propertyNode.type === \"SpreadElement\" ||\n propertyNode.type === \"ExperimentalSpreadProperty\"\n ) {\n const argument = getStaticValueR(\n propertyNode.argument,\n initialScope\n )\n if (argument == null) {\n return null\n }\n Object.assign(object, argument.value)\n } else {\n return null\n }\n }\n\n return { value: object }\n },\n\n SequenceExpression(node, initialScope) {\n const last = node.expressions[node.expressions.length - 1]\n return getStaticValueR(last, initialScope)\n },\n\n TaggedTemplateExpression(node, initialScope) {\n const tag = getStaticValueR(node.tag, initialScope)\n const expressions = getElementValues(\n node.quasi.expressions,\n initialScope\n )\n\n if (tag != null && expressions != null) {\n const func = tag.value\n const strings = node.quasi.quasis.map(q => q.value.cooked)\n strings.raw = node.quasi.quasis.map(q => q.value.raw)\n\n if (func === String.raw) {\n return { value: func(strings, ...expressions) }\n }\n }\n\n return null\n },\n\n TemplateLiteral(node, initialScope) {\n const expressions = getElementValues(node.expressions, initialScope)\n if (expressions != null) {\n let value = node.quasis[0].value.cooked\n for (let i = 0; i < expressions.length; ++i) {\n value += expressions[i]\n value += node.quasis[i + 1].value.cooked\n }\n return { value }\n }\n return null\n },\n\n UnaryExpression(node, initialScope) {\n if (node.operator === \"delete\") {\n // Not supported.\n return null\n }\n if (node.operator === \"void\") {\n return { value: undefined }\n }\n\n const arg = getStaticValueR(node.argument, initialScope)\n if (arg != null) {\n switch (node.operator) {\n case \"-\":\n return { value: -arg.value }\n case \"+\":\n return { value: +arg.value } //eslint-disable-line no-implicit-coercion\n case \"!\":\n return { value: !arg.value }\n case \"~\":\n return { value: ~arg.value }\n case \"typeof\":\n return { value: typeof arg.value }\n\n // no default\n }\n }\n\n return null\n },\n})\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope|undefined} initialScope The scope to start finding variable.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nfunction getStaticValueR(node, initialScope) {\n if (node != null && Object.hasOwnProperty.call(operations, node.type)) {\n return operations[node.type](node, initialScope)\n }\n return null\n}\n\n/**\n * Get the value of a given node if it's a static value.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If this scope was given, this tries to resolve identifier references which are in the given node as much as possible.\n * @returns {{value:any}|{value:undefined,optional?:true}|null} The static value of the node, or `null`.\n */\nexport function getStaticValue(node, initialScope = null) {\n try {\n return getStaticValueR(node, initialScope)\n } catch (_error) {\n return null\n }\n}\n","import { getStaticValue } from \"./get-static-value\"\n\n/**\n * Get the value of a given node if it's a literal or a template literal.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is an Identifier node and this scope was given, this checks the variable of the identifier, and returns the value of it if the variable is a constant.\n * @returns {string|null} The value of the node, or `null`.\n */\nexport function getStringIfConstant(node, initialScope = null) {\n // Handle the literals that the platform doesn't support natively.\n if (node && node.type === \"Literal\" && node.value === null) {\n if (node.regex) {\n return `/${node.regex.pattern}/${node.regex.flags}`\n }\n if (node.bigint) {\n return node.bigint\n }\n }\n\n const evaluated = getStaticValue(node, initialScope)\n return evaluated && String(evaluated.value)\n}\n","import { getStringIfConstant } from \"./get-string-if-constant\"\n\n/**\n * Get the property name from a MemberExpression node or a Property node.\n * @param {Node} node The node to get.\n * @param {Scope} [initialScope] The scope to start finding variable. Optional. If the node is a computed property node and this scope was given, this checks the computed property name by the `getStringIfConstant` function with the scope, and returns the value of it.\n * @returns {string|null} The property name of the node.\n */\nexport function getPropertyName(node, initialScope) {\n switch (node.type) {\n case \"MemberExpression\":\n if (node.computed) {\n return getStringIfConstant(node.property, initialScope)\n }\n return node.property.name\n\n case \"Property\":\n case \"MethodDefinition\":\n if (node.computed) {\n return getStringIfConstant(node.key, initialScope)\n }\n if (node.key.type === \"Literal\") {\n return String(node.key.value)\n }\n return node.key.name\n\n // no default\n }\n\n return null\n}\n","import { getPropertyName } from \"./get-property-name\"\n\n/**\n * Get the name and kind of the given function node.\n * @param {ASTNode} node - The function node to get.\n * @returns {string} The name and kind of the function node.\n */\nexport function getFunctionNameWithKind(node) {\n const parent = node.parent\n const tokens = []\n\n if (parent.type === \"MethodDefinition\" && parent.static) {\n tokens.push(\"static\")\n }\n if (node.async) {\n tokens.push(\"async\")\n }\n if (node.generator) {\n tokens.push(\"generator\")\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n tokens.push(\"arrow\", \"function\")\n } else if (\n parent.type === \"Property\" ||\n parent.type === \"MethodDefinition\"\n ) {\n if (parent.kind === \"constructor\") {\n return \"constructor\"\n }\n if (parent.kind === \"get\") {\n tokens.push(\"getter\")\n } else if (parent.kind === \"set\") {\n tokens.push(\"setter\")\n } else {\n tokens.push(\"method\")\n }\n } else {\n tokens.push(\"function\")\n }\n\n if (node.id) {\n tokens.push(`'${node.id.name}'`)\n } else {\n const name = getPropertyName(parent)\n\n if (name) {\n tokens.push(`'${name}'`)\n }\n }\n\n if (node.type === \"ArrowFunctionExpression\") {\n if (\n parent.type === \"VariableDeclarator\" &&\n parent.id &&\n parent.id.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.id.name}'`)\n }\n if (\n parent.type === \"AssignmentExpression\" &&\n parent.left &&\n parent.left.type === \"Identifier\"\n ) {\n tokens.push(`'${parent.left.name}'`)\n }\n }\n\n return tokens.join(\" \")\n}\n","import evk from \"eslint-visitor-keys\"\n\nconst typeConversionBinaryOps = Object.freeze(\n new Set([\n \"==\",\n \"!=\",\n \"<\",\n \"<=\",\n \">\",\n \">=\",\n \"<<\",\n \">>\",\n \">>>\",\n \"+\",\n \"-\",\n \"*\",\n \"/\",\n \"%\",\n \"|\",\n \"^\",\n \"&\",\n \"in\",\n ])\n)\nconst typeConversionUnaryOps = Object.freeze(new Set([\"-\", \"+\", \"!\", \"~\"]))\n\n/**\n * Check whether the given value is an ASTNode or not.\n * @param {any} x The value to check.\n * @returns {boolean} `true` if the value is an ASTNode.\n */\nfunction isNode(x) {\n return x !== null && typeof x === \"object\" && typeof x.type === \"string\"\n}\n\nconst visitor = Object.freeze(\n Object.assign(Object.create(null), {\n $visit(node, options, visitorKeys) {\n const { type } = node\n\n if (typeof this[type] === \"function\") {\n return this[type](node, options, visitorKeys)\n }\n\n return this.$visitChildren(node, options, visitorKeys)\n },\n\n $visitChildren(node, options, visitorKeys) {\n const { type } = node\n\n for (const key of visitorKeys[type] || evk.getKeys(node)) {\n const value = node[key]\n\n if (Array.isArray(value)) {\n for (const element of value) {\n if (\n isNode(element) &&\n this.$visit(element, options, visitorKeys)\n ) {\n return true\n }\n }\n } else if (\n isNode(value) &&\n this.$visit(value, options, visitorKeys)\n ) {\n return true\n }\n }\n\n return false\n },\n\n ArrowFunctionExpression() {\n return false\n },\n AssignmentExpression() {\n return true\n },\n AwaitExpression() {\n return true\n },\n BinaryExpression(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n typeConversionBinaryOps.has(node.operator) &&\n (node.left.type !== \"Literal\" || node.right.type !== \"Literal\")\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n CallExpression() {\n return true\n },\n FunctionExpression() {\n return false\n },\n ImportExpression() {\n return true\n },\n MemberExpression(node, options, visitorKeys) {\n if (options.considerGetters) {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.property.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n MethodDefinition(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n NewExpression() {\n return true\n },\n Property(node, options, visitorKeys) {\n if (\n options.considerImplicitTypeConversion &&\n node.computed &&\n node.key.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UnaryExpression(node, options, visitorKeys) {\n if (node.operator === \"delete\") {\n return true\n }\n if (\n options.considerImplicitTypeConversion &&\n typeConversionUnaryOps.has(node.operator) &&\n node.argument.type !== \"Literal\"\n ) {\n return true\n }\n return this.$visitChildren(node, options, visitorKeys)\n },\n UpdateExpression() {\n return true\n },\n YieldExpression() {\n return true\n },\n })\n)\n\n/**\n * Check whether a given node has any side effect or not.\n * @param {Node} node The node to get.\n * @param {SourceCode} sourceCode The source code object.\n * @param {object} [options] The option object.\n * @param {boolean} [options.considerGetters=false] If `true` then it considers member accesses as the node which has side effects.\n * @param {boolean} [options.considerImplicitTypeConversion=false] If `true` then it considers implicit type conversion as the node which has side effects.\n * @param {object} [options.visitorKeys=evk.KEYS] The keys to traverse nodes. Use `context.getSourceCode().visitorKeys`.\n * @returns {boolean} `true` if the node has a certain side effect.\n */\nexport function hasSideEffect(\n node,\n sourceCode,\n { considerGetters = false, considerImplicitTypeConversion = false } = {}\n) {\n return visitor.$visit(\n node,\n { considerGetters, considerImplicitTypeConversion },\n sourceCode.visitorKeys || evk.KEYS\n )\n}\n","import { isClosingParenToken, isOpeningParenToken } from \"./token-predicate\"\n\n/**\n * Get the left parenthesis of the parent node syntax if it exists.\n * E.g., `if (a) {}` then the `(`.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {Token|null} The left parenthesis of the parent node syntax\n */\nfunction getParentSyntaxParen(node, sourceCode) {\n const parent = node.parent\n\n switch (parent.type) {\n case \"CallExpression\":\n case \"NewExpression\":\n if (parent.arguments.length === 1 && parent.arguments[0] === node) {\n return sourceCode.getTokenAfter(\n parent.callee,\n isOpeningParenToken\n )\n }\n return null\n\n case \"DoWhileStatement\":\n if (parent.test === node) {\n return sourceCode.getTokenAfter(\n parent.body,\n isOpeningParenToken\n )\n }\n return null\n\n case \"IfStatement\":\n case \"WhileStatement\":\n if (parent.test === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"ImportExpression\":\n if (parent.source === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"SwitchStatement\":\n if (parent.discriminant === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n case \"WithStatement\":\n if (parent.object === node) {\n return sourceCode.getFirstToken(parent, 1)\n }\n return null\n\n default:\n return null\n }\n}\n\n/**\n * Check whether a given node is parenthesized or not.\n * @param {number} times The number of parantheses.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized the given times.\n */\n/**\n * Check whether a given node is parenthesized or not.\n * @param {Node} node The AST node to check.\n * @param {SourceCode} sourceCode The source code object to get tokens.\n * @returns {boolean} `true` if the node is parenthesized.\n */\nexport function isParenthesized(\n timesOrNode,\n nodeOrSourceCode,\n optionalSourceCode\n) {\n let times, node, sourceCode, maybeLeftParen, maybeRightParen\n if (typeof timesOrNode === \"number\") {\n times = timesOrNode | 0\n node = nodeOrSourceCode\n sourceCode = optionalSourceCode\n if (!(times >= 1)) {\n throw new TypeError(\"'times' should be a positive integer.\")\n }\n } else {\n times = 1\n node = timesOrNode\n sourceCode = nodeOrSourceCode\n }\n\n if (node == null) {\n return false\n }\n\n maybeLeftParen = maybeRightParen = node\n do {\n maybeLeftParen = sourceCode.getTokenBefore(maybeLeftParen)\n maybeRightParen = sourceCode.getTokenAfter(maybeRightParen)\n } while (\n maybeLeftParen != null &&\n maybeRightParen != null &&\n isOpeningParenToken(maybeLeftParen) &&\n isClosingParenToken(maybeRightParen) &&\n // Avoid false positive such as `if (a) {}`\n maybeLeftParen !== getParentSyntaxParen(node, sourceCode) &&\n --times > 0\n )\n\n return times === 0\n}\n","/**\n * @author Toru Nagashima \n * See LICENSE file in root directory for full license.\n */\n\nconst placeholder = /\\$(?:[$&`']|[1-9][0-9]?)/gu\n\n/** @type {WeakMap} */\nconst internal = new WeakMap()\n\n/**\n * Check whether a given character is escaped or not.\n * @param {string} str The string to check.\n * @param {number} index The location of the character to check.\n * @returns {boolean} `true` if the character is escaped.\n */\nfunction isEscaped(str, index) {\n let escaped = false\n for (let i = index - 1; i >= 0 && str.charCodeAt(i) === 0x5c; --i) {\n escaped = !escaped\n }\n return escaped\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {string} replacement The new substring to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceS(matcher, str, replacement) {\n const chunks = []\n let index = 0\n\n /** @type {RegExpExecArray} */\n let match = null\n\n /**\n * @param {string} key The placeholder.\n * @returns {string} The replaced string.\n */\n function replacer(key) {\n switch (key) {\n case \"$$\":\n return \"$\"\n case \"$&\":\n return match[0]\n case \"$`\":\n return str.slice(0, match.index)\n case \"$'\":\n return str.slice(match.index + match[0].length)\n default: {\n const i = key.slice(1)\n if (i in match) {\n return match[i]\n }\n return key\n }\n }\n }\n\n for (match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(replacement.replace(placeholder, replacer))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * Replace a given string by a given matcher.\n * @param {PatternMatcher} matcher The pattern matcher.\n * @param {string} str The string to be replaced.\n * @param {(...strs[])=>string} replace The function to replace each matched part.\n * @returns {string} The replaced string.\n */\nfunction replaceF(matcher, str, replace) {\n const chunks = []\n let index = 0\n\n for (const match of matcher.execAll(str)) {\n chunks.push(str.slice(index, match.index))\n chunks.push(String(replace(...match, match.index, match.input)))\n index = match.index + match[0].length\n }\n chunks.push(str.slice(index))\n\n return chunks.join(\"\")\n}\n\n/**\n * The class to find patterns as considering escape sequences.\n */\nexport class PatternMatcher {\n /**\n * Initialize this matcher.\n * @param {RegExp} pattern The pattern to match.\n * @param {{escaped:boolean}} options The options.\n */\n constructor(pattern, { escaped = false } = {}) {\n if (!(pattern instanceof RegExp)) {\n throw new TypeError(\"'pattern' should be a RegExp instance.\")\n }\n if (!pattern.flags.includes(\"g\")) {\n throw new Error(\"'pattern' should contains 'g' flag.\")\n }\n\n internal.set(this, {\n pattern: new RegExp(pattern.source, pattern.flags),\n escaped: Boolean(escaped),\n })\n }\n\n /**\n * Find the pattern in a given string.\n * @param {string} str The string to find.\n * @returns {IterableIterator} The iterator which iterate the matched information.\n */\n *execAll(str) {\n const { pattern, escaped } = internal.get(this)\n let match = null\n let lastIndex = 0\n\n pattern.lastIndex = 0\n while ((match = pattern.exec(str)) != null) {\n if (escaped || !isEscaped(str, match.index)) {\n lastIndex = pattern.lastIndex\n yield match\n pattern.lastIndex = lastIndex\n }\n }\n }\n\n /**\n * Check whether the pattern is found in a given string.\n * @param {string} str The string to check.\n * @returns {boolean} `true` if the pattern was found in the string.\n */\n test(str) {\n const it = this.execAll(str)\n const ret = it.next()\n return !ret.done\n }\n\n /**\n * Replace a given string.\n * @param {string} str The string to be replaced.\n * @param {(string|((...strs:string[])=>string))} replacer The string or function to replace. This is the same as the 2nd argument of `String.prototype.replace`.\n * @returns {string} The replaced string.\n */\n [Symbol.replace](str, replacer) {\n return typeof replacer === \"function\"\n ? replaceF(this, String(str), replacer)\n : replaceS(this, String(str), String(replacer))\n }\n}\n","import { findVariable } from \"./find-variable\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\n\nconst IMPORT_TYPE = /^(?:Import|Export(?:All|Default|Named))Declaration$/u\nconst has = Function.call.bind(Object.hasOwnProperty)\n\nexport const READ = Symbol(\"read\")\nexport const CALL = Symbol(\"call\")\nexport const CONSTRUCT = Symbol(\"construct\")\nexport const ESM = Symbol(\"esm\")\n\nconst requireCall = { require: { [CALL]: true } }\n\n/**\n * Check whether a given variable is modified or not.\n * @param {Variable} variable The variable to check.\n * @returns {boolean} `true` if the variable is modified.\n */\nfunction isModifiedGlobal(variable) {\n return (\n variable == null ||\n variable.defs.length !== 0 ||\n variable.references.some(r => r.isWrite())\n )\n}\n\n/**\n * Check if the value of a given node is passed through to the parent syntax as-is.\n * For example, `a` and `b` in (`a || b` and `c ? a : b`) are passed through.\n * @param {Node} node A node to check.\n * @returns {boolean} `true` if the node is passed through.\n */\nfunction isPassThrough(node) {\n const parent = node.parent\n\n switch (parent && parent.type) {\n case \"ConditionalExpression\":\n return parent.consequent === node || parent.alternate === node\n case \"LogicalExpression\":\n return true\n case \"SequenceExpression\":\n return parent.expressions[parent.expressions.length - 1] === node\n case \"ChainExpression\":\n return true\n\n default:\n return false\n }\n}\n\n/**\n * The reference tracker.\n */\nexport class ReferenceTracker {\n /**\n * Initialize this tracker.\n * @param {Scope} globalScope The global scope.\n * @param {object} [options] The options.\n * @param {\"legacy\"|\"strict\"} [options.mode=\"strict\"] The mode to determine the ImportDeclaration's behavior for CJS modules.\n * @param {string[]} [options.globalObjectNames=[\"global\",\"globalThis\",\"self\",\"window\"]] The variable names for Global Object.\n */\n constructor(\n globalScope,\n {\n mode = \"strict\",\n globalObjectNames = [\"global\", \"globalThis\", \"self\", \"window\"],\n } = {}\n ) {\n this.variableStack = []\n this.globalScope = globalScope\n this.mode = mode\n this.globalObjectNames = globalObjectNames.slice(0)\n }\n\n /**\n * Iterate the references of global variables.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateGlobalReferences(traceMap) {\n for (const key of Object.keys(traceMap)) {\n const nextTraceMap = traceMap[key]\n const path = [key]\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n nextTraceMap,\n true\n )\n }\n\n for (const key of this.globalObjectNames) {\n const path = []\n const variable = this.globalScope.set.get(key)\n\n if (isModifiedGlobal(variable)) {\n continue\n }\n\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n }\n\n /**\n * Iterate the references of CommonJS modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateCjsReferences(traceMap) {\n for (const { node } of this.iterateGlobalReferences(requireCall)) {\n const key = getStringIfConstant(node.arguments[0])\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextTraceMap = traceMap[key]\n const path = [key]\n\n if (nextTraceMap[READ]) {\n yield {\n node,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(node, path, nextTraceMap)\n }\n }\n\n /**\n * Iterate the references of ES modules.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *iterateEsmReferences(traceMap) {\n const programNode = this.globalScope.block\n\n for (const node of programNode.body) {\n if (!IMPORT_TYPE.test(node.type) || node.source == null) {\n continue\n }\n const moduleId = node.source.value\n\n if (!has(traceMap, moduleId)) {\n continue\n }\n const nextTraceMap = traceMap[moduleId]\n const path = [moduleId]\n\n if (nextTraceMap[READ]) {\n yield { node, path, type: READ, info: nextTraceMap[READ] }\n }\n\n if (node.type === \"ExportAllDeclaration\") {\n for (const key of Object.keys(nextTraceMap)) {\n const exportTraceMap = nextTraceMap[key]\n if (exportTraceMap[READ]) {\n yield {\n node,\n path: path.concat(key),\n type: READ,\n info: exportTraceMap[READ],\n }\n }\n }\n } else {\n for (const specifier of node.specifiers) {\n const esm = has(nextTraceMap, ESM)\n const it = this._iterateImportReferences(\n specifier,\n path,\n esm\n ? nextTraceMap\n : this.mode === \"legacy\"\n ? Object.assign(\n { default: nextTraceMap },\n nextTraceMap\n )\n : { default: nextTraceMap }\n )\n\n if (esm) {\n yield* it\n } else {\n for (const report of it) {\n report.path = report.path.filter(exceptDefault)\n if (\n report.path.length >= 2 ||\n report.type !== READ\n ) {\n yield report\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Iterate the references for a given variable.\n * @param {Variable} variable The variable to iterate that references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @param {boolean} shouldReport = The flag to report those references.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateVariableReferences(variable, path, traceMap, shouldReport) {\n if (this.variableStack.includes(variable)) {\n return\n }\n this.variableStack.push(variable)\n try {\n for (const reference of variable.references) {\n if (!reference.isRead()) {\n continue\n }\n const node = reference.identifier\n\n if (shouldReport && traceMap[READ]) {\n yield { node, path, type: READ, info: traceMap[READ] }\n }\n yield* this._iteratePropertyReferences(node, path, traceMap)\n }\n } finally {\n this.variableStack.pop()\n }\n }\n\n /**\n * Iterate the references for a given AST node.\n * @param rootNode The AST node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n //eslint-disable-next-line complexity\n *_iteratePropertyReferences(rootNode, path, traceMap) {\n let node = rootNode\n while (isPassThrough(node)) {\n node = node.parent\n }\n\n const parent = node.parent\n if (parent.type === \"MemberExpression\") {\n if (parent.object === node) {\n const key = getPropertyName(parent)\n if (key == null || !has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: parent,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iteratePropertyReferences(\n parent,\n path,\n nextTraceMap\n )\n }\n return\n }\n if (parent.type === \"CallExpression\") {\n if (parent.callee === node && traceMap[CALL]) {\n yield { node: parent, path, type: CALL, info: traceMap[CALL] }\n }\n return\n }\n if (parent.type === \"NewExpression\") {\n if (parent.callee === node && traceMap[CONSTRUCT]) {\n yield {\n node: parent,\n path,\n type: CONSTRUCT,\n info: traceMap[CONSTRUCT],\n }\n }\n return\n }\n if (parent.type === \"AssignmentExpression\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n yield* this._iteratePropertyReferences(parent, path, traceMap)\n }\n return\n }\n if (parent.type === \"AssignmentPattern\") {\n if (parent.right === node) {\n yield* this._iterateLhsReferences(parent.left, path, traceMap)\n }\n return\n }\n if (parent.type === \"VariableDeclarator\") {\n if (parent.init === node) {\n yield* this._iterateLhsReferences(parent.id, path, traceMap)\n }\n }\n }\n\n /**\n * Iterate the references for a given Pattern node.\n * @param {Node} patternNode The Pattern node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateLhsReferences(patternNode, path, traceMap) {\n if (patternNode.type === \"Identifier\") {\n const variable = findVariable(this.globalScope, patternNode)\n if (variable != null) {\n yield* this._iterateVariableReferences(\n variable,\n path,\n traceMap,\n false\n )\n }\n return\n }\n if (patternNode.type === \"ObjectPattern\") {\n for (const property of patternNode.properties) {\n const key = getPropertyName(property)\n\n if (key == null || !has(traceMap, key)) {\n continue\n }\n\n const nextPath = path.concat(key)\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: property,\n path: nextPath,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateLhsReferences(\n property.value,\n nextPath,\n nextTraceMap\n )\n }\n return\n }\n if (patternNode.type === \"AssignmentPattern\") {\n yield* this._iterateLhsReferences(patternNode.left, path, traceMap)\n }\n }\n\n /**\n * Iterate the references for a given ModuleSpecifier node.\n * @param {Node} specifierNode The ModuleSpecifier node to iterate references.\n * @param {string[]} path The current path.\n * @param {object} traceMap The trace map.\n * @returns {IterableIterator<{node:Node,path:string[],type:symbol,info:any}>} The iterator to iterate references.\n */\n *_iterateImportReferences(specifierNode, path, traceMap) {\n const type = specifierNode.type\n\n if (type === \"ImportSpecifier\" || type === \"ImportDefaultSpecifier\") {\n const key =\n type === \"ImportDefaultSpecifier\"\n ? \"default\"\n : specifierNode.imported.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n nextTraceMap,\n false\n )\n\n return\n }\n\n if (type === \"ImportNamespaceSpecifier\") {\n yield* this._iterateVariableReferences(\n findVariable(this.globalScope, specifierNode.local),\n path,\n traceMap,\n false\n )\n return\n }\n\n if (type === \"ExportSpecifier\") {\n const key = specifierNode.local.name\n if (!has(traceMap, key)) {\n return\n }\n\n path = path.concat(key) //eslint-disable-line no-param-reassign\n const nextTraceMap = traceMap[key]\n if (nextTraceMap[READ]) {\n yield {\n node: specifierNode,\n path,\n type: READ,\n info: nextTraceMap[READ],\n }\n }\n }\n }\n}\n\nReferenceTracker.READ = READ\nReferenceTracker.CALL = CALL\nReferenceTracker.CONSTRUCT = CONSTRUCT\nReferenceTracker.ESM = ESM\n\n/**\n * This is a predicate function for Array#filter.\n * @param {string} name A name part.\n * @param {number} index The index of the name.\n * @returns {boolean} `false` if it's default.\n */\nfunction exceptDefault(name, index) {\n return !(index === 1 && name === \"default\")\n}\n","import { findVariable } from \"./find-variable\"\nimport { getFunctionHeadLocation } from \"./get-function-head-location\"\nimport { getFunctionNameWithKind } from \"./get-function-name-with-kind\"\nimport { getInnermostScope } from \"./get-innermost-scope\"\nimport { getPropertyName } from \"./get-property-name\"\nimport { getStaticValue } from \"./get-static-value\"\nimport { getStringIfConstant } from \"./get-string-if-constant\"\nimport { hasSideEffect } from \"./has-side-effect\"\nimport { isParenthesized } from \"./is-parenthesized\"\nimport { PatternMatcher } from \"./pattern-matcher\"\nimport {\n CALL,\n CONSTRUCT,\n ESM,\n READ,\n ReferenceTracker,\n} from \"./reference-tracker\"\nimport {\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isSemicolonToken,\n} from \"./token-predicate\"\n\nexport default {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\nexport {\n CALL,\n CONSTRUCT,\n ESM,\n findVariable,\n getFunctionHeadLocation,\n getFunctionNameWithKind,\n getInnermostScope,\n getPropertyName,\n getStaticValue,\n getStringIfConstant,\n hasSideEffect,\n isArrowToken,\n isClosingBraceToken,\n isClosingBracketToken,\n isClosingParenToken,\n isColonToken,\n isCommaToken,\n isCommentToken,\n isNotArrowToken,\n isNotClosingBraceToken,\n isNotClosingBracketToken,\n isNotClosingParenToken,\n isNotColonToken,\n isNotCommaToken,\n isNotCommentToken,\n isNotOpeningBraceToken,\n isNotOpeningBracketToken,\n isNotOpeningParenToken,\n isNotSemicolonToken,\n isOpeningBraceToken,\n isOpeningBracketToken,\n isOpeningParenToken,\n isParenthesized,\n isSemicolonToken,\n PatternMatcher,\n READ,\n ReferenceTracker,\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE;AACtD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAC;AAClC;AACA,IAAI,IAAI,KAAK,GAAG,aAAY;AAC5B,IAAI,IAAI,KAAK,GAAG,MAAK;AACrB,IAAI,GAAG;AACP,QAAQ,KAAK,GAAG,MAAK;AACrB,QAAQ,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,WAAW,EAAE;AACpD,YAAY,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,MAAK;AAChD;AACA,YAAY,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,QAAQ,IAAI,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;AAC7D,gBAAgB,KAAK,GAAG,WAAU;AAClC,gBAAgB,KAAK,GAAG,KAAI;AAC5B,gBAAgB,KAAK;AACrB,aAAa;AACb,SAAS;AACT,KAA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AAI,IAAI,KAAK,SAAS,CAAC;AAC/C,CAAC;;AC1ZD,YAAe;AACf,IAAI,IAAI;AACR,IAAI,SAAS;AACb,IAAI,GAAG;AACP,IAAI,YAAY;AAChB,IAAI,uBAAuB;AAC3B,IAAI,uBAAuB;AAC3B,IAAI,iBAAiB;AACrB,IAAI,eAAe;AACnB,IAAI,cAAc;AAClB,IAAI,mBAAmB;AACvB,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,cAAc;AAClB,IAAI,eAAe;AACnB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,eAAe;AACnB,IAAI,eAAe;AACnB,IAAI,iBAAiB;AACrB,IAAI,sBAAsB;AAC1B,IAAI,wBAAwB;AAC5B,IAAI,sBAAsB;AAC1B,IAAI,mBAAmB;AACvB,IAAI,mBAAmB;AACvB,IAAI,qBAAqB;AACzB,IAAI,mBAAmB;AACvB,IAAI,eAAe;AACnB,IAAI,gBAAgB;AACpB,IAAI,cAAc;AAClB,IAAI,IAAI;AACR,IAAI,gBAAgB;AACpB,CAAC;;;;;"} \ No newline at end of file diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md deleted file mode 100644 index dc1d4b5ec..000000000 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md +++ /dev/null @@ -1,25 +0,0 @@ -v1.3.0 - June 19, 2020 - -* [`c92dd7f`](https://github.com/eslint/eslint-visitor-keys/commit/c92dd7ff96f0044dba12d681406a025b92b4c437) Update: add `ChainExpression` node (#12) (Toru Nagashima) - -v1.2.0 - June 4, 2020 - -* [`21f28bf`](https://github.com/eslint/eslint-visitor-keys/commit/21f28bf11be5329d740a8bf6bdbcd0ef13bbf1a2) Update: added exported in exportAllDeclaration key (#10) (Anix) - -v1.1.0 - August 13, 2019 - -* [`9331cc0`](https://github.com/eslint/eslint-visitor-keys/commit/9331cc09e756e65b9044c9186445a474b037fac6) Update: add ImportExpression (#8) (Toru Nagashima) -* [`5967f58`](https://github.com/eslint/eslint-visitor-keys/commit/5967f583b04f17fba9226aaa394e45d476d2b8af) Chore: add supported Node.js versions to CI (#7) (Kai Cataldo) -* [`6f7c60f`](https://github.com/eslint/eslint-visitor-keys/commit/6f7c60fef2ceec9f6323202df718321cec45cab0) Upgrade: eslint-release@1.0.0 (#5) (Teddy Katz) - -v1.0.0 - December 18, 2017 - -* 1f6bd38 Breaking: update keys (#4) (Toru Nagashima) - -v0.1.0 - November 17, 2017 - -* 17b4a88 Chore: update `repository` field in package.json (#3) (Toru Nagashima) -* a5a026b New: eslint-visitor-keys (#1) (Toru Nagashima) -* a1a48b8 Update: Change license to Apache 2 (#2) (Ilya Volodin) -* 2204715 Initial commit (Toru Nagashima) - diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md deleted file mode 100644 index 250f5fa31..000000000 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# eslint-visitor-keys - -[![npm version](https://img.shields.io/npm/v/eslint-visitor-keys.svg)](https://www.npmjs.com/package/eslint-visitor-keys) -[![Downloads/month](https://img.shields.io/npm/dm/eslint-visitor-keys.svg)](http://www.npmtrends.com/eslint-visitor-keys) -[![Build Status](https://travis-ci.org/eslint/eslint-visitor-keys.svg?branch=master)](https://travis-ci.org/eslint/eslint-visitor-keys) -[![Dependency Status](https://david-dm.org/eslint/eslint-visitor-keys.svg)](https://david-dm.org/eslint/eslint-visitor-keys) - -Constants and utilities about visitor keys to traverse AST. - -## 💿 Installation - -Use [npm] to install. - -```bash -$ npm install eslint-visitor-keys -``` - -### Requirements - -- [Node.js] 4.0.0 or later. - -## 📖 Usage - -```js -const evk = require("eslint-visitor-keys") -``` - -### evk.KEYS - -> type: `{ [type: string]: string[] | undefined }` - -Visitor keys. This keys are frozen. - -This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes. - -For example: - -``` -console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"] -``` - -### evk.getKeys(node) - -> type: `(node: object) => string[]` - -Get the visitor keys of a given AST node. - -This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`. - -This will be used to traverse unknown nodes. - -For example: - -``` -const node = { - type: "AssignmentExpression", - left: { type: "Identifier", name: "foo" }, - right: { type: "Literal", value: 0 } -} -console.log(evk.getKeys(node)) // → ["type", "left", "right"] -``` - -### evk.unionWith(additionalKeys) - -> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }` - -Make the union set with `evk.KEYS` and the given keys. - -- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that. -- It removes duplicated keys as keeping the first one. - -For example: - -``` -console.log(evk.unionWith({ - MethodDefinition: ["decorators"] -})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... } -``` - -## 📰 Change log - -See [GitHub releases](https://github.com/eslint/eslint-visitor-keys/releases). - -## 🍻 Contributing - -Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer-guide/contributing/). - -### Development commands - -- `npm test` runs tests and measures code coverage. -- `npm run lint` checks source codes with ESLint. -- `npm run coverage` opens the code coverage report of the previous test with your default browser. -- `npm run release` publishes this package to [npm] registory. - - -[npm]: https://www.npmjs.com/ -[Node.js]: https://nodejs.org/en/ -[ESTree]: https://github.com/estree/estree diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js deleted file mode 100644 index cd8a32608..000000000 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */ -"use strict"; - -const KEYS = require("./visitor-keys.json"); - -// Types. -const NODE_TYPES = Object.freeze(Object.keys(KEYS)); - -// Freeze the keys. -for (const type of NODE_TYPES) { - Object.freeze(KEYS[type]); -} -Object.freeze(KEYS); - -// List to ignore keys. -const KEY_BLACKLIST = new Set([ - "parent", - "leadingComments", - "trailingComments" -]); - -/** - * Check whether a given key should be used or not. - * @param {string} key The key to check. - * @returns {boolean} `true` if the key should be used. - */ -function filterKey(key) { - return !KEY_BLACKLIST.has(key) && key[0] !== "_"; -} - -//------------------------------------------------------------------------------ -// Public interfaces -//------------------------------------------------------------------------------ - -module.exports = Object.freeze({ - - /** - * Visitor keys. - * @type {{ [type: string]: string[] | undefined }} - */ - KEYS, - - /** - * Get visitor keys of a given node. - * @param {Object} node The AST node to get keys. - * @returns {string[]} Visitor keys of the node. - */ - getKeys(node) { - return Object.keys(node).filter(filterKey); - }, - - // Disable valid-jsdoc rule because it reports syntax error on the type of @returns. - // eslint-disable-next-line valid-jsdoc - /** - * Make the union set with `KEYS` and given keys. - * @param {Object} additionalKeys The additional keys. - * @returns {{ [type: string]: string[] | undefined }} The union set. - */ - unionWith(additionalKeys) { - const retv = Object.assign({}, KEYS); - - for (const type of Object.keys(additionalKeys)) { - if (retv.hasOwnProperty(type)) { - const keys = new Set(additionalKeys[type]); - - for (const key of retv[type]) { - keys.add(key); - } - - retv[type] = Object.freeze(Array.from(keys)); - } else { - retv[type] = Object.freeze(Array.from(additionalKeys[type])); - } - } - - return Object.freeze(retv); - } -}); diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json deleted file mode 100644 index a33bbc660..000000000 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "AssignmentExpression": [ - "left", - "right" - ], - "AssignmentPattern": [ - "left", - "right" - ], - "ArrayExpression": [ - "elements" - ], - "ArrayPattern": [ - "elements" - ], - "ArrowFunctionExpression": [ - "params", - "body" - ], - "AwaitExpression": [ - "argument" - ], - "BlockStatement": [ - "body" - ], - "BinaryExpression": [ - "left", - "right" - ], - "BreakStatement": [ - "label" - ], - "CallExpression": [ - "callee", - "arguments" - ], - "CatchClause": [ - "param", - "body" - ], - "ChainExpression": [ - "expression" - ], - "ClassBody": [ - "body" - ], - "ClassDeclaration": [ - "id", - "superClass", - "body" - ], - "ClassExpression": [ - "id", - "superClass", - "body" - ], - "ConditionalExpression": [ - "test", - "consequent", - "alternate" - ], - "ContinueStatement": [ - "label" - ], - "DebuggerStatement": [], - "DoWhileStatement": [ - "body", - "test" - ], - "EmptyStatement": [], - "ExportAllDeclaration": [ - "exported", - "source" - ], - "ExportDefaultDeclaration": [ - "declaration" - ], - "ExportNamedDeclaration": [ - "declaration", - "specifiers", - "source" - ], - "ExportSpecifier": [ - "exported", - "local" - ], - "ExpressionStatement": [ - "expression" - ], - "ExperimentalRestProperty": [ - "argument" - ], - "ExperimentalSpreadProperty": [ - "argument" - ], - "ForStatement": [ - "init", - "test", - "update", - "body" - ], - "ForInStatement": [ - "left", - "right", - "body" - ], - "ForOfStatement": [ - "left", - "right", - "body" - ], - "FunctionDeclaration": [ - "id", - "params", - "body" - ], - "FunctionExpression": [ - "id", - "params", - "body" - ], - "Identifier": [], - "IfStatement": [ - "test", - "consequent", - "alternate" - ], - "ImportDeclaration": [ - "specifiers", - "source" - ], - "ImportDefaultSpecifier": [ - "local" - ], - "ImportExpression": [ - "source" - ], - "ImportNamespaceSpecifier": [ - "local" - ], - "ImportSpecifier": [ - "imported", - "local" - ], - "JSXAttribute": [ - "name", - "value" - ], - "JSXClosingElement": [ - "name" - ], - "JSXElement": [ - "openingElement", - "children", - "closingElement" - ], - "JSXEmptyExpression": [], - "JSXExpressionContainer": [ - "expression" - ], - "JSXIdentifier": [], - "JSXMemberExpression": [ - "object", - "property" - ], - "JSXNamespacedName": [ - "namespace", - "name" - ], - "JSXOpeningElement": [ - "name", - "attributes" - ], - "JSXSpreadAttribute": [ - "argument" - ], - "JSXText": [], - "JSXFragment": [ - "openingFragment", - "children", - "closingFragment" - ], - "Literal": [], - "LabeledStatement": [ - "label", - "body" - ], - "LogicalExpression": [ - "left", - "right" - ], - "MemberExpression": [ - "object", - "property" - ], - "MetaProperty": [ - "meta", - "property" - ], - "MethodDefinition": [ - "key", - "value" - ], - "NewExpression": [ - "callee", - "arguments" - ], - "ObjectExpression": [ - "properties" - ], - "ObjectPattern": [ - "properties" - ], - "Program": [ - "body" - ], - "Property": [ - "key", - "value" - ], - "RestElement": [ - "argument" - ], - "ReturnStatement": [ - "argument" - ], - "SequenceExpression": [ - "expressions" - ], - "SpreadElement": [ - "argument" - ], - "Super": [], - "SwitchStatement": [ - "discriminant", - "cases" - ], - "SwitchCase": [ - "test", - "consequent" - ], - "TaggedTemplateExpression": [ - "tag", - "quasi" - ], - "TemplateElement": [], - "TemplateLiteral": [ - "quasis", - "expressions" - ], - "ThisExpression": [], - "ThrowStatement": [ - "argument" - ], - "TryStatement": [ - "block", - "handler", - "finalizer" - ], - "UnaryExpression": [ - "argument" - ], - "UpdateExpression": [ - "argument" - ], - "VariableDeclaration": [ - "declarations" - ], - "VariableDeclarator": [ - "id", - "init" - ], - "WhileStatement": [ - "test", - "body" - ], - "WithStatement": [ - "object", - "body" - ], - "YieldExpression": [ - "argument" - ] -} diff --git a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json deleted file mode 100644 index 14e2f6958..000000000 --- a/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "eslint-visitor-keys@^1.1.0", - "_id": "eslint-visitor-keys@1.3.0", - "_inBundle": false, - "_integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "_location": "/eslint-utils/eslint-visitor-keys", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "eslint-visitor-keys@^1.1.0", - "name": "eslint-visitor-keys", - "escapedName": "eslint-visitor-keys", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/eslint-utils" - ], - "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "_shasum": "30ebd1ef7c2fdff01c3a4f151044af25fab0523e", - "_spec": "eslint-visitor-keys@^1.1.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint-utils", - "author": { - "name": "Toru Nagashima", - "url": "https://github.com/mysticatea" - }, - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Constants and utilities about visitor keys to traverse AST.", - "devDependencies": { - "eslint": "^4.7.2", - "eslint-config-eslint": "^4.0.0", - "eslint-release": "^1.0.0", - "mocha": "^3.5.3", - "nyc": "^11.2.1", - "opener": "^1.4.3" - }, - "engines": { - "node": ">=4" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", - "keywords": [], - "license": "Apache-2.0", - "main": "lib/index.js", - "name": "eslint-visitor-keys", - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint-visitor-keys.git" - }, - "scripts": { - "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-alpharelease": "eslint-generate-prerelease alpha", - "generate-betarelease": "eslint-generate-prerelease beta", - "generate-rcrelease": "eslint-generate-prerelease rc", - "generate-release": "eslint-generate-release", - "lint": "eslint lib tests/lib", - "pretest": "npm run -s lint", - "publish-release": "eslint-publish-release", - "test": "nyc mocha tests/lib" - }, - "version": "1.3.0" -} diff --git a/node_modules/eslint-utils/package.json b/node_modules/eslint-utils/package.json deleted file mode 100644 index 0394c0c79..000000000 --- a/node_modules/eslint-utils/package.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "_from": "eslint-utils@^2.1.0", - "_id": "eslint-utils@2.1.0", - "_inBundle": false, - "_integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "_location": "/eslint-utils", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "eslint-utils@^2.1.0", - "name": "eslint-utils", - "escapedName": "eslint-utils", - "rawSpec": "^2.1.0", - "saveSpec": null, - "fetchSpec": "^2.1.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "_shasum": "d2de5e03424e707dc10c74068ddedae708741b27", - "_spec": "eslint-utils@^2.1.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Toru Nagashima" - }, - "bugs": { - "url": "https://github.com/mysticatea/eslint-utils/issues" - }, - "bundleDependencies": false, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "deprecated": false, - "description": "Utilities for ESLint plugins.", - "devDependencies": { - "@mysticatea/eslint-plugin": "^12.0.0", - "codecov": "^3.6.1", - "dot-prop": "^4.2.0", - "eslint": "^6.5.1", - "esm": "^3.2.25", - "espree": "^6.1.1", - "mocha": "^6.2.2", - "npm-run-all": "^4.1.5", - "nyc": "^14.1.1", - "opener": "^1.5.1", - "rimraf": "^3.0.0", - "rollup": "^1.25.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "semver": "^7.3.2", - "vuepress": "^1.2.0", - "warun": "^1.0.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.*" - ], - "funding": "https://github.com/sponsors/mysticatea", - "homepage": "https://github.com/mysticatea/eslint-utils#readme", - "keywords": [ - "eslint" - ], - "license": "MIT", - "main": "index", - "module": "index.mjs", - "name": "eslint-utils", - "repository": { - "type": "git", - "url": "git+https://github.com/mysticatea/eslint-utils.git" - }, - "scripts": { - "build": "rollup -c", - "clean": "rimraf .nyc_output coverage index.*", - "codecov": "nyc report -r lcovonly && codecov", - "coverage": "opener ./coverage/lcov-report/index.html", - "docs:build": "vuepress build docs", - "docs:watch": "vuepress dev docs", - "lint": "eslint src test", - "postversion": "git push && git push --tags", - "prebuild": "npm run -s clean", - "preversion": "npm test && npm run -s build", - "prewatch": "npm run -s clean", - "test": "run-s lint build test:mocha", - "test:mocha": "nyc mocha --reporter dot \"test/*.js\"", - "watch": "warun \"{src,test}/**/*.js\" -- npm run -s test:mocha" - }, - "sideEffects": false, - "version": "2.1.0" -} diff --git a/node_modules/eslint-visitor-keys/CHANGELOG.md b/node_modules/eslint-visitor-keys/CHANGELOG.md deleted file mode 100644 index a980b62d2..000000000 --- a/node_modules/eslint-visitor-keys/CHANGELOG.md +++ /dev/null @@ -1,30 +0,0 @@ -v2.0.0 - August 14, 2020 - -* [`fb86ca3`](https://github.com/eslint/eslint-visitor-keys/commit/fb86ca315daafc84e23ed9005db40b0892b972a6) Breaking: drop support for Node <10 (#13) (Kai Cataldo) -* [`69383b3`](https://github.com/eslint/eslint-visitor-keys/commit/69383b372915e33ada094880ecc6b6e8f8c7ca4e) Chore: move to GitHub Actions (#14) (Kai Cataldo) - -v1.3.0 - June 19, 2020 - -* [`c92dd7f`](https://github.com/eslint/eslint-visitor-keys/commit/c92dd7ff96f0044dba12d681406a025b92b4c437) Update: add `ChainExpression` node (#12) (Toru Nagashima) - -v1.2.0 - June 4, 2020 - -* [`21f28bf`](https://github.com/eslint/eslint-visitor-keys/commit/21f28bf11be5329d740a8bf6bdbcd0ef13bbf1a2) Update: added exported in exportAllDeclaration key (#10) (Anix) - -v1.1.0 - August 13, 2019 - -* [`9331cc0`](https://github.com/eslint/eslint-visitor-keys/commit/9331cc09e756e65b9044c9186445a474b037fac6) Update: add ImportExpression (#8) (Toru Nagashima) -* [`5967f58`](https://github.com/eslint/eslint-visitor-keys/commit/5967f583b04f17fba9226aaa394e45d476d2b8af) Chore: add supported Node.js versions to CI (#7) (Kai Cataldo) -* [`6f7c60f`](https://github.com/eslint/eslint-visitor-keys/commit/6f7c60fef2ceec9f6323202df718321cec45cab0) Upgrade: eslint-release@1.0.0 (#5) (Teddy Katz) - -v1.0.0 - December 18, 2017 - -* 1f6bd38 Breaking: update keys (#4) (Toru Nagashima) - -v0.1.0 - November 17, 2017 - -* 17b4a88 Chore: update `repository` field in package.json (#3) (Toru Nagashima) -* a5a026b New: eslint-visitor-keys (#1) (Toru Nagashima) -* a1a48b8 Update: Change license to Apache 2 (#2) (Ilya Volodin) -* 2204715 Initial commit (Toru Nagashima) - diff --git a/node_modules/eslint-visitor-keys/README.md b/node_modules/eslint-visitor-keys/README.md index 250f5fa31..cab810320 100644 --- a/node_modules/eslint-visitor-keys/README.md +++ b/node_modules/eslint-visitor-keys/README.md @@ -2,8 +2,7 @@ [![npm version](https://img.shields.io/npm/v/eslint-visitor-keys.svg)](https://www.npmjs.com/package/eslint-visitor-keys) [![Downloads/month](https://img.shields.io/npm/dm/eslint-visitor-keys.svg)](http://www.npmtrends.com/eslint-visitor-keys) -[![Build Status](https://travis-ci.org/eslint/eslint-visitor-keys.svg?branch=master)](https://travis-ci.org/eslint/eslint-visitor-keys) -[![Dependency Status](https://david-dm.org/eslint/eslint-visitor-keys.svg)](https://david-dm.org/eslint/eslint-visitor-keys) +[![Build Status](https://github.com/eslint/eslint-visitor-keys/workflows/CI/badge.svg)](https://github.com/eslint/eslint-visitor-keys/actions) Constants and utilities about visitor keys to traverse AST. @@ -17,10 +16,19 @@ $ npm install eslint-visitor-keys ### Requirements -- [Node.js] 4.0.0 or later. +- [Node.js] `^12.22.0`, `^14.17.0`, or `>=16.0.0` + ## 📖 Usage +To use in an ESM file: + +```js +import * as evk from "eslint-visitor-keys" +``` + +To use in a CommonJS file: + ```js const evk = require("eslint-visitor-keys") ``` @@ -51,7 +59,7 @@ This will be used to traverse unknown nodes. For example: -``` +```js const node = { type: "AssignmentExpression", left: { type: "Identifier", name: "foo" }, @@ -71,7 +79,7 @@ Make the union set with `evk.KEYS` and the given keys. For example: -``` +```js console.log(evk.unionWith({ MethodDefinition: ["decorators"] })) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... } @@ -89,10 +97,9 @@ Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer- - `npm test` runs tests and measures code coverage. - `npm run lint` checks source codes with ESLint. -- `npm run coverage` opens the code coverage report of the previous test with your default browser. -- `npm run release` publishes this package to [npm] registory. +- `npm run test:open-coverage` opens the code coverage report of the previous test with your default browser. [npm]: https://www.npmjs.com/ -[Node.js]: https://nodejs.org/en/ +[Node.js]: https://nodejs.org/ [ESTree]: https://github.com/estree/estree diff --git a/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs b/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs new file mode 100644 index 000000000..00f91bcc4 --- /dev/null +++ b/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs @@ -0,0 +1,384 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ + +/** + * @type {VisitorKeys} + */ +const KEYS = { + ArrayExpression: [ + "elements" + ], + ArrayPattern: [ + "elements" + ], + ArrowFunctionExpression: [ + "params", + "body" + ], + AssignmentExpression: [ + "left", + "right" + ], + AssignmentPattern: [ + "left", + "right" + ], + AwaitExpression: [ + "argument" + ], + BinaryExpression: [ + "left", + "right" + ], + BlockStatement: [ + "body" + ], + BreakStatement: [ + "label" + ], + CallExpression: [ + "callee", + "arguments" + ], + CatchClause: [ + "param", + "body" + ], + ChainExpression: [ + "expression" + ], + ClassBody: [ + "body" + ], + ClassDeclaration: [ + "id", + "superClass", + "body" + ], + ClassExpression: [ + "id", + "superClass", + "body" + ], + ConditionalExpression: [ + "test", + "consequent", + "alternate" + ], + ContinueStatement: [ + "label" + ], + DebuggerStatement: [], + DoWhileStatement: [ + "body", + "test" + ], + EmptyStatement: [], + ExperimentalRestProperty: [ + "argument" + ], + ExperimentalSpreadProperty: [ + "argument" + ], + ExportAllDeclaration: [ + "exported", + "source" + ], + ExportDefaultDeclaration: [ + "declaration" + ], + ExportNamedDeclaration: [ + "declaration", + "specifiers", + "source" + ], + ExportSpecifier: [ + "exported", + "local" + ], + ExpressionStatement: [ + "expression" + ], + ForInStatement: [ + "left", + "right", + "body" + ], + ForOfStatement: [ + "left", + "right", + "body" + ], + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: [ + "id", + "params", + "body" + ], + FunctionExpression: [ + "id", + "params", + "body" + ], + Identifier: [], + IfStatement: [ + "test", + "consequent", + "alternate" + ], + ImportDeclaration: [ + "specifiers", + "source" + ], + ImportDefaultSpecifier: [ + "local" + ], + ImportExpression: [ + "source" + ], + ImportNamespaceSpecifier: [ + "local" + ], + ImportSpecifier: [ + "imported", + "local" + ], + JSXAttribute: [ + "name", + "value" + ], + JSXClosingElement: [ + "name" + ], + JSXClosingFragment: [], + JSXElement: [ + "openingElement", + "children", + "closingElement" + ], + JSXEmptyExpression: [], + JSXExpressionContainer: [ + "expression" + ], + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: [], + JSXMemberExpression: [ + "object", + "property" + ], + JSXNamespacedName: [ + "namespace", + "name" + ], + JSXOpeningElement: [ + "name", + "attributes" + ], + JSXOpeningFragment: [], + JSXSpreadAttribute: [ + "argument" + ], + JSXSpreadChild: [ + "expression" + ], + JSXText: [], + LabeledStatement: [ + "label", + "body" + ], + Literal: [], + LogicalExpression: [ + "left", + "right" + ], + MemberExpression: [ + "object", + "property" + ], + MetaProperty: [ + "meta", + "property" + ], + MethodDefinition: [ + "key", + "value" + ], + NewExpression: [ + "callee", + "arguments" + ], + ObjectExpression: [ + "properties" + ], + ObjectPattern: [ + "properties" + ], + PrivateIdentifier: [], + Program: [ + "body" + ], + Property: [ + "key", + "value" + ], + PropertyDefinition: [ + "key", + "value" + ], + RestElement: [ + "argument" + ], + ReturnStatement: [ + "argument" + ], + SequenceExpression: [ + "expressions" + ], + SpreadElement: [ + "argument" + ], + StaticBlock: [ + "body" + ], + Super: [], + SwitchCase: [ + "test", + "consequent" + ], + SwitchStatement: [ + "discriminant", + "cases" + ], + TaggedTemplateExpression: [ + "tag", + "quasi" + ], + TemplateElement: [], + TemplateLiteral: [ + "quasis", + "expressions" + ], + ThisExpression: [], + ThrowStatement: [ + "argument" + ], + TryStatement: [ + "block", + "handler", + "finalizer" + ], + UnaryExpression: [ + "argument" + ], + UpdateExpression: [ + "argument" + ], + VariableDeclaration: [ + "declarations" + ], + VariableDeclarator: [ + "id", + "init" + ], + WhileStatement: [ + "test", + "body" + ], + WithStatement: [ + "object", + "body" + ], + YieldExpression: [ + "argument" + ] +}; + +// Types. +const NODE_TYPES = Object.keys(KEYS); + +// Freeze the keys. +for (const type of NODE_TYPES) { + Object.freeze(KEYS[type]); +} +Object.freeze(KEYS); + +/** + * @author Toru Nagashima + * See LICENSE file in root directory for full license. + */ + +/** + * @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys + */ + +// List to ignore keys. +const KEY_BLACKLIST = new Set([ + "parent", + "leadingComments", + "trailingComments" +]); + +/** + * Check whether a given key should be used or not. + * @param {string} key The key to check. + * @returns {boolean} `true` if the key should be used. + */ +function filterKey(key) { + return !KEY_BLACKLIST.has(key) && key[0] !== "_"; +} + +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +function getKeys(node) { + return Object.keys(node).filter(filterKey); +} + +// Disable valid-jsdoc rule because it reports syntax error on the type of @returns. +// eslint-disable-next-line valid-jsdoc +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +function unionWith(additionalKeys) { + const retv = /** @type {{ + [type: string]: ReadonlyArray + }} */ (Object.assign({}, KEYS)); + + for (const type of Object.keys(additionalKeys)) { + if (Object.prototype.hasOwnProperty.call(retv, type)) { + const keys = new Set(additionalKeys[type]); + + for (const key of retv[type]) { + keys.add(key); + } + + retv[type] = Object.freeze(Array.from(keys)); + } else { + retv[type] = Object.freeze(Array.from(additionalKeys[type])); + } + } + + return Object.freeze(retv); +} + +exports.KEYS = KEYS; +exports.getKeys = getKeys; +exports.unionWith = unionWith; diff --git a/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts b/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts new file mode 100644 index 000000000..c7c28ed37 --- /dev/null +++ b/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts @@ -0,0 +1,27 @@ +type VisitorKeys$1 = { + readonly [type: string]: readonly string[]; +}; +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ +/** + * @type {VisitorKeys} + */ +declare const KEYS: VisitorKeys$1; + +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +declare function getKeys(node: object): readonly string[]; +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys; + +type VisitorKeys = VisitorKeys$1; + +export { KEYS, VisitorKeys, getKeys, unionWith }; diff --git a/node_modules/eslint-visitor-keys/dist/index.d.ts b/node_modules/eslint-visitor-keys/dist/index.d.ts new file mode 100644 index 000000000..46bd87e27 --- /dev/null +++ b/node_modules/eslint-visitor-keys/dist/index.d.ts @@ -0,0 +1,16 @@ +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +export function getKeys(node: object): readonly string[]; +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +export function unionWith(additionalKeys: VisitorKeys): VisitorKeys; +export { KEYS }; +export type VisitorKeys = import('./visitor-keys.js').VisitorKeys; +import KEYS from "./visitor-keys.js"; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts b/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts new file mode 100644 index 000000000..57a952c50 --- /dev/null +++ b/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts @@ -0,0 +1,12 @@ +export default KEYS; +export type VisitorKeys = { + readonly [type: string]: readonly string[]; +}; +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ +/** + * @type {VisitorKeys} + */ +declare const KEYS: VisitorKeys; +//# sourceMappingURL=visitor-keys.d.ts.map \ No newline at end of file diff --git a/node_modules/eslint-visitor-keys/lib/index.js b/node_modules/eslint-visitor-keys/lib/index.js index cd8a32608..3622816d6 100644 --- a/node_modules/eslint-visitor-keys/lib/index.js +++ b/node_modules/eslint-visitor-keys/lib/index.js @@ -2,18 +2,11 @@ * @author Toru Nagashima * See LICENSE file in root directory for full license. */ -"use strict"; +import KEYS from "./visitor-keys.js"; -const KEYS = require("./visitor-keys.json"); - -// Types. -const NODE_TYPES = Object.freeze(Object.keys(KEYS)); - -// Freeze the keys. -for (const type of NODE_TYPES) { - Object.freeze(KEYS[type]); -} -Object.freeze(KEYS); +/** + * @typedef {import('./visitor-keys.js').VisitorKeys} VisitorKeys + */ // List to ignore keys. const KEY_BLACKLIST = new Set([ @@ -31,51 +24,42 @@ function filterKey(key) { return !KEY_BLACKLIST.has(key) && key[0] !== "_"; } -//------------------------------------------------------------------------------ -// Public interfaces -//------------------------------------------------------------------------------ - -module.exports = Object.freeze({ - - /** - * Visitor keys. - * @type {{ [type: string]: string[] | undefined }} - */ - KEYS, - - /** - * Get visitor keys of a given node. - * @param {Object} node The AST node to get keys. - * @returns {string[]} Visitor keys of the node. - */ - getKeys(node) { - return Object.keys(node).filter(filterKey); - }, - - // Disable valid-jsdoc rule because it reports syntax error on the type of @returns. - // eslint-disable-next-line valid-jsdoc - /** - * Make the union set with `KEYS` and given keys. - * @param {Object} additionalKeys The additional keys. - * @returns {{ [type: string]: string[] | undefined }} The union set. - */ - unionWith(additionalKeys) { - const retv = Object.assign({}, KEYS); +/** + * Get visitor keys of a given node. + * @param {object} node The AST node to get keys. + * @returns {readonly string[]} Visitor keys of the node. + */ +export function getKeys(node) { + return Object.keys(node).filter(filterKey); +} - for (const type of Object.keys(additionalKeys)) { - if (retv.hasOwnProperty(type)) { - const keys = new Set(additionalKeys[type]); +// Disable valid-jsdoc rule because it reports syntax error on the type of @returns. +// eslint-disable-next-line valid-jsdoc +/** + * Make the union set with `KEYS` and given keys. + * @param {VisitorKeys} additionalKeys The additional keys. + * @returns {VisitorKeys} The union set. + */ +export function unionWith(additionalKeys) { + const retv = /** @type {{ + [type: string]: ReadonlyArray + }} */ (Object.assign({}, KEYS)); - for (const key of retv[type]) { - keys.add(key); - } + for (const type of Object.keys(additionalKeys)) { + if (Object.prototype.hasOwnProperty.call(retv, type)) { + const keys = new Set(additionalKeys[type]); - retv[type] = Object.freeze(Array.from(keys)); - } else { - retv[type] = Object.freeze(Array.from(additionalKeys[type])); + for (const key of retv[type]) { + keys.add(key); } - } - return Object.freeze(retv); + retv[type] = Object.freeze(Array.from(keys)); + } else { + retv[type] = Object.freeze(Array.from(additionalKeys[type])); + } } -}); + + return Object.freeze(retv); +} + +export { KEYS }; diff --git a/node_modules/espree/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/node_modules/eslint-visitor-keys/lib/visitor-keys.js similarity index 52% rename from node_modules/espree/node_modules/eslint-visitor-keys/lib/visitor-keys.json rename to node_modules/eslint-visitor-keys/lib/visitor-keys.js index a33bbc660..ccf2b1f9a 100644 --- a/node_modules/espree/node_modules/eslint-visitor-keys/lib/visitor-keys.json +++ b/node_modules/eslint-visitor-keys/lib/visitor-keys.js @@ -1,284 +1,315 @@ -{ - "AssignmentExpression": [ - "left", - "right" - ], - "AssignmentPattern": [ - "left", - "right" - ], - "ArrayExpression": [ +/** + * @typedef {{ readonly [type: string]: ReadonlyArray }} VisitorKeys + */ + +/** + * @type {VisitorKeys} + */ +const KEYS = { + ArrayExpression: [ "elements" ], - "ArrayPattern": [ + ArrayPattern: [ "elements" ], - "ArrowFunctionExpression": [ + ArrowFunctionExpression: [ "params", "body" ], - "AwaitExpression": [ - "argument" + AssignmentExpression: [ + "left", + "right" ], - "BlockStatement": [ - "body" + AssignmentPattern: [ + "left", + "right" + ], + AwaitExpression: [ + "argument" ], - "BinaryExpression": [ + BinaryExpression: [ "left", "right" ], - "BreakStatement": [ + BlockStatement: [ + "body" + ], + BreakStatement: [ "label" ], - "CallExpression": [ + CallExpression: [ "callee", "arguments" ], - "CatchClause": [ + CatchClause: [ "param", "body" ], - "ChainExpression": [ + ChainExpression: [ "expression" ], - "ClassBody": [ + ClassBody: [ "body" ], - "ClassDeclaration": [ + ClassDeclaration: [ "id", "superClass", "body" ], - "ClassExpression": [ + ClassExpression: [ "id", "superClass", "body" ], - "ConditionalExpression": [ + ConditionalExpression: [ "test", "consequent", "alternate" ], - "ContinueStatement": [ + ContinueStatement: [ "label" ], - "DebuggerStatement": [], - "DoWhileStatement": [ + DebuggerStatement: [], + DoWhileStatement: [ "body", "test" ], - "EmptyStatement": [], - "ExportAllDeclaration": [ + EmptyStatement: [], + ExperimentalRestProperty: [ + "argument" + ], + ExperimentalSpreadProperty: [ + "argument" + ], + ExportAllDeclaration: [ "exported", "source" ], - "ExportDefaultDeclaration": [ + ExportDefaultDeclaration: [ "declaration" ], - "ExportNamedDeclaration": [ + ExportNamedDeclaration: [ "declaration", "specifiers", "source" ], - "ExportSpecifier": [ + ExportSpecifier: [ "exported", "local" ], - "ExpressionStatement": [ + ExpressionStatement: [ "expression" ], - "ExperimentalRestProperty": [ - "argument" - ], - "ExperimentalSpreadProperty": [ - "argument" - ], - "ForStatement": [ - "init", - "test", - "update", - "body" - ], - "ForInStatement": [ + ForInStatement: [ "left", "right", "body" ], - "ForOfStatement": [ + ForOfStatement: [ "left", "right", "body" ], - "FunctionDeclaration": [ + ForStatement: [ + "init", + "test", + "update", + "body" + ], + FunctionDeclaration: [ "id", "params", "body" ], - "FunctionExpression": [ + FunctionExpression: [ "id", "params", "body" ], - "Identifier": [], - "IfStatement": [ + Identifier: [], + IfStatement: [ "test", "consequent", "alternate" ], - "ImportDeclaration": [ + ImportDeclaration: [ "specifiers", "source" ], - "ImportDefaultSpecifier": [ + ImportDefaultSpecifier: [ "local" ], - "ImportExpression": [ + ImportExpression: [ "source" ], - "ImportNamespaceSpecifier": [ + ImportNamespaceSpecifier: [ "local" ], - "ImportSpecifier": [ + ImportSpecifier: [ "imported", "local" ], - "JSXAttribute": [ + JSXAttribute: [ "name", "value" ], - "JSXClosingElement": [ + JSXClosingElement: [ "name" ], - "JSXElement": [ + JSXClosingFragment: [], + JSXElement: [ "openingElement", "children", "closingElement" ], - "JSXEmptyExpression": [], - "JSXExpressionContainer": [ + JSXEmptyExpression: [], + JSXExpressionContainer: [ "expression" ], - "JSXIdentifier": [], - "JSXMemberExpression": [ + JSXFragment: [ + "openingFragment", + "children", + "closingFragment" + ], + JSXIdentifier: [], + JSXMemberExpression: [ "object", "property" ], - "JSXNamespacedName": [ + JSXNamespacedName: [ "namespace", "name" ], - "JSXOpeningElement": [ + JSXOpeningElement: [ "name", "attributes" ], - "JSXSpreadAttribute": [ + JSXOpeningFragment: [], + JSXSpreadAttribute: [ "argument" ], - "JSXText": [], - "JSXFragment": [ - "openingFragment", - "children", - "closingFragment" + JSXSpreadChild: [ + "expression" ], - "Literal": [], - "LabeledStatement": [ + JSXText: [], + LabeledStatement: [ "label", "body" ], - "LogicalExpression": [ + Literal: [], + LogicalExpression: [ "left", "right" ], - "MemberExpression": [ + MemberExpression: [ "object", "property" ], - "MetaProperty": [ + MetaProperty: [ "meta", "property" ], - "MethodDefinition": [ + MethodDefinition: [ "key", "value" ], - "NewExpression": [ + NewExpression: [ "callee", "arguments" ], - "ObjectExpression": [ + ObjectExpression: [ "properties" ], - "ObjectPattern": [ + ObjectPattern: [ "properties" ], - "Program": [ + PrivateIdentifier: [], + Program: [ "body" ], - "Property": [ + Property: [ + "key", + "value" + ], + PropertyDefinition: [ "key", "value" ], - "RestElement": [ + RestElement: [ "argument" ], - "ReturnStatement": [ + ReturnStatement: [ "argument" ], - "SequenceExpression": [ + SequenceExpression: [ "expressions" ], - "SpreadElement": [ + SpreadElement: [ "argument" ], - "Super": [], - "SwitchStatement": [ - "discriminant", - "cases" + StaticBlock: [ + "body" ], - "SwitchCase": [ + Super: [], + SwitchCase: [ "test", "consequent" ], - "TaggedTemplateExpression": [ + SwitchStatement: [ + "discriminant", + "cases" + ], + TaggedTemplateExpression: [ "tag", "quasi" ], - "TemplateElement": [], - "TemplateLiteral": [ + TemplateElement: [], + TemplateLiteral: [ "quasis", "expressions" ], - "ThisExpression": [], - "ThrowStatement": [ + ThisExpression: [], + ThrowStatement: [ "argument" ], - "TryStatement": [ + TryStatement: [ "block", "handler", "finalizer" ], - "UnaryExpression": [ + UnaryExpression: [ "argument" ], - "UpdateExpression": [ + UpdateExpression: [ "argument" ], - "VariableDeclaration": [ + VariableDeclaration: [ "declarations" ], - "VariableDeclarator": [ + VariableDeclarator: [ "id", "init" ], - "WhileStatement": [ + WhileStatement: [ "test", "body" ], - "WithStatement": [ + WithStatement: [ "object", "body" ], - "YieldExpression": [ + YieldExpression: [ "argument" ] +}; + +// Types. +const NODE_TYPES = Object.keys(KEYS); + +// Freeze the keys. +for (const type of NODE_TYPES) { + Object.freeze(KEYS[type]); } +Object.freeze(KEYS); + +export default KEYS; diff --git a/node_modules/eslint-visitor-keys/lib/visitor-keys.json b/node_modules/eslint-visitor-keys/lib/visitor-keys.json deleted file mode 100644 index a33bbc660..000000000 --- a/node_modules/eslint-visitor-keys/lib/visitor-keys.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "AssignmentExpression": [ - "left", - "right" - ], - "AssignmentPattern": [ - "left", - "right" - ], - "ArrayExpression": [ - "elements" - ], - "ArrayPattern": [ - "elements" - ], - "ArrowFunctionExpression": [ - "params", - "body" - ], - "AwaitExpression": [ - "argument" - ], - "BlockStatement": [ - "body" - ], - "BinaryExpression": [ - "left", - "right" - ], - "BreakStatement": [ - "label" - ], - "CallExpression": [ - "callee", - "arguments" - ], - "CatchClause": [ - "param", - "body" - ], - "ChainExpression": [ - "expression" - ], - "ClassBody": [ - "body" - ], - "ClassDeclaration": [ - "id", - "superClass", - "body" - ], - "ClassExpression": [ - "id", - "superClass", - "body" - ], - "ConditionalExpression": [ - "test", - "consequent", - "alternate" - ], - "ContinueStatement": [ - "label" - ], - "DebuggerStatement": [], - "DoWhileStatement": [ - "body", - "test" - ], - "EmptyStatement": [], - "ExportAllDeclaration": [ - "exported", - "source" - ], - "ExportDefaultDeclaration": [ - "declaration" - ], - "ExportNamedDeclaration": [ - "declaration", - "specifiers", - "source" - ], - "ExportSpecifier": [ - "exported", - "local" - ], - "ExpressionStatement": [ - "expression" - ], - "ExperimentalRestProperty": [ - "argument" - ], - "ExperimentalSpreadProperty": [ - "argument" - ], - "ForStatement": [ - "init", - "test", - "update", - "body" - ], - "ForInStatement": [ - "left", - "right", - "body" - ], - "ForOfStatement": [ - "left", - "right", - "body" - ], - "FunctionDeclaration": [ - "id", - "params", - "body" - ], - "FunctionExpression": [ - "id", - "params", - "body" - ], - "Identifier": [], - "IfStatement": [ - "test", - "consequent", - "alternate" - ], - "ImportDeclaration": [ - "specifiers", - "source" - ], - "ImportDefaultSpecifier": [ - "local" - ], - "ImportExpression": [ - "source" - ], - "ImportNamespaceSpecifier": [ - "local" - ], - "ImportSpecifier": [ - "imported", - "local" - ], - "JSXAttribute": [ - "name", - "value" - ], - "JSXClosingElement": [ - "name" - ], - "JSXElement": [ - "openingElement", - "children", - "closingElement" - ], - "JSXEmptyExpression": [], - "JSXExpressionContainer": [ - "expression" - ], - "JSXIdentifier": [], - "JSXMemberExpression": [ - "object", - "property" - ], - "JSXNamespacedName": [ - "namespace", - "name" - ], - "JSXOpeningElement": [ - "name", - "attributes" - ], - "JSXSpreadAttribute": [ - "argument" - ], - "JSXText": [], - "JSXFragment": [ - "openingFragment", - "children", - "closingFragment" - ], - "Literal": [], - "LabeledStatement": [ - "label", - "body" - ], - "LogicalExpression": [ - "left", - "right" - ], - "MemberExpression": [ - "object", - "property" - ], - "MetaProperty": [ - "meta", - "property" - ], - "MethodDefinition": [ - "key", - "value" - ], - "NewExpression": [ - "callee", - "arguments" - ], - "ObjectExpression": [ - "properties" - ], - "ObjectPattern": [ - "properties" - ], - "Program": [ - "body" - ], - "Property": [ - "key", - "value" - ], - "RestElement": [ - "argument" - ], - "ReturnStatement": [ - "argument" - ], - "SequenceExpression": [ - "expressions" - ], - "SpreadElement": [ - "argument" - ], - "Super": [], - "SwitchStatement": [ - "discriminant", - "cases" - ], - "SwitchCase": [ - "test", - "consequent" - ], - "TaggedTemplateExpression": [ - "tag", - "quasi" - ], - "TemplateElement": [], - "TemplateLiteral": [ - "quasis", - "expressions" - ], - "ThisExpression": [], - "ThrowStatement": [ - "argument" - ], - "TryStatement": [ - "block", - "handler", - "finalizer" - ], - "UnaryExpression": [ - "argument" - ], - "UpdateExpression": [ - "argument" - ], - "VariableDeclaration": [ - "declarations" - ], - "VariableDeclarator": [ - "id", - "init" - ], - "WhileStatement": [ - "test", - "body" - ], - "WithStatement": [ - "object", - "body" - ], - "YieldExpression": [ - "argument" - ] -} diff --git a/node_modules/eslint-visitor-keys/package.json b/node_modules/eslint-visitor-keys/package.json index ca24cbb37..b9d51ce0e 100644 --- a/node_modules/eslint-visitor-keys/package.json +++ b/node_modules/eslint-visitor-keys/package.json @@ -1,70 +1,74 @@ { - "_from": "eslint-visitor-keys@^2.0.0", - "_id": "eslint-visitor-keys@2.0.0", - "_inBundle": false, - "_integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", - "_location": "/eslint-visitor-keys", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "eslint-visitor-keys@^2.0.0", - "name": "eslint-visitor-keys", - "escapedName": "eslint-visitor-keys", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" + "name": "eslint-visitor-keys", + "version": "3.4.3", + "description": "Constants and utilities about visitor keys to traverse AST.", + "type": "module", + "main": "dist/eslint-visitor-keys.cjs", + "types": "./dist/index.d.ts", + "exports": { + ".": [ + { + "import": "./lib/index.js", + "require": "./dist/eslint-visitor-keys.cjs" + }, + "./dist/eslint-visitor-keys.cjs" + ], + "./package.json": "./package.json" }, - "_requiredBy": [ - "/eslint" + "files": [ + "dist/index.d.ts", + "dist/visitor-keys.d.ts", + "dist/eslint-visitor-keys.cjs", + "dist/eslint-visitor-keys.d.cts", + "lib" ], - "_resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "_shasum": "21fdc8fbcd9c795cc0321f0563702095751511a8", - "_spec": "eslint-visitor-keys@^2.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Toru Nagashima", - "url": "https://github.com/mysticatea" - }, - "bugs": { - "url": "https://github.com/eslint/eslint-visitor-keys/issues" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Constants and utilities about visitor keys to traverse AST.", "devDependencies": { - "eslint": "^4.7.2", - "eslint-config-eslint": "^4.0.0", - "eslint-release": "^1.0.0", - "mocha": "^3.5.3", - "nyc": "^11.2.1", - "opener": "^1.4.3" + "@types/estree": "^0.0.51", + "@types/estree-jsx": "^0.0.1", + "@typescript-eslint/parser": "^5.14.0", + "c8": "^7.11.0", + "chai": "^4.3.6", + "eslint": "^7.29.0", + "eslint-config-eslint": "^7.0.0", + "eslint-plugin-jsdoc": "^35.4.0", + "eslint-plugin-node": "^11.1.0", + "eslint-release": "^3.2.0", + "esquery": "^1.4.0", + "json-diff": "^0.7.3", + "mocha": "^9.2.1", + "opener": "^1.5.2", + "rollup": "^2.70.0", + "rollup-plugin-dts": "^4.2.3", + "tsd": "^0.19.1", + "typescript": "^4.6.2" }, - "engines": { - "node": ">=10" + "scripts": { + "build": "npm run build:cjs && npm run build:types", + "build:cjs": "rollup -c", + "build:debug": "npm run build:cjs -- -m && npm run build:types", + "build:keys": "node tools/build-keys-from-ts", + "build:types": "tsc", + "lint": "eslint .", + "prepare": "npm run build", + "release:generate:latest": "eslint-generate-release", + "release:generate:alpha": "eslint-generate-prerelease alpha", + "release:generate:beta": "eslint-generate-prerelease beta", + "release:generate:rc": "eslint-generate-prerelease rc", + "release:publish": "eslint-publish-release", + "test": "mocha tests/lib/**/*.cjs && c8 mocha tests/lib/**/*.js && npm run test:types", + "test:open-coverage": "c8 report --reporter lcov && opener coverage/lcov-report/index.html", + "test:types": "tsd" }, - "files": [ - "lib" - ], - "homepage": "https://github.com/eslint/eslint-visitor-keys#readme", + "repository": "eslint/eslint-visitor-keys", + "funding": "https://opencollective.com/eslint", "keywords": [], + "author": "Toru Nagashima (https://github.com/mysticatea)", "license": "Apache-2.0", - "main": "lib/index.js", - "name": "eslint-visitor-keys", - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint-visitor-keys.git" - }, - "scripts": { - "coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html", - "generate-alpharelease": "eslint-generate-prerelease alpha", - "generate-betarelease": "eslint-generate-prerelease beta", - "generate-rcrelease": "eslint-generate-prerelease rc", - "generate-release": "eslint-generate-release", - "lint": "eslint lib tests/lib", - "publish-release": "eslint-publish-release", - "test": "nyc mocha tests/lib" + "bugs": { + "url": "https://github.com/eslint/eslint-visitor-keys/issues" }, - "version": "2.0.0" + "homepage": "https://github.com/eslint/eslint-visitor-keys#readme" } diff --git a/node_modules/eslint/CHANGELOG.md b/node_modules/eslint/CHANGELOG.md deleted file mode 100644 index 4f825a2cd..000000000 --- a/node_modules/eslint/CHANGELOG.md +++ /dev/null @@ -1,6425 +0,0 @@ -v7.23.0 - March 26, 2021 - -* [`687ccae`](https://github.com/eslint/eslint/commit/687ccae517b8b815cf21e948f80d22e2bf118a99) Update: add option "allowInParentheses" to no-sequences (fixes #14197) (#14199) (Daniel Rentz) -* [`dbf2529`](https://github.com/eslint/eslint/commit/dbf252964d9a2b8957cfe0aed5c87a6d4a5cce24) Sponsors: Sync README with website (ESLint Jenkins) -* [`4bdf2c1`](https://github.com/eslint/eslint/commit/4bdf2c1dade27625b601080687ce95b8c229e491) Sponsors: Sync README with website (ESLint Jenkins) -* [`49d1697`](https://github.com/eslint/eslint/commit/49d16977d969070e5240074e76036f56631a90d3) Chore: Upgrade eslint-plugin-jsdoc to v25 and remove --legacy-peer-deps (#14244) (Brandon Mills) -* [`43f1685`](https://github.com/eslint/eslint/commit/43f1685356b9840e09631843ad9ccf0440a498b0) Update: `--quiet` should not supress `--max-warnings` (fixes #14202) (#14242) (Milos Djermanovic) -* [`909c727`](https://github.com/eslint/eslint/commit/909c7271b8d294bd884827ad5df02615b6ec5e82) Docs: Add valid example that shows vars in a block scope (#14230) (Ed S) -* [`28583eb`](https://github.com/eslint/eslint/commit/28583eb8ada20f32579841bec3fbd60a018d5931) Fix: no-mixed-operators false positives with `? :` (fixes #14223) (#14226) (Milos Djermanovic) -* [`a99eb2d`](https://github.com/eslint/eslint/commit/a99eb2dc2a297d16e40a9feef3956668716c4eb5) Fix: Clarify line breaks in object-curly-newline (fixes #14024) (#14063) (armin yahya) -* [`8984c91`](https://github.com/eslint/eslint/commit/8984c91372e64d1e8dd2ce21b87b80977d57bff9) Update: eslint --env-info output os info (#14059) (薛定谔的猫) -* [`2a79306`](https://github.com/eslint/eslint/commit/2a79306f71c4c80f1e3e73be2a140d07cf55c63d) Sponsors: Sync README with website (ESLint Jenkins) -* [`ebd7026`](https://github.com/eslint/eslint/commit/ebd70263f6e6fe597613d90f4b8de84710c2f3d6) Docs: Fix typo (#14225) (Greg Finley) -* [`a2013fc`](https://github.com/eslint/eslint/commit/a2013fcf996c8651bc760df21d900442828a6884) Sponsors: Sync README with website (ESLint Jenkins) - -v7.22.0 - March 12, 2021 - -* [`3a432d8`](https://github.com/eslint/eslint/commit/3a432d82b3a5710aff7da20302fe0b94fedc46c2) Docs: Improve documentation for indent rule (#14168) (Serkan Özel) -* [`f62ec8d`](https://github.com/eslint/eslint/commit/f62ec8d30d925e70e4d0d40640857c587ac2e116) Update: throw error when fix range is invalid (#14142) (Jacob Bandes-Storch) -* [`0eecad2`](https://github.com/eslint/eslint/commit/0eecad271358f753730741fcfcb2f7cc915c1fa7) Upgrade: Update lodash in package.json to V 4.17.21 (#14159) (Basem Al-Nabulsi) -* [`5ad91aa`](https://github.com/eslint/eslint/commit/5ad91aa7df3d6bc185786e6eccd9e055fd951055) Update: report es2021 globals in no-extend-native (refs #13602) (#14177) (Milos Djermanovic) -* [`c295581`](https://github.com/eslint/eslint/commit/c295581aca4e08ec4ae8e5ee5726a6f454a3ee26) Chore: remove leftover JSDoc from lint-result-cache (#14176) (Milos Djermanovic) -* [`0d541f9`](https://github.com/eslint/eslint/commit/0d541f9d9d58966372e2055a8f69fb9483d56a4b) Chore: Reduce lodash usage (#14178) (Stephen Wade) -* [`27a67d7`](https://github.com/eslint/eslint/commit/27a67d71ffa9bbd7af02ae448844e127bcf956dc) Sponsors: Sync README with website (ESLint Jenkins) -* [`459d821`](https://github.com/eslint/eslint/commit/459d821f4a599501ceb002f9d7a5034fc45ffbb0) Chore: upgrade dependencies of browser test (#14127) (Pig Fang) -* [`ebfb63a`](https://github.com/eslint/eslint/commit/ebfb63a682004a008f2707dbad616e5ae1630b2c) Sponsors: Sync README with website (ESLint Jenkins) -* [`3ba029f`](https://github.com/eslint/eslint/commit/3ba029fbffd44068be93254890fc2aec3e92c212) Docs: Remove Extraneous Dash (#14164) (Danny Hurlburt) -* [`6f4540e`](https://github.com/eslint/eslint/commit/6f4540ea7ea39775906526506fd7abd7ea97610c) Sponsors: Sync README with website (ESLint Jenkins) -* [`ddf361c`](https://github.com/eslint/eslint/commit/ddf361ca2a2a01a9974f421e5f62270df282d0e8) Docs: Fix Formatting (#14154) (Danny Hurlburt) -* [`c0d2ac1`](https://github.com/eslint/eslint/commit/c0d2ac16f8f9c75c62c78e9fe6a24a25ba0d7828) Sponsors: Sync README with website (ESLint Jenkins) -* [`a8df03e`](https://github.com/eslint/eslint/commit/a8df03efe3bc47665d2112c2cdd5bead337d475d) Docs: Clarify triage process (#14117) (Nicholas C. Zakas) - -v7.21.0 - February 27, 2021 - -* [`3cd5440`](https://github.com/eslint/eslint/commit/3cd5440b94d5fa4f11a09f50b685f6150f0c2d41) Upgrade: @eslint/eslintrc to 0.4.0 (#14147) (Brandon Mills) -* [`c0b8c71`](https://github.com/eslint/eslint/commit/c0b8c71df4d0b3f54b20587432d9133741985d5c) Upgrade: Puppeteer to 7.1.0 (#14122) (Tim van der Lippe) -* [`08ae31e`](https://github.com/eslint/eslint/commit/08ae31e539e381cd0eabf6393fa5c20f1d59125f) New: Implement cacheStrategy (refs eslint/rfcs#63) (#14119) (Manu Chambon) -* [`5e51fd2`](https://github.com/eslint/eslint/commit/5e51fd28dc773c11c924450d24088f97f2824f00) Update: do not ignore symbolic links (fixes #13551, fixes #13615) (#14126) (Pig Fang) -* [`87c43a5`](https://github.com/eslint/eslint/commit/87c43a5d7ea2018cffd6d9b5c431ecb60caaf0d6) Chore: improve a few comments and fix typos (#14125) (Tobias Nießen) -* [`e19c51e`](https://github.com/eslint/eslint/commit/e19c51ea2ef2cf666d94218c66f6b223bb2e9dae) Sponsors: Sync README with website (ESLint Jenkins) -* [`b8aea99`](https://github.com/eslint/eslint/commit/b8aea9988b6451b6a05af4f3ede8d6ed5c1d9926) Fix: pluralize 'line' to 'lines' in max-lines-per-function description (#14115) (Trevin Hofmann) -* [`f5b53e2`](https://github.com/eslint/eslint/commit/f5b53e285ab5286ea382d73b379b820f649c20d0) Sponsors: Sync README with website (ESLint Jenkins) -* [`eee1213`](https://github.com/eslint/eslint/commit/eee12134ce0956e9f825c1630776b1731551a948) Sponsors: Sync README with website (ESLint Jenkins) -* [`5c4d7ea`](https://github.com/eslint/eslint/commit/5c4d7ea8d2e8d137c42b918dc99a84b4a5fed9b3) Sponsors: Sync README with website (ESLint Jenkins) - -v7.20.0 - February 12, 2021 - -* [`f4ac3b0`](https://github.com/eslint/eslint/commit/f4ac3b0e7072fbd3c14e9c64ff0c2c255a4eb730) Docs: fix sibling selector descriptions (#14099) (Milos Djermanovic) -* [`9d6063a`](https://github.com/eslint/eslint/commit/9d6063add931f0803cae1676d5df307baf114360) Fix: Crash with esquery when using JSX (fixes #13639) (#14072) (Yosuke Ota) -* [`a0871f1`](https://github.com/eslint/eslint/commit/a0871f1840060bd23cfe0952a096b107142db2f0) Docs: Triage process (#14014) (Nicholas C. Zakas) -* [`ad90761`](https://github.com/eslint/eslint/commit/ad9076183bc2c2029525edfc4596e403999348d1) Update: add enforceForJSX option to no-unused-expressions rule (#14012) (Duncan Beevers) -* [`d6c84af`](https://github.com/eslint/eslint/commit/d6c84af67318537177ffac0120a81af08e3e9df4) Fix: `--init` autoconfig shouldn't add deprecated rules (fixes #14017) (#14060) (Milos Djermanovic) -* [`9b277a1`](https://github.com/eslint/eslint/commit/9b277a16a7261e51b7ba36d6de7f996e9203a6a4) Fix: Support ENOTDIR error code in the folder existence checking utility (#13973) (Constantine Genchevsky) -* [`7aeb127`](https://github.com/eslint/eslint/commit/7aeb12798f2b9da706f3593f26a02e717929c9af) Upgrade: pin @babel/code-frame@7.12.11 (#14067) (Milos Djermanovic) -* [`b4e2af5`](https://github.com/eslint/eslint/commit/b4e2af5db1c29343ffec2cd104b04bf39b77ee56) Docs: Add more fields to bug report template (#14039) (Nicholas C. Zakas) -* [`96f1d49`](https://github.com/eslint/eslint/commit/96f1d49a4647e59f2fb918be096654e290513adc) Sponsors: Sync README with website (ESLint Jenkins) -* [`cb27b0a`](https://github.com/eslint/eslint/commit/cb27b0abeda6dfee55dd43b9cbe12afad321f55d) Build: package.json update for eslint-config-eslint release (ESLint Jenkins) -* [`4cab165`](https://github.com/eslint/eslint/commit/4cab165bf4e6e5e9f42a59a37a8ff2548c0af87d) Sponsors: Sync README with website (ESLint Jenkins) - -v7.19.0 - January 30, 2021 - -* [`ce7f061`](https://github.com/eslint/eslint/commit/ce7f06121d9eb9cc2b3da24b4456b4d382e1413b) Update: add shadowed variable loc to message in no-shadow (fixes #13646) (#13841) (t-mangoe) -* [`c60e23f`](https://github.com/eslint/eslint/commit/c60e23ff306a14ca6eabcadb275ed27995fcc6e4) Update: fix `let` logic in for-in and for-of loops in no-extra-parens (#14011) (Milos Djermanovic) -* [`d76e8f6`](https://github.com/eslint/eslint/commit/d76e8f69bd791357c67ada7b5c55608acf29b622) Fix: no-useless-rename invalid autofix with parenthesized identifiers (#14032) (Milos Djermanovic) -* [`5800d92`](https://github.com/eslint/eslint/commit/5800d921144ec330b6ee7cd03364434007331354) Docs: Clarify stylistic rule update policy (#14052) (Brandon Mills) -* [`0ccf6d2`](https://github.com/eslint/eslint/commit/0ccf6d200147437b338cadb34546451972befd75) Docs: remove configuring.md (#14036) (Milos Djermanovic) -* [`65bb0ab`](https://github.com/eslint/eslint/commit/65bb0abde56f72586036fff151aa2d13f1b7be6c) Chore: Clean up new issue workflow (#14040) (Nicholas C. Zakas) -* [`e1da90f`](https://github.com/eslint/eslint/commit/e1da90fc414a3c9c16f52db4a5bd81bd4f9532a4) Fix: nested indenting for offsetTernaryExpressions: true (fixes #13971) (#13972) (Chris Brody) -* [`1a078b9`](https://github.com/eslint/eslint/commit/1a078b9166f29cb3760435ddbc1a0da4a0974d4a) Update: check ternary `:` even if `?` was reported in space-infix-ops (#13963) (Milos Djermanovic) -* [`fb27422`](https://github.com/eslint/eslint/commit/fb274226242eaebc1480fc9c901202986afc3c8a) Fix: extend prefer-const fixer range to whole declaration (fixes #13899) (#14033) (Nitin Kumar) -* [`e0b05c7`](https://github.com/eslint/eslint/commit/e0b05c704f3ce6f549d14718236d22fe49fcb611) Docs: add a correct example to no-unsafe-optional-chaining (refs #14029) (#14050) (armin yahya) -* [`46e836d`](https://github.com/eslint/eslint/commit/46e836d46442d2ec756038a2e12ba19b74394dbd) Sponsors: Sync README with website (ESLint Jenkins) -* [`3fc4fa4`](https://github.com/eslint/eslint/commit/3fc4fa485ca9ccd5e16dbc7e53ba31452d22dc4a) Docs: update configuring links (#14038) (Milos Djermanovic) -* [`8561c21`](https://github.com/eslint/eslint/commit/8561c2116ef89e53ebffb750066f1b00a4acdb76) Docs: fix broken links in configuring/README.md (#14046) (Milos Djermanovic) -* [`1c309eb`](https://github.com/eslint/eslint/commit/1c309ebca4a81a0faf397103dbc621019dea8c9c) Update: fix no-invalid-regexp false negatives with no flags specified (#14018) (Milos Djermanovic) -* [`f6602d5`](https://github.com/eslint/eslint/commit/f6602d569427e9e2a4f3b5ca3fc3a8bffb28d15e) Docs: Reorganize Configuration Documentation (#13837) (klkhan) -* [`c753b44`](https://github.com/eslint/eslint/commit/c753b442ef67867a178ffc2ad29b4e0534f72469) Sponsors: Sync README with website (ESLint Jenkins) -* [`a4fdb70`](https://github.com/eslint/eslint/commit/a4fdb7001aa41b9ad8bb92cc8a47b9135c94afc7) Docs: Fixed Typo (#14007) (Yash Singh) -* [`f7ca481`](https://github.com/eslint/eslint/commit/f7ca48165d025e01c38698352cff24d1de87cc8b) Docs: Explain why we disable lock files (refs eslint/tsc-meetings#234) (#14006) (Brandon Mills) - -v7.18.0 - January 15, 2021 - -* [`e3264b2`](https://github.com/eslint/eslint/commit/e3264b26a625d926a1ea96df1c4b643af5c3797c) Upgrade: @eslint/eslintrc to improve error message for invalid extends (#14009) (Milos Djermanovic) -* [`f17c3c3`](https://github.com/eslint/eslint/commit/f17c3c371789ffa84f0cda57101e8193899adbe6) Update: check logical assignment operators in the complexity rule (#13979) (Milos Djermanovic) -* [`672deb0`](https://github.com/eslint/eslint/commit/672deb057a14a7acad8c669189870009f1edb8a6) Docs: fix no-invalid-regexp docs regarding ecmaVersion (#13991) (Milos Djermanovic) -* [`179a910`](https://github.com/eslint/eslint/commit/179a910b32e853bc12a9dd71f7c10e762cbeac44) Fix: --init crash on question to upgrade/downgrade ESLint (fixes #13978) (#13995) (Milos Djermanovic) -* [`292b1c0`](https://github.com/eslint/eslint/commit/292b1c0017bc442d399f67e01d699c59e6b71453) Fix: no-extra-parens false positive with `let` identifier in for-loop (#13981) (Milos Djermanovic) -* [`de61f94`](https://github.com/eslint/eslint/commit/de61f9444cf58a4d70e126ab3d10bf20851de7c9) Sponsors: Sync README with website (ESLint Jenkins) -* [`9250d16`](https://github.com/eslint/eslint/commit/9250d167ceb5684669eabe93dae326e33f0684f2) Upgrade: Bump lodash to fix security issue (#13993) (Frederik Prijck) -* [`75fea9b`](https://github.com/eslint/eslint/commit/75fea9bcdd3dde5a07e0089d9011a4df518cdbe3) Sponsors: Sync README with website (ESLint Jenkins) -* [`f2687e7`](https://github.com/eslint/eslint/commit/f2687e71f9e2a2773f821c4dc1a02abe95b97df4) Docs: update space-in-parens related rules (#13985) (Chris Brody) -* [`4a38bbe`](https://github.com/eslint/eslint/commit/4a38bbe81b4b29ca1a4e62d0a0cc8d525455b063) Docs: space-in-parens examples with no arguments etc. (#13987) (Chris Brody) -* [`3e49169`](https://github.com/eslint/eslint/commit/3e491698687aa08b3b798cee0931f0872ca1bc55) Sponsors: Sync README with website (ESLint Jenkins) -* [`c5bf1f2`](https://github.com/eslint/eslint/commit/c5bf1f2150a9fbbb9e74c04808dc3bfeda1ed321) Sponsors: Sync README with website (ESLint Jenkins) -* [`98a729c`](https://github.com/eslint/eslint/commit/98a729c9def54cee9e5478e75e8bd6f28167d5e8) Sponsors: Sync README with website (ESLint Jenkins) -* [`e83a696`](https://github.com/eslint/eslint/commit/e83a6962b51b05c2ddfe42b0748b405d515eeb9d) Sponsors: Sync README with website (ESLint Jenkins) -* [`78cb483`](https://github.com/eslint/eslint/commit/78cb48345c725e9f90fd0e631c476802244df4a4) Chore: test `foo( )` with space-in-parens option "always" (#13986) (Chris Brody) -* [`f6948f6`](https://github.com/eslint/eslint/commit/f6948f6bdc763dca0787bb2786bc9f6f9ed88f43) Docs: Update semantic versioning policy (#13970) (Nicholas C. Zakas) -* [`0688212`](https://github.com/eslint/eslint/commit/068821248e2d2eff11152f270102d537d8fa8126) Sponsors: Sync README with website (ESLint Jenkins) -* [`aeba5e5`](https://github.com/eslint/eslint/commit/aeba5e5e6062095a06d9b867d7e7ee75422f25b9) Chore: fix typo (#13975) (Nitin Kumar) -* [`4ee1134`](https://github.com/eslint/eslint/commit/4ee113414bdcbea240a5d9db27da6a10df472005) Sponsors: Sync README with website (ESLint Jenkins) - -v7.17.0 - January 1, 2021 - -* [`e128e77`](https://github.com/eslint/eslint/commit/e128e775e9fa116a0ad68a071f1f0997589f8cd4) Update: check logical assignment in no-constant-condition (#13946) (Milos Djermanovic) -* [`cc48713`](https://github.com/eslint/eslint/commit/cc4871369645c3409dc56ded7a555af8a9f63d51) Chore: refactor calculating range and loc in no-useless-escape (#13964) (Milos Djermanovic) -* [`535fe47`](https://github.com/eslint/eslint/commit/535fe47fee6544b4957378f9408117c8318d4762) Update: use regexpp's default ecmaVersion in no-control-regex (#13969) (Milos Djermanovic) -* [`83e98cd`](https://github.com/eslint/eslint/commit/83e98cd48ce3d1acf729f4fb9be40cff332abd6e) Fix: use regexpp's default ecmaVersion in no-invalid-regexp (#13968) (Milos Djermanovic) -* [`7297363`](https://github.com/eslint/eslint/commit/7297363ea355d0e3b2a74aaec586126deb91fd93) Docs: fix examples for no-multi-str (#13966) (Milos Djermanovic) -* [`0649871`](https://github.com/eslint/eslint/commit/06498716bfba65ed8c7217917a29a07ad267193a) Update: add autofix to rule multiline-ternary (#13958) (薛定谔的猫) -* [`f6e7e32`](https://github.com/eslint/eslint/commit/f6e7e3231bc43c989f8c953de8e0d328bac5eea0) Fix: no-useless-escape wrong loc and fix with CRLF in template elements (#13953) (Milos Djermanovic) -* [`19c69c0`](https://github.com/eslint/eslint/commit/19c69c0293a98634ff0d4884a0cdabc1213ebcb4) Fix: one-var shouldn't split declaration if it isn't in a statement list (#13959) (Milos Djermanovic) -* [`e451b96`](https://github.com/eslint/eslint/commit/e451b9664aface32ad9321eaf5619c875dc76553) Docs: update build tool for webpack (#13962) (Sam Chen) -* [`c3e9acc`](https://github.com/eslint/eslint/commit/c3e9accce2f61b04ab699fd37c90703305281aa3) Chore: fix typos (#13960) (YeonJuan) -* [`7289ecf`](https://github.com/eslint/eslint/commit/7289ecf58ed0d2e7f0ad7f1e5004c8927a7bf805) Sponsors: Sync README with website (ESLint Jenkins) - -v7.16.0 - December 18, 2020 - -* [`a62ad6f`](https://github.com/eslint/eslint/commit/a62ad6f03151358b93b5fede022a30d67310705c) Update: fix false negative of no-extra-parens with NewExpression (#13930) (Milos Djermanovic) -* [`f85b4c7`](https://github.com/eslint/eslint/commit/f85b4c72668c95c79fdb342b74dbd53d21baa93f) Fix: require-atomic-updates false positive across await (fixes #11954) (#13915) (buhi) -* [`301d0c0`](https://github.com/eslint/eslint/commit/301d0c05229dbd6cfb1045d716524e8ec46fa2c1) Fix: no-constant-condition false positives with unary expressions (#13927) (Milos Djermanovic) -* [`555c128`](https://github.com/eslint/eslint/commit/555c128b49ae6d9c100a9f8429416417edb40d13) Fix: false positive with await and ** in no-extra-parens (fixes #12739) (#13923) (Milos Djermanovic) -* [`d93c935`](https://github.com/eslint/eslint/commit/d93c9350361d2aa1a1976c553e47ab399e51e8c9) Docs: update JSON Schema links (#13936) (Milos Djermanovic) -* [`8d0c93a`](https://github.com/eslint/eslint/commit/8d0c93a7ef9449c7b7d082bbb4b7d8465b0d6bac) Upgrade: table@6.0.4 (#13920) (Rouven Weßling) -* [`9247683`](https://github.com/eslint/eslint/commit/924768377a4935a95a6ff3866f9545a5a6178b53) Docs: Remove for deleted npm run profile script (#13931) (Brandon Mills) -* [`ab240d4`](https://github.com/eslint/eslint/commit/ab240d49833b4e6e594667c1abe5b0caa8a9cf70) Fix: prefer-exponentiation-operator invalid autofix with await (#13924) (Milos Djermanovic) -* [`dc76911`](https://github.com/eslint/eslint/commit/dc7691103554a99bdb2142561cb507f50f547e3b) Chore: Add .pre-commit-hooks.yaml file (#13628) (Álvaro Mondéjar) -* [`2124e1b`](https://github.com/eslint/eslint/commit/2124e1b5dad30a905dc26bde9da472bf622d3f50) Docs: Fix wrong rule name (#13913) (noisyboy25) -* [`06b5809`](https://github.com/eslint/eslint/commit/06b58096975935ec016d96dd5f333f059c270f26) Sponsors: Sync README with website (ESLint Jenkins) -* [`26fc12f`](https://github.com/eslint/eslint/commit/26fc12f88109af9d4081bf0e16364c411bce3009) Docs: Update README team and sponsors (ESLint Jenkins) - -v7.15.0 - December 5, 2020 - -* [`5c11aab`](https://github.com/eslint/eslint/commit/5c11aabbe8249aeb8cad29bc6a33fc20c8c683ef) Upgrade: @eslint/esintrc and espree for bug fixes (refs #13878) (#13908) (Brandon Mills) -* [`0eb7957`](https://github.com/eslint/eslint/commit/0eb7957e27fd521317bd5c8479ce7abc1399169c) Upgrade: file-entry-cache@6.0.0 (#13877) (Rouven Weßling) -* [`683ad00`](https://github.com/eslint/eslint/commit/683ad00c41e1ae4d889deff82b2a94318e8c2129) New: no-unsafe-optional-chaining rule (fixes #13431) (#13859) (YeonJuan) -* [`cbc57fb`](https://github.com/eslint/eslint/commit/cbc57fb7d07c00663ed5781f5e6bc8f534cc2d76) Fix: one-var autofixing for export (fixes #13834) (#13891) (Anix) -* [`110cf96`](https://github.com/eslint/eslint/commit/110cf962d05625a8a1bf7b5f4ec2194db150eb32) Docs: Fix a broken link in working-with-rules.md (#13875) (Anton Niklasson) - -v7.14.0 - November 20, 2020 - -* [`5f09073`](https://github.com/eslint/eslint/commit/5f0907399a9666dec78c74384c8969c01483c30e) Update: fix 'skip' options in no-irregular-whitespace (fixes #13852) (#13853) (Milos Djermanovic) -* [`1861b40`](https://github.com/eslint/eslint/commit/1861b4086f1018f43ab19744d866d5da986c500d) Docs: correct the function-call-argument-newline 'default' descriptions (#13866) (Trevin Hofmann) -* [`98c00c4`](https://github.com/eslint/eslint/commit/98c00c41d2aecb3a990393d430694f4ce6b47de5) New: Add no-nonoctal-decimal-escape rule (fixes #13765) (#13845) (Milos Djermanovic) -* [`95d2fe6`](https://github.com/eslint/eslint/commit/95d2fe6057498fc1cc2193d28c8c2d1593224b33) Chore: remove eslint comment from no-octal-escape tests (#13846) (Milos Djermanovic) -* [`2004b7e`](https://github.com/eslint/eslint/commit/2004b7ecd3db0d4e7376cc3344246f7b9ada5801) Fix: enable debug logs for @eslint/eslintrc (fixes #13850) (#13861) (Milos Djermanovic) -* [`d2239a1`](https://github.com/eslint/eslint/commit/d2239a1fdec452e24ede04e990d16d42516fa538) Fix: no-useless-constructor crash on bodyless constructor (fixes #13830) (#13842) (Ari Perkkiö) -* [`eda0aa1`](https://github.com/eslint/eslint/commit/eda0aa18498dd85eb618873e8e0f4ac97032cfca) Docs: no-restricted-imports is only for static imports (#13863) (Robat Williams) -* [`042ae44`](https://github.com/eslint/eslint/commit/042ae44682a8a6c5037d920689124e2304056dd8) Docs: Fix JS syntax and doc URL in working-with-custom-formatters.md (#13828) (Raphael LANG) -* [`038dc73`](https://github.com/eslint/eslint/commit/038dc73c99ae68eae2035ef303f3a947053c8f05) Chore: Test on Node.js 15 (#13844) (Brandon Mills) -* [`37a06d6`](https://github.com/eslint/eslint/commit/37a06d633d3669f0f43236141dc43465b8bc7ec5) Sponsors: Sync README with website (ESLint Jenkins) - -v7.13.0 - November 6, 2020 - -* [`254e00f`](https://github.com/eslint/eslint/commit/254e00fea8745ff5a8bcc8cb874fcfd02996d81b) New: Configurable List Size For Per-Rule Performance Metrics (#13812) (Bryan Mishkin) -* [`6c3c710`](https://github.com/eslint/eslint/commit/6c3c710ade7cd8654990f1adb55b58f038eab92d) Docs: fix broken url in docs (#13815) (SaintMalik) -* [`4a09149`](https://github.com/eslint/eslint/commit/4a091495a236d231a5065ece972719a0c4dd1b77) Sponsors: Sync README with website (ESLint Jenkins) -* [`fb6fcbf`](https://github.com/eslint/eslint/commit/fb6fcbfe0a8c41b92f0a33ab90f159037bd195e2) Docs: Fix reference to Code of Conduct (#13797) (Tobias Nießen) -* [`1b89ebe`](https://github.com/eslint/eslint/commit/1b89ebe1bdbef7de6001100945b8f71429df302c) Sponsors: Sync README with website (ESLint Jenkins) - -v7.12.1 - October 26, 2020 - -* [`08f33e8`](https://github.com/eslint/eslint/commit/08f33e8b9a353c3183be6f937785db7a30fb90eb) Upgrade: @eslint/eslintrc to fix rule schema validation (fixes #13793) (#13794) (Brandon Mills) -* [`aeef485`](https://github.com/eslint/eslint/commit/aeef485dc790571b1a82ac09904329e0226b66a9) Fix: Pass internal config paths in FileEnumerator default (fixes #13789) (#13792) (Brandon Mills) -* [`631ae8b`](https://github.com/eslint/eslint/commit/631ae8b50e5f7975f10860e9e763b70b4f25182e) Sponsors: Sync README with website (ESLint Jenkins) - -v7.12.0 - October 23, 2020 - -* [`cbf3585`](https://github.com/eslint/eslint/commit/cbf3585f1d6c60414c07380367a8b4505ee3538d) Update: skip keyword check for fns in space-before-blocks (fixes #13553) (#13712) (Milos Djermanovic) -* [`256f656`](https://github.com/eslint/eslint/commit/256f656455b47bcf9ed3fc30fbf72532678f97da) Fix: autofix shouldn't produce template literals with `\8` or `\9` (#13737) (Milos Djermanovic) -* [`b165aa5`](https://github.com/eslint/eslint/commit/b165aa5f4d4d19328f13ab80e5f058cbce94c3a6) Fix: yoda rule autofix produces syntax errors with adjacent tokens (#13760) (Milos Djermanovic) -* [`3175316`](https://github.com/eslint/eslint/commit/3175316db26aebef4b19e269aca90c8ce3955363) Fix: prefer-destructuring invalid autofix with comma operator (#13761) (Milos Djermanovic) -* [`1a9f171`](https://github.com/eslint/eslint/commit/1a9f17151a4e93eb17c8a2bf4f0a5320cce616de) Chore: Remove more ESLintRC-related files (refs #13481) (#13762) (Nicholas C. Zakas) -* [`bfddced`](https://github.com/eslint/eslint/commit/bfddcedace5587d662c840c2edf33062b54a178e) Update: remove suggestion if it didn't provide a fix (fixes #13723) (#13772) (Milos Djermanovic) -* [`5183b14`](https://github.com/eslint/eslint/commit/5183b14a2420b42b4089fb134a61ae57142f31fd) Update: check template literal in no-script-url (#13775) (YeonJuan) -* [`bfe97d2`](https://github.com/eslint/eslint/commit/bfe97d2332e711ca76b1fd2e7f8548b0cc84cb1c) Sponsors: Sync README with website (ESLint Jenkins) -* [`6c51ade`](https://github.com/eslint/eslint/commit/6c51adeb86f1de292cd02d2ee19f7b56182e358b) Sponsors: Sync README with website (ESLint Jenkins) -* [`603de04`](https://github.com/eslint/eslint/commit/603de04cab5e700df12999af2918decd4da9d11b) Update: treat all literals like boolean literal in no-constant-condition (#13245) (Zen) -* [`289aa6f`](https://github.com/eslint/eslint/commit/289aa6fcef3874ba5f86455f9302dc4209ea83e5) Sponsors: Sync README with website (ESLint Jenkins) -* [`9a1f669`](https://github.com/eslint/eslint/commit/9a1f6694e59eb3e584d4c5a98b98675c895a9783) Sponsors: Sync README with website (ESLint Jenkins) -* [`637f818`](https://github.com/eslint/eslint/commit/637f8187404ded600fb3d4013b3cd495d5ae675b) Docs: add more examples for no-func-assign (fixes #13705) (#13777) (Nitin Kumar) -* [`17cc0dd`](https://github.com/eslint/eslint/commit/17cc0dd9b5d2d500359c36881cd3e5637443c133) Chore: add test case for no-func-assign (refs #13705) (#13783) (Nitin Kumar) -* [`dee0f77`](https://github.com/eslint/eslint/commit/dee0f7764a1d5a323c89b22c4db94acee2b3c718) Docs: add TOC to user-guide/configuring.md (#13727) (metasean) -* [`0510621`](https://github.com/eslint/eslint/commit/05106212985cb1ffa1e6fa996a57f6fd2fc3c970) Update: Fix && vs || short-circuiting false negatives (fixes #13634) (#13769) (Brandon Mills) -* [`8b6ed69`](https://github.com/eslint/eslint/commit/8b6ed691c48189b7d096339441a78cb5874d4137) Sponsors: Sync README with website (ESLint Jenkins) -* [`1457509`](https://github.com/eslint/eslint/commit/145750991b04fd4cfb3fff3c5d4211a4428e011c) Docs: fix broken links in Node.js API docs (#13771) (Laura Barluzzi) -* [`7c813d4`](https://github.com/eslint/eslint/commit/7c813d458f9aedf7a94351d137728a4647542879) Docs: Fix typo in v7 migration page (#13778) (Yusuke Sasaki) -* [`b025795`](https://github.com/eslint/eslint/commit/b0257953be704d0bb387fc15afd7859fd6f19ba5) Docs: Fix the format option name in the document (#13770) (Hideki Igarashi) -* [`84fd591`](https://github.com/eslint/eslint/commit/84fd591c234accc41bb5af555f178825012fd35d) Chore: Increase Mocha timeout for copying fixtures (#13768) (Brandon Mills) -* [`1faeb84`](https://github.com/eslint/eslint/commit/1faeb84e663d88c5d85a3cb3f15cd224cc552c2d) Docs: clarify that space-unary-ops doesn't apply when space is required (#13767) (Taylor Morgan) -* [`67c0605`](https://github.com/eslint/eslint/commit/67c06059dd1ddcee6f369c650ce71220da1510c3) Update: check computed keys in no-prototype-builtins (fixes #13088) (#13755) (Milos Djermanovic) -* [`b5e011c`](https://github.com/eslint/eslint/commit/b5e011c865e95d700d29cb9a4ba71c671d99e423) Sponsors: Sync README with website (ESLint Jenkins) - -v7.11.0 - October 9, 2020 - -* [`23e966f`](https://github.com/eslint/eslint/commit/23e966f6cf2a6c6b699dff5d6950ece3cc396498) Chore: Refactor CLIEngine tests (refs #13481) (#13709) (Nicholas C. Zakas) -* [`fa9429a`](https://github.com/eslint/eslint/commit/fa9429aac0ffed505f3f02e8fc75f646c69f5c61) Fix: don't count line after EOF in max-lines (#13735) (Milos Djermanovic) -* [`d973675`](https://github.com/eslint/eslint/commit/d973675a5c06a2bd4f8ce640c78b67842cfebfd4) Docs: Update anchor links to use existing linkrefs (refs #13715) (#13741) (Brandon Mills) -* [`2c6d774`](https://github.com/eslint/eslint/commit/2c6d774c89dcd14f386bd9d73d451fa2a892c3ef) Docs: Fix typos (#13730) (Frieder Bluemle) -* [`cc468c0`](https://github.com/eslint/eslint/commit/cc468c01021385a028de727eefcd442e7f34875c) Upgrade: eslint-visitor-keys@2.0.0 (#13732) (Milos Djermanovic) -* [`ab0ac6c`](https://github.com/eslint/eslint/commit/ab0ac6c532fb7b7d49779c8913146244d680743b) Docs: Fix anchor links (#13715) (Gary Moore) -* [`27f0de6`](https://github.com/eslint/eslint/commit/27f0de62e6281c28043be38ef051818c9edc15cd) Fix: account for linebreaks before postfix `++`/`--` in no-extra-parens (#13731) (Milos Djermanovic) -* [`da78fa1`](https://github.com/eslint/eslint/commit/da78fa11632a2908db4ac494012a16f5d5a88a64) Update: support async arrow fn in function-paren-newline (fixes #13728) (#13729) (Michal Dziekonski) -* [`fe301b8`](https://github.com/eslint/eslint/commit/fe301b8cc0762d7f4edd59603ca51ed0ec0c2a43) Docs: Add configuration comments in examples (#13738) (YeonJuan) -* [`504408c`](https://github.com/eslint/eslint/commit/504408cd65e9d8827b2b8bbeb8f589df90eee523) Sponsors: Sync README with website (ESLint Jenkins) -* [`3900659`](https://github.com/eslint/eslint/commit/390065985b2289ad4412a83598e3e833c382d27e) Sponsors: Sync README with website (ESLint Jenkins) -* [`c1974b3`](https://github.com/eslint/eslint/commit/c1974b3f7169a8e5fab7007df92d02d8c1a8d5a3) Sponsors: Sync README with website (ESLint Jenkins) -* [`6f4abe5`](https://github.com/eslint/eslint/commit/6f4abe5d5ade2711cc4c21bc8485af952763c2d3) Sponsors: Sync README with website (ESLint Jenkins) - -v7.10.0 - September 26, 2020 - -* [`6919fbb`](https://github.com/eslint/eslint/commit/6919fbb83f86552b0f49ae749da866e4edc7c46a) Docs: Clarify that ignorePattern should be a string (refs #13029) (#13718) (Brandon Mills) -* [`07d9bea`](https://github.com/eslint/eslint/commit/07d9bea7c6f953e8f754afffc9752edcee799431) Update: Add ignorePattern to no-inline-comments (#13029) (Edie Lemoine) -* [`d79bbe9`](https://github.com/eslint/eslint/commit/d79bbe982930b53358d34ad91cc6e5eaac8ddede) Docs: fix typo (#13717) (Alexander Liu) -* [`9b8490e`](https://github.com/eslint/eslint/commit/9b8490ee6391c986b1314540a92b71d8c1e0efc4) Docs: grammatical error (#13687) (rajdeep) -* [`cb44e93`](https://github.com/eslint/eslint/commit/cb44e93f4780e925a75a68ce2f7f6d065b5f756c) Fix: prefer-destructuring invalid autofix with computed property access (#13704) (Milos Djermanovic) -* [`46c73b1`](https://github.com/eslint/eslint/commit/46c73b159a5ceed2f7f26f254fd97e459fb0e81a) Upgrade: eslint-scope@5.1.1 (#13716) (Milos Djermanovic) -* [`b7b12ba`](https://github.com/eslint/eslint/commit/b7b12ba0bd4e9c66883f11e97de8ed84b600cdaa) Chore: Move comment to make tests more organized (#13707) (Yusuke Tanaka) -* [`51674a4`](https://github.com/eslint/eslint/commit/51674a4113a1ca877094606bbf4938ab06cc1aad) Docs: Add missing quotes (#13714) (Lucio Paiva) -* [`7c34a98`](https://github.com/eslint/eslint/commit/7c34a982aaf93a02348f56c9ce887c7dcf51b5bd) Chore: remove mistakenly added file (#13710) (Milos Djermanovic) -* [`30b76c9`](https://github.com/eslint/eslint/commit/30b76c9a13fae3dff59f7db406d6c66f11152973) Docs: Clarify package.json requirement in Getting Started (refs #13549) (#13696) (Nicholas C. Zakas) -* [`044560d`](https://github.com/eslint/eslint/commit/044560dcc74db98b28e293da2e2f3b41ecbf5884) Sponsors: Sync README with website (ESLint Jenkins) -* [`54000d1`](https://github.com/eslint/eslint/commit/54000d13f27d5255851b5ac0606ad027e2b8d331) Sponsors: Sync README with website (ESLint Jenkins) - -v7.9.0 - September 12, 2020 - -* [`3ca2700`](https://github.com/eslint/eslint/commit/3ca27004ece5016ba7aed775f01ad13bc9282296) Fix: Corrected notice for invalid (:) plugin names (#13473) (Josh Goldberg) -* [`fc5783d`](https://github.com/eslint/eslint/commit/fc5783d2ff9e3b0d7a1f9664928d49270b4a6c01) Docs: Fix leaky anchors in v4 migration page (#13635) (Timo Tijhof) -* [`f1d07f1`](https://github.com/eslint/eslint/commit/f1d07f112be96c64dfdaa154aa9ac81985b16238) Docs: Provide install commands for Yarn (#13661) (Nikita Baksalyar) -* [`29d1cdc`](https://github.com/eslint/eslint/commit/29d1cdceedd6c056a39149723cf9ff2fbb260cbf) Fix: prefer-destructuring removes comments (refs #13678) (#13682) (Milos Djermanovic) -* [`b4da0a7`](https://github.com/eslint/eslint/commit/b4da0a7ca7995435bdfc116fd374eb0649470131) Docs: fix typo in working with plugins docs (#13683) (啸生) -* [`6f87db7`](https://github.com/eslint/eslint/commit/6f87db7c318225e48ccbbf0bec8b3758ea839b82) Update: fix id-length false negatives on Object.prototype property names (#13670) (Milos Djermanovic) -* [`361ac4d`](https://github.com/eslint/eslint/commit/361ac4d895c15086fb4351d4dca1405b2fdc4bd5) Fix: NonOctalDecimalIntegerLiteral is decimal integer (fixes #13588) (#13664) (Milos Djermanovic) -* [`f260716`](https://github.com/eslint/eslint/commit/f260716695064e4b4193337107b60401bd4b3f20) Docs: update outdated link (#13677) (klkhan) -* [`5138c91`](https://github.com/eslint/eslint/commit/5138c913c256e4266ffb68278783af45bf70af84) Docs: add missing eslint directive comments in no-await-in-loop (#13673) (Milos Djermanovic) -* [`17b58b5`](https://github.com/eslint/eslint/commit/17b58b528df62bf96813d50c087cafdf83306810) Docs: clarify correct example in no-return-await (fixes #13656) (#13657) (Milos Djermanovic) -* [`9171f0a`](https://github.com/eslint/eslint/commit/9171f0a99bb4d7c53f109b1c2b215004a7c27713) Chore: fix typo (#13660) (Nitin Kumar) -* [`6d9f8fb`](https://github.com/eslint/eslint/commit/6d9f8fbb7ed4361b475fb50d04e6d25744d5b1a2) Sponsors: Sync README with website (ESLint Jenkins) -* [`97b0dd9`](https://github.com/eslint/eslint/commit/97b0dd9a1af1ae4ae3857adcfe6eeac7837101ed) Sponsors: Sync README with website (ESLint Jenkins) -* [`deab125`](https://github.com/eslint/eslint/commit/deab125fc9220dab43baeb32c6cf78942ad25a83) Sponsors: Sync README with website (ESLint Jenkins) -* [`bf2e367`](https://github.com/eslint/eslint/commit/bf2e367bf4f6fde9930af9de8b8d8bc3d8b5782f) Sponsors: Sync README with website (ESLint Jenkins) -* [`8929208`](https://github.com/eslint/eslint/commit/89292084bf91ba5ae5bf966c6c56fa3da139ce57) Sponsors: Sync README with website (ESLint Jenkins) - -v7.8.1 - September 1, 2020 - -* [`f542b5d`](https://github.com/eslint/eslint/commit/f542b5d0679b73326ad249fc44a54c3f848bd3e6) Fix: Update broken @eslint/eslintrc version (fixes #13641) (#13647) (Nicholas C. Zakas) -* [`c1b5696`](https://github.com/eslint/eslint/commit/c1b56966c2354e12d16e8394443de49fa54f4290) Sponsors: Sync README with website (ESLint Jenkins) -* [`8ddeda0`](https://github.com/eslint/eslint/commit/8ddeda01afdb1e9656a43853b8e25c9c4582e6ad) Sponsors: Sync README with website (ESLint Jenkins) -* [`e02e2fe`](https://github.com/eslint/eslint/commit/e02e2fe019a1ed9a34a7b96e4c8961c35093b0ce) Sponsors: Sync README with website (ESLint Jenkins) - -v7.8.0 - August 31, 2020 - -* [`58abd93`](https://github.com/eslint/eslint/commit/58abd9311900a8af5a3c0963daaf64675bdd8383) Update: support logical assignments in code path analysis (refs #13569) (#13612) (Milos Djermanovic) -* [`db7488e`](https://github.com/eslint/eslint/commit/db7488e6326fd1b7ea04c5062beb1c5f75fc15ed) Update: support logical assignments in core rules (refs #13569) (#13618) (Milos Djermanovic) -* [`3729219`](https://github.com/eslint/eslint/commit/372921924778f2e525535985e17c97b988546210) Docs: Update Step 1 of Development Environment documentation (klkhan) -* [`a320324`](https://github.com/eslint/eslint/commit/a32032430a0779a4e3b2d137d4d0682844084b82) Chore: Test formatted integers in no-dupe-keys (refs #13568) (#13626) (Brandon Mills) -* [`88a9ade`](https://github.com/eslint/eslint/commit/88a9ade7643bb166efbab45cee15f3269496f4be) Update: add es2021 environment (refs #13602) (#13603) (Milos Djermanovic) -* [`0003dc0`](https://github.com/eslint/eslint/commit/0003dc0f966f2b47555595586f84eb3163cb0179) Update: support numeric separators (refs #13568) (#13581) (Milos Djermanovic) -* [`96b11a0`](https://github.com/eslint/eslint/commit/96b11a0717bf32b94ec768611574372320fb774b) Update: Add exceptionPatterns to id-length rule (fixes #13094) (#13576) (sodam) -* [`3439fea`](https://github.com/eslint/eslint/commit/3439fea5c0ed330d01d874b0c9df51dd51ae792c) Update: support numeric-separator in no-loss-of-precision (refs #13568) (#13574) (Anix) -* [`ed64767`](https://github.com/eslint/eslint/commit/ed64767859d776145d68145419a61f5379b4dd63) Update: add comment to message in no-warning-comments (fixes #12327) (#13522) (Anix) -* [`e60ec07`](https://github.com/eslint/eslint/commit/e60ec07fad0c1d4c966f28d214c5379da753ff4e) Sponsors: Sync README with website (ESLint Jenkins) -* [`483bf7f`](https://github.com/eslint/eslint/commit/483bf7f3cc40e0d866798d6ca9ee1c19aa77ddd2) Docs: fix examples in object-curly-newline (#13605) (Soobin Bak) -* [`1c35d57`](https://github.com/eslint/eslint/commit/1c35d57b0a5f374cc55f1727a7561bcab1962e83) Docs: Remove stale Keybase 2FA instructions (#13622) (Brandon Mills) -* [`82669fa`](https://github.com/eslint/eslint/commit/82669fa66670a00988db5b1d10fe8f3bf30be84e) Chore: Extract some functionality to eslintrc (refs #13481) (#13613) (Nicholas C. Zakas) -* [`4111d21`](https://github.com/eslint/eslint/commit/4111d21a046b73892e2c84f92815a21ef4db63e1) Docs: Fix typo and missing article before noun in docs (#13611) (Patrice Sandhu) -* [`091e52a`](https://github.com/eslint/eslint/commit/091e52ae1ca408f3e668f394c14d214c9ce806e6) Upgrade: espree@7.3.0 (refs #13568) (#13609) (Kai Cataldo) -* [`05074fb`](https://github.com/eslint/eslint/commit/05074fb2c243e904e8c09d714ad9d084acdd80d2) Sponsors: Sync README with website (ESLint Jenkins) -* [`bdb65ec`](https://github.com/eslint/eslint/commit/bdb65ec2e672c9815bee356b61d1cd60a1072152) Chore: add 3rd party parsers in BUG_REPORT template (#13606) (YeonJuan) -* [`f954476`](https://github.com/eslint/eslint/commit/f954476fb6b0664679c73babd5e8a0647572b81f) Chore: add common 3rd party parsers to issue template (#13596) (Kai Cataldo) -* [`2bee6d2`](https://github.com/eslint/eslint/commit/2bee6d256ae0516c9a9003bb3fdca24ff93253b5) Chore: Mark config-related files (refs #13481) (#13597) (Nicholas C. Zakas) -* [`66442a9`](https://github.com/eslint/eslint/commit/66442a9faf9872db4a40f56dde28c48f4d02fc7b) Update: Add no-magic-numbers 'ignoreDefaultValues' option (#12611) (Dieter Luypaert) -* [`b487164`](https://github.com/eslint/eslint/commit/b487164d01dd0bf66fdf2df0e374ce1c3bdb0339) Docs: add exponentiation operators to operator-assignment documentation (#13577) (Milos Djermanovic) -* [`2f27836`](https://github.com/eslint/eslint/commit/2f27836e989f3dfe236e34054b490febc359bc48) Sponsors: Sync README with website (ESLint Jenkins) -* [`60eafc1`](https://github.com/eslint/eslint/commit/60eafc15075f38955cb6816bf1f0bcf6e6e6d3a6) Sponsors: Sync README with website (ESLint Jenkins) - -v7.7.0 - August 14, 2020 - -* [`b46f3ee`](https://github.com/eslint/eslint/commit/b46f3ee0dae4add9df99cae940b641ad8de58b9e) Update: allowFunctionParams option in no-underscore-dangle (fixes 12579) (#13545) (Sunghyun Cho) -* [`26aa245`](https://github.com/eslint/eslint/commit/26aa2452b5f407fabc25dad21182180e4d3be532) Docs: clarify "case" specifier in padding-line-between-statements (#13562) (Milos Djermanovic) -* [`082891c`](https://github.com/eslint/eslint/commit/082891c042d72953fe86cd3ce9c96e661760793d) Docs: Update semantic versioning policy (#13563) (Nicholas C. Zakas) -* [`4e0b672`](https://github.com/eslint/eslint/commit/4e0b672eb4bf39f7502a550b08b25a56a196f19f) Fix: revert "Update: disallow multiple options in comma-dangle schema" (#13564) (Kai Cataldo) -* [`254990e`](https://github.com/eslint/eslint/commit/254990e87914457ca25ea2d7ee012964e56fc9e5) Fix: indent for async arrow functions (fixes #13497) (#13544) (Anix) -* [`28ca339`](https://github.com/eslint/eslint/commit/28ca339259b07c96c73f2ef28cbf112b96395855) Sponsors: Sync README with website (ESLint Jenkins) -* [`2e4158d`](https://github.com/eslint/eslint/commit/2e4158d3ec9cfed6400bf70795fd7171e96ff9b3) Sponsors: Sync README with website (ESLint Jenkins) -* [`488d159`](https://github.com/eslint/eslint/commit/488d1595aef43c4d52cccdb2c97977884f0375a8) Sponsors: Sync README with website (ESLint Jenkins) -* [`c44306e`](https://github.com/eslint/eslint/commit/c44306e52778309a79232ceab8b55a9aa0f2dfda) Sponsors: Sync README with website (ESLint Jenkins) -* [`6677180`](https://github.com/eslint/eslint/commit/6677180495e16a02d150d0552e7e5d5f6b77fcc5) Sponsors: Sync README with website (ESLint Jenkins) -* [`07db7b8`](https://github.com/eslint/eslint/commit/07db7b8080c2f68ee28e7d447db356c33e6fddce) Sponsors: Sync README with website (ESLint Jenkins) -* [`d4ce4d3`](https://github.com/eslint/eslint/commit/d4ce4d3b8492c3e4654ed1f51f2c48e6c0ad272f) Sponsors: Sync README with website (ESLint Jenkins) -* [`284e954`](https://github.com/eslint/eslint/commit/284e954f93126c50e0aa9b88f42afb03a47ad967) Sponsors: Sync README with website (ESLint Jenkins) -* [`ae9b54e`](https://github.com/eslint/eslint/commit/ae9b54e59b01aa9f50ee31f5b6787d86e6b59de6) Sponsors: Sync README with website (ESLint Jenkins) -* [`9124a15`](https://github.com/eslint/eslint/commit/9124a1599638a1caf4b7e252d1cb66abdc5e51c6) Chore: remove leche (fixes #13287) (#13533) (Mark de Dios) -* [`5c4c7f5`](https://github.com/eslint/eslint/commit/5c4c7f515c2e8e83f2186a66ddce75d6477abeb0) Sponsors: Sync README with website (ESLint Jenkins) -* [`48d8ec8`](https://github.com/eslint/eslint/commit/48d8ec8cf320c69aed17c6b6c78f19e7c1e587ca) Sponsors: Sync README with website (ESLint Jenkins) - -v7.6.0 - July 31, 2020 - -* [`ecb2b73`](https://github.com/eslint/eslint/commit/ecb2b7343a0d14fb57d297a16be6c1b176fb3dbf) Update: require `meta` for fixable rules in RuleTester (refs #13349) (#13489) (Milos Djermanovic) -* [`6fb4edd`](https://github.com/eslint/eslint/commit/6fb4edde3b7a7ae2faf8ac956a7342fbf80865fc) Docs: fix broken links in developer guide (#13518) (Sam Chen) -* [`318fe10`](https://github.com/eslint/eslint/commit/318fe103dbf2548eee293ff456ef0b829dbe3db3) Fix: Do not output `undefined` as line and column when it's unavailable (#13519) (haya14busa) -* [`493b5b4`](https://github.com/eslint/eslint/commit/493b5b40cae7a076fdeb19740f8c88fb4ae9c1fb) Sponsors: Sync README with website (ESLint Jenkins) -* [`f100143`](https://github.com/eslint/eslint/commit/f100143fa5f529aacb2b50e650a00d2697ca4c54) Sponsors: Sync README with website (ESLint Jenkins) -* [`16b10fe`](https://github.com/eslint/eslint/commit/16b10fe8ba3c78939d5ada4a25caf2f0c9e6a058) Fix: Update the chatroom link to go directly to help channel (#13536) (Nicholas C. Zakas) -* [`f937eb9`](https://github.com/eslint/eslint/commit/f937eb95407f60d3772bcb956e227aaf99e48777) Sponsors: Sync README with website (ESLint Jenkins) -* [`e71e298`](https://github.com/eslint/eslint/commit/e71e2980cd2e319afc70d8c859c7ffd59cf4157b) Update: Change no-duplicate-case to comparing tokens (fixes #13485) (#13494) (Yosuke Ota) -* [`6c4aea4`](https://github.com/eslint/eslint/commit/6c4aea44fd78e1eecea5fe3c37e1921e3b1e98a6) Docs: add ECMAScript 2020 to README (#13510) (Milos Djermanovic) - -v7.5.0 - July 18, 2020 - -* [`6ea3178`](https://github.com/eslint/eslint/commit/6ea3178776eae0e40c3f5498893e8aab0e23686b) Update: optional chaining support (fixes #12642) (#13416) (Toru Nagashima) -* [`540b1af`](https://github.com/eslint/eslint/commit/540b1af77278ae649b621aa8d4bf8d6de03c3155) Chore: enable consistent-meta-messages internal rule (#13487) (Milos Djermanovic) -* [`885a145`](https://github.com/eslint/eslint/commit/885a1455691265db88dc0befe9b48a69d69e8b9c) Docs: clarify behavior if `meta.fixable` is omitted (refs #13349) (#13493) (Milos Djermanovic) -* [`1a01b42`](https://github.com/eslint/eslint/commit/1a01b420eaab0de03dab5cc190a9f2a860c21a84) Docs: Update technology sponsors in README (#13478) (Nicholas C. Zakas) -* [`6ed9e8e`](https://github.com/eslint/eslint/commit/6ed9e8e4ff038c0259b0e7fe7ab7f4fd4ec55801) Upgrade: lodash@4.17.19 (#13499) (Yohan Siguret) -* [`45cdf00`](https://github.com/eslint/eslint/commit/45cdf00da6aeff3d584d37b0710fc8d6ad9456d6) Sponsors: Sync README with website (ESLint Jenkins) -* [`f1cc725`](https://github.com/eslint/eslint/commit/f1cc725ba1b8646dcf06a83716d96ad9bb726172) Docs: fix linebreaks between versions in changelog (#13488) (Milos Djermanovic) -* [`f4d7b9e`](https://github.com/eslint/eslint/commit/f4d7b9e1a599346b2f21ff9de003b311b51411e6) Update: deprecate id-blacklist rule (#13465) (Dimitri Mitropoulos) -* [`e14a645`](https://github.com/eslint/eslint/commit/e14a645aa495558081490f990ba221e21aa6b27c) Chore: use espree.latestEcmaVersion in fuzzer (#13484) (Milos Djermanovic) -* [`61097fe`](https://github.com/eslint/eslint/commit/61097fe5cc275d414a0c8e19b31c6060cb5568b7) Docs: Update int rule level to string (#13483) (Brandon Mills) -* [`c8f9c82`](https://github.com/eslint/eslint/commit/c8f9c8210cf4b9da8f07922093d7b219abad9f10) Update: Improve report location no-irregular-whitespace (refs #12334) (#13462) (Milos Djermanovic) -* [`f2e68ec`](https://github.com/eslint/eslint/commit/f2e68ec1d6cee6299e8a5cdf76c522c11d3008dd) Build: update webpack resolve.mainFields to match website config (#13457) (Milos Djermanovic) -* [`a96bc5e`](https://github.com/eslint/eslint/commit/a96bc5ec06f3a48bfe458bccd68d4d3b2a280ed9) Fix: arrow-body-style fixer for `in` wrap (fixes #11849) (#13228) (Anix) -* [`748734f`](https://github.com/eslint/eslint/commit/748734fdd497fbf61f3a616ff4a09169135b9396) Upgrade: Updated puppeteer version to v4.0.0 (#13444) (odidev) -* [`e951457`](https://github.com/eslint/eslint/commit/e951457b7aaa1b12b135588d36e3f4db4d7b8463) Docs: fix wording in configuring.md (#13469) (Piper) -* [`0af1d28`](https://github.com/eslint/eslint/commit/0af1d2828d27885483737867653ba1659af72005) Update: add allowSeparatedGroups option to sort-imports (fixes #12951) (#13455) (Milos Djermanovic) -* [`1050ee7`](https://github.com/eslint/eslint/commit/1050ee78a95da9484ff333dc1c74dac64c05da6f) Update: Improve report location for no-unneeded-ternary (refs #12334) (#13456) (Milos Djermanovic) -* [`b77b420`](https://github.com/eslint/eslint/commit/b77b4202bd1d5d1306f6f645e88d7a41a51715db) Update: Improve report location for max-len (refs #12334) (#13458) (Milos Djermanovic) -* [`095194c`](https://github.com/eslint/eslint/commit/095194c0fc0eb02aa69fde6b4280696e0e4de214) Fix: add end location to reports in object-curly-newline (refs #12334) (#13460) (Milos Djermanovic) -* [`10251bb`](https://github.com/eslint/eslint/commit/10251bbaeba80ac15244f385fc42cf2f2a30e5d2) Fix: add end location to reports in keyword-spacing (refs #12334) (#13461) (Milos Djermanovic) -* [`2ea7ee5`](https://github.com/eslint/eslint/commit/2ea7ee51a4e05ee76a6dae5954c3b6263b0970a3) Sponsors: Sync README with website (ESLint Jenkins) -* [`b55fd3b`](https://github.com/eslint/eslint/commit/b55fd3b8c05a29a465a794a524b06c1a28cddf0c) Sponsors: Sync README with website (ESLint Jenkins) - -v7.4.0 - July 3, 2020 - -* [`f21bad2`](https://github.com/eslint/eslint/commit/f21bad2680406a2671b877f8dba47f4475d0cc64) Docs: fix description for `never` in multiline-ternary (fixes #13368) (#13452) (Milos Djermanovic) -* [`ada2c89`](https://github.com/eslint/eslint/commit/ada2c891298382f82dfabf37cacd59a1057b2bb7) Fix: support typescript generics in arrow-parens (fixes #12570) (#13451) (Milos Djermanovic) -* [`89ee01e`](https://github.com/eslint/eslint/commit/89ee01e083f1e02293bf8d1447f9b0fdb3cb9384) Fix: Revert config cloning (fixes #13447) (#13449) (薛定谔的猫) -* [`0a463db`](https://github.com/eslint/eslint/commit/0a463dbf7cc5a77d442879c9117204d4d38db972) Docs: fix no-multiple-empty-lines examples (fixes #13432) (#13433) (Milos Djermanovic) -* [`ff5317e`](https://github.com/eslint/eslint/commit/ff5317e93425f93cfdf808609551ee67b2032543) Update: Improve array-callback-return report message (#13395) (Philip (flip) Kromer) -* [`3f51930`](https://github.com/eslint/eslint/commit/3f51930eea7cddc921a9ee3cb0328c7b649c0f83) Fix: false positive new with member in no-extra-parens (fixes #12740) (#13375) (YeonJuan) -* [`825a5b9`](https://github.com/eslint/eslint/commit/825a5b98d3d84f6eb72b75f7d8519de763cc8898) Fix: Clarify documentation on implicit ignore behavior (fixes #12348) (#12600) (Scott Hardin) -* [`c139156`](https://github.com/eslint/eslint/commit/c1391566a5f765f25716527de7b5cdee16c0ce36) Sponsors: Sync README with website (ESLint Jenkins) -* [`0c17e9d`](https://github.com/eslint/eslint/commit/0c17e9d2ac307cc288eea6ed7971bd5a7d33321a) Sponsors: Sync README with website (ESLint Jenkins) -* [`c680387`](https://github.com/eslint/eslint/commit/c680387ba61f6dccf0390d24a85d871fa83e9fea) Sponsors: Sync README with website (ESLint Jenkins) -* [`bf3939b`](https://github.com/eslint/eslint/commit/bf3939bbd9a33d0eb96cebe6a53bf61c855f9ba6) Sponsors: Sync README with website (ESLint Jenkins) -* [`7baf02e`](https://github.com/eslint/eslint/commit/7baf02e983af909800261263f125cca901a5bd0f) Sponsors: Sync README with website (ESLint Jenkins) -* [`5c4c3fd`](https://github.com/eslint/eslint/commit/5c4c3fdfbda18a13223ad36f44283adbfee8c496) Sponsors: Sync README with website (ESLint Jenkins) -* [`53912aa`](https://github.com/eslint/eslint/commit/53912aab1856327b399cca26cbb2ba81fd01bfa2) Sponsors: Sync README with website (ESLint Jenkins) -* [`51e42ec`](https://github.com/eslint/eslint/commit/51e42eca3e87d8259815d736ffe81e604f184057) Update: Add option "ignoreGlobals" to camelcase rule (fixes #11716) (#12782) (David Gasperoni) -* [`0655f66`](https://github.com/eslint/eslint/commit/0655f66525d167ca1288167b79a77087cfc8fcf6) Update: improve report location in arrow-body-style (refs #12334) (#13424) (YeonJuan) -* [`d53d69a`](https://github.com/eslint/eslint/commit/d53d69af08cfe55f42e0a0ca725b1014dabccc21) Update: prefer-regex-literal detect regex literals (fixes #12840) (#12842) (Mathias Schreck) -* [`004adae`](https://github.com/eslint/eslint/commit/004adae3f959414f56e44e5884f6221e9dcda142) Update: rename id-blacklist to id-denylist (fixes #13407) (#13408) (Kai Cataldo) - -v7.3.1 - June 22, 2020 - -* [`de77c11`](https://github.com/eslint/eslint/commit/de77c11e7515f2097ff355ddc0d7b6db9c83c892) Fix: Replace Infinity with Number.MAX_SAFE_INTEGER (fixes #13427) (#13435) (Nicholas C. Zakas) - -v7.3.0 - June 19, 2020 - -* [`638a6d6`](https://github.com/eslint/eslint/commit/638a6d6be18b4a37cfdc7223e1f5acd3718694be) Update: add missing `additionalProperties: false` to some rules' schema (#13198) (Milos Djermanovic) -* [`949a5cd`](https://github.com/eslint/eslint/commit/949a5cd741c2e930cfb43d80a9b6b084f9d677c3) Update: fix operator-linebreak overrides schema (#13199) (Milos Djermanovic) -* [`9e1414e`](https://github.com/eslint/eslint/commit/9e1414ee16b8caf582920f8fdf3b6ee1eb0b7cd5) New: Add no-promise-executor-return rule (fixes #12640) (#12648) (Milos Djermanovic) -* [`09cc0a2`](https://github.com/eslint/eslint/commit/09cc0a2bb5bcf3bcb0766a3c989871f268518437) Update: max-lines reporting loc improvement (refs #12334) (#13318) (Anix) -* [`ee2fc2e`](https://github.com/eslint/eslint/commit/ee2fc2e90d0f9dfcdba852b0609156bee5280b92) Update: object-property-newline end location (refs #12334) (#13399) (Anix) -* [`d98152a`](https://github.com/eslint/eslint/commit/d98152a3d8c72e4f5ac4c6fa10a615b12090c8f7) Update: added empty error array check for false negative (#13200) (Anix) -* [`7fb45cf`](https://github.com/eslint/eslint/commit/7fb45cf13e9908d489bd6d5fba3b7243c01508b9) Fix: clone config before validating (fixes #12592) (#13034) (Anix) -* [`aed46f6`](https://github.com/eslint/eslint/commit/aed46f69d54da167d9838149954ceeb4b02be5fd) Sponsors: Sync README with website (ESLint Jenkins) -* [`7686d7f`](https://github.com/eslint/eslint/commit/7686d7feaccc7b8fee927eda6602d641d8de1e5c) Update: semi-spacing should check do-while statements (#13358) (Milos Djermanovic) -* [`cbd0d00`](https://github.com/eslint/eslint/commit/cbd0d00a1ec2824d7e025bbbc084855ed0bf08bb) Update: disallow multiple options in comma-dangle schema (fixes #13165) (#13166) (Milos Djermanovic) -* [`b550330`](https://github.com/eslint/eslint/commit/b550330d739c73a7a8f887064e7c911d05a95f9a) New: Add no-unreachable-loop rule (fixes #12381) (#12660) (Milos Djermanovic) -* [`13999d2`](https://github.com/eslint/eslint/commit/13999d292080f814fa4fb266e011d61c184197c4) Update: curly should check consequent `if` statements (#12947) (Milos Djermanovic) -* [`c42e548`](https://github.com/eslint/eslint/commit/c42e54893b79b470ca7745bd2a626ffd069e017b) Chore: enable exceptRange option in the yoda rule (#12857) (Milos Djermanovic) -* [`6cfbd03`](https://github.com/eslint/eslint/commit/6cfbd03b3f22edb4d1c9c61c64eea7c129da71aa) Update: Drop @typescript-eslint/eslint-recommended from `eslint --init` (#13340) (Minh Nguyen) -* [`796f269`](https://github.com/eslint/eslint/commit/796f269e448fdcbf8a5a62edf1990bd857efd1af) Chore: update eslint-config-eslint's required node version (#13379) (薛定谔的猫) -* [`9d0186e`](https://github.com/eslint/eslint/commit/9d0186e55bee769ea6aa08dc5a62682f58316412) Docs: Fix changelog versions (#13410) (Tony Brix) -* [`1ee3c42`](https://github.com/eslint/eslint/commit/1ee3c42ceeee56b650bcc4206ed783b795f65643) Docs: On maxEOF with eol-last (fixes #12742) (#13374) (Arthur Dias) -* [`2a21049`](https://github.com/eslint/eslint/commit/2a210499288ed14ec9a6fd72decabfb77504c197) Update: key-spacing loc changes for extra space (refs #12334) (#13362) (Anix) -* [`7ce7988`](https://github.com/eslint/eslint/commit/7ce7988f411da64248a64a9d9d2b7884d5ba39e0) Chore: Replace the inquirer dependency with enquirer (#13254) (Selwyn) -* [`0f1f5ed`](https://github.com/eslint/eslint/commit/0f1f5ed2a20b8fb575d4360316861cf4c2b9b7bc) Docs: Add security policy link to README (#13403) (Nicholas C. Zakas) -* [`9e9ba89`](https://github.com/eslint/eslint/commit/9e9ba897c566601cfe90522099c635ea316b235f) Sponsors: Sync README with website (ESLint Jenkins) -* [`ca59fb9`](https://github.com/eslint/eslint/commit/ca59fb95a395c0a02ed23768a70e086480ab1f6d) Sponsors: Sync README with website (ESLint Jenkins) - -v7.2.0 - June 5, 2020 - -* [`b735a48`](https://github.com/eslint/eslint/commit/b735a485e77bcc791e4c4c6b8716801d94e98b2c) Update: add enforceForFunctionPrototypeMethods option to no-extra-parens (#12895) (Milos Djermanovic) -* [`27ef73f`](https://github.com/eslint/eslint/commit/27ef73ffb7428d5eff792d443186a2313e417bda) Update: reporter locr of func-call-spacing (refs #12334) (#13311) (Anix) -* [`353bfe9`](https://github.com/eslint/eslint/commit/353bfe9760ec640f470859855d4018df084a4e88) Update: handle parentheses in multiline-ternary (fixes #13195) (#13367) (Milos Djermanovic) -* [`a7fd343`](https://github.com/eslint/eslint/commit/a7fd343991cde99d8a219e3b25616db5792fe9a9) Update: keyword-spacing unexpected space loc improve (refs #12334) (#13377) (Anix) -* [`e49732e`](https://github.com/eslint/eslint/commit/e49732eb41bff6347ca7718c3c5ca1d13f1cd2d3) Fix: Ignore import expressions in no-unused-expressions rule (#13387) (Veniamin Krol) -* [`220349f`](https://github.com/eslint/eslint/commit/220349f5404060effe02fb5ec176a92e1383c3b5) Chore: Remove duplicate health files (#13380) (Nicholas C. Zakas) -* [`dd949ae`](https://github.com/eslint/eslint/commit/dd949aedb81fa772e10568920156daf075d25ea2) Update: support `??` operator, import.meta, and `export * as ns` (#13196) (Toru Nagashima) -* [`d5fce9f`](https://github.com/eslint/eslint/commit/d5fce9fa07e37ce61010a1fbb65964f1f7aefd82) Update: enable es2020 environment in --init (#13357) (Milos Djermanovic) -* [`21b1583`](https://github.com/eslint/eslint/commit/21b15832e326f96d349c063cd7e85e72c3abb670) Docs: fixed broken hash link for working-with-rules.md (#13386) (Yosuke Ota) -* [`b76aef7`](https://github.com/eslint/eslint/commit/b76aef778befb32afe7ad249934b132dc49713d2) Update: Improve report location for template-tag-spacing (refs #12334) (#13203) (Milos Djermanovic) -* [`578efad`](https://github.com/eslint/eslint/commit/578efad331b797e28c0f5f1547ce4769d2ea23ee) Chore: update no-unused-vars caughtErrors in eslint-config-eslint (#13351) (Milos Djermanovic) -* [`426088c`](https://github.com/eslint/eslint/commit/426088c966dc79dc338b33100f3adf827b147d69) Fix: no-unused-vars updated location to last reference (fixes #13181) (#13354) (Anix) -* [`cb50b69`](https://github.com/eslint/eslint/commit/cb50b69c08d4393e32d5c42c537d769c51dd34d8) Update: Improve location for no-mixed-spaces-and-tabs (refs #12334) (#13365) (Milos Djermanovic) -* [`f858f2a`](https://github.com/eslint/eslint/commit/f858f2a8f83232484491bd90b0bc5001b5056ad0) Chore: Add Tidelift to funding.yml (#13371) (Nicholas C. Zakas) -* [`ee30e5d`](https://github.com/eslint/eslint/commit/ee30e5d8bb1a4c82a2a3fbe1b9ee9f979b55c5c4) Sponsors: Sync README with website (ESLint Jenkins) -* [`c29bd9f`](https://github.com/eslint/eslint/commit/c29bd9f75582e5b1a403a8ffd0aafd1ffc8c58e1) Chore: Add breaking/core change link to issue templates (#13344) (Kai Cataldo) -* [`d55490f`](https://github.com/eslint/eslint/commit/d55490fa73ff69416de375e4c1cd67b6edba531c) Sponsors: Sync README with website (ESLint Jenkins) - -v7.1.0 - May 22, 2020 - -* [`a93083a`](https://github.com/eslint/eslint/commit/a93083af89c6f9714dcdd4a7f27c8655a0b0dba6) Fix: astUtils.getNextLocation returns invalid location after CRLF (#13275) (Milos Djermanovic) -* [`df01af1`](https://github.com/eslint/eslint/commit/df01af184d93b3d64b37cee786cad59bd0d7aacb) Update: padded-blocks loc position changes (refs #12334) (#13328) (Anix) -* [`bd3f092`](https://github.com/eslint/eslint/commit/bd3f092efa579944f75bfbc277b35f85e6d966ed) Fix: max-lines-per-function flagging arrow IIFEs (fixes #13332) (#13336) (cherryblossom000) -* [`25462b2`](https://github.com/eslint/eslint/commit/25462b23eac4ed1ded97eeae6187b5d8baa58e78) Update: block-spacing changed loc for extra (refs #12334) (#13314) (Anix) -* [`de0aab9`](https://github.com/eslint/eslint/commit/de0aab95005f172db72196fc3fd18e91ee9a5880) Fix: report end loc in one-var-declaration-per-line (refs #12334) (#13326) (YeonJuan) -* [`1710296`](https://github.com/eslint/eslint/commit/1710296082083602a904b080908657bb431fb56c) Fix: no-new-symbol false positive with Symbol as an argument (#13337) (Milos Djermanovic) -* [`cc01451`](https://github.com/eslint/eslint/commit/cc014514c29626e556acb0a528e3478b3725e284) Fix: arrow-parens no reporting for comments inside (fixes #12995) (#13312) (Anix) -* [`a195141`](https://github.com/eslint/eslint/commit/a19514193a42f4f00732559ff828b33a6ec9d7c5) Update: reporting location for semi-spacing (refs #12334) (#13285) (Anix) -* [`e3e4c41`](https://github.com/eslint/eslint/commit/e3e4c41ab625a5af8d4614d1c6d32c656f104f6b) Fix: fix false positives of no-new-func (#13333) (Pig Fang) -* [`611c676`](https://github.com/eslint/eslint/commit/611c676dfd671013d81810724f184e2a9c5ad5d7) Docs: Update new rules policies (#13343) (Nicholas C. Zakas) -* [`3a5fbb3`](https://github.com/eslint/eslint/commit/3a5fbb3d634be688615950c0a5fa8aead6ff08b5) Chore: correct fileoverview doc in accessor-pairs (#13335) (YeonJuan) -* [`b0a6b81`](https://github.com/eslint/eslint/commit/b0a6b8134e3b399beeb69432a02232a1037f7c46) Update: Improve report location for rest-spread-spacing (refs #12334) (#13313) (Milos Djermanovic) -* [`68c8ee3`](https://github.com/eslint/eslint/commit/68c8ee3ab70187972aef4c4e866bcf29da70a207) Fix: Stop path analyzer on unknown nodes (#13305) (Ilya Volodin) -* [`89e1081`](https://github.com/eslint/eslint/commit/89e10811c4df666216aae58bff5f855cd9df738b) Update: Improve report location for linebreak-style (refs #12334) (#13317) (Milos Djermanovic) -* [`0891379`](https://github.com/eslint/eslint/commit/08913798b4ec420b261b8fbc470504f9f248c840) Docs: Document the "correct" way to build an array with values (#13246) (Ed S) -* [`88127d7`](https://github.com/eslint/eslint/commit/88127d74d56b88cc5a0758856995716050021131) Chore: remove checkbox from PR template prerequesites (#13330) (Kai Cataldo) -* [`c636d57`](https://github.com/eslint/eslint/commit/c636d5708c461a8ff1ea55e5df56d4f76f9c4044) New: no-loss-of-precision (fixes #11279) (#12747) (jmoore914) -* [`72a4e10`](https://github.com/eslint/eslint/commit/72a4e1044592057c4a3f39dbb1dbe61b00ea8af6) Chore: Mark SourceCode getComments() method as deprecated (fixes #13293) (#13296) (SuperOleg39) -* [`7f14846`](https://github.com/eslint/eslint/commit/7f1484690665b4f4b9cd9680ca8bb7b5cf56e48a) Docs: fix broken link in Node.js API docs (#13307) (Kai Cataldo) -* [`02aeba1`](https://github.com/eslint/eslint/commit/02aeba19afb301140514097235a9f2a00a9acb2a) Sponsors: Sync README with website (ESLint Jenkins) -* [`1f17533`](https://github.com/eslint/eslint/commit/1f175338cba29960aab67a540f516051f9d428c8) Docs: Gitter -> Discord URL (refs #13039) (#13308) (Nicholas C. Zakas) -* [`82a448a`](https://github.com/eslint/eslint/commit/82a448a7deff24e9207f60dfe77622c00102bd99) Docs: improve documentation of no-return-await (#13215) (Linus Unnebäck) -* [`742941d`](https://github.com/eslint/eslint/commit/742941d7fdc3fd79ff8c5d2588413e0d3a5a525b) Update: added typescript-eslint/recommended configs for init (#13235) (Anix) -* [`3d03df0`](https://github.com/eslint/eslint/commit/3d03df08c8000403a85baffe2a000287f3335114) Sponsors: Sync README with website (ESLint Jenkins) -* [`f44a6b4`](https://github.com/eslint/eslint/commit/f44a6b4fd92602af8e2c75d5852f796ec064aa8e) Chore: fix invalid syntax in require-await tests (#13277) (Milos Djermanovic) -* [`2c778fb`](https://github.com/eslint/eslint/commit/2c778fb6e31b7943bb27a47a6e15dcbfd8336f39) Fix: remove custom plugins from replacedBy metadata (#13274) (Kai Cataldo) -* [`0db3b1d`](https://github.com/eslint/eslint/commit/0db3b1d5cc5e4e1de21462679581b7a4d89ff36e) Sponsors: Sync README with website (ESLint Jenkins) - -v7.0.0 - May 8, 2020 - -* [`b98d8bd`](https://github.com/eslint/eslint/commit/b98d8bda4630fe8278c5aa2b6650630770568fe5) Upgrade: eslint-release@2.0.0 (#13271) (Kai Cataldo) -* [`4c0b028`](https://github.com/eslint/eslint/commit/4c0b028c55fc1674b374efe0bc6dd22c02b4ac88) Fix: remove Node.js and CommonJS category from build process (#13242) (Kai Cataldo) -* [`401a687`](https://github.com/eslint/eslint/commit/401a68799d9d15145e1c7d92ee04644abec2f15a) Chore: fix rules list for prereleases (#13230) (Kai Cataldo) -* [`4ef6158`](https://github.com/eslint/eslint/commit/4ef61580736353f700ab9e4e29f005b5ac552c78) Breaking: espree@7.0.0 (#13270) (Kai Cataldo) -* [`b5c8d73`](https://github.com/eslint/eslint/commit/b5c8d7389bb2c5d4eae850b866832d099187818b) Docs: update 7.0.0 migration guide for consistency (#13267) (Kai Cataldo) -* [`356fdb4`](https://github.com/eslint/eslint/commit/356fdb46aa118ba3d81cee93e8c058a7c98acaf9) Docs: add migration guide (#12692) (Toru Nagashima) -* [`015edf6`](https://github.com/eslint/eslint/commit/015edf6467e33c67b904db037a674d71957a6865) Sponsors: Sync README with website (ESLint Jenkins) -* [`fdfa364`](https://github.com/eslint/eslint/commit/fdfa364c1b0d88689d02cbe8ae848a3e323209aa) 7.0.0-rc.0 (ESLint Jenkins) -* [`8d1b4db`](https://github.com/eslint/eslint/commit/8d1b4db9932cf7c3289187afbb3866a83f9b3f8c) Build: changelog update for 7.0.0-rc.0 (ESLint Jenkins) -* [`0b1d65a`](https://github.com/eslint/eslint/commit/0b1d65a45aa5dfe08cd596c420490e81b546317e) Update: Improve report location for array-callback-return (refs #12334) (#13109) (Milos Djermanovic) -* [`d85e291`](https://github.com/eslint/eslint/commit/d85e291d1b56960373031f2562547df7285444f7) Fix: yoda left string fix for exceptRange (fixes #12883) (#13052) (Anix) -* [`2ce6bed`](https://github.com/eslint/eslint/commit/2ce6bed04cad376003f70447ece4b6578c142bfd) Chore: added tests for nested arrays (#13145) (Anix) -* [`d3aac53`](https://github.com/eslint/eslint/commit/d3aac532f6a24c633f85dedf0e552eabd22d0956) Update: report backtick loc in no-unexpected-multiline (refs #12334) (#13142) (Milos Djermanovic) -* [`8e7a2d9`](https://github.com/eslint/eslint/commit/8e7a2d93595cfe0c1597af0e7873853369251c0b) Fix: func-call-spacing "never" reports wrong message (fixes #13190) (#13193) (Milos Djermanovic) -* [`bcafd0f`](https://github.com/eslint/eslint/commit/bcafd0f8508e19ab8087a35fac7b97fc4295df3e) Update: Add ESLint API (refs eslint/rfcs#40) (#12939) (Kai Cataldo) -* [`3eeae56`](https://github.com/eslint/eslint/commit/3eeae565bfb0834a31e5d3a253a17bbf4027cf88) Upgrade: some (dev) deps (#13155) (薛定谔的猫) -* [`6b7030b`](https://github.com/eslint/eslint/commit/6b7030b1a1e1e3d1a3953cfa9722074d6a6fc1a9) Chore: Run tests on Node.js v14 (#13210) (fisker Cheung) -* [`ebc28d7`](https://github.com/eslint/eslint/commit/ebc28d76658f1f3e4e8d56e70a25752b5d4a6686) Fix: Remove default .js from --ext CLI option (#13176) (Brandon Mills) -* [`5c1bdeb`](https://github.com/eslint/eslint/commit/5c1bdebcf728062fd41583886830c89b65485df9) Update: Improve report location for getter-return (refs #12334) (#13164) (Milos Djermanovic) -* [`56d2bee`](https://github.com/eslint/eslint/commit/56d2beea0ea0b6395a6d4a3e116ea6a964ff92f3) Docs: fix typos (#13204) (Nitin Kumar) -* [`e13256e`](https://github.com/eslint/eslint/commit/e13256e395cc413ce45a66c8562621d48440d8f4) Chore: use espree.latestEcmaVersion in config-initializer (#13157) (Kai Cataldo) -* [`e4f57b7`](https://github.com/eslint/eslint/commit/e4f57b7d7b8b7441a2217a217dcda1e7bfff516a) Chore: add nested array tests for array-element-newline (#13161) (Anix) -* [`63ac918`](https://github.com/eslint/eslint/commit/63ac91877668205aaa50495a9615806967e6e4cf) Sponsors: Sync README with website (ESLint Jenkins) -* [`516f253`](https://github.com/eslint/eslint/commit/516f253729daeeb9da5de5e9b38606ff9c1aae71) Docs: Adds import example for object-curly-newline rule (refs #12018) (#13177) (Luke Lewis) -* [`5a0e84e`](https://github.com/eslint/eslint/commit/5a0e84e9498a946a3e8491a370e012354e087fe0) Sponsors: Sync README with website (ESLint Jenkins) -* [`b398e0b`](https://github.com/eslint/eslint/commit/b398e0b9ff455e4e7d70f19d5ccea5819c21eb86) Docs: add rule comment in prefer-rest-params doc (#13191) (YeonJuan) -* [`ffaa4ba`](https://github.com/eslint/eslint/commit/ffaa4ba5e2bb1a51a78a2b2c028cbe2efc9e5165) Sponsors: Sync README with website (ESLint Jenkins) -* [`932869b`](https://github.com/eslint/eslint/commit/932869b3251b04c4ad5fa72279cb2a56a3e67b55) Sponsors: Sync README with website (ESLint Jenkins) -* [`54630f0`](https://github.com/eslint/eslint/commit/54630f0063fa66318476473757b5912465d4caf2) Sponsors: Sync README with website (ESLint Jenkins) -* [`c9a5035`](https://github.com/eslint/eslint/commit/c9a503571a4662f6c2d31cabc7fd7819ec388150) Fix: newBasePath should be an absolute path (fixes #12850) (#13078) (Nick Harris) -* [`e7c1d4b`](https://github.com/eslint/eslint/commit/e7c1d4b2ac56149a517d4b0000230348a641f1d3) Update: deprecate Node.js & CommonJS rules (#12898) (Kai Cataldo) -* [`95e1c70`](https://github.com/eslint/eslint/commit/95e1c70cebde210a990ee786ec7ab1c8e522edb8) Upgrade: levn@0.4.1 (fixes #9366) (#13140) (Kai Cataldo) -* [`c41de38`](https://github.com/eslint/eslint/commit/c41de382a330d4789488fd2dcf6db5a3163bb5d2) Docs: fix curly multi-or-nest examples with comments (refs #12972) (#13151) (Milos Djermanovic) -* [`57221d5`](https://github.com/eslint/eslint/commit/57221d58c60e757062242f30ed574e0502fc7c31) Docs: fix eslint comment in no-inner-declarations examples (#13152) (Milos Djermanovic) -* [`301b450`](https://github.com/eslint/eslint/commit/301b450ecd1985ae84d1915124f4638ab2a2e6de) Fix: no-extra-parens export default sequence expression false positive (#13096) (Milos Djermanovic) -* [`af4472f`](https://github.com/eslint/eslint/commit/af4472fed794b86e63730702e4b27294a4118d09) Update: Improve report location for new-cap (refs #12334) (#13136) (Milos Djermanovic) -* [`bfa811c`](https://github.com/eslint/eslint/commit/bfa811ceee801fe8ba212a5c879e13743146e909) Fix: init error in extending recommended config (fixes #12707) (#12738) (YeonJuan) -* [`5dfd4eb`](https://github.com/eslint/eslint/commit/5dfd4eb50d84077a57950f119e5de8976070e49a) Docs: examples with arrow functions in no-return-assign (fixes #13135) (#13138) (Anix) -* [`adc8fa8`](https://github.com/eslint/eslint/commit/adc8fa88c9f223b984a3519ed159a055bf933b18) Docs: clarify exceptions in spaced-comment (fixes #13032) (#13126) (Anix) -* [`a784dac`](https://github.com/eslint/eslint/commit/a784dac8bc26f31edbca869b16d6ad91bd4e5cc4) Update: Improve report location newline-per-chained-call (refs #12334) (#13116) (Milos Djermanovic) -* [`5e07574`](https://github.com/eslint/eslint/commit/5e07574a91861fdcab6888b4c6829868030c3a39) Update: Improve report location for space-before-function-paren (#13128) (Chiawen Chen) -* [`d0d32a8`](https://github.com/eslint/eslint/commit/d0d32a8c2a6c60c7e6e2d32a054e5987efd4c263) Sponsors: Sync README with website (ESLint Jenkins) -* [`17e2fe4`](https://github.com/eslint/eslint/commit/17e2fe425168e675fe7607182615e50527eedf53) Update: Improve error message for fatal fixer errors (#13120) (Brad Zacher) -* [`7551f0c`](https://github.com/eslint/eslint/commit/7551f0c6fd12f0295cc7d6377bf1899c092e79d8) Fix: no check for shadowed Object (fixes #12809) (#13115) (Anix) -* [`988d842`](https://github.com/eslint/eslint/commit/988d8428811934943ce13b2d8b833d795ac2bb4a) Fix: add end location to report in no-useless-concat (refs #12334) (#13110) (Milos Djermanovic) -* [`0518ebb`](https://github.com/eslint/eslint/commit/0518ebb840b5bf2d646dbd8a9b3e246e7069eb79) Sponsors: Sync README with website (ESLint Jenkins) -* [`252fd41`](https://github.com/eslint/eslint/commit/252fd4133805f003151e0220b5d89bbb70cfacb1) Sponsors: Sync README with website (ESLint Jenkins) -* [`438dcbb`](https://github.com/eslint/eslint/commit/438dcbb981214d67e8848006ce45afc0fbfa1705) Update: Improve report location for comma-style (refs #12334) (#13111) (Chiawen Chen) -* [`85b7254`](https://github.com/eslint/eslint/commit/85b72548c0c893499c787b82f404348e1b50354d) Update: no-inner-declarations false negative in non-block (fixes #12222) (#13062) (Anix) -* [`6631ef1`](https://github.com/eslint/eslint/commit/6631ef1678bbdd48680fb3025c3692abd0aeec4a) Update: Improve report location for no-empty-function (refs #12334) (#13121) (Milos Djermanovic) -* [`b228f95`](https://github.com/eslint/eslint/commit/b228f958afaf507d6f6f99c90b2075b395733839) Docs: Update README team and sponsors (ESLint Jenkins) -* [`119b7ce`](https://github.com/eslint/eslint/commit/119b7ce97993b84df5af4e4f82e5102e430dfff1) 7.0.0-alpha.3 (ESLint Jenkins) -* [`2531b80`](https://github.com/eslint/eslint/commit/2531b802a1527ea1084905641a17befcb50350c7) Build: changelog update for 7.0.0-alpha.3 (ESLint Jenkins) -* [`78c8cda`](https://github.com/eslint/eslint/commit/78c8cda5a5d82f5f8548c4528a6438d29756bb71) Breaking: RuleTester Improvements (refs eslint/rfcs#25) (#12955) (Milos Djermanovic) -* [`e0f1b6c`](https://github.com/eslint/eslint/commit/e0f1b6c3d62f725b99b8c07654603b559ba43ba9) Update: stricter array index check in no-magic-numbers (fixes #12845) (#12851) (Milos Djermanovic) -* [`362713c`](https://github.com/eslint/eslint/commit/362713c04aa89092b2b98a77fa94a75b3c933fc6) Update: Improve report location for template-curly-spacing (#12813) (Milos Djermanovic) -* [`29f32db`](https://github.com/eslint/eslint/commit/29f32db68c921a857e17ae627923d87b9c8708de) Fix: Change error message logic for implicit file ignore (fixes #12873) (#12878) (Scott Hardin) -* [`eb1a43c`](https://github.com/eslint/eslint/commit/eb1a43ce3113c906800192c3ef766d2ff188776f) Fix: require-await ignore async generators (fixes #12459) (#13048) (Anix) -* [`920465b`](https://github.com/eslint/eslint/commit/920465b5d8d291df8bce7eef8a066b1dd43d8cae) Fix: getNameLocationInGlobalDirectiveComment end location (refs #12334) (#13086) (Milos Djermanovic) -* [`ae14a02`](https://github.com/eslint/eslint/commit/ae14a021bbea5117fe366ae4ed235e8f08dc65a8) Fix: add end location to report in no-extra-bind (refs #12334) (#13083) (Milos Djermanovic) -* [`105384c`](https://github.com/eslint/eslint/commit/105384ccc11dcd7303104fb5a347eda1d4d48357) Update: report operator location in operator-linebreak (refs #12334) (#13102) (Milos Djermanovic) -* [`081e240`](https://github.com/eslint/eslint/commit/081e24022a40d9a026ddd2a85c68cb8c3f18dc53) Update: support globalThis in no-implied-eval (fixes #12670) (#13105) (YeonJuan) -* [`185982d`](https://github.com/eslint/eslint/commit/185982d5615d325ae8b45c2360d5847df4098bda) Breaking: improve plugin resolving (refs eslint/rfcs#47) (#12922) (Toru Nagashima) -* [`0c20bc0`](https://github.com/eslint/eslint/commit/0c20bc068e608869981a10711bba88ffde1539d8) Fix: check assignment property target in camelcase (fixes #13025) (#13027) (YeonJuan) -* [`8d50a7d`](https://github.com/eslint/eslint/commit/8d50a7d82244d4912f3eab62a66c81c76c44a9da) Fix: add end location to report in no-prototype-builtins (refs #12334) (#13087) (Milos Djermanovic) -* [`3e4e7f8`](https://github.com/eslint/eslint/commit/3e4e7f8d429dc70b78c0aefaa37f9c22a1e5fc0f) Fix: incorrect logic for required parens in no-extra-boolean-cast fixer (#13061) (Milos Djermanovic) -* [`6c069f9`](https://github.com/eslint/eslint/commit/6c069f907a04268b671c7f949c04a508df9d42a3) Docs: Add comments to code block in example (#13089) (Kibeom Kwon) -* [`ee1f053`](https://github.com/eslint/eslint/commit/ee1f0531aa534ef9182cf8586f55ad82aaa55e75) Docs: Fix typo (#13092) (Max Coplan) -* [`76324ac`](https://github.com/eslint/eslint/commit/76324ace67893c3d7e38a369114d6128df9ffb65) Docs: Add further reading to rule (#13084) (Max Coplan) -* [`a1370ab`](https://github.com/eslint/eslint/commit/a1370abed72e1fb93e601816d981fa6e46204afb) Update: Report constructor calls in no-obj-calls (#12909) (Milos Djermanovic) -* [`2111c52`](https://github.com/eslint/eslint/commit/2111c52443e7641caad291e0daaea8e2fe6c4562) Upgrade: esquery@1.2.0 (#13076) (Milos Djermanovic) -* [`3f7c9bf`](https://github.com/eslint/eslint/commit/3f7c9bf19615122fb776cdd13da532d860bd945a) Docs: clarify variables option in no-use-before-define (fixes #12986) (#13017) (Anix) -* [`aef9488`](https://github.com/eslint/eslint/commit/aef9488c07d3da4becff6e8d6918824b53086d86) Fix: allow references to external globals in id-blacklist (fixes #12567) (#12987) (Milos Djermanovic) -* [`4955c50`](https://github.com/eslint/eslint/commit/4955c50dc9e89b4077b28e35f065d45e89bdccd7) Fix: remove type arguments in prefer-object-spread (fixes #13058) (#13063) (Milos Djermanovic) -* [`48b122f`](https://github.com/eslint/eslint/commit/48b122f450b14dd27afef4c8115c69fca4f02be1) Breaking: change relative paths with --config (refs eslint/rfcs#37) (#12887) (Toru Nagashima) -* [`085979f`](https://github.com/eslint/eslint/commit/085979fed9a5e24a87e4d92ee79272b59211d03f) Update: consider env in no-implied-eval (fixes #12733) (#12757) (YeonJuan) -* [`9ac5b9e`](https://github.com/eslint/eslint/commit/9ac5b9edf06d16a9216c2c9b02bb20b6aa8ed0ab) Docs: Clarify node_modules is ignored by default (fixes #13006) (#13054) (Mika Kuijpers) -* [`0de91f3`](https://github.com/eslint/eslint/commit/0de91f39a97cdf530cb64edbadde57a2bb41ca86) Docs: removed correct code from incorrect eg (#13060) (Anix) -* [`dbe357d`](https://github.com/eslint/eslint/commit/dbe357de199620675446464f6fd0e35064c4d247) Fix: check template literal in prefer-numeric-literals (fixes #13045) (#13046) (YeonJuan) -* [`2260611`](https://github.com/eslint/eslint/commit/2260611e616bdc2a0bf16d508b60a50772ce7fbb) Fix: added async in allow method in no-empty-function (fixes #12768) (#13036) (Anix) -* [`f3788af`](https://github.com/eslint/eslint/commit/f3788aff615edfbfb7afc4c491bb07d20737531b) Sponsors: Sync README with website (ESLint Jenkins) -* [`e90b29b`](https://github.com/eslint/eslint/commit/e90b29bb1f41d4e5767e33d03db5984f036586ed) Update: Allow testing Suggestions with data in RuleTester (fixes #12606) (#12635) (Milos Djermanovic) -* [`7224eee`](https://github.com/eslint/eslint/commit/7224eee3ff4b4378d3439deb038bf34b116fa48b) Fix: no-plusplus allow comma operands in for afterthought (fixes #13005) (#13024) (Milos Djermanovic) -* [`7598cf8`](https://github.com/eslint/eslint/commit/7598cf816bd854de1dd7d96cf00dec6ecc4564ac) Fix: Newline before eof when creating config via --init (#12952) (Andreas Lind) -* [`183e300`](https://github.com/eslint/eslint/commit/183e3006841c29efdd245c45a72e6cefac86ae35) Update: support globalThis (refs #12670) (#12774) (YeonJuan) -* [`af7af9d`](https://github.com/eslint/eslint/commit/af7af9d32ea8073d2d0d726cc8551351261a170f) Docs: Update governance (#13055) (Nicholas C. Zakas) -* [`31d5eb3`](https://github.com/eslint/eslint/commit/31d5eb3e60b6c2ee26976721f07cc89d60867659) Sponsors: Sync README with website (ESLint Jenkins) -* [`95613d4`](https://github.com/eslint/eslint/commit/95613d46b7900b3d9757a7f6959d5dfb262f29fc) Upgrade: espree@6.2.1 (#13026) (Kai Cataldo) -* [`f1525dc`](https://github.com/eslint/eslint/commit/f1525dc45dfdbbe31e724671270785b41cffc6bd) Sponsors: Sync README with website (ESLint Jenkins) -* [`0243549`](https://github.com/eslint/eslint/commit/0243549db4d237cb78e720d55a9cae89b91f6830) Fix: camelcase false positive with computed property (fixes #13022) (#13023) (Milos Djermanovic) -* [`bc0c02c`](https://github.com/eslint/eslint/commit/bc0c02cd0368559c7a7b1510eb4620022a4cc31c) Chore: added lock files to gitignore (#13015) (Anix) -* [`79ac6cd`](https://github.com/eslint/eslint/commit/79ac6cd2d8e4c32e03dfea10a957806845058573) Docs: added less confusing explanation for func-style (fixes #12900) (#13004) (Anix) -* [`26267ed`](https://github.com/eslint/eslint/commit/26267ed70270ef746b785c09e267f815bf7c596a) Chore: update GitHub Actions (#12984) (Pig Fang) -* [`1299705`](https://github.com/eslint/eslint/commit/12997058626b5167ba4b9d2ae0d0ea965a01c4be) Update: acorn version (#13016) (Idan Avrahami) -* [`6cef0d5`](https://github.com/eslint/eslint/commit/6cef0d50a0d131bc8897799a54e1af1d38606db4) Fix: Check division operator in astUtils.canTokensBeAdjacent (#12879) (Milos Djermanovic) -* [`fd8e1f5`](https://github.com/eslint/eslint/commit/fd8e1f52110cada542a120750236fd1ec8779336) Sponsors: Sync README with website (ESLint Jenkins) -* [`472025f`](https://github.com/eslint/eslint/commit/472025f2814d0360fe8d4cddbcba049982e1cd43) Chore: update space-before-function-paren in eslint-config-eslint (#12966) (Kai Cataldo) -* [`fd8c42a`](https://github.com/eslint/eslint/commit/fd8c42ada52f0ae2488ad96ee8fee675f63134ce) Sponsors: Sync README with website (ESLint Jenkins) -* [`c615eae`](https://github.com/eslint/eslint/commit/c615eae0be3c6c167c6f77ec7a73e7adca0ecef0) 7.0.0-alpha.2 (ESLint Jenkins) -* [`2e8f193`](https://github.com/eslint/eslint/commit/2e8f193ebc970f07ea37d267c8bce02d74c285a8) Build: changelog update for 7.0.0-alpha.2 (ESLint Jenkins) -* [`a5b41a7`](https://github.com/eslint/eslint/commit/a5b41a75b57572e97476b06ad39b768e15b9d844) Update: no-restricted-modules handle TemplateLiteral (fixes #12926) (#12927) (Michal Piechowiak) -* [`051567a`](https://github.com/eslint/eslint/commit/051567adca7ca56d691bcda76f54ed72e3eae367) Update: check identifier in array pattern in id-length (fixes #12832) (#12839) (YeonJuan) -* [`4af06fc`](https://github.com/eslint/eslint/commit/4af06fc49029dac5c9acfd53f01fd9527bfbb4aa) Breaking: Test with an unknown error property should fail in RuleTester (#12096) (Milos Djermanovic) -* [`9038a29`](https://github.com/eslint/eslint/commit/9038a29569548c0563c29dbe9f7dae280ff3addd) Update: func-names `as-needed` false negative with AssignmentPattern (#12932) (Milos Djermanovic) -* [`afde78b`](https://github.com/eslint/eslint/commit/afde78b125747ce5ad9e5f871122a0d370dd0152) Fix: curly removes necessary braces between if and else (fixes #12928) (#12943) (Milos Djermanovic) -* [`4797fb2`](https://github.com/eslint/eslint/commit/4797fb2c29db97bc5cd23b40e5a9235fef1ea06a) Fix: arrow-body-style crash with object literal body (fixes #12884) (#12886) (Milos Djermanovic) -* [`afa9aac`](https://github.com/eslint/eslint/commit/afa9aac6de9444e935a55b46311e5b5a58f86063) Breaking: class default `true` computed-property-spacing (fixes #12812) (#12915) (Milos Djermanovic) -* [`b8e20d3`](https://github.com/eslint/eslint/commit/b8e20d33b7d6645266beef09cd231afaf5054328) Docs: Mention TypeScript's compiler check (#12903) (Benny Neugebauer) -* [`de14d1c`](https://github.com/eslint/eslint/commit/de14d1ce0cf422b4100a686abb906f53fbf905b3) Fix: wrap-iife autofix removes mandatory parentheses (#12905) (Milos Djermanovic) -* [`5775b06`](https://github.com/eslint/eslint/commit/5775b06a74573cbe068bea56b1d2376421f5e831) Fix: Optionally allow underscores in member names (#11972) (Edgardo Avilés) -* [`e997f32`](https://github.com/eslint/eslint/commit/e997f32b936463ac38e8b0034f764c47502e56a8) Docs: Updated arrow-parens for minor grammar issue (#12962) (Tom) -* [`7d52151`](https://github.com/eslint/eslint/commit/7d52151bcd5d5524f240588436a8808162be187f) Breaking: classes default `true` in accessor-pairs (fixes #12811) (#12919) (Milos Djermanovic) -* [`cf14355`](https://github.com/eslint/eslint/commit/cf14355e34a6757e15806f8e493553bd7110fb36) Docs: Fix links to custom parsers doc (#12965) (Brandon Mills) -* [`0dfc3ff`](https://github.com/eslint/eslint/commit/0dfc3ff9fb228e1d9b1df99de50033ce9140ac24) Fix: add end location to report in no-eval (#12960) (Milos Djermanovic) -* [`f479f6f`](https://github.com/eslint/eslint/commit/f479f6fe2eb95156e22bebfccb39a7fc1f19e9c0) Docs: References correct config file name (#12885) (Patrick Kilgore) -* [`78182e4`](https://github.com/eslint/eslint/commit/78182e45e0178d9eac2591944ef4daee21d2cb44) Breaking: Add new rules to eslint:recommended (fixes #12911) (#12920) (Milos Djermanovic) -* [`8d5c434`](https://github.com/eslint/eslint/commit/8d5c434f721142be74c7515aaa935668a15b79b1) Docs: fix category descriptions for site generation (fixes #12894) (#12930) (Kai Cataldo) -* [`05380e6`](https://github.com/eslint/eslint/commit/05380e6e7e19a79d26ea6d6b44a8d5ee7cde51c8) Docs: Remove claim about semicolons from docs (#12944) (Luke Sikina) -* [`aa9d725`](https://github.com/eslint/eslint/commit/aa9d72525054e641231a2960a2e37b3716228056) Sponsors: Sync README with website (ESLint Jenkins) -* [`7747177`](https://github.com/eslint/eslint/commit/7747177f8504961059b7c56bdb70a820bd1114c1) Update: report rename id destructuring in id-blacklist (fixes #12807) (#12923) (YeonJuan) -* [`6423e11`](https://github.com/eslint/eslint/commit/6423e11c0bedd3b4e661ab554316bdeb1fc1ee3c) Breaking: check unnamed default export in func-names (fixes #12194) (#12195) (Chiawen Chen) -* [`77df505`](https://github.com/eslint/eslint/commit/77df505d9a08496a8eaefeca4f885f54a21d5c5e) Update: check renaming identifier in object destructuring (fixes 12827) (#12881) (YeonJuan) -* [`41de9df`](https://github.com/eslint/eslint/commit/41de9df41a30a4300243bfe4ca26f716a787b2fc) Update: enforceForLogicalOperands no-extra-boolean-cast (fixes #12137) (#12734) (jmoore914) -* [`98a9b01`](https://github.com/eslint/eslint/commit/98a9b019e52f344c1a6bc2f704c227f89692afe3) 7.0.0-alpha.1 (ESLint Jenkins) -* [`e9f1073`](https://github.com/eslint/eslint/commit/e9f1073f748f8c22f754d145b1ba193e7ce82215) Build: changelog update for 7.0.0-alpha.1 (ESLint Jenkins) -* [`f702b1a`](https://github.com/eslint/eslint/commit/f702b1a54820d2b4e4993dcded99f551a98b490f) Add missing plugin reference (#12796) (Eduard Bardají Puig) -* [`1f1424c`](https://github.com/eslint/eslint/commit/1f1424cb200e609d58645f6c54739e11469e6265) Fix: fix inconsistently works option in no-extra-parens (fixes #12717) (#12843) (YeonJuan) -* [`b5adcaa`](https://github.com/eslint/eslint/commit/b5adcaab93f388f1d8e9d35d6f5e8c2994240850) Fix: make YieldExpression throwable (fixes #12880) (#12897) (YeonJuan) -* [`4293229`](https://github.com/eslint/eslint/commit/4293229709dde105692347241513766e953664dd) Breaking: use-isnan enforceForSwitchCase default `true` (fixes #12810) (#12913) (Milos Djermanovic) -* [`cf38d0d`](https://github.com/eslint/eslint/commit/cf38d0d939b62f3670cdd59f0143fd896fccd771) Breaking: change default ignore pattern (refs eslint/rfcs#51) (#12888) (Toru Nagashima) -* [`bfe1dc4`](https://github.com/eslint/eslint/commit/bfe1dc4e614640cb69032afbb5851c1493f537e3) Breaking: no-dupe-class-members checks some computed keys (fixes #12808) (#12837) (Milos Djermanovic) -* [`1ee6b63`](https://github.com/eslint/eslint/commit/1ee6b6388305a8671c8d4c3cf30c2dbf18a1ff7e) Update: check template literal in yoda (fixes #12863) (#12876) (YeonJuan) -* [`0ae7041`](https://github.com/eslint/eslint/commit/0ae70417af70ad565450d9e779ae78c05f6a51e2) Sponsors: Sync README with website (ESLint Jenkins) -* [`1907e57`](https://github.com/eslint/eslint/commit/1907e57362f7d5f7a02a5a78f24ac3347f868e93) Chore: add Twitter and Open Collective badge (#12877) (Kai Cataldo) -* [`95e0586`](https://github.com/eslint/eslint/commit/95e0586c95e6953d11983d1d11891ed30318109a) Fix: id-blacklist false positives on renamed imports (#12831) (Milos Djermanovic) -* [`b7f0d20`](https://github.com/eslint/eslint/commit/b7f0d200c125b3d233ccafaabdaa61c66dc60e3c) Chore: Use consistent badge style (#12825) (fisker Cheung) -* [`3734a66`](https://github.com/eslint/eslint/commit/3734a669983de7d5107ba8f39b291c6e3116489f) Chore: use ids for messages (#12859) (Gareth Jones) -* [`824d235`](https://github.com/eslint/eslint/commit/824d23585c205f2993716585cb6f55dfbe4a33f0) Docs: add errorOnUnmatchedPattern option to CLIEngine (#12834) (Arthur Denner) -* [`439c833`](https://github.com/eslint/eslint/commit/439c83342c364ba3ce5168d54e165b1fe3e35630) Update: array-callback-return checks Array.forEach (fixes #12551) (#12646) (Gabriel R Sezefredo) -* [`33efd71`](https://github.com/eslint/eslint/commit/33efd71d7c3496b4b9cbfe006280527064940826) Docs: Fix spelling mistakes (#12861) (Bryan Mishkin) -* [`a5b3c5f`](https://github.com/eslint/eslint/commit/a5b3c5fa4edc2312534af0d9f0911f68144f8baf) Docs: Update README team and sponsors (ESLint Jenkins) -* [`0cae920`](https://github.com/eslint/eslint/commit/0cae9203a8077184ad6beb00028fd376cc806f34) Chore: rename shadowed global (#12862) (Tony Brix) -* [`055b80d`](https://github.com/eslint/eslint/commit/055b80dc89bba2a5ab22f7a27deb40135b5cacfa) Chore: Fix typo in complexity.js (#12864) (Kyle Shevlin) -* [`d6c313d`](https://github.com/eslint/eslint/commit/d6c313de794ea0671d35b5027288cd2ea456c0b5) Docs: add missing eslint comments in prefer-regex-literals examples (#12858) (Milos Djermanovic) -* [`7d551ab`](https://github.com/eslint/eslint/commit/7d551ab8cbf2d3a802b0d0685379aa075fe9d7c0) Sponsors: Sync README with website (ESLint Jenkins) -* [`540de8e`](https://github.com/eslint/eslint/commit/540de8e34d08f4b17b66b06d13927acb7552357a) Sponsors: Sync README with website (ESLint Jenkins) -* [`ac5d515`](https://github.com/eslint/eslint/commit/ac5d515252c226f030fa646bf7635a12a3b856fe) Sponsors: Sync README with website (ESLint Jenkins) -* [`dadc892`](https://github.com/eslint/eslint/commit/dadc8927820576c60b48bcbc7d5a9056a6279d30) Fix: operator-assignment crash on adjacent division assignment (#12844) (Milos Djermanovic) -* [`9f39ef0`](https://github.com/eslint/eslint/commit/9f39ef0d4b398c7c09ceef89128da448680d587c) Chore: typo in PULL_REQUEST_TEMPLATE.md (#12848) (Balázs Orbán) -* [`a60d5cd`](https://github.com/eslint/eslint/commit/a60d5cd2325ca72fa1b272b0b90ccd7904b92062) Chore: typo in no-irregular-whitespace.js (#12847) (Balázs Orbán) -* [`691d19a`](https://github.com/eslint/eslint/commit/691d19a2872bffab50c0024d488b8cb33504cc83) Chore: add missing `ecmaVersion` 2020/11 type value (#12833) (Piotr Błażejewicz (Peter Blazejewicz)) -* [`516ddb3`](https://github.com/eslint/eslint/commit/516ddb37d39502e5a8c88a017ae3bad05046f41d) Sponsors: Sync README with website (ESLint Jenkins) -* [`a9d92f9`](https://github.com/eslint/eslint/commit/a9d92f991d69902a9150db373590e2ed54dec988) Fix: radix rule crash on disabled globals (#12824) (Milos Djermanovic) -* [`03a69db`](https://github.com/eslint/eslint/commit/03a69dbe86d5b5768a310105416ae726822e3c1c) Update: check template literal in no-proto, no-iterator (fixes #12801) (#12806) (YeonJuan) -* [`562e784`](https://github.com/eslint/eslint/commit/562e7845946a490f2e173a0bcd1af631070a4eef) Update: fix no-magic-numbers false negative with ignoreArrayIndexes (#12805) (Milos Djermanovic) -* [`f5b9656`](https://github.com/eslint/eslint/commit/f5b96564f732962f46755adbb33c49fae9af6a92) Chore: add test for no-constant-condition (#12836) (Milos Djermanovic) -* [`533c114`](https://github.com/eslint/eslint/commit/533c1140dc98bebdc3ae8334ab2e6c27c7df0c21) Fix: multiline-comment-style rule add extra space after * (fixes #12785) (#12823) (Karthik Priyadarshan) -* [`0460748`](https://github.com/eslint/eslint/commit/0460748cda67ddc4a4cb0db3cdf187a742d09bf8) Update: check template literal in no-constant-condition (fixes #12815) (#12816) (YeonJuan) -* [`80309c3`](https://github.com/eslint/eslint/commit/80309c3791188ac5d1c4eebc99ede323a55336e6) Fix: no-constant-condition doesn't introspect arrays (fixes #12225) (#12307) (Sean Gray) -* [`10a79a6`](https://github.com/eslint/eslint/commit/10a79a672b42d51539bcd6ace482be7afa5f34f8) Chore: Adopt `eslint-plugin/require-meta-docs-description` internally (#12762) (Bryan Mishkin) -* [`aea1729`](https://github.com/eslint/eslint/commit/aea172998ec4e2af1d9186b6767c3f34428945f4) Docs: Fix anchor links in Node.js API TOC (#12821) (Matija Marohnić) -* [`1b8a3ce`](https://github.com/eslint/eslint/commit/1b8a3ce15237b9085f2761dcf73655207e6169a6) Sponsors: Sync README with website (ESLint Jenkins) -* [`c2217c0`](https://github.com/eslint/eslint/commit/c2217c04d6c82b160a21b00fca39c8acec543403) Breaking: make `radix` rule stricter (#12608) (fisker Cheung) -* [`e03a7b3`](https://github.com/eslint/eslint/commit/e03a7b311cb9ddf55914b1496683609bd564de2f) 7.0.0-alpha.0 (ESLint Jenkins) -* [`c8c1b2b`](https://github.com/eslint/eslint/commit/c8c1b2b2efadfcd3c04aaf15bd793c5b4dd84cb6) Build: changelog update for 7.0.0-alpha.0 (ESLint Jenkins) -* [`1aa021d`](https://github.com/eslint/eslint/commit/1aa021d77fdd2c68d7b7d2f4603252110c414b32) Breaking: lint `overrides` files (fixes #10828, refs eslint/rfcs#20) (#12677) (Toru Nagashima) -* [`e59d775`](https://github.com/eslint/eslint/commit/e59d77536bd8db57e8a75cd5245f6f320aa699f8) Update: Separate pattern/expression options for array-element-newline (#11796) (jacobparish) -* [`f8f115a`](https://github.com/eslint/eslint/commit/f8f115af6e10539e6cad485588187cb11917f8c9) Update: treat comment tokens in template-curly-spacing (fixes #12744) (#12775) (YeonJuan) -* [`b50179d`](https://github.com/eslint/eslint/commit/b50179def3fedbd95fdeab25e32c2511867eb760) Breaking: Check assignment targets in no-extra-parens (#12490) (Milos Djermanovic) -* [`de4fa7c`](https://github.com/eslint/eslint/commit/de4fa7c65c7befefa64d1605550267071ee56a5d) Fix: wrong indent at tagged template in indent (fixes #12122) (#12596) (YeonJuan) -* [`d86a5bb`](https://github.com/eslint/eslint/commit/d86a5bbb1987d858d4963f647b0af5c1fd924b4f) Breaking: Check flatMap in array-callback-return (fixes #12235) (#12765) (Milos Djermanovic) -* [`cf46df7`](https://github.com/eslint/eslint/commit/cf46df70158a4ed4c09d5c9d655c07dc6df3ff5e) Breaking: description in directive comments (refs eslint/rfcs#33) (#12699) (Toru Nagashima) -* [`7350589`](https://github.com/eslint/eslint/commit/7350589a5bdfc9d75d1ff19364f476eec44c3911) Breaking: some rules recognize bigint literals (fixes #11803) (#12701) (Toru Nagashima) -* [`16a1c1f`](https://github.com/eslint/eslint/commit/16a1c1f79bc0a4cc1c3a87e98d220041de88bb93) Fix: prefer-object-spread false positives with accessors (fixes #12086) (#12784) (Milos Djermanovic) -* [`f9774ec`](https://github.com/eslint/eslint/commit/f9774ec11b0ebe63fb16a97b97890efb84699548) New: Add default-case-last rule (fixes #12665) (#12668) (Milos Djermanovic) -* [`9a93d9e`](https://github.com/eslint/eslint/commit/9a93d9ef389c49a133c4df4f9843927f5f806423) Update: fix no-restricted-imports export * false negative (fixes #12737) (#12798) (Milos Djermanovic) -* [`0d8c0af`](https://github.com/eslint/eslint/commit/0d8c0affe1ae7ecf228cdf91b490921f7e9d1fdb) Fix: improve report location for computed-property-spacing (#12795) (Milos Djermanovic) -* [`756b95d`](https://github.com/eslint/eslint/commit/756b95d59fb97cd9b3f3adf98cebf529fe4842a2) Fix: id-blacklist should ignore ObjectPatterns (fixes #12787) (#12792) (JP Ramassini) -* [`561b6d4`](https://github.com/eslint/eslint/commit/561b6d4726f3e77dd40ba0d340ca7f08429cd2eb) Chore: add prerequisites checklist to PR template (#12790) (Kai Cataldo) -* [`01ff791`](https://github.com/eslint/eslint/commit/01ff7910af86fc45b76e883bc9ab00c9be3b50ac) Fix: Display pipe character correctly in test output (#12771) (Brad Zacher) -* [`68becbd`](https://github.com/eslint/eslint/commit/68becbd84e8a0693409d36f2be10679c483e233a) Update: fix no-restricted-imports importNames reporting (fixes #12282) (#12711) (Andrey Alexandrov) -* [`ae959b6`](https://github.com/eslint/eslint/commit/ae959b691fb148ac8b474c924c8cb01ef61c436d) Update: report double extra parens in no-extra-parens (fixes #12127) (#12697) (YeonJuan) -* [`02fcc05`](https://github.com/eslint/eslint/commit/02fcc055710e8d69d986f1e682cae2014ad881e2) Docs: Improve sort-keys (#12791) (Steven Vachon) -* [`35cd958`](https://github.com/eslint/eslint/commit/35cd95893be0afd8c954cbcf9268c2aa045b7d5b) Sponsors: Sync README with website (ESLint Jenkins) -* [`a1d999c`](https://github.com/eslint/eslint/commit/a1d999c6b4e51c317ad409110be7be214ff9f7c6) New: Add no-useless-backreference rule (fixes #12673) (#12690) (Milos Djermanovic) -* [`b2c6209`](https://github.com/eslint/eslint/commit/b2c62096a8b318765d618cab222240f87d73063b) Update: fix no-extra-parens CallExpression#callee false negatives (#12743) (Milos Djermanovic) -* [`14b42c3`](https://github.com/eslint/eslint/commit/14b42c386be3387c415267b789f277e1294d4567) Update: fix counting jsx comment len in max-len (fixes #12213) (#12661) (YeonJuan) -* [`e632c31`](https://github.com/eslint/eslint/commit/e632c31d7e5363f1347b787702ecd4a85f5c11a2) Upgrade: several dependencies (#12753) (Toru Nagashima) -* [`25eb703`](https://github.com/eslint/eslint/commit/25eb703c8758563988ffb497a53f89a3ed345399) Docs: fix dead link in max-lines rule docs (#12766) (Christian Bundy) -* [`9dfc850`](https://github.com/eslint/eslint/commit/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d) Chore: Refactor to use messageId in a number of rules (#12715) (Brad Zacher) -* [`1118fce`](https://github.com/eslint/eslint/commit/1118fceb49af3436b8dcd0c6089f913cedf9a329) Breaking: runtime-deprecation on '~/.eslintrc' (refs eslint/rfcs#32) (#12678) (Toru Nagashima) -* [`2c28fbb`](https://github.com/eslint/eslint/commit/2c28fbbb563a44282bef0c9fcc9be29d611cc83b) Breaking: drop Node.js 8 support (refs eslint/rfcs#44) (#12700) (Toru Nagashima) -* [`098b67d`](https://github.com/eslint/eslint/commit/098b67d04a4b4dc8ef4faa6434c6ef5abbde3ed3) Docs: fix minor typo in brace-style.md (#12749) (Marko Kaznovac) -* [`313f70a`](https://github.com/eslint/eslint/commit/313f70ac9a3cf5d1558d2427b00dd75666e18cf4) Update: add outerIIFEBody: "off" to indent rule (fixes #11377) (#12706) (Kai Cataldo) -* [`b77b858`](https://github.com/eslint/eslint/commit/b77b8585e33fc4bb438a0e11ca8177c7eb91dbd8) Chore: fix separateRequires tests for one-var rule (#12709) (Milos Djermanovic) -* [`e4df7df`](https://github.com/eslint/eslint/commit/e4df7dfb0199badb61d2c03ff4f7e4be735279d9) Chore: add JSDoc types for RuleTester test cases (#12325) (Chiawen Chen) -* [`b23ad0d`](https://github.com/eslint/eslint/commit/b23ad0d789a909baf8d7c41a35bc53df932eaf30) Docs: change a broken link in working-with-rules.md (#12732) (Damien Cassou) -* [`3fa39a6`](https://github.com/eslint/eslint/commit/3fa39a633b37544fec7cedfc1f2b0e62e9312a72) Update: Handle locally unsupported regex in computed property keys (#12056) (Milos Djermanovic) -* [`4744397`](https://github.com/eslint/eslint/commit/474439720258b1a64b305c31588f803104fa4aaf) Chore: remove unused code in max-lines-per-function (#12659) (YeonJuan) -* [`4e16957`](https://github.com/eslint/eslint/commit/4e169576a526023ee297d5bc8b37eedba229f63d) Build: update browser build (#12693) (Toru Nagashima) -* [`00ddfff`](https://github.com/eslint/eslint/commit/00ddfffe6b4b4244e4680b0f92f2c6697fad136f) Fix: Windows path parsing for JUnit (fixes #12507) (#12509) (Michael Wall) -* [`985dac3`](https://github.com/eslint/eslint/commit/985dac35e3c367f0f99d1f0e766e06a1d9818dd4) New: Add no-restricted-exports rule (fixes #10428) (#12546) (Milos Djermanovic) -* [`1aff21b`](https://github.com/eslint/eslint/commit/1aff21bb54da44cef0b6e378a34a74265863b930) Fix: no-mixed-spaces-and-tabs reports multiline strings (#12566) (Milos Djermanovic) -* [`8f1020f`](https://github.com/eslint/eslint/commit/8f1020ff711b0c57d590bf666e2841f64186d083) Update: no-void add an option to allow void as a statement (#12613) (Brad Zacher) -* [`bb6cf50`](https://github.com/eslint/eslint/commit/bb6cf5082623ffb67bb1495fee52c0610ee5f421) Update: Add offsetTernaryExpressions option for indent rule (#12556) (Adam Stankiewicz) -* [`39f5a45`](https://github.com/eslint/eslint/commit/39f5a453579b2ad732212edeb71f84ecb0991f97) Chore: add test cases for for-direction (#12698) (YeonJuan) -* [`b340304`](https://github.com/eslint/eslint/commit/b3403045e535921df6d34785a4ce053e14ba27fd) Chore: Add extra test, improve docs (#12492) (Kevin Partington) -* [`827259e`](https://github.com/eslint/eslint/commit/827259ea009f98a0fdf3f7ebf1bfb6cd661ce28d) Build: package.json update for eslint-config-eslint release (ESLint Jenkins) - -v7.0.0-rc.0 - April 24, 2020 - -* [`0b1d65a`](https://github.com/eslint/eslint/commit/0b1d65a45aa5dfe08cd596c420490e81b546317e) Update: Improve report location for array-callback-return (refs #12334) (#13109) (Milos Djermanovic) -* [`d85e291`](https://github.com/eslint/eslint/commit/d85e291d1b56960373031f2562547df7285444f7) Fix: yoda left string fix for exceptRange (fixes #12883) (#13052) (Anix) -* [`2ce6bed`](https://github.com/eslint/eslint/commit/2ce6bed04cad376003f70447ece4b6578c142bfd) Chore: added tests for nested arrays (#13145) (Anix) -* [`d3aac53`](https://github.com/eslint/eslint/commit/d3aac532f6a24c633f85dedf0e552eabd22d0956) Update: report backtick loc in no-unexpected-multiline (refs #12334) (#13142) (Milos Djermanovic) -* [`8e7a2d9`](https://github.com/eslint/eslint/commit/8e7a2d93595cfe0c1597af0e7873853369251c0b) Fix: func-call-spacing "never" reports wrong message (fixes #13190) (#13193) (Milos Djermanovic) -* [`bcafd0f`](https://github.com/eslint/eslint/commit/bcafd0f8508e19ab8087a35fac7b97fc4295df3e) Update: Add ESLint API (refs eslint/rfcs#40) (#12939) (Kai Cataldo) -* [`3eeae56`](https://github.com/eslint/eslint/commit/3eeae565bfb0834a31e5d3a253a17bbf4027cf88) Upgrade: some (dev) deps (#13155) (薛定谔的猫) -* [`6b7030b`](https://github.com/eslint/eslint/commit/6b7030b1a1e1e3d1a3953cfa9722074d6a6fc1a9) Chore: Run tests on Node.js v14 (#13210) (fisker Cheung) -* [`ebc28d7`](https://github.com/eslint/eslint/commit/ebc28d76658f1f3e4e8d56e70a25752b5d4a6686) Fix: Remove default .js from --ext CLI option (#13176) (Brandon Mills) -* [`5c1bdeb`](https://github.com/eslint/eslint/commit/5c1bdebcf728062fd41583886830c89b65485df9) Update: Improve report location for getter-return (refs #12334) (#13164) (Milos Djermanovic) -* [`56d2bee`](https://github.com/eslint/eslint/commit/56d2beea0ea0b6395a6d4a3e116ea6a964ff92f3) Docs: fix typos (#13204) (Nitin Kumar) -* [`e13256e`](https://github.com/eslint/eslint/commit/e13256e395cc413ce45a66c8562621d48440d8f4) Chore: use espree.latestEcmaVersion in config-initializer (#13157) (Kai Cataldo) -* [`e4f57b7`](https://github.com/eslint/eslint/commit/e4f57b7d7b8b7441a2217a217dcda1e7bfff516a) Chore: add nested array tests for array-element-newline (#13161) (Anix) -* [`63ac918`](https://github.com/eslint/eslint/commit/63ac91877668205aaa50495a9615806967e6e4cf) Sponsors: Sync README with website (ESLint Jenkins) -* [`516f253`](https://github.com/eslint/eslint/commit/516f253729daeeb9da5de5e9b38606ff9c1aae71) Docs: Adds import example for object-curly-newline rule (refs #12018) (#13177) (Luke Lewis) -* [`5a0e84e`](https://github.com/eslint/eslint/commit/5a0e84e9498a946a3e8491a370e012354e087fe0) Sponsors: Sync README with website (ESLint Jenkins) -* [`b398e0b`](https://github.com/eslint/eslint/commit/b398e0b9ff455e4e7d70f19d5ccea5819c21eb86) Docs: add rule comment in prefer-rest-params doc (#13191) (YeonJuan) -* [`ffaa4ba`](https://github.com/eslint/eslint/commit/ffaa4ba5e2bb1a51a78a2b2c028cbe2efc9e5165) Sponsors: Sync README with website (ESLint Jenkins) -* [`932869b`](https://github.com/eslint/eslint/commit/932869b3251b04c4ad5fa72279cb2a56a3e67b55) Sponsors: Sync README with website (ESLint Jenkins) -* [`54630f0`](https://github.com/eslint/eslint/commit/54630f0063fa66318476473757b5912465d4caf2) Sponsors: Sync README with website (ESLint Jenkins) -* [`c9a5035`](https://github.com/eslint/eslint/commit/c9a503571a4662f6c2d31cabc7fd7819ec388150) Fix: newBasePath should be an absolute path (fixes #12850) (#13078) (Nick Harris) -* [`e7c1d4b`](https://github.com/eslint/eslint/commit/e7c1d4b2ac56149a517d4b0000230348a641f1d3) Update: deprecate Node.js & CommonJS rules (#12898) (Kai Cataldo) -* [`95e1c70`](https://github.com/eslint/eslint/commit/95e1c70cebde210a990ee786ec7ab1c8e522edb8) Upgrade: levn@0.4.1 (fixes #9366) (#13140) (Kai Cataldo) -* [`c41de38`](https://github.com/eslint/eslint/commit/c41de382a330d4789488fd2dcf6db5a3163bb5d2) Docs: fix curly multi-or-nest examples with comments (refs #12972) (#13151) (Milos Djermanovic) -* [`57221d5`](https://github.com/eslint/eslint/commit/57221d58c60e757062242f30ed574e0502fc7c31) Docs: fix eslint comment in no-inner-declarations examples (#13152) (Milos Djermanovic) -* [`301b450`](https://github.com/eslint/eslint/commit/301b450ecd1985ae84d1915124f4638ab2a2e6de) Fix: no-extra-parens export default sequence expression false positive (#13096) (Milos Djermanovic) -* [`af4472f`](https://github.com/eslint/eslint/commit/af4472fed794b86e63730702e4b27294a4118d09) Update: Improve report location for new-cap (refs #12334) (#13136) (Milos Djermanovic) -* [`bfa811c`](https://github.com/eslint/eslint/commit/bfa811ceee801fe8ba212a5c879e13743146e909) Fix: init error in extending recommended config (fixes #12707) (#12738) (YeonJuan) -* [`5dfd4eb`](https://github.com/eslint/eslint/commit/5dfd4eb50d84077a57950f119e5de8976070e49a) Docs: examples with arrow functions in no-return-assign (fixes #13135) (#13138) (Anix) -* [`adc8fa8`](https://github.com/eslint/eslint/commit/adc8fa88c9f223b984a3519ed159a055bf933b18) Docs: clarify exceptions in spaced-comment (fixes #13032) (#13126) (Anix) -* [`a784dac`](https://github.com/eslint/eslint/commit/a784dac8bc26f31edbca869b16d6ad91bd4e5cc4) Update: Improve report location newline-per-chained-call (refs #12334) (#13116) (Milos Djermanovic) -* [`5e07574`](https://github.com/eslint/eslint/commit/5e07574a91861fdcab6888b4c6829868030c3a39) Update: Improve report location for space-before-function-paren (#13128) (Chiawen Chen) -* [`d0d32a8`](https://github.com/eslint/eslint/commit/d0d32a8c2a6c60c7e6e2d32a054e5987efd4c263) Sponsors: Sync README with website (ESLint Jenkins) -* [`17e2fe4`](https://github.com/eslint/eslint/commit/17e2fe425168e675fe7607182615e50527eedf53) Update: Improve error message for fatal fixer errors (#13120) (Brad Zacher) -* [`7551f0c`](https://github.com/eslint/eslint/commit/7551f0c6fd12f0295cc7d6377bf1899c092e79d8) Fix: no check for shadowed Object (fixes #12809) (#13115) (Anix) -* [`988d842`](https://github.com/eslint/eslint/commit/988d8428811934943ce13b2d8b833d795ac2bb4a) Fix: add end location to report in no-useless-concat (refs #12334) (#13110) (Milos Djermanovic) -* [`0518ebb`](https://github.com/eslint/eslint/commit/0518ebb840b5bf2d646dbd8a9b3e246e7069eb79) Sponsors: Sync README with website (ESLint Jenkins) -* [`252fd41`](https://github.com/eslint/eslint/commit/252fd4133805f003151e0220b5d89bbb70cfacb1) Sponsors: Sync README with website (ESLint Jenkins) -* [`438dcbb`](https://github.com/eslint/eslint/commit/438dcbb981214d67e8848006ce45afc0fbfa1705) Update: Improve report location for comma-style (refs #12334) (#13111) (Chiawen Chen) -* [`85b7254`](https://github.com/eslint/eslint/commit/85b72548c0c893499c787b82f404348e1b50354d) Update: no-inner-declarations false negative in non-block (fixes #12222) (#13062) (Anix) -* [`6631ef1`](https://github.com/eslint/eslint/commit/6631ef1678bbdd48680fb3025c3692abd0aeec4a) Update: Improve report location for no-empty-function (refs #12334) (#13121) (Milos Djermanovic) -* [`b228f95`](https://github.com/eslint/eslint/commit/b228f958afaf507d6f6f99c90b2075b395733839) Docs: Update README team and sponsors (ESLint Jenkins) - -v7.0.0-alpha.3 - March 27, 2020 - -* [`78c8cda`](https://github.com/eslint/eslint/commit/78c8cda5a5d82f5f8548c4528a6438d29756bb71) Breaking: RuleTester Improvements (refs eslint/rfcs#25) (#12955) (Milos Djermanovic) -* [`e0f1b6c`](https://github.com/eslint/eslint/commit/e0f1b6c3d62f725b99b8c07654603b559ba43ba9) Update: stricter array index check in no-magic-numbers (fixes #12845) (#12851) (Milos Djermanovic) -* [`362713c`](https://github.com/eslint/eslint/commit/362713c04aa89092b2b98a77fa94a75b3c933fc6) Update: Improve report location for template-curly-spacing (#12813) (Milos Djermanovic) -* [`29f32db`](https://github.com/eslint/eslint/commit/29f32db68c921a857e17ae627923d87b9c8708de) Fix: Change error message logic for implicit file ignore (fixes #12873) (#12878) (Scott Hardin) -* [`eb1a43c`](https://github.com/eslint/eslint/commit/eb1a43ce3113c906800192c3ef766d2ff188776f) Fix: require-await ignore async generators (fixes #12459) (#13048) (Anix) -* [`920465b`](https://github.com/eslint/eslint/commit/920465b5d8d291df8bce7eef8a066b1dd43d8cae) Fix: getNameLocationInGlobalDirectiveComment end location (refs #12334) (#13086) (Milos Djermanovic) -* [`ae14a02`](https://github.com/eslint/eslint/commit/ae14a021bbea5117fe366ae4ed235e8f08dc65a8) Fix: add end location to report in no-extra-bind (refs #12334) (#13083) (Milos Djermanovic) -* [`105384c`](https://github.com/eslint/eslint/commit/105384ccc11dcd7303104fb5a347eda1d4d48357) Update: report operator location in operator-linebreak (refs #12334) (#13102) (Milos Djermanovic) -* [`081e240`](https://github.com/eslint/eslint/commit/081e24022a40d9a026ddd2a85c68cb8c3f18dc53) Update: support globalThis in no-implied-eval (fixes #12670) (#13105) (YeonJuan) -* [`185982d`](https://github.com/eslint/eslint/commit/185982d5615d325ae8b45c2360d5847df4098bda) Breaking: improve plugin resolving (refs eslint/rfcs#47) (#12922) (Toru Nagashima) -* [`0c20bc0`](https://github.com/eslint/eslint/commit/0c20bc068e608869981a10711bba88ffde1539d8) Fix: check assignment property target in camelcase (fixes #13025) (#13027) (YeonJuan) -* [`8d50a7d`](https://github.com/eslint/eslint/commit/8d50a7d82244d4912f3eab62a66c81c76c44a9da) Fix: add end location to report in no-prototype-builtins (refs #12334) (#13087) (Milos Djermanovic) -* [`3e4e7f8`](https://github.com/eslint/eslint/commit/3e4e7f8d429dc70b78c0aefaa37f9c22a1e5fc0f) Fix: incorrect logic for required parens in no-extra-boolean-cast fixer (#13061) (Milos Djermanovic) -* [`6c069f9`](https://github.com/eslint/eslint/commit/6c069f907a04268b671c7f949c04a508df9d42a3) Docs: Add comments to code block in example (#13089) (Kibeom Kwon) -* [`ee1f053`](https://github.com/eslint/eslint/commit/ee1f0531aa534ef9182cf8586f55ad82aaa55e75) Docs: Fix typo (#13092) (Max Coplan) -* [`76324ac`](https://github.com/eslint/eslint/commit/76324ace67893c3d7e38a369114d6128df9ffb65) Docs: Add further reading to rule (#13084) (Max Coplan) -* [`a1370ab`](https://github.com/eslint/eslint/commit/a1370abed72e1fb93e601816d981fa6e46204afb) Update: Report constructor calls in no-obj-calls (#12909) (Milos Djermanovic) -* [`2111c52`](https://github.com/eslint/eslint/commit/2111c52443e7641caad291e0daaea8e2fe6c4562) Upgrade: esquery@1.2.0 (#13076) (Milos Djermanovic) -* [`3f7c9bf`](https://github.com/eslint/eslint/commit/3f7c9bf19615122fb776cdd13da532d860bd945a) Docs: clarify variables option in no-use-before-define (fixes #12986) (#13017) (Anix) -* [`aef9488`](https://github.com/eslint/eslint/commit/aef9488c07d3da4becff6e8d6918824b53086d86) Fix: allow references to external globals in id-blacklist (fixes #12567) (#12987) (Milos Djermanovic) -* [`4955c50`](https://github.com/eslint/eslint/commit/4955c50dc9e89b4077b28e35f065d45e89bdccd7) Fix: remove type arguments in prefer-object-spread (fixes #13058) (#13063) (Milos Djermanovic) -* [`48b122f`](https://github.com/eslint/eslint/commit/48b122f450b14dd27afef4c8115c69fca4f02be1) Breaking: change relative paths with --config (refs eslint/rfcs#37) (#12887) (Toru Nagashima) -* [`085979f`](https://github.com/eslint/eslint/commit/085979fed9a5e24a87e4d92ee79272b59211d03f) Update: consider env in no-implied-eval (fixes #12733) (#12757) (YeonJuan) -* [`9ac5b9e`](https://github.com/eslint/eslint/commit/9ac5b9edf06d16a9216c2c9b02bb20b6aa8ed0ab) Docs: Clarify node_modules is ignored by default (fixes #13006) (#13054) (Mika Kuijpers) -* [`0de91f3`](https://github.com/eslint/eslint/commit/0de91f39a97cdf530cb64edbadde57a2bb41ca86) Docs: removed correct code from incorrect eg (#13060) (Anix) -* [`dbe357d`](https://github.com/eslint/eslint/commit/dbe357de199620675446464f6fd0e35064c4d247) Fix: check template literal in prefer-numeric-literals (fixes #13045) (#13046) (YeonJuan) -* [`2260611`](https://github.com/eslint/eslint/commit/2260611e616bdc2a0bf16d508b60a50772ce7fbb) Fix: added async in allow method in no-empty-function (fixes #12768) (#13036) (Anix) -* [`f3788af`](https://github.com/eslint/eslint/commit/f3788aff615edfbfb7afc4c491bb07d20737531b) Sponsors: Sync README with website (ESLint Jenkins) -* [`e90b29b`](https://github.com/eslint/eslint/commit/e90b29bb1f41d4e5767e33d03db5984f036586ed) Update: Allow testing Suggestions with data in RuleTester (fixes #12606) (#12635) (Milos Djermanovic) -* [`7224eee`](https://github.com/eslint/eslint/commit/7224eee3ff4b4378d3439deb038bf34b116fa48b) Fix: no-plusplus allow comma operands in for afterthought (fixes #13005) (#13024) (Milos Djermanovic) -* [`7598cf8`](https://github.com/eslint/eslint/commit/7598cf816bd854de1dd7d96cf00dec6ecc4564ac) Fix: Newline before eof when creating config via --init (#12952) (Andreas Lind) -* [`183e300`](https://github.com/eslint/eslint/commit/183e3006841c29efdd245c45a72e6cefac86ae35) Update: support globalThis (refs #12670) (#12774) (YeonJuan) -* [`af7af9d`](https://github.com/eslint/eslint/commit/af7af9d32ea8073d2d0d726cc8551351261a170f) Docs: Update governance (#13055) (Nicholas C. Zakas) -* [`31d5eb3`](https://github.com/eslint/eslint/commit/31d5eb3e60b6c2ee26976721f07cc89d60867659) Sponsors: Sync README with website (ESLint Jenkins) -* [`95613d4`](https://github.com/eslint/eslint/commit/95613d46b7900b3d9757a7f6959d5dfb262f29fc) Upgrade: espree@6.2.1 (#13026) (Kai Cataldo) -* [`f1525dc`](https://github.com/eslint/eslint/commit/f1525dc45dfdbbe31e724671270785b41cffc6bd) Sponsors: Sync README with website (ESLint Jenkins) -* [`0243549`](https://github.com/eslint/eslint/commit/0243549db4d237cb78e720d55a9cae89b91f6830) Fix: camelcase false positive with computed property (fixes #13022) (#13023) (Milos Djermanovic) -* [`bc0c02c`](https://github.com/eslint/eslint/commit/bc0c02cd0368559c7a7b1510eb4620022a4cc31c) Chore: added lock files to gitignore (#13015) (Anix) -* [`79ac6cd`](https://github.com/eslint/eslint/commit/79ac6cd2d8e4c32e03dfea10a957806845058573) Docs: added less confusing explanation for func-style (fixes #12900) (#13004) (Anix) -* [`26267ed`](https://github.com/eslint/eslint/commit/26267ed70270ef746b785c09e267f815bf7c596a) Chore: update GitHub Actions (#12984) (Pig Fang) -* [`1299705`](https://github.com/eslint/eslint/commit/12997058626b5167ba4b9d2ae0d0ea965a01c4be) Update: acorn version (#13016) (Idan Avrahami) -* [`6cef0d5`](https://github.com/eslint/eslint/commit/6cef0d50a0d131bc8897799a54e1af1d38606db4) Fix: Check division operator in astUtils.canTokensBeAdjacent (#12879) (Milos Djermanovic) -* [`fd8e1f5`](https://github.com/eslint/eslint/commit/fd8e1f52110cada542a120750236fd1ec8779336) Sponsors: Sync README with website (ESLint Jenkins) -* [`472025f`](https://github.com/eslint/eslint/commit/472025f2814d0360fe8d4cddbcba049982e1cd43) Chore: update space-before-function-paren in eslint-config-eslint (#12966) (Kai Cataldo) -* [`fd8c42a`](https://github.com/eslint/eslint/commit/fd8c42ada52f0ae2488ad96ee8fee675f63134ce) Sponsors: Sync README with website (ESLint Jenkins) - -v7.0.0-alpha.2 - February 28, 2020 - -* [`a5b41a7`](https://github.com/eslint/eslint/commit/a5b41a75b57572e97476b06ad39b768e15b9d844) Update: no-restricted-modules handle TemplateLiteral (fixes #12926) (#12927) (Michal Piechowiak) -* [`051567a`](https://github.com/eslint/eslint/commit/051567adca7ca56d691bcda76f54ed72e3eae367) Update: check identifier in array pattern in id-length (fixes #12832) (#12839) (YeonJuan) -* [`4af06fc`](https://github.com/eslint/eslint/commit/4af06fc49029dac5c9acfd53f01fd9527bfbb4aa) Breaking: Test with an unknown error property should fail in RuleTester (#12096) (Milos Djermanovic) -* [`9038a29`](https://github.com/eslint/eslint/commit/9038a29569548c0563c29dbe9f7dae280ff3addd) Update: func-names `as-needed` false negative with AssignmentPattern (#12932) (Milos Djermanovic) -* [`afde78b`](https://github.com/eslint/eslint/commit/afde78b125747ce5ad9e5f871122a0d370dd0152) Fix: curly removes necessary braces between if and else (fixes #12928) (#12943) (Milos Djermanovic) -* [`4797fb2`](https://github.com/eslint/eslint/commit/4797fb2c29db97bc5cd23b40e5a9235fef1ea06a) Fix: arrow-body-style crash with object literal body (fixes #12884) (#12886) (Milos Djermanovic) -* [`afa9aac`](https://github.com/eslint/eslint/commit/afa9aac6de9444e935a55b46311e5b5a58f86063) Breaking: class default `true` computed-property-spacing (fixes #12812) (#12915) (Milos Djermanovic) -* [`b8e20d3`](https://github.com/eslint/eslint/commit/b8e20d33b7d6645266beef09cd231afaf5054328) Docs: Mention TypeScript's compiler check (#12903) (Benny Neugebauer) -* [`de14d1c`](https://github.com/eslint/eslint/commit/de14d1ce0cf422b4100a686abb906f53fbf905b3) Fix: wrap-iife autofix removes mandatory parentheses (#12905) (Milos Djermanovic) -* [`5775b06`](https://github.com/eslint/eslint/commit/5775b06a74573cbe068bea56b1d2376421f5e831) Fix: Optionally allow underscores in member names (#11972) (Edgardo Avilés) -* [`e997f32`](https://github.com/eslint/eslint/commit/e997f32b936463ac38e8b0034f764c47502e56a8) Docs: Updated arrow-parens for minor grammar issue (#12962) (Tom) -* [`7d52151`](https://github.com/eslint/eslint/commit/7d52151bcd5d5524f240588436a8808162be187f) Breaking: classes default `true` in accessor-pairs (fixes #12811) (#12919) (Milos Djermanovic) -* [`cf14355`](https://github.com/eslint/eslint/commit/cf14355e34a6757e15806f8e493553bd7110fb36) Docs: Fix links to custom parsers doc (#12965) (Brandon Mills) -* [`0dfc3ff`](https://github.com/eslint/eslint/commit/0dfc3ff9fb228e1d9b1df99de50033ce9140ac24) Fix: add end location to report in no-eval (#12960) (Milos Djermanovic) -* [`f479f6f`](https://github.com/eslint/eslint/commit/f479f6fe2eb95156e22bebfccb39a7fc1f19e9c0) Docs: References correct config file name (#12885) (Patrick Kilgore) -* [`78182e4`](https://github.com/eslint/eslint/commit/78182e45e0178d9eac2591944ef4daee21d2cb44) Breaking: Add new rules to eslint:recommended (fixes #12911) (#12920) (Milos Djermanovic) -* [`8d5c434`](https://github.com/eslint/eslint/commit/8d5c434f721142be74c7515aaa935668a15b79b1) Docs: fix category descriptions for site generation (fixes #12894) (#12930) (Kai Cataldo) -* [`05380e6`](https://github.com/eslint/eslint/commit/05380e6e7e19a79d26ea6d6b44a8d5ee7cde51c8) Docs: Remove claim about semicolons from docs (#12944) (Luke Sikina) -* [`aa9d725`](https://github.com/eslint/eslint/commit/aa9d72525054e641231a2960a2e37b3716228056) Sponsors: Sync README with website (ESLint Jenkins) -* [`7747177`](https://github.com/eslint/eslint/commit/7747177f8504961059b7c56bdb70a820bd1114c1) Update: report rename id destructuring in id-blacklist (fixes #12807) (#12923) (YeonJuan) -* [`6423e11`](https://github.com/eslint/eslint/commit/6423e11c0bedd3b4e661ab554316bdeb1fc1ee3c) Breaking: check unnamed default export in func-names (fixes #12194) (#12195) (Chiawen Chen) -* [`77df505`](https://github.com/eslint/eslint/commit/77df505d9a08496a8eaefeca4f885f54a21d5c5e) Update: check renaming identifier in object destructuring (fixes 12827) (#12881) (YeonJuan) -* [`41de9df`](https://github.com/eslint/eslint/commit/41de9df41a30a4300243bfe4ca26f716a787b2fc) Update: enforceForLogicalOperands no-extra-boolean-cast (fixes #12137) (#12734) (jmoore914) - -v7.0.0-alpha.1 - February 14, 2020 - -* [`f702b1a`](https://github.com/eslint/eslint/commit/f702b1a54820d2b4e4993dcded99f551a98b490f) Add missing plugin reference (#12796) (Eduard Bardají Puig) -* [`1f1424c`](https://github.com/eslint/eslint/commit/1f1424cb200e609d58645f6c54739e11469e6265) Fix: fix inconsistently works option in no-extra-parens (fixes #12717) (#12843) (YeonJuan) -* [`b5adcaa`](https://github.com/eslint/eslint/commit/b5adcaab93f388f1d8e9d35d6f5e8c2994240850) Fix: make YieldExpression throwable (fixes #12880) (#12897) (YeonJuan) -* [`4293229`](https://github.com/eslint/eslint/commit/4293229709dde105692347241513766e953664dd) Breaking: use-isnan enforceForSwitchCase default `true` (fixes #12810) (#12913) (Milos Djermanovic) -* [`cf38d0d`](https://github.com/eslint/eslint/commit/cf38d0d939b62f3670cdd59f0143fd896fccd771) Breaking: change default ignore pattern (refs eslint/rfcs#51) (#12888) (Toru Nagashima) -* [`bfe1dc4`](https://github.com/eslint/eslint/commit/bfe1dc4e614640cb69032afbb5851c1493f537e3) Breaking: no-dupe-class-members checks some computed keys (fixes #12808) (#12837) (Milos Djermanovic) -* [`1ee6b63`](https://github.com/eslint/eslint/commit/1ee6b6388305a8671c8d4c3cf30c2dbf18a1ff7e) Update: check template literal in yoda (fixes #12863) (#12876) (YeonJuan) -* [`0ae7041`](https://github.com/eslint/eslint/commit/0ae70417af70ad565450d9e779ae78c05f6a51e2) Sponsors: Sync README with website (ESLint Jenkins) -* [`1907e57`](https://github.com/eslint/eslint/commit/1907e57362f7d5f7a02a5a78f24ac3347f868e93) Chore: add Twitter and Open Collective badge (#12877) (Kai Cataldo) -* [`95e0586`](https://github.com/eslint/eslint/commit/95e0586c95e6953d11983d1d11891ed30318109a) Fix: id-blacklist false positives on renamed imports (#12831) (Milos Djermanovic) -* [`b7f0d20`](https://github.com/eslint/eslint/commit/b7f0d200c125b3d233ccafaabdaa61c66dc60e3c) Chore: Use consistent badge style (#12825) (fisker Cheung) -* [`3734a66`](https://github.com/eslint/eslint/commit/3734a669983de7d5107ba8f39b291c6e3116489f) Chore: use ids for messages (#12859) (Gareth Jones) -* [`824d235`](https://github.com/eslint/eslint/commit/824d23585c205f2993716585cb6f55dfbe4a33f0) Docs: add errorOnUnmatchedPattern option to CLIEngine (#12834) (Arthur Denner) -* [`439c833`](https://github.com/eslint/eslint/commit/439c83342c364ba3ce5168d54e165b1fe3e35630) Update: array-callback-return checks Array.forEach (fixes #12551) (#12646) (Gabriel R Sezefredo) -* [`33efd71`](https://github.com/eslint/eslint/commit/33efd71d7c3496b4b9cbfe006280527064940826) Docs: Fix spelling mistakes (#12861) (Bryan Mishkin) -* [`a5b3c5f`](https://github.com/eslint/eslint/commit/a5b3c5fa4edc2312534af0d9f0911f68144f8baf) Docs: Update README team and sponsors (ESLint Jenkins) -* [`0cae920`](https://github.com/eslint/eslint/commit/0cae9203a8077184ad6beb00028fd376cc806f34) Chore: rename shadowed global (#12862) (Tony Brix) -* [`055b80d`](https://github.com/eslint/eslint/commit/055b80dc89bba2a5ab22f7a27deb40135b5cacfa) Chore: Fix typo in complexity.js (#12864) (Kyle Shevlin) -* [`d6c313d`](https://github.com/eslint/eslint/commit/d6c313de794ea0671d35b5027288cd2ea456c0b5) Docs: add missing eslint comments in prefer-regex-literals examples (#12858) (Milos Djermanovic) -* [`7d551ab`](https://github.com/eslint/eslint/commit/7d551ab8cbf2d3a802b0d0685379aa075fe9d7c0) Sponsors: Sync README with website (ESLint Jenkins) -* [`540de8e`](https://github.com/eslint/eslint/commit/540de8e34d08f4b17b66b06d13927acb7552357a) Sponsors: Sync README with website (ESLint Jenkins) -* [`ac5d515`](https://github.com/eslint/eslint/commit/ac5d515252c226f030fa646bf7635a12a3b856fe) Sponsors: Sync README with website (ESLint Jenkins) -* [`dadc892`](https://github.com/eslint/eslint/commit/dadc8927820576c60b48bcbc7d5a9056a6279d30) Fix: operator-assignment crash on adjacent division assignment (#12844) (Milos Djermanovic) -* [`9f39ef0`](https://github.com/eslint/eslint/commit/9f39ef0d4b398c7c09ceef89128da448680d587c) Chore: typo in PULL_REQUEST_TEMPLATE.md (#12848) (Balázs Orbán) -* [`a60d5cd`](https://github.com/eslint/eslint/commit/a60d5cd2325ca72fa1b272b0b90ccd7904b92062) Chore: typo in no-irregular-whitespace.js (#12847) (Balázs Orbán) -* [`691d19a`](https://github.com/eslint/eslint/commit/691d19a2872bffab50c0024d488b8cb33504cc83) Chore: add missing `ecmaVersion` 2020/11 type value (#12833) (Piotr Błażejewicz (Peter Blazejewicz)) -* [`516ddb3`](https://github.com/eslint/eslint/commit/516ddb37d39502e5a8c88a017ae3bad05046f41d) Sponsors: Sync README with website (ESLint Jenkins) -* [`a9d92f9`](https://github.com/eslint/eslint/commit/a9d92f991d69902a9150db373590e2ed54dec988) Fix: radix rule crash on disabled globals (#12824) (Milos Djermanovic) -* [`03a69db`](https://github.com/eslint/eslint/commit/03a69dbe86d5b5768a310105416ae726822e3c1c) Update: check template literal in no-proto, no-iterator (fixes #12801) (#12806) (YeonJuan) -* [`562e784`](https://github.com/eslint/eslint/commit/562e7845946a490f2e173a0bcd1af631070a4eef) Update: fix no-magic-numbers false negative with ignoreArrayIndexes (#12805) (Milos Djermanovic) -* [`f5b9656`](https://github.com/eslint/eslint/commit/f5b96564f732962f46755adbb33c49fae9af6a92) Chore: add test for no-constant-condition (#12836) (Milos Djermanovic) -* [`533c114`](https://github.com/eslint/eslint/commit/533c1140dc98bebdc3ae8334ab2e6c27c7df0c21) Fix: multiline-comment-style rule add extra space after * (fixes #12785) (#12823) (Karthik Priyadarshan) -* [`0460748`](https://github.com/eslint/eslint/commit/0460748cda67ddc4a4cb0db3cdf187a742d09bf8) Update: check template literal in no-constant-condition (fixes #12815) (#12816) (YeonJuan) -* [`80309c3`](https://github.com/eslint/eslint/commit/80309c3791188ac5d1c4eebc99ede323a55336e6) Fix: no-constant-condition doesn't introspect arrays (fixes #12225) (#12307) (Sean Gray) -* [`10a79a6`](https://github.com/eslint/eslint/commit/10a79a672b42d51539bcd6ace482be7afa5f34f8) Chore: Adopt `eslint-plugin/require-meta-docs-description` internally (#12762) (Bryan Mishkin) -* [`aea1729`](https://github.com/eslint/eslint/commit/aea172998ec4e2af1d9186b6767c3f34428945f4) Docs: Fix anchor links in Node.js API TOC (#12821) (Matija Marohnić) -* [`1b8a3ce`](https://github.com/eslint/eslint/commit/1b8a3ce15237b9085f2761dcf73655207e6169a6) Sponsors: Sync README with website (ESLint Jenkins) -* [`c2217c0`](https://github.com/eslint/eslint/commit/c2217c04d6c82b160a21b00fca39c8acec543403) Breaking: make `radix` rule stricter (#12608) (fisker Cheung) - -v7.0.0-alpha.0 - January 17, 2020 - -* [`1aa021d`](https://github.com/eslint/eslint/commit/1aa021d77fdd2c68d7b7d2f4603252110c414b32) Breaking: lint `overrides` files (fixes #10828, refs eslint/rfcs#20) (#12677) (Toru Nagashima) -* [`e59d775`](https://github.com/eslint/eslint/commit/e59d77536bd8db57e8a75cd5245f6f320aa699f8) Update: Separate pattern/expression options for array-element-newline (#11796) (jacobparish) -* [`f8f115a`](https://github.com/eslint/eslint/commit/f8f115af6e10539e6cad485588187cb11917f8c9) Update: treat comment tokens in template-curly-spacing (fixes #12744) (#12775) (YeonJuan) -* [`b50179d`](https://github.com/eslint/eslint/commit/b50179def3fedbd95fdeab25e32c2511867eb760) Breaking: Check assignment targets in no-extra-parens (#12490) (Milos Djermanovic) -* [`de4fa7c`](https://github.com/eslint/eslint/commit/de4fa7c65c7befefa64d1605550267071ee56a5d) Fix: wrong indent at tagged template in indent (fixes #12122) (#12596) (YeonJuan) -* [`d86a5bb`](https://github.com/eslint/eslint/commit/d86a5bbb1987d858d4963f647b0af5c1fd924b4f) Breaking: Check flatMap in array-callback-return (fixes #12235) (#12765) (Milos Djermanovic) -* [`cf46df7`](https://github.com/eslint/eslint/commit/cf46df70158a4ed4c09d5c9d655c07dc6df3ff5e) Breaking: description in directive comments (refs eslint/rfcs#33) (#12699) (Toru Nagashima) -* [`7350589`](https://github.com/eslint/eslint/commit/7350589a5bdfc9d75d1ff19364f476eec44c3911) Breaking: some rules recognize bigint literals (fixes #11803) (#12701) (Toru Nagashima) -* [`16a1c1f`](https://github.com/eslint/eslint/commit/16a1c1f79bc0a4cc1c3a87e98d220041de88bb93) Fix: prefer-object-spread false positives with accessors (fixes #12086) (#12784) (Milos Djermanovic) -* [`f9774ec`](https://github.com/eslint/eslint/commit/f9774ec11b0ebe63fb16a97b97890efb84699548) New: Add default-case-last rule (fixes #12665) (#12668) (Milos Djermanovic) -* [`9a93d9e`](https://github.com/eslint/eslint/commit/9a93d9ef389c49a133c4df4f9843927f5f806423) Update: fix no-restricted-imports export * false negative (fixes #12737) (#12798) (Milos Djermanovic) -* [`0d8c0af`](https://github.com/eslint/eslint/commit/0d8c0affe1ae7ecf228cdf91b490921f7e9d1fdb) Fix: improve report location for computed-property-spacing (#12795) (Milos Djermanovic) -* [`756b95d`](https://github.com/eslint/eslint/commit/756b95d59fb97cd9b3f3adf98cebf529fe4842a2) Fix: id-blacklist should ignore ObjectPatterns (fixes #12787) (#12792) (JP Ramassini) -* [`561b6d4`](https://github.com/eslint/eslint/commit/561b6d4726f3e77dd40ba0d340ca7f08429cd2eb) Chore: add prerequisites checklist to PR template (#12790) (Kai Cataldo) -* [`01ff791`](https://github.com/eslint/eslint/commit/01ff7910af86fc45b76e883bc9ab00c9be3b50ac) Fix: Display pipe character correctly in test output (#12771) (Brad Zacher) -* [`68becbd`](https://github.com/eslint/eslint/commit/68becbd84e8a0693409d36f2be10679c483e233a) Update: fix no-restricted-imports importNames reporting (fixes #12282) (#12711) (Andrey Alexandrov) -* [`ae959b6`](https://github.com/eslint/eslint/commit/ae959b691fb148ac8b474c924c8cb01ef61c436d) Update: report double extra parens in no-extra-parens (fixes #12127) (#12697) (YeonJuan) -* [`02fcc05`](https://github.com/eslint/eslint/commit/02fcc055710e8d69d986f1e682cae2014ad881e2) Docs: Improve sort-keys (#12791) (Steven Vachon) -* [`35cd958`](https://github.com/eslint/eslint/commit/35cd95893be0afd8c954cbcf9268c2aa045b7d5b) Sponsors: Sync README with website (ESLint Jenkins) -* [`a1d999c`](https://github.com/eslint/eslint/commit/a1d999c6b4e51c317ad409110be7be214ff9f7c6) New: Add no-useless-backreference rule (fixes #12673) (#12690) (Milos Djermanovic) -* [`b2c6209`](https://github.com/eslint/eslint/commit/b2c62096a8b318765d618cab222240f87d73063b) Update: fix no-extra-parens CallExpression#callee false negatives (#12743) (Milos Djermanovic) -* [`14b42c3`](https://github.com/eslint/eslint/commit/14b42c386be3387c415267b789f277e1294d4567) Update: fix counting jsx comment len in max-len (fixes #12213) (#12661) (YeonJuan) -* [`e632c31`](https://github.com/eslint/eslint/commit/e632c31d7e5363f1347b787702ecd4a85f5c11a2) Upgrade: several dependencies (#12753) (Toru Nagashima) -* [`25eb703`](https://github.com/eslint/eslint/commit/25eb703c8758563988ffb497a53f89a3ed345399) Docs: fix dead link in max-lines rule docs (#12766) (Christian Bundy) -* [`9dfc850`](https://github.com/eslint/eslint/commit/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d) Chore: Refactor to use messageId in a number of rules (#12715) (Brad Zacher) -* [`1118fce`](https://github.com/eslint/eslint/commit/1118fceb49af3436b8dcd0c6089f913cedf9a329) Breaking: runtime-deprecation on '~/.eslintrc' (refs eslint/rfcs#32) (#12678) (Toru Nagashima) -* [`2c28fbb`](https://github.com/eslint/eslint/commit/2c28fbbb563a44282bef0c9fcc9be29d611cc83b) Breaking: drop Node.js 8 support (refs eslint/rfcs#44) (#12700) (Toru Nagashima) -* [`098b67d`](https://github.com/eslint/eslint/commit/098b67d04a4b4dc8ef4faa6434c6ef5abbde3ed3) Docs: fix minor typo in brace-style.md (#12749) (Marko Kaznovac) -* [`313f70a`](https://github.com/eslint/eslint/commit/313f70ac9a3cf5d1558d2427b00dd75666e18cf4) Update: add outerIIFEBody: "off" to indent rule (fixes #11377) (#12706) (Kai Cataldo) -* [`b77b858`](https://github.com/eslint/eslint/commit/b77b8585e33fc4bb438a0e11ca8177c7eb91dbd8) Chore: fix separateRequires tests for one-var rule (#12709) (Milos Djermanovic) -* [`e4df7df`](https://github.com/eslint/eslint/commit/e4df7dfb0199badb61d2c03ff4f7e4be735279d9) Chore: add JSDoc types for RuleTester test cases (#12325) (Chiawen Chen) -* [`b23ad0d`](https://github.com/eslint/eslint/commit/b23ad0d789a909baf8d7c41a35bc53df932eaf30) Docs: change a broken link in working-with-rules.md (#12732) (Damien Cassou) -* [`3fa39a6`](https://github.com/eslint/eslint/commit/3fa39a633b37544fec7cedfc1f2b0e62e9312a72) Update: Handle locally unsupported regex in computed property keys (#12056) (Milos Djermanovic) -* [`4744397`](https://github.com/eslint/eslint/commit/474439720258b1a64b305c31588f803104fa4aaf) Chore: remove unused code in max-lines-per-function (#12659) (YeonJuan) -* [`4e16957`](https://github.com/eslint/eslint/commit/4e169576a526023ee297d5bc8b37eedba229f63d) Build: update browser build (#12693) (Toru Nagashima) -* [`00ddfff`](https://github.com/eslint/eslint/commit/00ddfffe6b4b4244e4680b0f92f2c6697fad136f) Fix: Windows path parsing for JUnit (fixes #12507) (#12509) (Michael Wall) -* [`985dac3`](https://github.com/eslint/eslint/commit/985dac35e3c367f0f99d1f0e766e06a1d9818dd4) New: Add no-restricted-exports rule (fixes #10428) (#12546) (Milos Djermanovic) -* [`1aff21b`](https://github.com/eslint/eslint/commit/1aff21bb54da44cef0b6e378a34a74265863b930) Fix: no-mixed-spaces-and-tabs reports multiline strings (#12566) (Milos Djermanovic) -* [`8f1020f`](https://github.com/eslint/eslint/commit/8f1020ff711b0c57d590bf666e2841f64186d083) Update: no-void add an option to allow void as a statement (#12613) (Brad Zacher) -* [`bb6cf50`](https://github.com/eslint/eslint/commit/bb6cf5082623ffb67bb1495fee52c0610ee5f421) Update: Add offsetTernaryExpressions option for indent rule (#12556) (Adam Stankiewicz) -* [`39f5a45`](https://github.com/eslint/eslint/commit/39f5a453579b2ad732212edeb71f84ecb0991f97) Chore: add test cases for for-direction (#12698) (YeonJuan) -* [`b340304`](https://github.com/eslint/eslint/commit/b3403045e535921df6d34785a4ce053e14ba27fd) Chore: Add extra test, improve docs (#12492) (Kevin Partington) -* [`827259e`](https://github.com/eslint/eslint/commit/827259ea009f98a0fdf3f7ebf1bfb6cd661ce28d) Build: package.json update for eslint-config-eslint release (ESLint Jenkins) - -v6.8.0 - December 20, 2019 - -* [`c5c7086`](https://github.com/eslint/eslint/commit/c5c708666b450fb69522a55aa375626f9297dc6f) Fix: ignore aligning single line in key-spacing (fixes #11414) (#12652) (YeonJuan) -* [`9986d9e`](https://github.com/eslint/eslint/commit/9986d9e0baed0d3586bbee472fe2fae2ed625f5d) Chore: add object option test cases in yield-star-spacing (#12679) (YeonJuan) -* [`1713d07`](https://github.com/eslint/eslint/commit/1713d0758b083f3840d724505f997a7cb20ff384) New: Add no-error-on-unmatched-pattern flag (fixes #10587) (#12377) (ncraley) -* [`5c25a26`](https://github.com/eslint/eslint/commit/5c25a26608fbd9a1d0127c9a3653609aa4b63e86) Update: autofix bug in lines-between-class-members (fixes #12391) (#12632) (YeonJuan) -* [`4b3cc5c`](https://github.com/eslint/eslint/commit/4b3cc5cd2459f04eae149faea0651785d7f9db0b) Chore: enable prefer-regex-literals in eslint codebase (#12268) (薛定谔的猫) -* [`05faebb`](https://github.com/eslint/eslint/commit/05faebb943456ad2b20117f3c8b3eccbe2e2fb03) Update: improve suggestion testing experience (#12602) (Brad Zacher) -* [`05f7dd5`](https://github.com/eslint/eslint/commit/05f7dd53ed91a6e3be9eb40825fb6d2207f82209) Update: Add suggestions for no-unsafe-negation (fixes #12591) (#12609) (Milos Djermanovic) -* [`d3e43f1`](https://github.com/eslint/eslint/commit/d3e43f1c10c5e19f40e7b3d3944b87f1b0c9c075) Docs: Update no-multi-assign explanation (#12615) (Yuping Zuo) -* [`272e4db`](https://github.com/eslint/eslint/commit/272e4db6074283bc01cc6ec72c9e396bb3c110e6) Fix: no-multiple-empty-lines: Adjust reported `loc` (#12594) (Tobias Bieniek) -* [`a258039`](https://github.com/eslint/eslint/commit/a258039e556075d7d1f955a79d094ea103ec165a) Fix: no-restricted-imports schema allows multiple paths/patterns objects (#12639) (Milos Djermanovic) -* [`51f9620`](https://github.com/eslint/eslint/commit/51f9620cc55cc091fe38dbe68e4633de06297b8c) Fix: improve report location for array-bracket-spacing (#12653) (Milos Djermanovic) -* [`45364af`](https://github.com/eslint/eslint/commit/45364afc9c7f0251348cd1a7a13656c3816435d7) Fix: prefer-numeric-literals doesn't check types of literal arguments (#12655) (Milos Djermanovic) -* [`e3c570e`](https://github.com/eslint/eslint/commit/e3c570eaf3d1d44fb57bf42f1870887856e4c5a0) Docs: Add example for expression option (#12694) (Arnaud Barré) -* [`6b774ef`](https://github.com/eslint/eslint/commit/6b774ef0d849ccf5c1127b25e1fe7c3e438d586b) Docs: Add spacing in comments for no-console rule (#12696) (Nikki Nikkhoui) -* [`7171fca`](https://github.com/eslint/eslint/commit/7171fca6ef4e0e8f267658fc7d8f603f00eddd84) Chore: refactor regex in config comment parser (#12662) (Milos Djermanovic) -* [`1600648`](https://github.com/eslint/eslint/commit/1600648d2880ffb1e9e414b31ff0f66ead7167f9) Update: Allow $schema in config (#12612) (Yordis Prieto) -* [`acc0e47`](https://github.com/eslint/eslint/commit/acc0e47572a9390292b4e313b4a4bf360d236358) Update: support .eslintrc.cjs (refs eslint/rfcs#43) (#12321) (Evan Plaice) -* [`49c1658`](https://github.com/eslint/eslint/commit/49c1658544ace24b9aaaa301af0fc07a2ef3bf30) Chore: remove bundling of ESLint during release (#12676) (Kai Cataldo) -* [`257f3d6`](https://github.com/eslint/eslint/commit/257f3d67905a52bf8602a5a5707c893cc90d7ca7) Chore: complete to move to GitHub Actions (#12625) (Toru Nagashima) -* [`ab912f0`](https://github.com/eslint/eslint/commit/ab912f0ef709a916ab9a27ea09d9d7adf046fb2d) Docs: 1tbs with allowSingleLine edge cases (refs #12284) (#12314) (Ari Kardasis) -* [`dd1c30e`](https://github.com/eslint/eslint/commit/dd1c30e35f05ed332e2abbd3d4d53635efde74b8) Sponsors: Sync README with website (ESLint Jenkins) -* [`a230f84`](https://github.com/eslint/eslint/commit/a230f8404e4f2423dd79378b065d24c12776775b) Update: include node version in cache (#12582) (Eric Wang) -* [`8b65f17`](https://github.com/eslint/eslint/commit/8b65f175dfb4fac11ed7184537be400ed14996fb) Chore: remove references to parser demo (#12644) (Kai Cataldo) -* [`e9cef99`](https://github.com/eslint/eslint/commit/e9cef99e6ebec1faefdb576ca597e81ae4f04afd) Docs: wrap {{}} in raw liquid tags to prevent interpolation (#12643) (Kai Cataldo) -* [`e707453`](https://github.com/eslint/eslint/commit/e70745325ff9e085acc6843dd8bfae5550645d4f) Docs: Fix configuration example in no-restricted-imports (fixes #11717) (#12638) (Milos Djermanovic) -* [`19194ce`](https://github.com/eslint/eslint/commit/19194cec724e016df02376bbeae31171be6f0bdf) Chore: Add tests to cover default object options in comma-dangle (#12627) (YeonJuan) -* [`6e36d12`](https://github.com/eslint/eslint/commit/6e36d12d95e76022172fd0ec8a5e85c22fde6a8a) Update: do not recommend require-atomic-updates (refs #11899) (#12599) (Kai Cataldo) - -v6.7.2 - November 30, 2019 - -* [`bc435a9`](https://github.com/eslint/eslint/commit/bc435a93afd6ba4def1b53993ef7cf8220f3f070) Fix: isSpaceBetweenTokens() recognizes spaces in JSXText (fixes #12614) (#12616) (Toru Nagashima) -* [`4928d51`](https://github.com/eslint/eslint/commit/4928d513b4fe716c7ed958c294a10ef8517be25e) Fix: don't ignore the entry directory (fixes #12604) (#12607) (Toru Nagashima) -* [`b41677a`](https://github.com/eslint/eslint/commit/b41677ae2a143790b19b0e70391a46ec6c8f5de1) Docs: Clarify suggestion's data in Working with Rules (refs #12606) (#12617) (Milos Djermanovic) -* [`ea16de4`](https://github.com/eslint/eslint/commit/ea16de4e7c6f661398b0b7843f95e5f307c89551) Fix: Support tagged template literal generics in no-unexpected-multiline (#11698) (Brad Zacher) -* [`fa6415d`](https://github.com/eslint/eslint/commit/fa6415d5b877370374a6a530a5190ab5a411b4dc) Sponsors: Sync README with website (ESLint Jenkins) -* [`e1e158b`](https://github.com/eslint/eslint/commit/e1e158b4d7bd61e812723b378d2c391295da43a5) Sponsors: Sync README with website (ESLint Jenkins) - -v6.7.1 - November 24, 2019 - -* [`dd1e9f4`](https://github.com/eslint/eslint/commit/dd1e9f4df2103c43509a54b0ad5f9106557997f9) Fix: revert changes to key-spacing due to regression (#12598) (Kai Cataldo) -* [`c644b54`](https://github.com/eslint/eslint/commit/c644b5429e5bc8a050afd70c99ec82035eb611fa) Docs: Update README team and sponsors (ESLint Jenkins) - -v6.7.0 - November 22, 2019 - -* [`312a88f`](https://github.com/eslint/eslint/commit/312a88f2230082d898b7d8d82f8af63cb352e55a) New: Add grouped-accessor-pairs rule (fixes #12277) (#12331) (Milos Djermanovic) -* [`5c68f5f`](https://github.com/eslint/eslint/commit/5c68f5feeb4a6c0cb53ff76b2fd255b5bfa69c93) Update: Add 'lexicalBindings' to no-implicit-globals and change messages (#11996) (Milos Djermanovic) -* [`6eaad96`](https://github.com/eslint/eslint/commit/6eaad964ff159d0a38de96c1104782ffe6858c78) New: Add suggestions API (#12384) (Will Douglas) -* [`b336fbe`](https://github.com/eslint/eslint/commit/b336fbedecd85731611fdc2dfd8edb635a8b1c39) Fix: indent rule with JSX spread props (#12581) (Nathan Woltman) -* [`97c745d`](https://github.com/eslint/eslint/commit/97c745dc277febbea82552a4d9186e3df847f860) Update: Report assignment expression location in no-cond-assign (#12465) (Milos Djermanovic) -* [`0f01f3d`](https://github.com/eslint/eslint/commit/0f01f3d0807c580631c2fdcff29192a64a870637) Update: Check member expressions with `this` in operator-assignment (#12495) (Milos Djermanovic) -* [`62c7038`](https://github.com/eslint/eslint/commit/62c7038a493d89e4a7b14ac673a063d09d04057b) Fix: invalid token checking in computed-property-spacing (fixes #12198) (#12533) (YeonJuan) -* [`4f8a1ee`](https://github.com/eslint/eslint/commit/4f8a1ee1c26ccb5882e5e83ea7eab2f406c7476b) Update: Add enforceForClassMembers option to no-useless-computed-key (#12110) (ark120202) -* [`1a2eb99`](https://github.com/eslint/eslint/commit/1a2eb99f11c65813bba11d6576a06cff2b823cc9) New: new rule no-constructor-return (fixes #12481) (#12529) (Pig Fang) -* [`ca3b2a6`](https://github.com/eslint/eslint/commit/ca3b2a62c9e829dc4534bca3643d6bc729b46df0) New: ignorePatterns in config files (refs eslint/rfcs#22) (#12274) (Toru Nagashima) -* [`60204a3`](https://github.com/eslint/eslint/commit/60204a3620e33a078c1c35fa2e5d839a16c627ff) Docs: Added another Textmate 2 bundle. (#12580) (Ryan Fitzer) -* [`62623f9`](https://github.com/eslint/eslint/commit/62623f9f611a3adb79696304760a2fd14be8afbc) Fix: preserve whitespace in multiline-comment-style (fixes #12312) (#12316) (Kai Cataldo) -* [`17a8849`](https://github.com/eslint/eslint/commit/17a8849491a983f6cb8e98da8c0c9d52ff5f2aa6) New: Add no-dupe-else-if rule (fixes #12469) (#12504) (Milos Djermanovic) -* [`41a78fd`](https://github.com/eslint/eslint/commit/41a78fd7ce245cad8ff6a96c42f5840688849427) Update: improve location for semi and comma-dangle (#12380) (Chiawen Chen) -* [`0a480f8`](https://github.com/eslint/eslint/commit/0a480f8307a0e438032f484254941e6426748143) Docs: Change "Code Conventions" link in pull-requests.md (#12401) (Denis Sikuler) -* [`fed20bb`](https://github.com/eslint/eslint/commit/fed20bb039cf9f53adfcf93e467f418c5e958f45) Fix: require-await crash on global await (#12571) (Brad Zacher) -* [`b8030fc`](https://github.com/eslint/eslint/commit/b8030fc23e88f57a04d955b3befd1ab0fc2c5d10) Update: deprecate personal config (fixes #11914, refs eslint/rfcs#32) (#12426) (Toru Nagashima) -* [`40c8c32`](https://github.com/eslint/eslint/commit/40c8c3264c7c383d98c9faf9c4cb4f8b75aee40f) Fix: improve report location for object-curly-spacing (#12563) (Milos Djermanovic) -* [`1110045`](https://github.com/eslint/eslint/commit/1110045e0d28a461e75d2f57d5f01533d59ef239) Fix: ignore marker-only comments in spaced-comment (fixes #12036) (#12558) (Milos Djermanovic) -* [`6503cb8`](https://github.com/eslint/eslint/commit/6503cb8d99e549fece53b80b110e890a7978b9fd) Update: Fix uglified object align in key-spacing (fixes #11414) (#12472) (YeonJuan) -* [`40791af`](https://github.com/eslint/eslint/commit/40791af69efde1701690637603ad37d41e15a727) Docs: clarify ignoreDestructuring option in the camelcase rule (#12553) (Milos Djermanovic) -* [`07d398d`](https://github.com/eslint/eslint/commit/07d398d91d5b6d0247e58b1f8ea64bb5acd570a8) Chore: Add GitHub organization to Sponsor button (#12562) (Brandon Mills) -* [`a477707`](https://github.com/eslint/eslint/commit/a47770706ac59633dcd73e886d1a7282b324ee06) Chore: Format style guide links so they can be clicked (#12189) (Ivan V) -* [`0f7edef`](https://github.com/eslint/eslint/commit/0f7edefdc1576d5e3e7ef89083002b0a4a31f039) Update: add react plugin config for eslint init (#12446) (Ibrahim Rouis) -* [`448ff1e`](https://github.com/eslint/eslint/commit/448ff1e53734c503fb9e7e6802c1c7e441d4c019) Update: Report '\08' and '\09' in no-octal-escape (fixes #12080) (#12526) (Milos Djermanovic) -* [`45aa6a3`](https://github.com/eslint/eslint/commit/45aa6a3ba3486f1b116c5daab6432d144e5ea574) New: Add no-setter-return rule (fixes #12285) (#12346) (Milos Djermanovic) -* [`0afb518`](https://github.com/eslint/eslint/commit/0afb518d1f139376245613dddd8eaef32b52d619) Fix: invalid autofix in function-call-argument-newline (fixes #12454) (#12539) (YeonJuan) -* [`90305e0`](https://github.com/eslint/eslint/commit/90305e017c2c5fba0b4b62f41b180910b4baeedb) Update: Depcrecate isSpaceBetweenTokens() (#12519) (Kai Cataldo) -* [`41b1e43`](https://github.com/eslint/eslint/commit/41b1e4308c1cb01c8b00cc8adc36440e77854117) New: add option for camelcase (fixes #12527) (#12528) (Pig Fang) -* [`f49f1e0`](https://github.com/eslint/eslint/commit/f49f1e0a69afa49f6548af7b2c0e6347e1ea022d) Upgrade: upgrade optionator to avoid license issue (fixes #11536) (#12537) (Pig Fang) -* [`0286b57`](https://github.com/eslint/eslint/commit/0286b5730501b391c74e069db46849f0de0885d2) Docs: Clean up Getting Started Guide (#12544) (Nicholas C. Zakas) -* [`575a98d`](https://github.com/eslint/eslint/commit/575a98d724b2688f1e9c83744c5dc9ffe9a7bfb4) Chore: Add funding field to package.json (#12543) (Nicholas C. Zakas) -* [`9e29e18`](https://github.com/eslint/eslint/commit/9e29e189752f06362fd1956659e07834efb746a5) Fix: sourceCode#isSpaceBetweenTokens() checks non-adjacent tokens (#12491) (Kai Cataldo) -* [`5868550`](https://github.com/eslint/eslint/commit/586855060afb3201f4752be8820dc85703b523a6) Docs: add notice about `function` keyword in keyword-spacing (#12524) (Pig Fang) -* [`bb556d5`](https://github.com/eslint/eslint/commit/bb556d5fd735ad2dcea322082edcc07a58105ce9) Fix: curly `multi` reports single lexical declarations (fixes #11908) (#12513) (Milos Djermanovic) -* [`ac60621`](https://github.com/eslint/eslint/commit/ac606217d4beebc35b865d14a7f9723fd21faa48) Fix: unexpected autofix in prefer-const (fixes #12514) (#12521) (YeonJuan) -* [`990065e`](https://github.com/eslint/eslint/commit/990065e5f58b6cc6922ab6cee5b97bfc56a6237a) Update: curly multi-or-nest flagging semis on next line (fixes #12370) (#12378) (cherryblossom000) -* [`084a8a6`](https://github.com/eslint/eslint/commit/084a8a63a749232681fefe9bdac6802efdcdc8a8) Fix: no-cond-assign with `always` option reports switch case clauses (#12470) (Milos Djermanovic) -* [`7e41355`](https://github.com/eslint/eslint/commit/7e41355b19a8ef347620dd7c0dde491c3460937b) Update: improve report location for space-infix-ops (#12324) (Chiawen Chen) -* [`94ff921`](https://github.com/eslint/eslint/commit/94ff921689115f856578159564ee1968b4b914be) Update: Add capIsConstructor option to no-invalid-this (fixes #12271) (#12308) (Milos Djermanovic) -* [`de65de6`](https://github.com/eslint/eslint/commit/de65de6e488112a602949e6a5d27dd4c754b003c) New: Add prefer-exponentiation-operator rule (fixes #10482) (#12360) (Milos Djermanovic) -* [`c78f4a7`](https://github.com/eslint/eslint/commit/c78f4a73de68f81cd41132b46d4840b91599d599) Update: Allow JSX exception in no-inline-comments (fixes #11270) (#12388) (Milos Djermanovic) -* [`e17fb90`](https://github.com/eslint/eslint/commit/e17fb90f5817d16081e690eb06b7720afcb9fa2a) New: allowAfterThisConstructor for no-underscore-dangle (fixes #11488) (#11489) (sripberger) -* [`287ca56`](https://github.com/eslint/eslint/commit/287ca562811d037bde09a47af7f5b9c7b741e022) Build: update CI for Node.js 13 (#12496) (Toru Nagashima) -* [`98e1d50`](https://github.com/eslint/eslint/commit/98e1d50273f31c2a7b59772298280ed7305274c8) Upgrade: globals to v12.1.0 (#12296) (Tony Brix) -* [`8ac71a3`](https://github.com/eslint/eslint/commit/8ac71a3c89a9db13706a44b23d1b509b65185113) Sponsors: Sync README with website (ESLint Jenkins) -* [`4e142ea`](https://github.com/eslint/eslint/commit/4e142ea411dfb692b6e2a69cd5f1204ade4dd58a) Docs: Update README team and sponsors (ESLint Jenkins) - -v6.6.0 - October 25, 2019 - -* [`39dfe08`](https://github.com/eslint/eslint/commit/39dfe0880fa934e287e8ea1f7b56d5cba8d43765) Update: false positives in function-call-argument-newline (fixes #12123) (#12280) (Scott O'Hara) -* [`4d84210`](https://github.com/eslint/eslint/commit/4d842105c9c82026be668d7425213138903d4d41) Update: improve report location for no-trailing-spaces (fixes #12315) (#12477) (Milos Djermanovic) -* [`c6a7745`](https://github.com/eslint/eslint/commit/c6a7745a1371a85932bfae5fec039d1b6fcfc128) Update: no-trailing-spaces false negatives after comments (fixes #12479) (#12480) (Milos Djermanovic) -* [`0bffe95`](https://github.com/eslint/eslint/commit/0bffe953d2752dd2d3045f2f8771c96b6cee8fc4) Fix: no-misleading-character-class crash on invalid regex (fixes #12169) (#12347) (Milos Djermanovic) -* [`c6a9a3b`](https://github.com/eslint/eslint/commit/c6a9a3bc58b69dbf9be9cd09b0283c081ca211e7) Update: Add enforceForIndexOf option to use-isnan (fixes #12207) (#12379) (Milos Djermanovic) -* [`364877b`](https://github.com/eslint/eslint/commit/364877b2504e8f7ece04770b93d517e2f27458d0) Update: measure plugin loading time and output in debug message (#12395) (Victor Homyakov) -* [`1744fab`](https://github.com/eslint/eslint/commit/1744faba3c93c869f7dbbf0a704d32e2692d6856) Fix: operator-assignment removes and duplicates comments (#12485) (Milos Djermanovic) -* [`52ca11a`](https://github.com/eslint/eslint/commit/52ca11a66ab6c2fb5a71d8b9869482f14f98cb9d) Fix: operator-assignment invalid autofix with adjacent tokens (#12483) (Milos Djermanovic) -* [`0f6d0dc`](https://github.com/eslint/eslint/commit/0f6d0dcdf5adc30079a7379bbf605a4ef3887a85) Fix: CLIEngine#addPlugin reset lastConfigArrays (fixes #12425) (#12468) (Toru Nagashima) -* [`923a8cb`](https://github.com/eslint/eslint/commit/923a8cb752b8dee1e622c5fd36f3f53288e30602) Chore: Fix lint failure in JSDoc comment (#12489) (Brandon Mills) -* [`aac3be4`](https://github.com/eslint/eslint/commit/aac3be435cccc241781150fcac728df04d086fa8) Update: Add ignored prop regex no-param-reassign (#11275) (Luke Bennett) -* [`e5382d6`](https://github.com/eslint/eslint/commit/e5382d6e4eb1344f537b6f107535269e9939fcb8) Chore: Remove unused parameter in dot-location (#12464) (Milos Djermanovic) -* [`49faefb`](https://github.com/eslint/eslint/commit/49faefbee3fc7daaf2482d9d7d23513d6ffda9e8) Fix: no-obj-calls false positive (fixes #12437) (#12467) (Toru Nagashima) -* [`b3dbd96`](https://github.com/eslint/eslint/commit/b3dbd9657bbeac6571111a4429b03fc085ba6655) Fix: problematic installation issue (fixes #11018) (#12309) (Toru Nagashima) -* [`cd7c29b`](https://github.com/eslint/eslint/commit/cd7c29b17085c14c9cf6345201c72a192c0d0e0c) Sponsors: Sync README with website (ESLint Jenkins) -* [`8233873`](https://github.com/eslint/eslint/commit/8233873b8e5facd80ab7b172bff1e896a9c5fd39) Docs: Add note about Node.js requiring SSL support (fixes #11413) (#12475) (Nicholas C. Zakas) -* [`89e8aaf`](https://github.com/eslint/eslint/commit/89e8aafcc622a4763bed6b9d62f148ef95798f38) Fix: improve report location for no-tabs (#12471) (Milos Djermanovic) -* [`7dffe48`](https://github.com/eslint/eslint/commit/7dffe482d646d4e5f94fa87a22f3b5b2e0a4b189) Update: Enable function string option in comma-dangle (fixes #12058) (#12462) (YeonJuan) -* [`e15e1f9`](https://github.com/eslint/eslint/commit/e15e1f933f287d274a726e7f0f0a1dd80f0964af) Docs: fix doc for no-unneeded-ternary rule (fixes #12098) (#12410) (Sam Rae) -* [`b1dc58f`](https://github.com/eslint/eslint/commit/b1dc58f0a717cb3d19300c845ca23a21ceb610d3) Sponsors: Sync README with website (ESLint Jenkins) -* [`61749c9`](https://github.com/eslint/eslint/commit/61749c94bd8a2ebcdfb89e0cd48c4a029a945079) Chore: Provide debug log for parser errors (#12474) (Brad Zacher) -* [`7c8bbe0`](https://github.com/eslint/eslint/commit/7c8bbe0391944e1f92e083a04715bf4b3fe6be5d) Update: enforceForOrderingRelations no-unsafe-negation (fixes #12163) (#12414) (Sam Rae) -* [`349ed67`](https://github.com/eslint/eslint/commit/349ed6700e1155384597e1e6035550a96cb8a42d) Update: improve report location for no-mixed-operators (#12328) (Chiawen Chen) -* [`a102eaa`](https://github.com/eslint/eslint/commit/a102eaa9ac19e1c6d92f79a4033e9048cfb64c0d) Fix: prefer-numeric-literals invalid autofix with adjacent tokens (#12387) (Milos Djermanovic) -* [`6e7c18d`](https://github.com/eslint/eslint/commit/6e7c18ddb30b32ee5b2e842cc8258aa7aebb7445) Update: enforceForNewInMemberExpressions no-extra-parens (fixes #12428) (#12436) (Milos Djermanovic) -* [`51fbbd7`](https://github.com/eslint/eslint/commit/51fbbd78f98f223d17071650f5117d07f60dadc2) Fix: array-bracket-newline consistent error with comments (fixes #12416) (#12441) (Milos Djermanovic) -* [`e657d4c`](https://github.com/eslint/eslint/commit/e657d4ccb9f3dd5cacceaaa40ffe24ac29a1349a) Fix: report full dot location in dot-location (#12452) (Milos Djermanovic) -* [`2d6e345`](https://github.com/eslint/eslint/commit/2d6e345e3c2626b0f2252f22cfaffdf53ea0871a) Update: make isSpaceBetweenTokens() ignore newline in comments (#12407) (YeonJuan) -* [`84f71de`](https://github.com/eslint/eslint/commit/84f71de0e686e0fe37b83d6728ce1825caaa44fb) Update: remove default overrides in keyword-spacing (fixes #12369) (#12411) (YeonJuan) -* [`18a0b0e`](https://github.com/eslint/eslint/commit/18a0b0e3df927428a22b5b5295f9faee4bd57246) Update: improve report location for no-space-in-parens (#12364) (Chiawen Chen) -* [`d61c8a5`](https://github.com/eslint/eslint/commit/d61c8a5a75447a36276f2d4f84afb3e1129618da) Update: improve report location for no-multi-spaces (#12329) (Chiawen Chen) -* [`561093f`](https://github.com/eslint/eslint/commit/561093fc4267a4ae317d63bc9f103020fad88802) Upgrade: bump inquirer to ^7.0.0 (#12440) (Joe Graham) -* [`fb633b2`](https://github.com/eslint/eslint/commit/fb633b2bbd0a390b247047524fdd1f612dbab803) Chore: Add a script for testing with more control (#12444) (Eric Wang) -* [`012ec51`](https://github.com/eslint/eslint/commit/012ec5151113a2be06fc0e4cd208d714e52dbc57) Sponsors: Sync README with website (ESLint Jenkins) -* [`874fe16`](https://github.com/eslint/eslint/commit/874fe1642a10a0fb937ccccdd4d22343b84f80dc) New: pass cwd from cli engine (#12389) (Eric Wang) -* [`b962775`](https://github.com/eslint/eslint/commit/b962775b8cb7c90985a5ab63e56744bb2ba79644) Update: no-self-assign should detect member expression with this (#12279) (Tibor Blenessy) -* [`02977f2`](https://github.com/eslint/eslint/commit/02977f25a922dd0b8617c16116bb4364d0f30e94) Docs: Clarify `eslint:recommended` semver policy (#12429) (Kevin Partington) -* [`97045ae`](https://github.com/eslint/eslint/commit/97045ae0805e6503887eef0b131dcb9e70b6d185) Docs: Fixes object type for `rules` in "Use a Plugin" (#12409) (Daisy Develops) -* [`24ca088`](https://github.com/eslint/eslint/commit/24ca088fdc901feef8f10b050414fbde64b55c7d) Docs: Fix typo in v6 migration guide (#12412) (Benjamim Sonntag) -* [`b094008`](https://github.com/eslint/eslint/commit/b094008fb196dc1de5b4c27b7dbf0bcbb4b7b352) Chore: update version parameter name (#12402) (Toru Nagashima) -* [`e5637ba`](https://github.com/eslint/eslint/commit/e5637badd42f087d115f81575b832097fe6fe554) Chore: enable jsdoc/require-description (#12365) (Kai Cataldo) -* [`d31f337`](https://github.com/eslint/eslint/commit/d31f3370396ec4868722bdc044aa697b135ac183) Sponsors: Sync README with website (ESLint Jenkins) -* [`7ffb22f`](https://github.com/eslint/eslint/commit/7ffb22f61cf1622511a7fe42b5ead7c3b216df5e) Chore: Clean up inline directive parsing (#12375) (Jordan Eldredge) -* [`84467c0`](https://github.com/eslint/eslint/commit/84467c07461cc47ee43807ba9014e13700473c5c) Docs: fix wrong max-depth example (fixes #11991) (#12358) (Gabriel R Sezefredo) -* [`3642342`](https://github.com/eslint/eslint/commit/364234262efabd91fa8bd53161d9d3e1e37e7944) Docs: Fix minor formatting/grammar errors (#12371) (cherryblossom000) -* [`c47fa0d`](https://github.com/eslint/eslint/commit/c47fa0dfc76211b3b0e5649c63acdd9606ce0eca) Docs: Fix missing word in sentence (#12361) (Dan Boulet) -* [`8108f49`](https://github.com/eslint/eslint/commit/8108f49f9fa0c2de80b3b66c847551beff585951) Chore: enable additional eslint-plugin-jsdoc rules (#12336) (Kai Cataldo) -* [`b718d2e`](https://github.com/eslint/eslint/commit/b718d2e6c9fe3fc56aa7cfc68b1a40b5cd8a7c01) Chore: update issue template with --eslint-fix flag (#12352) (James George) -* [`20ba14d`](https://github.com/eslint/eslint/commit/20ba14dc78fc2654b2920d14877dde21c6c10da4) Sponsors: Sync README with website (ESLint Jenkins) -* [`566a947`](https://github.com/eslint/eslint/commit/566a947f67c8038a50e204d68723519778a78a0f) Sponsors: Sync README with website (ESLint Jenkins) -* [`070cbd0`](https://github.com/eslint/eslint/commit/070cbd0a2ec07831962a25c4276d08e097302416) Sponsors: Sync README with website (ESLint Jenkins) - -v6.5.1 - September 30, 2019 - -* [`0d3d7d9`](https://github.com/eslint/eslint/commit/0d3d7d9cdd83a7f0e035c95f716a91b9ecc4868b) Docs: fix typo in no-magic-numbers (#12345) (Josiah Rooney) -* [`447ac87`](https://github.com/eslint/eslint/commit/447ac877e8ca2858d61b1e983f72d39e3e2ca74d) Fix: no-useless-rename handles ExperimentalRestProperty (fixes #12335) (#12339) (Kai Cataldo) -* [`b6ff73c`](https://github.com/eslint/eslint/commit/b6ff73cad13282fbfc91186cf4bc2f20278a8936) Sponsors: Sync README with website (ESLint Jenkins) - -v6.5.0 - September 29, 2019 - -* [`73596cb`](https://github.com/eslint/eslint/commit/73596cbdf0a12e2878b2994783f9b969b0c5fbeb) Update: Add enforceForSwitchCase option to use-isnan (#12106) (Milos Djermanovic) -* [`d592a24`](https://github.com/eslint/eslint/commit/d592a248d67920f7200925c003f10853d29f1f8d) Fix: exclude `\u000d` so new line won't convert to text (fixes #12027) (#12031) (zamboney) -* [`e85d27a`](https://github.com/eslint/eslint/commit/e85d27af427d6185ac553a0d801b5103153426d4) Fix: no-regex-spaces false positives and invalid autofix (fixes #12226) (#12231) (Milos Djermanovic) -* [`b349bf7`](https://github.com/eslint/eslint/commit/b349bf79ad56dded826bc99cb52c3551af34fa63) Fix: prefer-named-capture-group incorrect locations (fixes #12233) (#12247) (Milos Djermanovic) -* [`7dc1ea9`](https://github.com/eslint/eslint/commit/7dc1ea9a1b9a21daaffcf712ba9c0e91af81b906) Fix: no-useless-return autofix removes comments (#12292) (Milos Djermanovic) -* [`0e68677`](https://github.com/eslint/eslint/commit/0e68677ec0aaf060a071ecf71e4af954dddb6af0) Fix: no-extra-bind autofix removes comments (#12293) (Milos Djermanovic) -* [`6ad7e86`](https://github.com/eslint/eslint/commit/6ad7e864303e56a39c89569d50c6caf80752ee21) Fix: no-extra-label autofix removes comments (#12298) (Milos Djermanovic) -* [`acec201`](https://github.com/eslint/eslint/commit/acec201f06df780791179ad92cfc484f9b6d23d4) Fix: no-undef-init autofix removes comments (#12299) (Milos Djermanovic) -* [`d89390b`](https://github.com/eslint/eslint/commit/d89390b75e3e9993f347387a49b0ac5550f45c7f) Fix: use async reading of stdin in bin/eslint.js (fixes #12212) (#12230) (Barrie Treloar) -* [`334ca7c`](https://github.com/eslint/eslint/commit/334ca7c8b9c18ac097849c1cefaa43097a4e51dc) Update: no-useless-rename also reports default values (fixes #12301) (#12322) (Kai Cataldo) -* [`41bfe91`](https://github.com/eslint/eslint/commit/41bfe919c06932b7e58cd9ead20157e06656160a) Update: Fix handling of chained new expressions in new-parens (#12303) (Milos Djermanovic) -* [`160b7c4`](https://github.com/eslint/eslint/commit/160b7c46b556ccb6023eb411a8be8801a4bda6df) Chore: add autofix npm script (#12330) (Kai Cataldo) -* [`04b6adb`](https://github.com/eslint/eslint/commit/04b6adb7f1bcb2b6cb3fa377b1ca4cecd810630e) Chore: enable eslint-plugin-jsdoc (refs #11146) (#12332) (Kai Cataldo) -* [`9b86167`](https://github.com/eslint/eslint/commit/9b86167e6f053e4a72bf68ebc79db53903f7f8c3) Docs: Add new ES environments to Configuring ESLint (#12289) (Milos Djermanovic) -* [`c9aeab2`](https://github.com/eslint/eslint/commit/c9aeab21a71c6743f51163b7a8fdf4f0cbfcdbde) Docs: Add supported ECMAScript version to README (#12290) (Milos Djermanovic) -* [`8316e7b`](https://github.com/eslint/eslint/commit/8316e7be5a9429513d7ecf2ee2afc40ab4415b8f) Fix: no-useless-rename autofix removes comments (#12300) (Milos Djermanovic) -* [`29c12f1`](https://github.com/eslint/eslint/commit/29c12f18726a3afb21fc89ab1bdacc6972d49e68) Chore: cache results in runtime-info (#12320) (Kai Cataldo) -* [`f5537b2`](https://github.com/eslint/eslint/commit/f5537b2ed0b0b5e51a34c22cdd4ebfd024eaea3d) Fix: prefer-numeric-literals autofix removes comments (#12313) (Milos Djermanovic) -* [`11ae6fc`](https://github.com/eslint/eslint/commit/11ae6fcb5d5503e5dea41c02780369efe51f0bb9) Update: Fix call, new and member expressions in no-extra-parens (#12302) (Milos Djermanovic) -* [`a7894eb`](https://github.com/eslint/eslint/commit/a7894ebb43523152d36720efa770bb1fe8b58c07) New: add --env-info flag to CLI (#12270) (Kai Cataldo) -* [`61392ff`](https://github.com/eslint/eslint/commit/61392ff5ec660bfc01ac2ff0e9660d259cf88fd6) Sponsors: Sync README with website (ESLint Jenkins) -* [`2c6bf8e`](https://github.com/eslint/eslint/commit/2c6bf8ea9c8a8f94746f980bd5bea0a8c5c4d6b7) Docs: English fix (#12306) (Daniel Nixon) -* [`6f11877`](https://github.com/eslint/eslint/commit/6f118778366613fc53036cb6a7537e1b4c6e7af8) Sponsors: Sync README with website (ESLint Jenkins) -* [`2e202ca`](https://github.com/eslint/eslint/commit/2e202ca2228846e6226aa8dd99c614d572fb86a8) Docs: fix links in array-callback-return (#12288) (Milos Djermanovic) -* [`e39c631`](https://github.com/eslint/eslint/commit/e39c6318af0fd27edd5fd2aaf2b24a3e204005dd) Docs: add example for CLIEngine#executeOnText 3rd arg (#12286) (Kai Cataldo) -* [`d4f9a16`](https://github.com/eslint/eslint/commit/d4f9a16af7e00021e2ed63823d9c2f149bc985d6) Update: add support for JSXFragments in indent rule (fixes #12208) (#12210) (Kai Cataldo) -* [`c6af95f`](https://github.com/eslint/eslint/commit/c6af95f5bf1ef10f08545d54fd52b98e85fdf7f7) Sponsors: Sync README with website (ESLint Jenkins) -* [`8cadd52`](https://github.com/eslint/eslint/commit/8cadd5229b7372aed0d4785dcae15532a399bf55) Sponsors: Sync README with website (ESLint Jenkins) -* [`f9fc695`](https://github.com/eslint/eslint/commit/f9fc695d77c19cd5ecb3f0e97e1ea124c8543409) Chore: enable default-param-last (#12244) (薛定谔的猫) -* [`9984c3e`](https://github.com/eslint/eslint/commit/9984c3e27c92de76b8c05a58525dbcea12b10b83) Docs: Update README team and sponsors (ESLint Jenkins) - -v6.4.0 - September 13, 2019 - -* [`e915fff`](https://github.com/eslint/eslint/commit/e915fffb6089a23ff1cae926cc607f9b87dc1819) Docs: Improve examples and clarify default option (#12067) (Yuping Zuo) -* [`540296f`](https://github.com/eslint/eslint/commit/540296fcecd232a09dc873a5a22f5839b59b7842) Update: enforceForClassMembers option to accessor-pairs (fixes #12063) (#12192) (Milos Djermanovic) -* [`d3c2334`](https://github.com/eslint/eslint/commit/d3c2334646eae9287d5be9e457d041e445efb512) Update: flag nested block with declaration as error (#12193) (David Waller) -* [`b2498d2`](https://github.com/eslint/eslint/commit/b2498d284b9c30ed1543429c2f45d9014e12fe22) Update: Fix handling of property names in no-self-assign (#12105) (Milos Djermanovic) -* [`1ee61b0`](https://github.com/eslint/eslint/commit/1ee61b06715fcc750be2c923034a1e59ba663287) Update: enforceForClassMembers computed-property-spacing (fixes #12049) (#12214) (Milos Djermanovic) -* [`520c922`](https://github.com/eslint/eslint/commit/520c92270eed6e90c1a796e8af275980f01705e0) Docs: Added naming convention details to plugin usage (#12202) (Henrique Barcelos) -* [`f826eab`](https://github.com/eslint/eslint/commit/f826eabbeecddb047f58f4e7308a14c18148d369) Fix: Allow line comment exception in object-curly-spacing (fixes #11902) (#12216) (Milos Djermanovic) -* [`db2a29b`](https://github.com/eslint/eslint/commit/db2a29beb0fa28183f65bf9e659c66c03a8918b5) Update: indentation of comment followed by semicolon (fixes #12232) (#12243) (Kai Cataldo) -* [`ae17d1c`](https://github.com/eslint/eslint/commit/ae17d1ca59dd466aa64da0680ec2453c2dc3b80d) Fix: no-sequences is reporting incorrect locations (#12241) (Milos Djermanovic) -* [`365331a`](https://github.com/eslint/eslint/commit/365331a42e22af5a77ac9cfa9673d6a8f653eb5a) Fix: object-shorthand providing invalid fixes for typescript (#12260) (Brad Zacher) -* [`1c921c6`](https://github.com/eslint/eslint/commit/1c921c6dfd7ddfb0308c8103e53d32c1241475f0) New: add no-import-assign (fixes #12237) (#12252) (Toru Nagashima) -* [`3be04fd`](https://github.com/eslint/eslint/commit/3be04fd6a4e7b3f5a5ecb845a29cf29b71fe2dfb) New: Add prefer-regex-literals rule (fixes #12238) (#12254) (Milos Djermanovic) -* [`37c0fde`](https://github.com/eslint/eslint/commit/37c0fdeb87b92a0b779b125adf45535b79b65757) Update: Report global Atomics calls in no-obj-calls (fixes #12234) (#12258) (Milos Djermanovic) -* [`985c9e5`](https://github.com/eslint/eslint/commit/985c9e5eba351965a8a1491a41dbdcc78154b8f4) Fix: space-before-function-paren autofix removes comments (fixes #12259) (#12264) (Milos Djermanovic) -* [`01da7d0`](https://github.com/eslint/eslint/commit/01da7d04c4e5a7376cf241ec02db7971726a1bf9) Fix: eqeqeq rule reports incorrect locations (#12265) (Milos Djermanovic) -* [`319e4d8`](https://github.com/eslint/eslint/commit/319e4d8386ea846928f0f906c251b46043a53491) Docs: adding finally example (#12256) (Jens Melgaard) -* [`d52328f`](https://github.com/eslint/eslint/commit/d52328f012f3704c7d1ce39427e63f80531c7979) Docs: fix no-sequences `with` examples (#12239) (Milos Djermanovic) -* [`a41fdc0`](https://github.com/eslint/eslint/commit/a41fdc07404a7675d14183fab245fb8f49dcb858) Fix: Remove autofixer for no-unsafe-negation (#12157) (Milos Djermanovic) -* [`e38f5fd`](https://github.com/eslint/eslint/commit/e38f5fdfc786363a3eae642f1a69a8725600aa61) Update: fix no-octal-escape false negatives after \0 (#12079) (Milos Djermanovic) -* [`9418fbe`](https://github.com/eslint/eslint/commit/9418fbe0eb31cace3debe27b620709628df2fad7) Sponsors: Sync README with website (ESLint Jenkins) -* [`acc5ec5`](https://github.com/eslint/eslint/commit/acc5ec5082aed466a29899f651e6767b39155aec) Sponsors: Sync README with website (ESLint Jenkins) -* [`460c5ad`](https://github.com/eslint/eslint/commit/460c5ad176eaf39ff579cd96b3bcbe0539093f8f) Sponsors: Sync README with website (ESLint Jenkins) -* [`0313441`](https://github.com/eslint/eslint/commit/0313441d016c8aa0674c135f9da67a676e766ec5) New: add rule default-param-last (fixes #11361) (#12188) (Chiawen Chen) -* [`7621f5d`](https://github.com/eslint/eslint/commit/7621f5d2aa7d87e798b75ca47d6889c280597e99) Update: add more specific linting messages to space-in-parens (#11121) (Che Fisher) -* [`21eb904`](https://github.com/eslint/eslint/commit/21eb9044135c01b6c12188517bba840614483fc6) Fix: basePath of OverrideTester (fixes #12032) (#12205) (Toru Nagashima) -* [`86e5e65`](https://github.com/eslint/eslint/commit/86e5e657ea3fbf12b10524abcbc197afd215a060) Sponsors: Sync README with website (ESLint Jenkins) -* [`2b1a13f`](https://github.com/eslint/eslint/commit/2b1a13fa0de8360586857f3ced8da514c971297d) Fix: no-extra-boolean-cast reports wrong negation node (fixes #11324) (#12197) (Milos Djermanovic) -* [`ba8c2aa`](https://github.com/eslint/eslint/commit/ba8c2aa0154561fbeca33db0343cb39a7fbd9b4f) Sponsors: Sync README with website (ESLint Jenkins) -* [`a0a9746`](https://github.com/eslint/eslint/commit/a0a9746724ccd22c721ddc1b25c566aa9acea154) Docs: Fix link in no-irregular-whitespace.md (#12196) (Timo Tijhof) -* [`e10eeba`](https://github.com/eslint/eslint/commit/e10eebab4abd193dee697c4de7fb2d95bbab2d8c) Fix: quotes autofix produces syntax error with octal escape sequences (#12118) (Milos Djermanovic) - -v6.3.0 - August 30, 2019 - -* [`0acdefb`](https://github.com/eslint/eslint/commit/0acdefb97f35bb09db2910540c70dc377a01ad62) Chore: refactor code (#12113) (James George) -* [`52e2cf5`](https://github.com/eslint/eslint/commit/52e2cf50b35d57fb8466e0bcd0581eff1590fb4c) New: reportUnusedDisableDirectives in config (refs eslint/rfcs#22) (#12151) (Toru Nagashima) -* [`020f952`](https://github.com/eslint/eslint/commit/020f9526b618a191566acea3e17e20815d484c58) Update: enforceForSequenceExpressions to no-extra-parens (fixes #11916) (#12142) (Milos Djermanovic) -* [`aab1b84`](https://github.com/eslint/eslint/commit/aab1b840f9cffb2a76a5c9fe1852961be71dc184) Fix: reset to the default color (#12174) (Ricardo Gobbo de Souza) -* [`4009d39`](https://github.com/eslint/eslint/commit/4009d39aa59451510aa24911e758d664f216289a) Fix: yoda rule produces invalid autofix with preceding yield (#12166) (Milos Djermanovic) -* [`febb660`](https://github.com/eslint/eslint/commit/febb6605d350c936d64cb73e694482cfbb20b29c) Fix: no-extra-boolean-cast invalid autofix with yield before negation (#12164) (Milos Djermanovic) -* [`4c0b70b`](https://github.com/eslint/eslint/commit/4c0b70b869c16647f7af6de9d5c5479fc19f49db) New: support TypeScript at config initializer (fixes #11789) (#12172) (Pig Fang) -* [`94e39d9`](https://github.com/eslint/eslint/commit/94e39d9f782f45db86a079e07508d63040118ef1) Chore: use GitHub Actions (#12144) (Toru Nagashima) -* [`e88f305`](https://github.com/eslint/eslint/commit/e88f305df9d454868624c559fd93b981a680c215) Chore: support es2020 in fuzz (#12180) (薛定谔的猫) -* [`00d2c5b`](https://github.com/eslint/eslint/commit/00d2c5be9a89efd90135c4368a9589f33df3f7ba) Docs: corrected class extension example (#12176) (Marius M) -* [`31e5428`](https://github.com/eslint/eslint/commit/31e542819967b2aa1191e1abaa1c4a49fddbe3cf) Chore: Fix wrong error object keys in test files (#12162) (Milos Djermanovic) -* [`197f443`](https://github.com/eslint/eslint/commit/197f4432fca70a574028e5568c48afad12213224) Fix: func-name-matching crash on descriptor-like arguments (#12100) (Milos Djermanovic) -* [`644ce33`](https://github.com/eslint/eslint/commit/644ce3306748a33b74fc6a94be0267c2c9f19348) Fix: no-self-assign false positive with rest and spread in array (#12099) (Milos Djermanovic) -* [`a81d263`](https://github.com/eslint/eslint/commit/a81d2636ce41fb34d6826c2e9857814e11cb9c30) Fix: fix message of function-paren-newline (#12136) (Pig Fang) -* [`77f8ed1`](https://github.com/eslint/eslint/commit/77f8ed1ad9656c526217ce54a6717fa232d522c8) Chore: update blogpost template (#12154) (Toru Nagashima) -* [`6abc7b7`](https://github.com/eslint/eslint/commit/6abc7b72dfb824a372379708ca39340b2c7abc03) Docs: Document the exception in no-unsafe-negation (#12161) (Milos Djermanovic) - -v6.2.2 - August 23, 2019 - -* [`0e0b784`](https://github.com/eslint/eslint/commit/0e0b784b922051c2a1d39dd8160382114b645800) Upgrade: espree@^6.1.1 (#12158) (Kevin Partington) -* [`04e859f`](https://github.com/eslint/eslint/commit/04e859f228d081efd3af6edb22563dbc775f8d1d) Sponsors: Sync README with website (ESLint Jenkins) -* [`34783d1`](https://github.com/eslint/eslint/commit/34783d10ff9b58a3c1e39a36e10864caeb9f66e0) Sponsors: Sync README with website (ESLint Jenkins) -* [`b809e72`](https://github.com/eslint/eslint/commit/b809e72221bc658e5a42bfd4b8723d3771571f9e) Docs: Update README team and sponsors (ESLint Jenkins) - -v6.2.1 - August 20, 2019 - -* [`8c021b5`](https://github.com/eslint/eslint/commit/8c021b5917b3aa3c578ffe3972106d0a6bcf0838) Upgrade: eslint-utils 1.4.2 (#12131) (Toru Nagashima) -* [`e82388b`](https://github.com/eslint/eslint/commit/e82388bd87717430200ec554634cc08806e38d3c) Sponsors: Sync README with website (ESLint Jenkins) -* [`4aeeeed`](https://github.com/eslint/eslint/commit/4aeeeedb656ee3519ea82ebf0cb41ca801215046) Docs: update docs for ecmaVersion 2020 (#12120) (silverwind) -* [`6886148`](https://github.com/eslint/eslint/commit/6886148d1f528659ec3e125f61ef7a5f4c67556d) Docs: Add duplicate keys limitation to accessor-pairs (#12124) (Milos Djermanovic) - -v6.2.0 - August 18, 2019 - -* [`fee6acb`](https://github.com/eslint/eslint/commit/fee6acbe13cecd4c028e681e185fc6a6d6ba9452) Update: support bigint and dynamic import (refs #11803) (#11983) (Toru Nagashima) -* [`afd8012`](https://github.com/eslint/eslint/commit/afd8012c2797f2f5bf3c360cb241ea2ba6e1a489) New: noInlineConfig setting (refs eslint/rfcs#22) (#12091) (Toru Nagashima) -* [`3d12378`](https://github.com/eslint/eslint/commit/3d12378221961439c27ddae0ecda9845ac575107) Update: Fix accessor-pairs to enforce pairs per property in literals (#12062) (Milos Djermanovic) -* [`8cd00b3`](https://github.com/eslint/eslint/commit/8cd00b308987e0db0bdb2e242bf13b2b07b350bd) New: function-call-argument-newline (#12024) (finico) -* [`30ebf92`](https://github.com/eslint/eslint/commit/30ebf929f60684520b1201c1adfd86214c19d614) Fix: prefer-template autofix produces syntax error with octal escapes (#12085) (Milos Djermanovic) -* [`13c3988`](https://github.com/eslint/eslint/commit/13c3988a4001ae368ea7b6c8d3dd0abfa7c6cf64) Fix: Check literal type explicitly in dot-notation (#12095) (Milos Djermanovic) -* [`3e5ceca`](https://github.com/eslint/eslint/commit/3e5ceca4d2284b55a2292a1d3de9aa4cdf6fa213) Fix: Handle empty string property names in getFunctionNameWithKind (#12104) (Milos Djermanovic) -* [`9a043ff`](https://github.com/eslint/eslint/commit/9a043ffbb864fc65baeb16fe5668435e3b7cfe34) Fix: no-duplicate-case false positives on Object.prototype keys (#12107) (Milos Djermanovic) -* [`fe631af`](https://github.com/eslint/eslint/commit/fe631afee59641876598d19b1935967099cc6fa0) Chore: minor typo fix (#12112) (James George) -* [`4cb7877`](https://github.com/eslint/eslint/commit/4cb78774f6cc687a3c8701462f8c7f7b587ecaf0) Fix: fix no-extra-parens ignores some nodes (#11909) (Pig Fang) -* [`2dc23b8`](https://github.com/eslint/eslint/commit/2dc23b81e54defbce7a70a7f26c2e4c7b692cf58) Update: fix no-dupe-keys false negatives on empty string names (#12069) (Milos Djermanovic) -* [`19ab666`](https://github.com/eslint/eslint/commit/19ab6666e8e4142a183bdee2be96e5bafbac0e21) Fix: yoda exceptRange false positives on empty string property names (#12071) (Milos Djermanovic) -* [`d642150`](https://github.com/eslint/eslint/commit/d642150fe016608e71a1df2a72960e915b3cfbad) Update: Check empty string property names in sort-keys (#12073) (Milos Djermanovic) -* [`acce6de`](https://github.com/eslint/eslint/commit/acce6de940e2b089ff5ba59e4518a54af1682d5e) Fix: class-methods-use-this reports 'undefined' names (#12103) (Milos Djermanovic) -* [`92ec2cb`](https://github.com/eslint/eslint/commit/92ec2cb1731b7b6e0ac66336d583fbb782504290) Fix: Allow bind call with a single spread element in no-extra-bind (#12088) (Milos Djermanovic) -* [`bfdb0c9`](https://github.com/eslint/eslint/commit/bfdb0c97003fc0e045aa6ed10b177c35305a6e46) Fix: no-extra-boolean-cast invalid autofix for Boolean() without args (#12076) (Milos Djermanovic) -* [`34ccc0c`](https://github.com/eslint/eslint/commit/34ccc0cd81f495190e585c6efa8ae233d45bd3ed) Chore: Remove TDZ scope type condition from no-unused-vars (#12055) (Milos Djermanovic) -* [`01d38ce`](https://github.com/eslint/eslint/commit/01d38ce2faf0abbc9dd5d25694baeee131036165) Docs: Remove TDZ scope from the scope manager interface documentation (#12054) (Milos Djermanovic) -* [`1aff8fc`](https://github.com/eslint/eslint/commit/1aff8fc4f9394cd9126654a55f7f3a43ab1cf8f0) Update: warn about mixing ternary and logical operators (fixes #11704) (#12001) (Karthik Priyadarshan) -* [`11be2f8`](https://github.com/eslint/eslint/commit/11be2f8513bd61499f6247392a33ac0a26901c90) Docs: do not recommend global-installed usage (#12016) (薛定谔的猫) -* [`cf31dab`](https://github.com/eslint/eslint/commit/cf31dab5d5982151e0cfcc32879e69a83180ec70) Fix: no-restricted-syntax - correct the schema (#12051) (Brad Zacher) -* [`fbec99e`](https://github.com/eslint/eslint/commit/fbec99ea3e39316791685652c66e522d698f52d8) Update: fix class-methods-use-this false negatives with exceptMethods (#12077) (Milos Djermanovic) -* [`fb08b7c`](https://github.com/eslint/eslint/commit/fb08b7c9d28bc68864eb940e26df274059228b6a) Docs: Remove readonly/writable global logic from no-undef (fixes #11963) (#12053) (Milos Djermanovic) -* [`5b5934b`](https://github.com/eslint/eslint/commit/5b5934b9513f9114f5bf8e12ff4f4981590d64d3) Sponsors: Sync README with website (ESLint Jenkins) -* [`9156760`](https://github.com/eslint/eslint/commit/915676022a100ae5dba788fa3329d34b3c1f18d3) Sponsors: Sync README with website (ESLint Jenkins) -* [`f5e0cc4`](https://github.com/eslint/eslint/commit/f5e0cc40795f175692acb05daaadb91e9e5ae5d3) Update: Check computed method keys in no-extra-parens (#11973) (Milos Djermanovic) -* [`d961438`](https://github.com/eslint/eslint/commit/d9614388df8cfb977842ed7ac4725d76a3e05df3) Docs: Fix Incorrect Documentation (#12045) (Michael Miceli) -* [`887d08c`](https://github.com/eslint/eslint/commit/887d08c244e32f1fc18359e63380e2cdb0cb3797) Sponsors: Sync README with website (ESLint Jenkins) -* [`d90183f`](https://github.com/eslint/eslint/commit/d90183ff6757cff854f4ca4d25b835143dfb4b21) Docs: add a case to func-names (#12038) (Chiawen Chen) -* [`8a5b62d`](https://github.com/eslint/eslint/commit/8a5b62de2ae574f416c0f8ad91205da9b1837275) Docs: no use eslint.linter in code example (#12037) (薛定谔的猫) -* [`5831767`](https://github.com/eslint/eslint/commit/58317673210e48be3975e317c2c566fae155c94f) Update: report location of func-names (fixes #12022) (#12028) (Pig Fang) - -v6.1.0 - July 20, 2019 - -* [`8f86cca`](https://github.com/eslint/eslint/commit/8f86ccaa89daf10123370868c5dcb48c1fcbef7d) Upgrade: eslint-scope@^5.0.0 (#12011) (Kevin Partington) -* [`d08683e`](https://github.com/eslint/eslint/commit/d08683e3c807f92daf266894093c70f8d5ac6afa) Fix: glob processing (fixes #11940) (#11986) (Toru Nagashima) -* [`bfcf8b2`](https://github.com/eslint/eslint/commit/bfcf8b21011466b570b536ca31ec10fd228b3dca) Fix: dot-location errors with parenthesized objects (fixes #11868) (#11933) (Milos Djermanovic) -* [`79e8d09`](https://github.com/eslint/eslint/commit/79e8d099bbbebfa4d804484eeeeea9c074ede870) Fix: add parens for sequence expr in arrow-body-style (fixes #11917) (#11918) (Pig Fang) -* [`105c098`](https://github.com/eslint/eslint/commit/105c098f3cece8b83ab8d1566b8ea41dd94a60b9) Docs: update docs for object-curly-spacing (fixes #11634) (#12009) (Chiawen Chen) -* [`c90a12c`](https://github.com/eslint/eslint/commit/c90a12c283698befcafd2c86f8bd8942428fe80b) Chore: update release script for new website repo (#12006) (Kai Cataldo) -* [`e2c08a9`](https://github.com/eslint/eslint/commit/e2c08a9c8d86238955ecc8fd5a626584ee91eba5) Sponsors: Sync README with website (ESLint Jenkins) -* [`b974fcb`](https://github.com/eslint/eslint/commit/b974fcbd3321ab382a914520018d4c051b2e5c62) Update: Check computed property keys in no-extra-parens (#11952) (Milos Djermanovic) -* [`222d27c`](https://github.com/eslint/eslint/commit/222d27c32a6d6d8828233b3b99e93ecefa94c603) Update: Add for-in and for-of checks for props in no-param-reassign (#11941) (Milos Djermanovic) -* [`e4c450f`](https://github.com/eslint/eslint/commit/e4c450febc9bd77b33f6473667afa9f955be6b71) Fix: no-extra-parens autofix with `in` in a for-loop init (fixes #11706) (#11848) (Milos Djermanovic) -* [`2dafe2d`](https://github.com/eslint/eslint/commit/2dafe2d288d1e0d353bb938d12a5da888091cfdb) Fix: prefer-const produces invalid autofix (fixes #11699) (#11827) (Milos Djermanovic) -* [`cb475fd`](https://github.com/eslint/eslint/commit/cb475fd8c0bbfcb00340459966b6780f39ea87a7) Fix: Cache file error handling on read-only file system. (fixes #11945) (#11946) (Cuki) -* [`89412c3`](https://github.com/eslint/eslint/commit/89412c3cbc52e556dba590fa94e10bf40faf1fdf) Docs: Fixed a typo (fixes #11999) (#12000) (Eddie Olson) -* [`6669f78`](https://github.com/eslint/eslint/commit/6669f78a3dd305aef6191e7eea24fae2ae4fd2e8) Fix: --init with Vue.js failed (fixes #11970) (#11985) (Toru Nagashima) -* [`93633c2`](https://github.com/eslint/eslint/commit/93633c2b3716b17816bcb3dc221c49b75db41317) Upgrade: Upgrade lodash dependency (fixes #11992) (#11994) (Cyd La Luz) -* [`776dae7`](https://github.com/eslint/eslint/commit/776dae71f2f5c7b5f0650ea3c277eca26e324e41) Docs: fix wrong Node.js version in getting started (#11993) (Toru Nagashima) -* [`4448261`](https://github.com/eslint/eslint/commit/4448261f5d217d8a06eb0ef898401928b54a34e3) Docs: some typos and optimization points (#11960) (Jason Lee) -* [`2a10856`](https://github.com/eslint/eslint/commit/2a10856d1ed5880a09a5ba452bd80d49c1be4e6c) Chore: Add temporary test files to .gitignore (#11978) (Milos Djermanovic) -* [`d83b233`](https://github.com/eslint/eslint/commit/d83b23382de3b80056a7e6330ed5846316c94147) Chore: update path for release bundles (#11977) (Kai Cataldo) -* [`1fb3620`](https://github.com/eslint/eslint/commit/1fb362093a65b99456a11029967d9ee0c31fd697) Fix: creating of enabledGlobals object without prototype (fixes #11929) (#11935) (finico) -* [`c2f2db9`](https://github.com/eslint/eslint/commit/c2f2db97c6d6a415b78ee7b3e8924853d465e757) Docs: Replace global true and false with writable and readonly in rules (#11956) (Milos Djermanovic) -* [`19335b8`](https://github.com/eslint/eslint/commit/19335b8f47029b2f742d5507ba39484eaf68d07b) Fix: actual messageId and expected messageId are switched in rule tester (#11928) (Milos Djermanovic) -* [`8b216e0`](https://github.com/eslint/eslint/commit/8b216e04fb0dd0a1a4d3730ebe4b24780020b09c) Docs: Fix incorrect example comments for unicode-bom rule (fixes #11937) (#11938) (Brandon Yeager) -* [`cc3885b`](https://github.com/eslint/eslint/commit/cc3885b028e29ebc575c900f43af81cb0dabffb6) Chore: add v8-compile-cache to speed up instantiation time (#11921) (薛定谔的猫) -* [`d8f2688`](https://github.com/eslint/eslint/commit/d8f26886f19a17f2e1cdcb91e2db84fc7ba3fdfb) Upgrade: deps (#11904) (薛定谔的猫) -* [`e5f1ccc`](https://github.com/eslint/eslint/commit/e5f1ccc9e2d07ad0acf149027ffc382021d54da1) Docs: add 'stricter rule config validating' in migrating docs (#11905) (薛定谔的猫) - -v6.0.1 - June 24, 2019 - -* [`b5bde06`](https://github.com/eslint/eslint/commit/b5bde0669bd6a7a6b8e38cdf204d8d4b932cea63) Fix: --rulesdir option didn't work (fixes #11888) (#11890) (Toru Nagashima) -* [`13f0418`](https://github.com/eslint/eslint/commit/13f041897ee31982808a57b4d06450b57c9b27dc) Fix: improve error message on --print-config (fixes #11874) (#11885) (Toru Nagashima) -* [`056c2aa`](https://github.com/eslint/eslint/commit/056c2aaf39a5f8d06de24f06946dda95032a0361) Fix: improve diagnostics for shareable-config-missing errors (#11880) (Teddy Katz) -* [`566b7aa`](https://github.com/eslint/eslint/commit/566b7aa5d61fb31cd47fe4da7820b07cf9bde1ec) Docs: Update no-confusing-arrow with the new default option (#11886) (Yuping Zuo) -* [`d07f3fa`](https://github.com/eslint/eslint/commit/d07f3fae19b901c30cf4998f10722cb3182bd237) Fix: CLIEngine#getRules() contains plugin rules (fixes #11871) (#11872) (Toru Nagashima) -* [`21f4a80`](https://github.com/eslint/eslint/commit/21f4a8057ccc941f72bb617ae3b5c135a774f6c0) Docs: Fix inconsistent linking in migration guide (#11881) (Teddy Katz) -* [`f3a0774`](https://github.com/eslint/eslint/commit/f3a0774a8879b08777a4aedc76677f13d5156242) Docs: Fix typo in 6.0.0 migration guide (#11870) (Kevin Partington) - -v6.0.0 - June 21, 2019 - -* [`81aa06b`](https://github.com/eslint/eslint/commit/81aa06b4cc49e9c15234a2c4d27659a03fea53d8) Upgrade: espree@6.0.0 (#11869) (Teddy Katz) -* [`5f022bc`](https://github.com/eslint/eslint/commit/5f022bc91d0d93d140876ceb1ee4e08b1b7cfd49) Fix: no-else-return autofix produces name collisions (fixes #11069) (#11867) (Milos Djermanovic) -* [`ded9548`](https://github.com/eslint/eslint/commit/ded9548d881b15e771ca79b844e8159601f30f70) Fix: multiline-comment-style incorrect message (#11864) (golopot) -* [`cad074d`](https://github.com/eslint/eslint/commit/cad074d4ddb34a59183b5965ca50170713b5a711) Docs: Add JSHint W047 compat to no-floating-decimal (#11861) (Timo Tijhof) -* [`41f6304`](https://github.com/eslint/eslint/commit/41f6304ce641a82ee729251b448dceb9fb0d501d) Upgrade: sinon (#11855) (Toru Nagashima) -* [`167ce87`](https://github.com/eslint/eslint/commit/167ce87e908ec04b0d3d79960278d45c883c4285) Chore: remove unuseable profile command (#11854) (Toru Nagashima) -* [`c844c6f`](https://github.com/eslint/eslint/commit/c844c6f2ff314cfa8c6ca0e35a1ef58b7e297b79) Fix: max-len properly ignore trailing comments (fixes #11838) (#11841) (ZYSzys) -* [`1b5661a`](https://github.com/eslint/eslint/commit/1b5661ae467c227c0239e06cc1466480004aa799) Fix: no-var should not fix variables named 'let' (fixes #11830) (#11832) (Milos Djermanovic) -* [`4d75956`](https://github.com/eslint/eslint/commit/4d75956147b6fd662ee90eb21d3f762816463b88) Build: CI with Azure Pipelines (#11845) (Toru Nagashima) -* [`1db3462`](https://github.com/eslint/eslint/commit/1db346220889305a427b45a00afcf362b81b3767) Chore: rm superfluous argument & fix perf-multifiles-targets (#11834) (薛定谔的猫) -* [`c57a4a4`](https://github.com/eslint/eslint/commit/c57a4a4a993193c4208c6419df331a7bc644a536) Upgrade: @babel/polyfill => core-js v3 (#11833) (薛定谔的猫) -* [`65faa04`](https://github.com/eslint/eslint/commit/65faa04e8b42eecd4505111bbff296951179f033) Docs: Clarify prefer-destructuring array/object difference (fixes #9970) (#11851) (Oliver Sieweke) -* [`81c3823`](https://github.com/eslint/eslint/commit/81c382378923a45015bafe58362f6c8faa5c3d5f) Fix: require-atomic-updates reports parameters (fixes #11723) (#11774) (Toru Nagashima) -* [`aef8ea1`](https://github.com/eslint/eslint/commit/aef8ea1a44b9f13d468f48536c4c93f79f201d9b) Sponsors: Sync README with website (ESLint Jenkins) - -v6.0.0-rc.0 - June 9, 2019 - -* [`f403b07`](https://github.com/eslint/eslint/commit/f403b07283f91f1285d8318d6acea851dd765755) Update: introduce minKeys option to sort-keys rule (fixes #11624) (#11625) (Christian) -* [`87451f4`](https://github.com/eslint/eslint/commit/87451f4779bc4c0ec874042b6854920f947ee258) Fix: no-octal should report NonOctalDecimalIntegerLiteral (fixes #11794) (#11805) (Milos Djermanovic) -* [`e4ab053`](https://github.com/eslint/eslint/commit/e4ab0531c4e44c23494c6a802aa2329d15ac90e5) Update: support "bigint" in valid-typeof rule (#11802) (Colin Ihrig) -* [`e0fafc8`](https://github.com/eslint/eslint/commit/e0fafc8ef59a80a6137f4170bbe46582d6fbcafc) Chore: removes unnecessary assignment in loop (#11780) (Dimitri Mitropoulos) -* [`20908a3`](https://github.com/eslint/eslint/commit/20908a38f489c285abf8fceef4d9d13bf8b87f22) Docs: removed '>' prefix from from docs/working-with-rules (#11818) (Alok Takshak) -* [`1c43eef`](https://github.com/eslint/eslint/commit/1c43eef605a9cf02a157881424ea62dcae747f69) Sponsors: Sync README with website (ESLint Jenkins) -* [`21f3131`](https://github.com/eslint/eslint/commit/21f3131aa1636afa8e5c01053e0e870f968425b1) Fix: `overrides` handle relative paths as expected (fixes #11577) (#11799) (Toru Nagashima) -* [`5509cdf`](https://github.com/eslint/eslint/commit/5509cdfa1b3d575248eef89a935f79c82e3f3071) Fix: fails the test case if autofix made syntax error (fixes #11615) (#11798) (Toru Nagashima) -* [`cb1922b`](https://github.com/eslint/eslint/commit/cb1922bdc07e58de0e55c13fd992dd8faf3292a4) Fix: show custom message for namespace import (fixes #11580) (#11791) (Pig Fang) -* [`37e5193`](https://github.com/eslint/eslint/commit/37e5193102d7544f155cdcb09c7c50dc602914d4) Update: add `endColumn` to no-useless-escape (fixes #11629) (#11790) (Pig Fang) -* [`ad4b048`](https://github.com/eslint/eslint/commit/ad4b048c6d034cbd7fd97deb4390d059bde8803f) Build: Fix typo in blog post template (fixes #11614) (#11782) (Kai Cataldo) -* [`9590587`](https://github.com/eslint/eslint/commit/9590587cef74c936ef9b7ce2d22a71e2fd0fbbc4) Update: improve reported location of arrow-parens (fixes #11773) (#11775) (Pig Fang) -* [`d662b17`](https://github.com/eslint/eslint/commit/d662b178c7dad193201564d16f7977af2f81ebcf) New: Add classname attribute to JUnit testcase (refs #11068) (#11683) (Fabio Pitino) -* [`8eaa9b2`](https://github.com/eslint/eslint/commit/8eaa9b259dc08dfb48269b1e4413d0d47698ed87) Chore: remove incorrect comment (#11769) (薛定谔的猫) -* [`4039a49`](https://github.com/eslint/eslint/commit/4039a49177f2fefacd747050b420c0c4560b7d4b) Chore: add .github/funding.yml (#11764) (Toru Nagashima) - -v6.0.0-alpha.2 - May 25, 2019 - -* [`9b87fee`](https://github.com/eslint/eslint/commit/9b87fee9dc7b1d99a50b924cb6b81255ebb5c4a2) Chore: Fix formatter documentation generation (#11767) (Ilya Volodin) -* [`f116208`](https://github.com/eslint/eslint/commit/f11620848733a3a6f58811d9bb2c3e748d6135ac) Chore: Fix site generation script for releases (#11766) (Ilya Volodin) -* [`cf9cce8`](https://github.com/eslint/eslint/commit/cf9cce81aa68e9bc23840530cb33f4c3f551fb1e) Update: Add never option for new-parens (refs #10034) (#11379) (pfgithub) -* [`b5fa149`](https://github.com/eslint/eslint/commit/b5fa1491d2371a721e4b5029e797ae98fd30fed2) New: multiple processors support (fixes #11035, fixes #11725) (#11552) (Toru Nagashima) -* [`2d32a9e`](https://github.com/eslint/eslint/commit/2d32a9e8dd10a5927576bd50d184876c775da4af) Breaking: stricter rule config validating (fixes #9505) (#11742) (薛定谔的猫) -* [`71716eb`](https://github.com/eslint/eslint/commit/71716eba3155266d777b994a38af524952e97696) Update: add fixer for no-div-regex rule (fixes #11355) (#11744) (joe-re) -* [`53f7f4c`](https://github.com/eslint/eslint/commit/53f7f4cf8d8b66a1911db56e4f72764388a21cc4) Update: Uniform messages for the rules in "complexity" section (#11759) (Igor Novozhilov) -* [`0a801d7`](https://github.com/eslint/eslint/commit/0a801d702dc41dae7eac0c802b822493ddc3ac41) Chore: improve perf test (#11756) (薛定谔的猫) -* [`45bd336`](https://github.com/eslint/eslint/commit/45bd336e647a6fa8a502488e5cbd27ba02712083) Docs: add about RuleTester's parser to migration guide (fixes #11728) (#11761) (Toru Nagashima) -* [`1374be4`](https://github.com/eslint/eslint/commit/1374be44f7ec4b8c913c52cc84debc4012c4f3ea) Docs: add table of contents in readme (#11765) (薛定谔的猫) -* [`54e6eda`](https://github.com/eslint/eslint/commit/54e6edaa2f881aab530fa14e63d92e5e0e2ca55c) New: extends in glob-based config (fixes #8813) (#11554) (Toru Nagashima) -* [`ec105b2`](https://github.com/eslint/eslint/commit/ec105b24f7e036ecdc4267f018529ac3765e29d5) Chore: typo in JSDoc on timing.display's return value (#11755) (Dimitri Mitropoulos) -* [`e45cc3f`](https://github.com/eslint/eslint/commit/e45cc3f3dc44f3a5b6b713a1bf5ce6e46d87ca49) Docs: updated no-proto rule (fixes #11743) (#11746) (Francesco Trotta) -* [`15c6c63`](https://github.com/eslint/eslint/commit/15c6c6374c0425d5402142d012a541fa208bc9da) Chore: eslint-config-eslint require node >= 8 (#11718) (薛定谔的猫) -* [`f9790ca`](https://github.com/eslint/eslint/commit/f9790ca1baec1275f3c946586766a5713258ac32) Fix: typo: missing word in docs (#11750) (Dimitri Mitropoulos) -* [`219aecb`](https://github.com/eslint/eslint/commit/219aecb78bc646d44bad27dc775a9b3d3dc58232) Chore: restructure files (#11555) (Toru Nagashima) -* [`5dad0b1`](https://github.com/eslint/eslint/commit/5dad0b1d80c9cf380c49f46266c35d461d3cecad) Fix: Unignoring directories in .eslintignore (fixes #11684) (#11685) (Mykola Bilochub) -* [`4625090`](https://github.com/eslint/eslint/commit/462509058e46770cf70307cf8dba279f0e73b967) Docs: small fix about the migration guide (#11729) (Toru Nagashima) -* [`0e89c73`](https://github.com/eslint/eslint/commit/0e89c73177398eaf978a50d5b0f79ff8e43512f2) Sponsors: Sync README with website (ESLint Jenkins) -* [`5a296fa`](https://github.com/eslint/eslint/commit/5a296fa0c9345ad1a55e2b257e5f6c9f05fff362) Sponsors: Sync README with website (ESLint Jenkins) -* [`7c8e86b`](https://github.com/eslint/eslint/commit/7c8e86bf2c900cec7cd1dfd529a8c77cc81ef34c) Fix: wrong 'plugin-missing' error on Node.js 12 (fixes #11720) (#11722) (Toru Nagashima) -* [`67c671f`](https://github.com/eslint/eslint/commit/67c671fdc1c8b08cb8d263a9bb2151e3108c88b4) Chore: ignore deprecated rules in fuzz tests (#11710) (Pig Fang) -* [`af81cb3`](https://github.com/eslint/eslint/commit/af81cb3ecc5e6bf43a6a2d8f326103350513a1b8) Chore: make fuzzer produce minimal reproducible examples of bugs (#11700) (Teddy Katz) - -v6.0.0-alpha.1 - May 10, 2019 - -* [`e84b6f8`](https://github.com/eslint/eslint/commit/e84b6f8b171ba4266164688f76d5ee45d278e5c2) Docs: fix example in object-curly-newline docs (#11633) (golopot) -* [`252efd3`](https://github.com/eslint/eslint/commit/252efd337b1441debb6d2cc8f51a625549b2c535) Fix: delete unnecessary duplicated question (fixes #11617) (#11618) (HelloRusk) -* [`21dd211`](https://github.com/eslint/eslint/commit/21dd2116c70b93aa8dd50d2b15e202724b11486a) New: add --resolve-plugins-relative-to flag (#11696) (Teddy Katz) -* [`1a3a88d`](https://github.com/eslint/eslint/commit/1a3a88df2f952c34631d8e1d83de47178826fce0) Fix: Curly rule incorrectly flagging lexical declarations (fixes #11663) (#11675) (Brian Kurek) -* [`f42d0af`](https://github.com/eslint/eslint/commit/f42d0afd89874b459fce1eb1998247d53f9aa42b) Chore: lazy loading for rules (#11705) (Toru Nagashima) -* [`f47d72c`](https://github.com/eslint/eslint/commit/f47d72ce2f2edb80cd38810894b9d4bda896bb29) Fix: not set ecmaVersion to 6 when sourceType=module (fixes #9687) (#11649) (薛定谔的猫) -* [`9484e9e`](https://github.com/eslint/eslint/commit/9484e9ea188ff70683c3112e397c7fddcc3f8095) Fix: ignore return statements in dead code (fixes #11647) (#11688) (Toru Nagashima) -* [`aae6f65`](https://github.com/eslint/eslint/commit/aae6f6525557ba06e73f051511646056313fcf91) Fix: don't use deprecated API (#11689) (Toru Nagashima) -* [`483239e`](https://github.com/eslint/eslint/commit/483239ec74a0c13529fc99547a784b749f41dd54) Docs: updated ImportDeclaration in docs-rules-indent (#11679) (Alok Takshak) -* [`f5bae78`](https://github.com/eslint/eslint/commit/f5bae78c19d5359f67969a2ff344025082e253f4) Chore: fix CLIEngine tests when os.tmpdir is a symlink (#11697) (Teddy Katz) -* [`e4400b5`](https://github.com/eslint/eslint/commit/e4400b5a02602bba7f67ea4cb874c231903c546a) Fix: require-atomic-updates false positive (fixes #11194, fixes #11687) (#11224) (Toru Nagashima) -* [`6ae21a4`](https://github.com/eslint/eslint/commit/6ae21a4bfe5a1566f787fbad798182a524b96d28) Breaking: fix config loading (fixes #11510, fixes #11559, fixes #11586) (#11546) (Toru Nagashima) -* [`bc0819c`](https://github.com/eslint/eslint/commit/bc0819c94aad14f7fad3cbc2338ea15658b0f272) Sponsors: Sync README with website (ESLint Jenkins) -* [`036a188`](https://github.com/eslint/eslint/commit/036a188143677384f720ff18071fc4206c54500b) Sponsors: Sync README with website (ESLint Jenkins) -* [`4b3b036`](https://github.com/eslint/eslint/commit/4b3b036d6240cdbc2d52e670de36b1117f5f34d7) Docs: replace `var` with `const` in code examples (#11655) (Niyaz Akhmetov) -* [`e4a08ba`](https://github.com/eslint/eslint/commit/e4a08bae82788136b6899262cb8b9ed4fe7964e6) Chore: update eslint-plugin-node to 9.0.0 (#11670) (Toru Nagashima) -* [`f2e7828`](https://github.com/eslint/eslint/commit/f2e78281d057f38b18cc160e81ed1bb54a5b9565) Docs: Fix Node 6 LTS EOL date (#11676) (James Ross) -* [`4052bfe`](https://github.com/eslint/eslint/commit/4052bfebb87850b901f2eb8687edfbe49c01d68f) Sponsors: Sync README with website (ESLint Jenkins) -* [`f6fc045`](https://github.com/eslint/eslint/commit/f6fc0450e749707bed44118c1205fb4e73e65628) Sponsors: Sync README with website (ESLint Jenkins) -* [`1ebf21b`](https://github.com/eslint/eslint/commit/1ebf21bc18769956366110bb62ff677639e633ae) Sponsors: Sync README with website (ESLint Jenkins) -* [`776b0fe`](https://github.com/eslint/eslint/commit/776b0fe3d93da958517ac7752682091f22eb30b4) Fix: update rule message of no-throw-literal (fixes #11637) (#11638) (Pig Fang) -* [`67c08b6`](https://github.com/eslint/eslint/commit/67c08b67509c54acd96aab2cec22efb53bfe6265) Fix: consider comments in object-curly-spacing (fixes #11656) (#11657) (Pig Fang) -* [`b6d41cb`](https://github.com/eslint/eslint/commit/b6d41cbe28a8b28b1c1d9aa36cb4c349c73f6f1d) Fix: check token before using in no-cond-assign (fixes #11611) (#11619) (Pig Fang) -* [`7f290a9`](https://github.com/eslint/eslint/commit/7f290a9044ca795884ac2e495cd31b2a35f109a6) Chore: add eslint as a devDependeny (#11654) (Toru Nagashima) -* [`139fd2f`](https://github.com/eslint/eslint/commit/139fd2f1254bcc524738f8c2645e0847df95e0d0) Chore: add markdownlint-cli (#11653) (Toru Nagashima) -* [`adc6585`](https://github.com/eslint/eslint/commit/adc6585ce074e03fc8a842e8ebc5b082a0ed0b65) Docs: update status of breaking changes in migration guide (#11652) (Teddy Katz) -* [`eef71e4`](https://github.com/eslint/eslint/commit/eef71e455e67040168c8df8a6c9c2b4fbe805a50) Docs: add missing items to migration guide (#11628) (Teddy Katz) -* [`0fc8e62`](https://github.com/eslint/eslint/commit/0fc8e62818bc8d0a0a804b59c6110818844df5f3) Breaking: eslint:recommended changes (fixes #10768) (#11518) (薛定谔的猫) -* [`1c34d4a`](https://github.com/eslint/eslint/commit/1c34d4a6313c399761281282fff3a1bbe5e17b6d) Sponsors: Sync README with website (ESLint Jenkins) -* [`33695e7`](https://github.com/eslint/eslint/commit/33695e7f7048306ac196eff6e5a16e165ad03090) Sponsors: Sync README with website (ESLint Jenkins) -* [`c94cf21`](https://github.com/eslint/eslint/commit/c94cf212d31513fde74e0ea88b79e5e0f89a18a4) Sponsors: Sync README with website (ESLint Jenkins) -* [`f62a451`](https://github.com/eslint/eslint/commit/f62a4510b007172c7160f007a6ec2aa2c9a80dd7) Build: add node 12 (#11648) (薛定谔的猫) -* [`20364cc`](https://github.com/eslint/eslint/commit/20364cc4f7fe0423adce0dd44fb24fc48e1cae4b) Breaking: make no-redeclare stricter (fixes #11370, fixes #11405) (#11509) (Toru Nagashima) -* [`ed675a6`](https://github.com/eslint/eslint/commit/ed675a6e5ac42898555c51a7cf771b79695ba591) Sponsors: Sync README with website (ESLint Jenkins) -* [`8b4dba6`](https://github.com/eslint/eslint/commit/8b4dba606f8306f8ad0a37e2174a6e3236f7ebe7) Chore: Add linting to git commit (#11556) (Nicholas C. Zakas) -* [`8684f46`](https://github.com/eslint/eslint/commit/8684f4646da33bfe81e8f7f8c2d1af8b31065564) Sponsors: Sync README with website (ESLint Jenkins) -* [`1bdacc9`](https://github.com/eslint/eslint/commit/1bdacc9b703158d5ca3563e4a9b67bb8453ac316) Sponsors: Sync README with website (ESLint Jenkins) -* [`e62c8af`](https://github.com/eslint/eslint/commit/e62c8af6a86e35dc05f30713faf87a18cc77714d) Sponsors: Sync README with website (ESLint Jenkins) -* [`1dfe077`](https://github.com/eslint/eslint/commit/1dfe077b7e47c6090277eb984e08bd472bb5595e) Fix: autofix of no-unneeded-ternary made syntax error (fixes #11579) (#11616) (Toru Nagashima) -* [`bebd079`](https://github.com/eslint/eslint/commit/bebd0793eaf122b013cca501ff2c6b0fc05d5493) Docs: fix grammar mistake in no-caller docs (#11623) (Daniel Lemay) -* [`f570be1`](https://github.com/eslint/eslint/commit/f570be17b339cb7622c512331b1653013279855a) Sponsors: Sync README with website (ESLint Jenkins) -* [`7c13a1c`](https://github.com/eslint/eslint/commit/7c13a1c144a6a7c99cd9338a24166da9f7439cd0) Sponsors: Sync README with website (ESLint Jenkins) -* [`b7bd432`](https://github.com/eslint/eslint/commit/b7bd432e1161feba8dbb81f62cf03cafad42c3d4) Sponsors: Sync README with website (ESLint Jenkins) -* [`412a76b`](https://github.com/eslint/eslint/commit/412a76b316e05ca85334c1d6bc6372df536da2db) Sponsors: Sync README with website (ESLint Jenkins) - -v6.0.0-alpha.0 - April 12, 2019 - -* [`3d9e137`](https://github.com/eslint/eslint/commit/3d9e1372aad1e174b5438e3d6bd75fdefba06bad) Chore: fix test that fails when the CWD contains a space (#11612) (Teddy Katz) -* [`8bfd1d1`](https://github.com/eslint/eslint/commit/8bfd1d138001d4493180b2fcff3330b42d0bb7cb) Docs: add v6.0.0 migration guide (#11515) (Teddy Katz) -* [`9e49b56`](https://github.com/eslint/eslint/commit/9e49b56c08fd0e449fddab45dfeb0da8d918b460) Breaking: upgrade espree to 6.0.0-alpha.0 (fixes #9687) (#11610) (Teddy Katz) -* [`0127d10`](https://github.com/eslint/eslint/commit/0127d107590acabfdea4a68b56acbeee6a7b9daa) Fix: no-var fixed to incorrect code (fixes #11441) (#11443) (薛定谔的猫) -* [`5cfdc2d`](https://github.com/eslint/eslint/commit/5cfdc2d08307c63bec487e76d2f470ef84166867) Update: Improve no-loop-func rule description and message (#11046) (Pedro Lopes) -* [`608a02c`](https://github.com/eslint/eslint/commit/608a02c60656b96c3219d342eee7e98b55bdd580) Fix: object-shorthand ignoreConstructors option (fixes #11595) (#11596) (overlookmotel) -* [`eeea893`](https://github.com/eslint/eslint/commit/eeea89361d48494995446ddb6ee6f049457911ec) Upgrade: update js-yaml package to 3.13.1 version (#11607) (Pobegaylo Maksim) -* [`e70d5f7`](https://github.com/eslint/eslint/commit/e70d5f7573a9641d7b63394df53a3ef86183445c) Upgrade: compatible deps (#11608) (薛定谔的猫) -* [`a55913d`](https://github.com/eslint/eslint/commit/a55913d6c6fd1a7c684b8b4d7ab380cf7dc83eb8) Sponsors: Sync README with website (ESLint Jenkins) -* [`9a6e8fe`](https://github.com/eslint/eslint/commit/9a6e8fe4b025d52275f7ad2959361587f476cc58) Sponsors: Sync README with website (ESLint Jenkins) -* [`cbdee62`](https://github.com/eslint/eslint/commit/cbdee6230d22522c37259449467ace16f28ea8e8) Docs: README updates to reflect JSCS compat project is finished (#11568) (Kevin Partington) -* [`b92ca6e`](https://github.com/eslint/eslint/commit/b92ca6ea8ae46b92c258921e8b5b40f5035dbc43) Fix: getErrorResults function to not mutate passed parameter (#11592) (danielamaia) -* [`ef7801e`](https://github.com/eslint/eslint/commit/ef7801ea510e12a9ca4963bcc8ec7e3aacc75ff0) Breaking: disallow invalid rule defaults in RuleTester (fixes #11473) (#11599) (Teddy Katz) -* [`c021117`](https://github.com/eslint/eslint/commit/c021117915d5d23399233f761a237e138f1854af) Sponsors: Sync README with website (ESLint Jenkins) -* [`4e7cdca`](https://github.com/eslint/eslint/commit/4e7cdca571632a3f3c32b39eb03022fe88ca8b30) Breaking: comma-dangle enable functions: "never" (fixes #11502) (#11519) (薛定谔的猫) -* [`12f256f`](https://github.com/eslint/eslint/commit/12f256f22534c4a4e1ca0ba54c37c6db81441461) Breaking: no-confusing-arrow enable allowParens: true (fixes #11503) (#11520) (薛定谔的猫) -* [`25cc63d`](https://github.com/eslint/eslint/commit/25cc63d47e6c0aea8b88589a088c1f0de5f6f1cc) Breaking: simplify config/plugin/parser resolution (fixes #10125) (#11388) (Teddy Katz) -* [`63fead8`](https://github.com/eslint/eslint/commit/63fead86f8cf4e6b33d5424fb7db1e76a66d4cce) Sponsors: Sync README with website (ESLint Jenkins) -* [`595de40`](https://github.com/eslint/eslint/commit/595de4074fac1b5839f56b29fe0106a7fda7e3e0) Docs: edit arrow-parens as-needed explanation (fixes #11202) (#11569) (Logan Lowder) -* [`3396c3e`](https://github.com/eslint/eslint/commit/3396c3e2231b5b6e16da8751c22c86c256590f6b) Upgrade: karma@^4.0.1, drops Node 6 support, fixes vulnerability (#11570) (Kevin Partington) -* [`2f8ae13`](https://github.com/eslint/eslint/commit/2f8ae1397eef3625fe66636e95b0b312c6ff8a37) Update: support single argument on newline with function-paren-newline (#11406) (Vladlen Grachev) -* [`fd1c91b`](https://github.com/eslint/eslint/commit/fd1c91b00e8d8c3a83d21e60668d5f1fa61cb214) Breaking: throw an error for invalid global configs (refs #11338) (#11517) (Teddy Katz) -* [`be83322`](https://github.com/eslint/eslint/commit/be833229b355eafb90f3e0bbc29bb106e100bed0) Breaking: Remove extra rules from eslint:recommended (fixes #10873) (#11357) (Kevin Partington) -* [`2543f11`](https://github.com/eslint/eslint/commit/2543f11dfe8069ed5096073169cf6791d42454db) Breaking: remove deprecated experimentalObjectRestSpread option (#11420) (Teddy Katz) -* [`19248e0`](https://github.com/eslint/eslint/commit/19248e0838425748d75518fe9f0a985587793378) Fix: make `overrides[].files` matching dotfiles (fixes #11201) (#11225) (Toru Nagashima) -* [`0fb5fd4`](https://github.com/eslint/eslint/commit/0fb5fd402334098dc44cbfbb8ab25919da04843d) Breaking: interpret rule options as unicode regexes (fixes #11423) (#11516) (Teddy Katz) -* [`6e7da57`](https://github.com/eslint/eslint/commit/6e7da57dddc41830df4aee77e31c4320c1557350) Breaking: drop Node.js 6 support (fixes #11456) (#11557) (Toru Nagashima) -* [`a73b4b8`](https://github.com/eslint/eslint/commit/a73b4b8d6398b00bdaf90599d9e6d1c80f000f88) Docs: Update README team and sponsors (ESLint Jenkins) - -v5.16.0 - March 29, 2019 - -* [`dfef227`](https://github.com/eslint/eslint/commit/dfef227091955a2f8f3fa8c76ad79de8a77e7955) Build: gensite passes rulesMeta to formatter rendering (#11567) (Kevin Partington) -* [`c06d38c`](https://github.com/eslint/eslint/commit/c06d38c81bd9203c904587396a65d3c8cc7f2944) Fix: Allow HTML formatter to handle no meta data (#11566) (Ilya Volodin) -* [`87a5c03`](https://github.com/eslint/eslint/commit/87a5c034977cf4538ff3539d2f8776a987c5942a) Docs: `func-style`: clarify when `allowArrowFunctions` is used (#11548) (Oliver Joseph Ash) -* [`bc3e427`](https://github.com/eslint/eslint/commit/bc3e427ee8875c53eac6b6762884b50074f1adfc) Update: pass rule meta to formatters RFC 10 (#11551) (Chris Meyer) -* [`b452f27`](https://github.com/eslint/eslint/commit/b452f270bc0b523d88d5d827c95be3096f82e99d) Chore: Update README to pull in reviewer data (#11506) (Nicholas C. Zakas) -* [`afe3d25`](https://github.com/eslint/eslint/commit/afe3d25f8afb88caee43f7202d0eb96f33a92a6b) Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550) (Vernon de Goede) -* [`4fe7eb7`](https://github.com/eslint/eslint/commit/4fe7eb7cecdc2395cf1eeaa20921bda8460b00c2) Chore: use nyc instead of istanbul (#11532) (Toru Nagashima) -* [`f16af43`](https://github.com/eslint/eslint/commit/f16af439694aab473c647d8fae47c402bd489447) Chore: fix formatters/table test (#11534) (Toru Nagashima) -* [`78358a8`](https://github.com/eslint/eslint/commit/78358a8f66e95c4fcc921f2497e8a5ec5f1537ec) Docs: fix duplicate punctuation in CLI docs (#11528) (Teddy Katz) - -v5.15.3 - March 18, 2019 - -* [`71adc66`](https://github.com/eslint/eslint/commit/71adc665b9649b173adc76f80723b8de20664ae1) Fix: avoid moving comments in implicit-arrow-linebreak (fixes #11521) (#11522) (Teddy Katz) -* [`1f715a2`](https://github.com/eslint/eslint/commit/1f715a20c145d8ccc38f3310afccd838495d09d4) Chore: make test-case-property-ordering reasonable (#11511) (Toru Nagashima) - -v5.15.2 - March 15, 2019 - -* [`29dbca7`](https://github.com/eslint/eslint/commit/29dbca73d762a809adb2f457b527e144426d54a7) Fix: implicit-arrow-linebreak adds extra characters (fixes #11268) (#11407) (Mark de Dios) -* [`5d2083f`](https://github.com/eslint/eslint/commit/5d2083fa3e14c024197f6c386ff72237a145e258) Upgrade: eslint-scope@4.0.3 (#11513) (Teddy Katz) -* [`a5dae7c`](https://github.com/eslint/eslint/commit/a5dae7c3d30231c2f5f075d98c2c8825899bab16) Fix: Empty glob pattern incorrectly expands to "/**" (#11476) (Ben Chauvette) -* [`448e8da`](https://github.com/eslint/eslint/commit/448e8da94d09b397e98ffcb6f22b55a578ef79c1) Chore: improve crash reporting (fixes #11304) (#11463) (Alex Zherdev) -* [`0f56dc6`](https://github.com/eslint/eslint/commit/0f56dc6d9eadad05dc3d5c9d1d9ddef94e10c5d3) Chore: make config validator params more consistent (#11435) (薛定谔的猫) -* [`d6c1122`](https://github.com/eslint/eslint/commit/d6c112289f0f16ade070865c8786831b7940ca79) Docs: Add working groups to maintainer guide (#11400) (Nicholas C. Zakas) -* [`5fdb4d3`](https://github.com/eslint/eslint/commit/5fdb4d3fb01b9d8a4c2dff71ed9cddb2f8feefb0) Build: compile deps to ES5 when generating browser file (fixes #11504) (#11505) (Teddy Katz) -* [`06fa165`](https://github.com/eslint/eslint/commit/06fa1655c3da8394ed9144d727115fc434b0416f) Build: update CI testing configuration (#11500) (Reece Dunham) -* [`956e883`](https://github.com/eslint/eslint/commit/956e883c21fd9f393bf6718d032a4e2e53b33f22) Docs: Fix example in no-restricted-modules docs (#11454) (Paul O’Shannessy) -* [`2c7431d`](https://github.com/eslint/eslint/commit/2c7431d6b32063f74e3837ee727f26af215eada7) Docs: fix json schema example dead link (#11498) (kazuya kawaguchi) -* [`e7266c2`](https://github.com/eslint/eslint/commit/e7266c2478aff5d66e7859313feb49e3a129f85e) Docs: Fix invalid JSON in "Specifying Parser Options" (#11492) (Mihira Jayasekera) -* [`6693161`](https://github.com/eslint/eslint/commit/6693161978a83e0730d5ea0fecdb627c5a2acdfd) Sponsors: Sync README with website (ESLint Jenkins) -* [`62fee4a`](https://github.com/eslint/eslint/commit/62fee4a976897d158c8c137339728cd280333286) Chore: eslint-config-eslint enable comma-dangle functions: "never" (#11434) (薛定谔的猫) -* [`34a5382`](https://github.com/eslint/eslint/commit/34a53829e7a63ff2f6b371d77ce283bbdd373b91) Build: copy bundled espree to website directory (#11478) (Pig Fang) -* [`f078f9a`](https://github.com/eslint/eslint/commit/f078f9a9e094ec00c61a6ef1c9550d017631e69a) Chore: use "file:" dependencies for internal rules/config (#11465) (Teddy Katz) -* [`0756128`](https://github.com/eslint/eslint/commit/075612871f85aa04cef8137bd32247e128ad600b) Docs: Add `visualstudio` to formatter list (#11480) (Patrick Eriksson) -* [`44de9d7`](https://github.com/eslint/eslint/commit/44de9d7e1aa2fcae475a97b8f597b7d8094566b2) Docs: Fix typo in func-name-matching rule docs (#11484) (Iulian Onofrei) - -v5.15.1 - March 4, 2019 - -* [`fe1a892`](https://github.com/eslint/eslint/commit/fe1a892f85b09c3d2fea05bef011530a678a6af5) Build: bundle espree (fixes eslint/eslint.github.io#546) (#11467) (薛定谔的猫) -* [`458053b`](https://github.com/eslint/eslint/commit/458053b0b541f857bf233dacbde5ba80681820f8) Fix: avoid creating invalid regex in no-warning-comments (fixes #11471) (#11472) (Teddy Katz) - -v5.15.0 - March 1, 2019 - -* [`4088c6c`](https://github.com/eslint/eslint/commit/4088c6c9d4578cd581ce8ff4385d90b58a75b755) Build: Remove path.resolve in webpack build (#11462) (Kevin Partington) -* [`ec59ec0`](https://github.com/eslint/eslint/commit/ec59ec09c8d001b8c04f9edc09994e2b0d0af0f9) New: add rule "prefer-named-capture-group" (fixes #11381) (#11392) (Pig Fang) -* [`a44f750`](https://github.com/eslint/eslint/commit/a44f75073306e5ea4e6722654009a99884fbca4f) Upgrade: eslint-scope@4.0.2 (#11461) (Teddy Katz) -* [`d3ce611`](https://github.com/eslint/eslint/commit/d3ce611e1c705440ccbcae357f2194134d026541) Sponsors: Sync README with website (ESLint Jenkins) -* [`ee88475`](https://github.com/eslint/eslint/commit/ee884754e4111e11994ff0df3f0c29e43e1dc3f2) Chore: add utils for rule tests (#11453) (薛定谔的猫) -* [`d4824e4`](https://github.com/eslint/eslint/commit/d4824e46d7a6ca1618454d3c6198403382108123) Sponsors: Sync README with website (ESLint Jenkins) -* [`6489518`](https://github.com/eslint/eslint/commit/64895185bde5233223648bcaf46f8deb72c9fb55) Fix: no-extra-parens crash when code is "((let))" (#11444) (Teddy Katz) -* [`9d20de2`](https://github.com/eslint/eslint/commit/9d20de2b0ac756bd62888119b8e08c7441d8a5aa) Sponsors: Sync README with website (ESLint Jenkins) -* [`3f14de4`](https://github.com/eslint/eslint/commit/3f14de458ba120e9c013f5fc7c6fe3e9b40c1460) Sponsors: Sync README with website (ESLint Jenkins) -* [`3d6c770`](https://github.com/eslint/eslint/commit/3d6c7709d47e047b25d91ca1a77d6dab92313061) Sponsors: Sync README with website (ESLint Jenkins) -* [`de5cbc5`](https://github.com/eslint/eslint/commit/de5cbc526b30405e742b35d85d04361529d49ed4) Update: remove invalid defaults from core rules (fixes #11415) (#11427) (Teddy Katz) -* [`eb0650b`](https://github.com/eslint/eslint/commit/eb0650ba20cf9f9ad78dbaccfeb7e0e7ab56e31d) Build: fix linting errors on master (#11428) (Teddy Katz) -* [`5018378`](https://github.com/eslint/eslint/commit/5018378131fd5190bbccca902c0cf4276ee1581a) Chore: enable require-unicode-regexp on ESLint codebase (#11422) (Teddy Katz) -* [`f6ba633`](https://github.com/eslint/eslint/commit/f6ba633f56eca6be20fc4b0d9496a78b9498d578) Chore: lint all files in the repo at the same time (#11425) (Teddy Katz) -* [`8f3d717`](https://github.com/eslint/eslint/commit/8f3d71754932669332ad7623bcc4c1aef3897125) Docs: Add non-attending TSC member info (#11411) (Nicholas C. Zakas) -* [`ce0777d`](https://github.com/eslint/eslint/commit/ce0777da5bc167fe0c529158fd8216d3eaf11565) Docs: use more common spelling (#11417) (薛定谔的猫) -* [`b9aabe3`](https://github.com/eslint/eslint/commit/b9aabe34311f6189b87c9d8a1aa40f3513fed773) Chore: run fuzzer along with unit tests (#11404) (Teddy Katz) -* [`db0c5e2`](https://github.com/eslint/eslint/commit/db0c5e2a7f894b7cda71007b0ba43d7814b3fb2e) Build: switch from browserify to webpack (fixes #11366) (#11398) (Pig Fang) - -v5.14.1 - February 18, 2019 - -* [`1d6e639`](https://github.com/eslint/eslint/commit/1d6e63930073e79e52890f552cc6e9a0646b7fb4) Fix: sort-keys throws Error at SpreadElement (fixes #11402) (#11403) (Krist Wongsuphasawat) - -v5.14.0 - February 15, 2019 - -* [`85a04b3`](https://github.com/eslint/eslint/commit/85a04b319e6dfde1458174cd1d8c9e7d33da0871) Fix: adds conditional for separateRequires in one-var (fixes #10179) (#10980) (Scott Stern) -* [`0c02932`](https://github.com/eslint/eslint/commit/0c02932f1b2e2a85809e84617efa1b8836c19cfb) Upgrade: espree@5.0.1 (#11401) (Ilya Volodin) -* [`104ae88`](https://github.com/eslint/eslint/commit/104ae881d0b21e9c64e006b2a2c21535cef0ad28) Docs: Update governance doc with reviewers status (#11399) (Nicholas C. Zakas) -* [`ab8ac6a`](https://github.com/eslint/eslint/commit/ab8ac6adaaf7a88e160899e7f438a4cfd655eb6e) Fix: Support boundary spread elements in sort-keys (#11158) (Jakub Rożek) -* [`a23d197`](https://github.com/eslint/eslint/commit/a23d1975d48841eafdead1a1357e2af842f688bc) New: add allowSingleLineBlocks opt. to padded-blocks rule (fixes #7145) (#11243) (richie3366) -* [`e25e7aa`](https://github.com/eslint/eslint/commit/e25e7aa3ea1e8c9b3cd3242acda6d4a5572c2c6a) Fix: comma-spacing ignore comma before closing paren (fixes #11295) (#11374) (Pig Fang) -* [`a1f7c44`](https://github.com/eslint/eslint/commit/a1f7c44ea9efbd9393889c1cc91b74260e0a8e02) Docs: fix space-before-blocks correct code for "classes": "never" (#11391) (PoziWorld) -* [`14f58a2`](https://github.com/eslint/eslint/commit/14f58a2bec4d6aade0de22771c378b86b1e51959) Docs: fix grammar in object-curly-spacing docs (#11389) (PoziWorld) -* [`d3e9a27`](https://github.com/eslint/eslint/commit/d3e9a27bbba30008a610df59e82b7192f0ecc3a3) Docs: fix grammar in “those who says” (#11390) (PoziWorld) -* [`ea8e804`](https://github.com/eslint/eslint/commit/ea8e8045ba0e6c1e1015104346af962f3e16fd81) Docs: Add note about support for object spread (fixes #11136) (#11395) (Steven Thomas) -* [`95aa3fd`](https://github.com/eslint/eslint/commit/95aa3fdb392d265e6c3d813d54076458e88e7ad8) Docs: Update README team and sponsors (ESLint Jenkins) -* [`51c4972`](https://github.com/eslint/eslint/commit/51c497298a15ad296a2b1f8fc397df687976b836) Update: Behavior of --init (fixes #11105) (#11332) (Nicholas C. Zakas) -* [`ad7a380`](https://github.com/eslint/eslint/commit/ad7a38097c32a91e5a831ef1bc8933601532576c) Docs: Update README team and sponsors (ESLint Jenkins) -* [`550de1e`](https://github.com/eslint/eslint/commit/550de1e611a1e9af873bcb18d74cf2056e8d2e1b) Update: use `default` keyword in JSON schema (fixes #9929) (#11288) (Pig Fang) -* [`983c520`](https://github.com/eslint/eslint/commit/983c5201210d7a4ffab0b3d05ab9919c0754e5ca) Update: Use 'readonly' and 'writable' for globals (fixes #11359) (#11384) (Nicholas C. Zakas) -* [`f1d3a7e`](https://github.com/eslint/eslint/commit/f1d3a7ee7c82365989e219b1dae379f08f6dd526) Upgrade: some deps (fixes #11372) (#11373) (薛定谔的猫) -* [`3e0c417`](https://github.com/eslint/eslint/commit/3e0c4176eff085498b813f8ba1732d7ed6ee44f8) Docs: Fix grammar in “there’s nothing prevent you” (#11385) (PoziWorld) -* [`de988bc`](https://github.com/eslint/eslint/commit/de988bc909b491366ad0cd9bc83f4d6de42d041a) Docs: Fix grammar: Spacing improve -> Spacing improves (#11386) (PoziWorld) -* [`1309dfd`](https://github.com/eslint/eslint/commit/1309dfdebb5595460b79dcac20df6a1f109e7566) Revert "Build: fix test failure on Node 11 (#11100)" (#11375) (薛定谔的猫) -* [`1e56897`](https://github.com/eslint/eslint/commit/1e56897db3e254e0aef6d2fe3274157fc379c79e) Docs: “the function actually use”: use -> uses (#11380) (PoziWorld) -* [`5a71bc9`](https://github.com/eslint/eslint/commit/5a71bc95a7e961b1b1b77022645e0bd9cdd08dc0) Docs: Update README team and sponsors (ESLint Jenkins) -* [`82a58ce`](https://github.com/eslint/eslint/commit/82a58ce26b282fd80335b3ac4fc88f21266c3ba1) Docs: Update README team and sponsors (ESLint Jenkins) -* [`546d355`](https://github.com/eslint/eslint/commit/546d355ace65631e27de859baea3ffcc50e0ad2c) Docs: Update README with latest sponsors/team data (#11378) (Nicholas C. Zakas) -* [`c0df9fe`](https://github.com/eslint/eslint/commit/c0df9febb7c7e045ababc10b88dbcbb3f28c724c) Docs: `...` is not an operator (#11232) (Felix Kling) -* [`7ecfdef`](https://github.com/eslint/eslint/commit/7ecfdefaeadb772f8b96ffe37c4a2c97fde0da16) Docs: update typescript parser (refs #11368) (#11369) (薛定谔的猫) -* [`3c90dd7`](https://github.com/eslint/eslint/commit/3c90dd7e25cf97833deddb11cfbc107a5663ac08) Update: remove prefer-spread autofix (fixes #11330) (#11365) (薛定谔的猫) -* [`5eb3121`](https://github.com/eslint/eslint/commit/5eb3121b82c1837da0c3021b7d9384bb30832e36) Update: add fixer for `prefer-destructuring` (fixes #11151) (#11301) (golopot) -* [`173eb38`](https://github.com/eslint/eslint/commit/173eb38cdb3e4673cba947521f27158828186d77) Docs: Clarify ecmaVersion doesn't imply globals (refs #9812) (#11364) (Keith Maxwell) -* [`84ce72f`](https://github.com/eslint/eslint/commit/84ce72fdeba082b7b132e4ac6b714fb1a93831b7) Fix: Remove extraneous linefeeds in `one-var` fixer (fixes #10741) (#10955) (st-sloth) -* [`389362a`](https://github.com/eslint/eslint/commit/389362a06ac6601512b872d3e843c7371f2a1bcc) Docs: clarify motivation for no-prototype-builtins (#11356) (Teddy Katz) -* [`533d240`](https://github.com/eslint/eslint/commit/533d240b0811f663494cb213b06cc9e51e1ff2d0) Update: no-shadow-restricted-names lets unassigned vars shadow undefined (#11341) (Teddy Katz) -* [`d0e823a`](https://github.com/eslint/eslint/commit/d0e823aef196a6564c87a78b72c1ef980ce67af9) Update: Make --init run js config files through linter (fixes #9947) (#11337) (Brian Kurek) -* [`92fc2f4`](https://github.com/eslint/eslint/commit/92fc2f4f3faf8aeaae8a8e71db0de405404fb6c3) Fix: CircularJSON dependency warning (fixes #11052) (#11314) (Terry) -* [`4dd19a3`](https://github.com/eslint/eslint/commit/4dd19a3c4c037adc860a65e96f2ba3eeccace1de) Docs: mention 'prefer-spread' in docs of 'no-useless-call' (#11348) (Klaus Meinhardt) -* [`4fd83d5`](https://github.com/eslint/eslint/commit/4fd83d5ec47a6a7b81cd8801c3bd63d27ea1c7c4) Docs: fix a misleading example in one-var (#11350) (薛定谔的猫) -* [`9441ce7`](https://github.com/eslint/eslint/commit/9441ce77b7228f2c4562e158a10905afe11f31f2) Chore: update incorrect tests to fix build failing (#11354) (薛定谔的猫) - -v5.13.0 - February 1, 2019 - -* [`91c8884`](https://github.com/eslint/eslint/commit/91c8884971f5e57f5f7490d8daf92c4a9a489836) Chore: use local function to append "s" instead of a package (#11293) (Timo Tijhof) -* [`b5143bf`](https://github.com/eslint/eslint/commit/b5143bfc09e53d8da8f63421ade093b7593f4f51) Update: for-direction detection false positives/negatives (#11254) (Ruben Bridgewater) -* [`9005e63`](https://github.com/eslint/eslint/commit/9005e632d13476880c55f7e3c8a6e450762a5171) Chore: increase camelcase test coverage (#11299) (Redmond Tran) -* [`5b14ad1`](https://github.com/eslint/eslint/commit/5b14ad1003c7df9a37621dea55c6d6d0484adc05) Fix: false positive in no-constant-condition (fixes #11306) (#11308) (Pig Fang) -* [`6567c4f`](https://github.com/eslint/eslint/commit/6567c4f6665df85c3347388b29d8193cc8208d63) Fix: only remove arrow before body in object-shorthand (fixes #11305) (#11307) (Pig Fang) -* [`fa2f370`](https://github.com/eslint/eslint/commit/fa2f370affa4814dbdda278f9859d0172d4b7aa2) Docs: update rule configuration values in examples (#11323) (Kai Cataldo) -* [`0a3c3ff`](https://github.com/eslint/eslint/commit/0a3c3ff1d91e8f39943efc4a7d2bf6927d68d37e) New: Allow globals to be disabled/configured with strings (fixes #9940) (#11338) (Teddy Katz) -* [`dccee63`](https://github.com/eslint/eslint/commit/dccee63cf41234180c71bf0fe01b165c9078fc69) Chore: avoid hard-coding the list of core rules in eslint:recommended (#11336) (Teddy Katz) -* [`c1fd6f5`](https://github.com/eslint/eslint/commit/c1fd6f54d92efe615bcae529006221e122dbe9e6) Chore: remove undocumented `Linter#rules` property (refs #9161) (#11335) (Teddy Katz) -* [`36e3356`](https://github.com/eslint/eslint/commit/36e335681d61cbe3c83b653b7cc5f95730f1d86e) Chore: remove dead code for loading rules (#11334) (Teddy Katz) -* [`c464e27`](https://github.com/eslint/eslint/commit/c464e2744ec76e7e9c6c5af0f6162c92187f1ece) Docs: Rename `result` -> `foo` (#11210) (Alexis Tyler) - -v5.12.1 - January 18, 2019 - -* [`eb5c401`](https://github.com/eslint/eslint/commit/eb5c4014f16be1c2003ed46ce9560d0d8a567d0f) Chore: use meta.messages in some rules (2/4) (refs #9870) (#10773) (薛定谔的猫) -* [`aa56247`](https://github.com/eslint/eslint/commit/aa56247746a0095996a41dd03bdbbf659f0f93b6) Fix: avoid loading core rules dynamically from FS in Linter (#11278) (Peter Metz) -* [`04450bb`](https://github.com/eslint/eslint/commit/04450bb7ed20f2412102538b238119d9764b4dc9) Docs: clarify process for adding committers (#11272) (Kai Cataldo) -* [`3ffcf26`](https://github.com/eslint/eslint/commit/3ffcf26c1c83efe7d7cf2d87f1063695ae653709) Docs: add @g-plane as committer (#11277) (Kai Cataldo) -* [`c403445`](https://github.com/eslint/eslint/commit/c40344566eff2e77a6ae2b2d2dbdbd4ad3e76b67) Fix: warn constant on RHS of || in no-constant-condition (fixes #11181) (#11253) (Merlin Mason) -* [`9194f45`](https://github.com/eslint/eslint/commit/9194f45ac7d521119a53773bf02b81670bad526e) Fix: Manage severity of 1 with TAP reporter (fixes #11110) (#11221) (Gabriel Cousin) -* [`000f495`](https://github.com/eslint/eslint/commit/000f4952ae6a4311fbbc3ed36c481235fcb0b64b) Docs: fix example for sort-imports ignoreDeclarationSort (#11242) (Remco Haszing) -* [`7c0bf2c`](https://github.com/eslint/eslint/commit/7c0bf2ca92d83125a1fa000c9c4250bae6b4fc21) Docs: Add `npx` usage to Getting Started guide (#11249) (eyal0803) -* [`da9174e`](https://github.com/eslint/eslint/commit/da9174e0798c1d785ddabb3ae405860fc5b89311) Docs: fixes typo peerDepencies (#11252) (Christian Kühl) -* [`9c31625`](https://github.com/eslint/eslint/commit/9c31625f19176664ef76dcf088ce50703c41c324) Docs: Improve custom formatter docs (#11258) (Nicholas C. Zakas) - -v5.12.0 - January 4, 2019 - -* [`0d91e7d`](https://github.com/eslint/eslint/commit/0d91e7d28e5eba79a6032165cdef5d4549d26462) Update: Add sort-imports ignoreDeclarationSort (fixes #11019) (#11040) (Remco Haszing) -* [`f92d6f0`](https://github.com/eslint/eslint/commit/f92d6f05c4dcd4a3a0616871e10b31edae9dfad5) Build: Add karma-chrome-launcher support (#11027) (薛定谔的猫) -* [`166853d`](https://github.com/eslint/eslint/commit/166853d9c59db493f0b1bb68a67ad868662a4205) Upgrade: eslint-plugin-eslint-plugin@2.0.1 (#11220) (薛定谔的猫) -* [`bfff77a`](https://github.com/eslint/eslint/commit/bfff77ad4eaa02e2e62481c986634df38d5db6e5) Fix: no-param-reassign parameter in ternary operator (fixes #11236) (#11239) (周昊宇) -* [`258b654`](https://github.com/eslint/eslint/commit/258b6541f61dc3a9ae64e200680766a11c3dd316) Upgrade: require-uncached renamed to import-fresh (#11066) (薛定谔的猫) - -v5.11.1 - December 26, 2018 - -* [`de79f10`](https://github.com/eslint/eslint/commit/de79f1026b7035f0296d7876f1db64f225cca1b8) Fix: handle optional catch bindings in no-useless-catch (#11205) (Colin Ihrig) - -v5.11.0 - December 22, 2018 - -* [`b4395f6`](https://github.com/eslint/eslint/commit/b4395f671442a7e0be956382c24cce38025a6df6) New: add option `first` for VariableDeclarator in indent (fixes #8976) (#11193) (Pig Fang) -* [`2b5a602`](https://github.com/eslint/eslint/commit/2b5a60284670a3ab1281b206941ed38faf2ea10c) New: no-useless-catch rule (fixes #11174) (#11198) (Alexander Grasley) -* [`06b3b5b`](https://github.com/eslint/eslint/commit/06b3b5bfcf0429c5078d4f4af3c03bb777e4f022) Fix: Account for comments in implicit-arrow-linebreak (#10545) (Mark de Dios) -* [`4242314`](https://github.com/eslint/eslint/commit/4242314215a6f35e432860433906f47af1a29724) Update: handle computed properties in camelcase (fixes #11084) (#11113) (Bence Dányi) -* [`1009304`](https://github.com/eslint/eslint/commit/100930493d9ab802a94dac5c761515b12241ddd2) Docs: add a note for no-unused-expressions (fixes #11169) (#11192) (Pig Fang) -* [`88f99d3`](https://github.com/eslint/eslint/commit/88f99d31b88a4cde4563bc4a6f4c41f0cc557885) Docs: clarify how to use configs in plugins (#11199) (Kai Cataldo) -* [`bcf558b`](https://github.com/eslint/eslint/commit/bcf558b2f7036f487af2bdb2b2d34b6cdf7fc174) Docs: Clarify the no-unused-vars docs (#11195) (Jed Fox) -* [`a470eb7`](https://github.com/eslint/eslint/commit/a470eb73d52fae0f0bc48de5a487e23cf78fcfa9) Docs: Fix no-irregular-whitespace description (#11196) (Jed Fox) -* [`8abc8af`](https://github.com/eslint/eslint/commit/8abc8afe71691b747cbd1819a13d896e8aa5b92a) Docs: Remove a misleading example (#11204) (Bogdan Gradinariu) -* [`733d936`](https://github.com/eslint/eslint/commit/733d93618a99758a05453ab94505a9f1330950e0) Docs: link to JSDoc EOL blogpost in valid-jsdoc and require-jsdoc (#11191) (Nathan Diddle) -* [`d5eb108`](https://github.com/eslint/eslint/commit/d5eb108e17f676d0e4fcddeb1211b4bdfac760c1) Docs: Ensure `triage` label is added to new issues (#11182) (Teddy Katz) -* [`617a287`](https://github.com/eslint/eslint/commit/617a2874ed085bca36ca289aac55e3b7f7ce937e) Docs: add missing deprecation notices for jsdoc rules (#11171) (Teddy Katz) - -v5.10.0 - December 8, 2018 - -* [`4b0f517`](https://github.com/eslint/eslint/commit/4b0f517cd317e5f1b99a1e8a0392332bd8a2e231) Upgrade: single- and multiline const, let, var statements (fixes #10721) (#10919) (Tom Panier) -* [`9666aba`](https://github.com/eslint/eslint/commit/9666abaf46c841fba7b5d4e53c6998cd25b9bc33) Update: space-infix-ops reports violating operator (#10934) (Bence Dányi) -* [`c14f717`](https://github.com/eslint/eslint/commit/c14f717f4c32860766185da47f64f8eb0c2d2998) Fix: Update all-files-ignored.txt message to be less confusing (#11075) (z.ky) -* [`9f3573d`](https://github.com/eslint/eslint/commit/9f3573dda3dc35bc220e945686cc835eaad0ac2c) Docs: Clarify the CLIEngine options (#10995) (Ed Morley) -* [`dd7b0cb`](https://github.com/eslint/eslint/commit/dd7b0cb019d94964930d30fec36f7b22ef072822) Chore: refactor template literal feature detection in 'quotes' rule (#11125) (Bryan) -* [`3bf0332`](https://github.com/eslint/eslint/commit/3bf0332508b921cb660c2e8a1ab7ddf46a2013b6) Fix: fix the fixer of lone comma with comments (fixes #10632) (#11154) (Pig Fang) -* [`f850726`](https://github.com/eslint/eslint/commit/f8507260c2091d18488fde20e466639d1a7f913c) Upgrade: Espree v5.0.0 (#11161) (Kai Cataldo) -* [`4490d7a`](https://github.com/eslint/eslint/commit/4490d7af529d4ecc18b6874f1d838869656da58a) Update: deprecate valid-jsdoc and require-jsdoc (#11145) (Teddy Katz) -* [`60dfb6c`](https://github.com/eslint/eslint/commit/60dfb6c623dfe829e5350dabe507e7850c1beacf) Docs: Update issue templates (#11163) (Teddy Katz) -* [`958987a`](https://github.com/eslint/eslint/commit/958987aa6f5630faa051d8f822f0200faff41924) Docs: Fix link to rule no-useless-rename (#11165) (Brian) -* [`62fd2b9`](https://github.com/eslint/eslint/commit/62fd2b93448966331db3eb2dfbe4e1273eb032b2) Update: Amend keyword-spacing to validate `default` keywords (#11097) (Bin Ury) -* [`4bcdfd0`](https://github.com/eslint/eslint/commit/4bcdfd07d514fd7a6b8672d33703d0b6c606f214) Chore: fix some jsdoc-related issues (#11148) (薛定谔的猫) -* [`c6471ed`](https://github.com/eslint/eslint/commit/c6471ed6feb3e71e239379a7042deb9b8ab3cf39) Docs: fix typo in issue-templates/new-rule (#11149) (薛定谔的猫) -* [`5d451c5`](https://github.com/eslint/eslint/commit/5d451c510c15abc41b5bb14b4955a7db96aeb100) Chore: Remove dependency on is-resolvable (#11128) (Matt Grande) -* [`bc50dc7`](https://github.com/eslint/eslint/commit/bc50dc7737496712463220e662946eb516e36ae1) Chore: Move ignored-paths, report-translator to lib/util (refs #10559) (#11116) (Kevin Partington) -* [`c0a80d0`](https://github.com/eslint/eslint/commit/c0a80d0ca3c80ca27694fc8aedcf84b72bfd9465) Fix: Do not strip underscores in camelcase allow (fixes #11000) (#11001) (Luke Page) -* [`a675c89`](https://github.com/eslint/eslint/commit/a675c89573836adaf108a932696b061946abf1e6) Docs: (Grammar) "the setup" -> "to set up" (#11117) (MarvinJWendt) -* [`54dfa60`](https://github.com/eslint/eslint/commit/54dfa602f62e6d183d57d60d5fdd417a263f479e) Fix: Typo in function comment parameters (#11111) (Pierre Maoui) -* [`cf296bd`](https://github.com/eslint/eslint/commit/cf296bdabf0dbbfbae491419e38aee4ecd63ec71) Docs: switch incorrect example with correct one (#11107) (Romain Le Quellec) -* [`d2d500c`](https://github.com/eslint/eslint/commit/d2d500ca5dff307189b9d4161a5e7b8282557dd6) Docs: no-console#When-Not-To-Use provides incorrect rule snippet (#11093) (Lawrence Chou) -* [`f394a1d`](https://github.com/eslint/eslint/commit/f394a1dfc5eb4874f899b7bc19685896893af7b8) Chore: Extract config comment parsing (#11091) (Nicholas C. Zakas) -* [`709190f`](https://github.com/eslint/eslint/commit/709190f8c5d7559b1e0915e25af60b50a94ba1c7) Build: fix test failure on Node 11 (#11100) (Teddy Katz) -* [`3025cdd`](https://github.com/eslint/eslint/commit/3025cddf0a2ea8461ce05575098a5714fcf6278d) Update: don't indent leading semi in line after import (fixes #11082) (#11085) (Pig Fang) -* [`e18c827`](https://github.com/eslint/eslint/commit/e18c827cc12cb1c52e5d0aa993f572cb56238704) Chore: refactor linter#parseBooleanConfig to improve readability (#11074) (薛定谔的猫) -* [`5da378a`](https://github.com/eslint/eslint/commit/5da378ac922d732ca1765f08edee0face1b1b924) Upgrade: eslint-release@1.2.0 (#11073) (Teddy Katz) - -v5.9.0 - November 9, 2018 - -* 9436712 Fix: Unused recursive function expressions (fixes #10982) (#11032) (Sergei Startsev) -* c832cd5 Update: add `ignoreDestructuring` option to `id-match` rule (#10554) (一名宅。) -* 54687a8 Fix: prefer-const autofix multiline assignment (fixes #10582) (#10987) (Scott Stern) -* ae2b61d Update: "off" options for "space-before-blocks" (refs #10906) (#10907) (Sophie Kirschner) -* 57f357e Docs: Update require-await docs with exception (fixes #9540) (#11063) (Nicholas C. Zakas) -* 79a2797 Update: no-restricted-imports to check re-export (fixes #9678) (#11064) (Nicholas C. Zakas) -* 3dd7493 Docs: update ecmaVersion to include 2019/10 values (#11059) (Vse Mozhet Byt) -* 607635d Upgrade: eslint-plugin-node & eslint-plugin (#11067) (薛定谔的猫) -* dcc6233 Fix: Ignore empty statements in no-unreachable (fixes #9081) (#11058) (Nicholas C. Zakas) -* 7ad86de New: Add --fix-type option to CLI (fixes #10855) (#10912) (Nicholas C. Zakas) -* 0800b20 Chore: fix invalid super() calls in tests (#11054) (Teddy Katz) -* 4fe3287 Docs: Cross-reference two rules (refs #11041) (#11042) (Paul Melnikow) -* 5525eb6 Fix: rule deprecation warnings did not consider all rules (#11044) (Teddy Katz) -* 44d37ca Docs: Update steps for adding new TSC member (#11038) (Nicholas C. Zakas) -* 802e926 Update: Warn for deprecation in Node output (fixes #7443) (#10953) (Colin Chang) - -v5.8.0 - October 26, 2018 - -* 9152417 Fix: deprecation warning in RuleTester using Node v11 (#11009) (Teddy Katz) -* e349a03 Docs: Update issue templates to ask for PRs (#11012) (Nicholas C. Zakas) -* 3d88b38 Chore: avoid using legacy report API in no-irregular-whitespace (#11013) (Teddy Katz) -* 5a31a92 Build: compile espree's deps to ES5 when generating site (fixes #11014) (#11015) (Teddy Katz) -* 3943635 Update: Create Linter.version API (fixes #9271) (#11010) (Nicholas C. Zakas) -* a940cf4 Docs: Mention version for config glob patterns (fixes #8793) (Nicholas C. Zakas) -* 6e1c530 Build: run tests on Node 11 (#11008) (Teddy Katz) -* 58ff359 Docs: add instructions for npm 2FA (refs #10631) (#10992) (Teddy Katz) -* 2f87bb3 Upgrade: eslint-release@1.0.0 (refs #10631) (#10991) (Teddy Katz) -* 57ef0fd Fix: prefer-const when using destructuring assign (fixes #8308) (#10924) (Nicholas C. Zakas) -* 577cbf1 Chore: Add typescript-specific edge case tests to space-infix-ops (#10986) (Bence Dányi) -* d45b184 Chore: Using deconstruction assignment for shelljs (#10974) (ZYSzys) - -v5.7.0 - October 12, 2018 - -* 6cb63fd Update: Add iife to padding-line-between-statements (fixes #10853) (#10916) (Kevin Partington) -* 5fd1bda Update: no-tabs allowIndentationTabs option (fixes #10256) (#10925) (Kevin Partington) -* d12be69 Fix: no-extra-bind No autofix if arg may have side effect (fixes #10846) (#10918) (Kevin Partington) -* 847372f Fix: no-unused-vars false pos. with markVariableAsUsed (fixes #10952) (#10954) (Roy Sutton) -* 4132de7 Chore: Simplify space-infix-ops (#10935) (Bence Dányi) -* 543edfa Fix: Fix error with one-var (fixes #10937) (#10938) (Justin Krup) -* 95c4cb1 Docs: Fix typo for no-unsafe-finally (#10945) (Sergio Santoro) -* 5fe0e1a Fix: no-invalid-regexp disallows \ at end of pattern (fixes #10861) (#10920) (Toru Nagashima) -* f85547a Docs: Add 'When Not To Use' section to space-infix-ops (#10931) (Bence Dányi) -* 3dccac4 Docs: Update working-with-parsers link (#10929) (Azeem Bande-Ali) -* 557a8bb Docs: Remove old note about caching, add a new one (fixes #10739) (#10913) (Zac) -* fe8111a Chore: Add more test cases to space-infix-ops (#10936) (Bence Dányi) -* 066f7e0 Update: camelcase rule ignoreList added (#10783) (Julien Martin) -* 70bde69 Upgrade: table to version 5 (#10903) (Rouven Weßling) -* 2e52bca Chore: Update issue templates (#10900) (Nicholas C. Zakas) - -v5.6.1 - September 28, 2018 - -* 9b26bdb Fix: avoid exponential require-atomic-updates traversal (fixes #10893) (#10894) (Teddy Katz) -* 9432b10 Fix: make separateRequires work in consecutive mode (fixes #10784) (#10886) (Pig Fang) -* e51868d Upgrade: debug@4 (fixes #10854) (#10887) (薛定谔的猫) -* d3f3994 Docs: add information about reporting security issues (#10889) (Teddy Katz) -* cc458f4 Build: fix failing tests on master (#10890) (Teddy Katz) -* a6ebfd3 Docs: clarify defaultAssignment option, fix no-unneeded-ternary examples (#10874) (CoffeeTableEspresso) -* 9d52541 Fix: Remove duplicate error message on crash (fixes #8964) (#10865) (Nicholas C. Zakas) -* 4eb9a49 Docs: Update quotes.md (#10862) (The Jared Wilcurt) -* 9159e9b Docs: Update complexity.md (#10867) (Szymon Przybylski) -* 14f4e46 Docs: Use Linter instead of linter in Nodejs API page (#10864) (Nicholas C. Zakas) -* b3e3cb1 Chore: Update debug log name to match filename (#10863) (Nicholas C. Zakas) - -v5.6.0 - September 14, 2018 - -* c5b688e Update: Added generators option to func-names (fixes #9511) (#10697) (Oscar Barrett) -* 7da36d5 Fix: respect generator function expressions in no-constant-condition (#10827) (Julian Rosse) -* 0a65844 Chore: quote enable avoidEscape option in eslint-config-eslint (#10626) (薛定谔的猫) -* 32f41bd Chore: Add configuration wrapper markdown for the bug report template (#10669) (Iulian Onofrei) - -v5.5.0 - August 31, 2018 - -* 6e110e6 Fix: camelcase duplicate warning bug (fixes #10801) (#10802) (Julian Rosse) -* 5103ee7 Docs: Add Brackets integration (#10813) (Jan Pilzer) -* b61d2cd Update: max-params to only highlight function header (#10815) (Ian Obermiller) -* 2b2f11d Upgrade: babel-code-frame to version 7 (#10808) (Rouven Weßling) -* 2824d43 Docs: fix comment placement in a code example (#10799) (Vse Mozhet Byt) -* 10690b7 Upgrade: devdeps and deps to latest (#10622) (薛定谔的猫) -* 80c8598 Docs: gitignore syntax updates (fixes #8139) (#10776) (Gustavo Santana) -* cb946af Chore: use meta.messages in some rules (1/4) (#10764) (薛定谔的猫) - -v5.4.0 - August 17, 2018 - -* a70909f Docs: Add jscs-dev.github.io links (#10771) (Gustavo Santana) -* 034690f Fix: no-invalid-meta crashes for non Object values (fixes #10750) (#10753) (Sandeep Kumar Ranka) -* 11a462d Docs: Broken jscs.info URLs (fixes #10732) (#10770) (Gustavo Santana) -* 985567d Chore: rm unused dep string.prototype.matchall (#10756) (薛定谔的猫) -* f3d8454 Update: Improve no-extra-parens error message (#10748) (Timo Tijhof) -* 562a03f Fix: consistent-docs-url crashes if meta.docs is empty (fixes #10722) (#10749) (Sandeep Kumar Ranka) -* 6492233 Chore: enable no-prototype-builtins in codebase (fixes #10660) (#10664) (薛定谔的猫) -* 137140f Chore: use eslintrc overrides (#10677) (薛定谔的猫) - -v5.3.0 - August 3, 2018 - -* dd6cb19 Docs: Updated no-return-await Rule Documentation (fixes #9695) (#10699) (Marla Foreman) -* 6009239 Chore: rename utils for consistency (#10727) (薛定谔的猫) -* 6eb972c New: require-unicode-regexp rule (fixes #9961) (#10698) (Toru Nagashima) -* 5c5d64d Fix: ignored-paths for Windows path (fixes #10687) (#10691) (Toru Nagashima) -* 5f6a765 Build: ensure URL fragments remain in documentation links (fixes #10717) (#10720) (Teddy Katz) -* 863aa78 Docs: add another example for when not to use no-await-in-loop (#10714) (Valeri Karpov) -* 6e78b7d Docs: remove links to terminated jscs.info domain (#10706) (Piotr Kuczynski) -* d56c39d Fix: ESLint cache no longer stops autofix (fixes #10679) (#10694) (Kevin Partington) -* 2cc3240 New: add no-misleading-character-class (fixes #10049) (#10511) (Toru Nagashima) -* 877f4b8 Fix: The "../.." folder is always ignored (fixes #10675) (#10682) (Sridhar) -* 5984820 Chore: Move lib/file-finder.js to lib/util/ (refs #10559) (#10695) (Kevin Partington) -* e37a593 Update: Fix incorrect default value for position (#10670) (Iulian Onofrei) -* 8084bfc Docs: change when not to use object spread (#10621) (Benny Powers) -* 7f496e2 Chore: Update require path for ast-utils (#10693) (Kevin Partington) -* 648a33a Chore: reorganize code structure of utilities (refs #10599) (#10680) (薛定谔的猫) -* f026fe1 Update: Fix 'function' in padding-line-between-statements (fixes #10487) (#10676) (Kevin Partington) -* c2bb8bb Docs: Remove superfluous object option sample code (#10652) (Iulian Onofrei) -* d34a13b Docs: add subheader in configuring/configuring-rules (#10686) (薛定谔的猫) -* d8aea28 Chore: rm unnecessary plugin in eslint-config-eslint (#10685) (薛定谔的猫) -* 9e76be7 Update: indent comments w/ nearby code if no blank lines (fixes #9733) (#10640) (Kevin Partington) -* 9e93d46 New: add no-async-promise-executor rule (fixes #10217) (#10661) (Teddy Katz) -* 5a2538c New: require-atomic-updates rule (fixes #10405) (#10655) (Teddy Katz) -* 8b83d2b Fix: always resolve default ignore patterns from CWD (fixes #9227) (#10638) (Teddy Katz) -* acb6658 Fix: ESLint crash with prefer-object-spread (fixes #10646) (#10649) (薛定谔的猫) -* 99fb7d3 Docs: fix misleading no-prototype-builtins description (#10666) (薛定谔的猫) -* 005b849 Docs: fix outdated description of `baseConfig` option (#10657) (Teddy Katz) -* 15a77c4 Docs: fix broken links (fixes eslint/eslint-jp#6) (#10658) (Toru Nagashima) -* 87cd344 Docs: Make marking a default option consistent with other rules (#10650) (Iulian Onofrei) -* 0cb5e3e Chore: Replace some function application with spread operators (#10645) (Kevin Partington) -* b6daf0e Docs: Remove superfluous section from no-unsafe-negation (#10648) (Iulian Onofrei) -* e1a3cac Chore: rm deprecated experimentalObjectRestSpread option in tests (#10647) (薛定谔的猫) - -v5.2.0 - July 20, 2018 - -* 81283d0 Update: Cache files that failed linting (fixes #9948) (#10571) (Kevin Partington) -* 13cc63e Upgrade: ignore@4.0.2 (#10619) (Rouven Weßling) -* ac77a80 Chore: Fixing a call to Object.assign.apply in Linter (#10629) (Kevin Partington) -* 761f802 Upgrade: eslint-plugin-node to 7.0.1 (#10612) (Toru Nagashima) -* c517b2a Build: fix npm run perf failing(fixes #10577) (#10607) (薛定谔的猫) -* e596939 Chore: fix redundant equality check (#10617) (Toru Nagashima) -* 9f93d5f Docs: Updated Working with Custom Formatters (fixes #9950) (#10592) (Marla Foreman) -* 9aaf195 Chore: Extract lint result cache logic (refs #9948) (#10562) (Kevin Partington) -* 80b296e Build: package.json update for eslint-config-eslint release (ESLint Jenkins) -* e4e7ff2 Chore: fix error message in eslint-config-eslint (#10588) (薛定谔的猫) -* 1e88170 Chore: Move lib/logging and lib/timing to lib/util/ (refs #10559) (#10579) (Kevin Partington) -* 64dfa21 Build: Fix prerelease logic in blog post generation (fixes #10578) (#10581) (Kevin Partington) -* 0faf633 Chore: Simplify helper method in Linter tests (#10580) (Kevin Partington) - -v5.1.0 - July 8, 2018 - -* 7328f99 Build: package.json update for eslint-config-eslint release (ESLint Jenkins) -* b161f6b Build: Include prerelease install info in release blog post (#10463) (Kevin Partington) -* b2df738 Fix: prefer-object-spread duplicated comma (fixes #10512, fixes #10532) (#10524) (Toru Nagashima) -* d8c3a25 Fix: wrap-regex doesn't work in some expression(fixes #10573) (#10576) (薛定谔的猫) -* 114f42e Docs: Clarify option defaults in max-lines-per-function docs (#10569) (Chris Harwood) -* 63f36f7 Fix: sort-keys in an object that contains spread (fixes #10261) (#10495) (katerberg) -* 601a5c4 Fix: Prefer-const rule crashing on array destructuring (fixes #10520) (#10527) (Michael Mason) -* 143890a Update: Adjust grammar of error/warnings fixable (#10546) (Matt Mischuk) -* 8ee39c5 Chore: small refactor config-validator (#10565) (薛定谔的猫) -* 100f1be Docs: add note about release issues to readme (#10572) (Teddy Katz) -* 02efeac Fix: do not fail on nested unknown operators (#10561) (Rubén Norte) -* 92b19ca Chore: use eslintrc overrides(dogfooding) (#10566) (薛定谔的猫) -* 076a6b6 Docs: add actionable fix to no-irregular-whitespace (#10558) (Matteo Collina) -* de663ec Docs: Only successfully linted files are cached (fixes #9802) (#10557) (Kevin Partington) -* f0e22fc Upgrade: globals@11.7.0 (#10497) (薛定谔的猫) -* 8a2ff2c Docs: adding a section about disable rules for some files (#10536) (Wellington Soares) -* f22a3f8 Docs: fix a word in no-implied-eval (#10539) (Dan Homola) -* 20d8bbd Docs: add missing paragraph about "custom parsers" (#10547) (Pig Fang) -* b7addf6 Update: deprecate no-catch-shadow (fixes #10466) (#10526) (Toru Nagashima) -* e862dc3 Fix: Remove autofixer for no-debugger (fixes #10242) (#10509) (Teddy Katz) - -v5.0.1 - June 25, 2018 - -* 196c102 Fix: valid-jsdoc should allow optional returns for async (fixes #10386) (#10480) (Mark Banner) -* 4c823bd Docs: Fix max-lines-per-function correct code's max value (#10513) (Rhys Bower) - -v5.0.0 - June 22, 2018 - -* 0feedfd New: Added max-lines-per-function rule (fixes #9842) (#10188) (peteward44) -* daefbdb Upgrade: eslint-scope and espree to 4.0.0 (refs #10458) (#10500) (Brandon Mills) -* 077358b Docs: no-process-exit: recommend process.exitCode (#10478) (Andres Kalle) -* f93d6ff Fix: do not fail on unknown operators from custom parsers (fixes #10475) (#10476) (Rubén Norte) -* 05343fd Fix: add parens for yield statement (fixes #10432) (#10468) (Pig Fang) -* d477c5e Fix: check destructuring for "no-shadow-restricted-names" (fixes #10467) (#10470) (Pig Fang) -* 7a7580b Update: Add considerPropertyDescriptor option to func-name-matching (#9078) (Dieter Luypaert) -* e0a0418 Fix: crash on optional catch binding (#10429) (Toru Nagashima) -* de4dba9 Docs: styling team members (#10460) (薛定谔的猫) -* 5e453a3 Docs: display team members in tables. (#10433) (薛定谔的猫) -* b1895eb Docs: Restore intentional spelling mistake (#10459) (Wilfred Hughes) - -v5.0.0-rc.0 - June 9, 2018 - -* abf400d Update: Add ignoreDestructing option to camelcase rule (fixes #9807) (#10373) (Andrew Lunny) -* e2b394d Upgrade: espree and eslint-scope to rc versions (#10457) (Kevin Partington) -* a370da2 Chore: small opt to improve readability (#10241) (薛定谔的猫) -* 640bf07 Update: Fixes multiline no-warning-comments rule. (fixes #9884) (#10381) (Scott Stern) -* 831c39a Build: Adding rc release script to package.json (#10456) (Kevin Partington) -* dc4075e Update: fix false negative in no-use-before-define (fixes #10227) (#10396) (Toru Nagashima) -* 3721841 Docs: Add new experimental syntax policy to README (fixes #9804) (#10408) (Kevin Partington) -* d0aae3c Docs: Create docs landing page (#10453) (Kevin Partington) -* fe8bec3 Fix: fix writing config file when `source` is `prompt` (#10422) (Pig Fang) -* 917108d Update: Add requireParamType option to valid-jsdoc (fixes #6753) (#10220) (Tomasz Sterna) -* 1984c21 Docs: move custom parsers docs into a page (fixes #9919) (#10431) (Pig Fang) -* 400d4b5 Docs: Add rest and spread operator changes to migration guide (#10416) (Yannick Croissant) -* e7bdd02 Upgrade: Consume espree@4.0.0-alpha.1 (#10410) (Kevin Partington) -* 3e9f33a Fix: prevent crashing from JSON parsing error (fixes #10364) (#10376) (Pig Fang) -* 636457d Fix: parse later ES files in `eslint --init` (fixes #10003) (#10378) (Pig Fang) - -v5.0.0-alpha.4 - May 28, 2018 - -* ce3e62a Docs: remove test coverage badge (#10407) (薛定谔的猫) -* 240c1a4 Fix: prefer-const object destructuring false positive (fixes #9108) (#10368) (Pig Fang) -* 93c9a52 Update: config-validator should validate overrides (#10357) (Toru Nagashima) -* c2e0398 Update: Improves the prefer-object-spread rule by removing extraneous visitors (#10351) (Sharmila Jesupaul) -* d848949 Update: Support JSXFragment node (fixes #9662) (#9664) (Clement Hoang) -* f268128 Build: add Node v10 to travis (#10262) (alberto) -* 9c922ce Update: Add "consistent" option to array-element-newline (fixes #9457) (#10355) (Pig Fang) -* 65bce3a Fix: ensure --stdin flag works when stdin is piped asynchronously (#10393) (Teddy Katz) -* b9b23a9 Chore: rm unused argument (#10400) (薛定谔的猫) -* 8b7a70c Fix: handle one-var with no semicolon (fixes #10330) (#10371) (Malcolm Groves) -* 465e615 New: prompt users before installing dependencies (#10353) (Pig Fang) -* e25fc22 Chore: remove assert.doesNotThrow in tests (#10199) (Ruben Bridgewater) -* fb148aa Fix: allow no tokens after `return` keyword (fixes #10372) (#10379) (Pig Fang) -* 074bc1c Docs: polish for max-classes-per-file rule (#10377) (Pig Fang) -* a812845 Fix: allow array spread for prefer-object-spread rule (fixes #10344) (#10347) (Pig Fang) -* 448fc52 Docs: Update link to Integrations / Build tools / Start (#10354) (Kir Belevich) -* 4e5e9be Chore: avoid unnecessary filesystem accesses during config search (#10359) (Teddy Katz) -* 363da01 Chore: avoid code duplication in rule severity checking (#10358) (Teddy Katz) - -v5.0.0-alpha.3 - May 11, 2018 - -* 1a6b399 New: Adds prefer-object-spread rule (refs: #7230) (#9955) (Sharmila Jesupaul) -* c4109b2 New: add max-classes-per-file rule (#10163) (James Garbutt) -* 41f0f6e Breaking: report multiline eslint-disable-line directives (fixes #10334) (#10335) (Teddy Katz) -* 4ccd25a Chore: add eslint-plugin-node to eslint-config-eslint(fixes #10319) (#10320) (薛定谔的猫) -* 82757b2 Docs: Adding a little guidance to rule documentation (#10301) (Justin) -* 09dde26 Breaking: new object-curly-newline/no-self-assign default (fixes #10215) (#10337) (Teddy Katz) -* d65f11d Fix: correct comma fix in spare array (fixes #10273) (#10329) (Malcolm Groves) -* c343d86 Fix: do not autofix octal escape sequence (fixes #10031) (#10240) (Malcolm Groves) -* 514013c New: Add `globInputPaths` CLIEngine option (fixes #9972) (#10191) (Pierre Vanduynslager) -* 02e7b28 Chore: upgrade deps (#10339) (薛定谔的猫) -* 1397179 Chore: unskip test for scope analysis (#10336) (Teddy Katz) -* e5b33be Update: Add --fix for one-var rule (refs #9072) (#10040) (Sebastian Malton) -* 99b842d Chore: upgrade mock-fs@4.5.0 (#10325) (Tim Schaub) -* fe91859 Chore: Update issue templates with new format (#10309) (Ilya Volodin) -* 2f30aa5 Docs: add a better vim linting engine (#10292) (Jon Smithers) -* df2c1fb Docs: improve formatter guide (refs #9550) (#10294) (Dominic Lee) -* f7330c1 Chore: Add ESLint path to plugin-missing message (#10283) (Kevin Partington) -* bb6090f Fix: Throw error when --ignore-path not a file (fixes #10076) (#10205) (Malcolm Groves) -* 1b6b2b2 Build: remove trailing spaces in blogpost template (#10280) (Teddy Katz) -* a960d69 Docs: remove outdated notes from migration guide (#10279) (Teddy Katz) - -v5.0.0-alpha.2 - April 27, 2018 - -* 510ca8b Docs: make grammatical tweaks in migration guide (#10278) (Teddy Katz) -* 02e44a5 Breaking: remove TDZ scopes (fixes #10245) (#10270) (Toru Nagashima) -* c74933b Breaking: remove extra check in getScope (fixes #10246, fixes #10247) (#10252) (Toru Nagashima) -* 7c2e83a Chore: improve tests and checking for equality (#10182) (Ruben Bridgewater) -* 8799972 Docs: make template link wording more clear (#10219) (David Luzar) -* 8b7c6ea Breaking: report fatal error for linting nonexistent files (fixes #7390) (#10143) (Teddy Katz) -* 9100819 Breaking: fix plugin resolver in extends (fixes #9904) (#10236) (Toru Nagashima) -* c45f1d0 Breaking: add rules to recommended (fixes #8865) (#10158) (薛定谔的猫) -* 1d443a0 Fix: valid-jsdoc does not know async function returns (fixes #9881) (#10161) (Rachael Sim) -* a82cbea Update: re-enable experimentalObjectRestSpread (fixes #9990) (#10230) (Toru Nagashima) -* f9c7371 Fix: do not autofix object-shorthand with comments (fixes #10038) (#10238) (Malcolm Groves) -* 4672b56 Docs: Correct wording in the `smart-tabs` docs page (#10277) (Jed Fox) -* b32d1f4 Chore: upgrade eslump@1.6.2 (#10258) (薛定谔的猫) -* 7938bf1 Chore: update eslint-fuzzer ecmaVersion to 2018 (#10255) (薛定谔的猫) -* a2953ec Chore: small opt to improve readability (#10225) (薛定谔的猫) -* 85a5191 Docs: Update JSCS FAQ (#10221) (alberto) -* 8e89d5c Docs: Fix typo (#10223) (alberto) -* c0c331e Docs: Add Prettier to FAQ (#10222) (alberto) -* 2443627 Docs: add backticks in getter-return (#10218) (薛定谔的猫) -* 74bb5b5 Docs: Fix misspelling in changelog (#10216) (Kevin Partington) - -v5.0.0-alpha.1 - April 13, 2018 - -* b2a48a9 Breaking: stop using fake `context._linter` property (fixes #10140) (#10209) (Teddy Katz) -* a039956 Breaking: remove deprecated browser/jest/node globals (fixes #10141) (#10210) (Teddy Katz) -* 98f1cad Docs: update migration guide with latest changes (#10212) (Teddy Katz) -* 2e60017 Chore: remove concat-stream dependency (#10173) (Teddy Katz) -* 7f69f11 Chore: rearrange init options. (#10131) (薛定谔的猫) -* f595fd8 Upgrade: upgrade deps (#10184) (alberto) -* 71167be Docs: fix wrong config in id-length (#10196) (薛定谔的猫) -* 81629d2 Chore: enable rest/spread rules on ESLint codebase (#10211) (Teddy Katz) -* 2324570 Breaking: no-unused-vars reports all after-used params (fixes #9909) (#10119) (Kevin Partington) -* 7765fc4 Upgrade: ajv@^6.0.1, still using json schema draft 04 (#9856) (Kevin Partington) -* b77846d Breaking: drop supporting Node.js 4 (fixes #10052) (#10074) (薛定谔的猫) -* cd34d44 Chore: avoid modifying global state when tests fail (#10201) (Teddy Katz) -* 731da1e Docs: fix code in correct example. (#10195) (薛定谔的猫) -* 3780915 Docs: fix some small errors in examples (#10194) (薛定谔的猫) -* 869c9f5 Upgrade: babelify (#10185) (alberto) -* 218ee57 Fix: report no-case-declarations from declarations (fixes #10048) (#10167) (Carlo Abelli) -* b7ee1ed Upgrade: upgrade devdeps (#10178) (alberto) -* db1a582 Chore: Add debug logging for CLI args as they came in (#10174) (Kevin Partington) -* f3a0291 Upgrade: Update dependencies. (#10168) (alberto) -* 7d6e052 Upgrade: esquery@^1.0.1 (fixes #8733) (#10170) (Kevin Partington) -* 1e7252f Docs: Add more related rules for object-curly-spacing (#10175) (Saugat Acharya) -* e5cf9cc Docs: Reorder README sections (#10172) (alberto) -* c85578f Chore: Remove `esprima-fb` dependency. (#10171) (alberto) -* d0dc2e3 Docs: Add Missing Quotes (#10162) (Samarth Verma) -* 7a63bfa Upgrade: eslint-release to v0.11.1 (#10156) (Teddy Katz) -* b7a1a7a Build: Gensite creates prerelease dirs if needed (#10154) (Brandon Mills) - -v5.0.0-alpha.0 - March 30, 2018 - -* f4b3af5 Breaking: Upgrade to Espree v4 alpha (refs #9990) (#10152) (Brandon Mills) -* 3351129 Docs: add v5.0.0 migration guide (fixes #10142) (#10147) (Teddy Katz) -* f2f98dd Build: make prerelease script publish to GitHub/website (#10151) (Teddy Katz) -* d440e84 Breaking: support @scope shorthand in plugins (fixes #9903) (#9905) (Toru Nagashima) -* 462b058 Update: Include debugging information when rule throws error (#9742) (Patrick Hayes) -* 9a020dc Chore: refactor --no-ignore flag logic (#10146) (Teddy Katz) -* 4f61a0d Chore: add noopener/noreferrer (薛定谔的猫) -* 65cc834 Docs: Ensure CLI doc sections match command line help order (#10144) (Kevin Partington) -* 9c79174 Docs: Update capitalized-comments with missing letters (fixes #10135) (#10134) (jasonfry) -* 9e66bfb Docs: remove eslint vs jshint from faq (#10108) (alberto) -* 692e383 Docs: Add modified variable examples for no-loop-func (fixes #9527) (#10098) (Rachael Sim) -* a9ee9ae Breaking: require rules to provide report messages (fixes #10011) (#10057) (Teddy Katz) -* 837edc7 Chore: Uncommented test for empty program for no-invalid-meta (#10046) (Kevin Partington) -* c383bc5 Breaking: Make require('eslint').linter non-enumerable (fixes #9270) (#9692) (Jed Fox) -* 4eaebe5 Breaking: set `parent` of AST nodes before rules run (fixes #9122) (#10014) (Teddy Katz) -* 91ece32 Breaking: remove special exception for linting empty files (fixes #9534) (#10013) (Teddy Katz) -* 27e3f24 Breaking: remove `source` property from linting messages (fixes #7358) (#10012) (Teddy Katz) -* e4c3b3c Breaking: use an exit code of 2 for fatal config problems (fixes #9384) (#10009) (Teddy Katz) -* 2a7ecaa Breaking: Use strict equality in RuleTester comparisons (fixes #9417) (#10008) (Teddy Katz) -* 0bc4a38 Fix: Make rule-tester strictly check messageId. (ref #9890) (#9908) (Jacques Favreau) -* ea6fb17 Update: Make no-cond-assign work for ternaries (fixes #10091) (#10109) (Aaron Harper) - -v4.19.1 - March 21, 2018 - -* 3ff5d11 Fix: no-invalid-regexp not understand variable for flags (fixes #10112) (#10113) (薛定谔的猫) -* abc765c Fix: object-curly-newline minProperties w/default export (fixes #10101) (#10103) (Kevin Partington) -* 6f9e155 Docs: Update ambiguous for...in example for guard-for-in (#10114) (CJ R) -* 0360cc2 Chore: Adding debug logs on successful plugin loads (#10100) (Kevin Partington) -* a717c5d Chore: Adding log at beginning of unit tests in Makefile.js (#10102) (Kevin Partington) - -v4.19.0 - March 16, 2018 - -* 55a1593 Update: consecutive option for one-var (fixes #4680) (#9994) (薛定谔的猫) -* 8d3814e Fix: false positive about ES2018 RegExp enhancements (fixes #9893) (#10062) (Toru Nagashima) -* 935f4e4 Docs: Clarify default ignoring of node_modules (#10092) (Matijs Brinkhuis) -* 72ed3db Docs: Wrap `Buffer()` in backticks in `no-buffer-constructor` rule description (#10084) (Stephen Edgar) -* 3aded2f Docs: Fix lodash typos, make spacing consistent (#10073) (Josh Smith) -* e33bb64 Chore: enable no-param-reassign on ESLint codebase (#10065) (Teddy Katz) -* 66a1e9a Docs: fix possible typo (#10060) (Vse Mozhet Byt) -* 2e68be6 Update: give a node at least the indentation of its parent (fixes #9995) (#10054) (Teddy Katz) -* 72ca5b3 Update: Correctly indent JSXText with trailing linebreaks (fixes #9878) (#10055) (Teddy Katz) -* 2a4c838 Docs: Update ECMAScript versions in FAQ (#10047) (alberto) - -v4.18.2 - March 2, 2018 - -* 6b71fd0 Fix: table@4.0.2, because 4.0.3 needs "ajv": "^6.0.1" (#10022) (Mathieu Seiler) -* 3c697de Chore: fix incorrect comment about linter.verify return value (#10030) (Teddy Katz) -* 9df8653 Chore: refactor parser-loading out of linter.verify (#10028) (Teddy Katz) -* f6901d0 Fix: remove catastrophic backtracking vulnerability (fixes #10002) (#10019) (Jamie Davis) -* e4f52ce Chore: Simplify dataflow in linter.verify (#10020) (Teddy Katz) -* 33177cd Chore: make library files non-executable (#10021) (Teddy Katz) -* 558ccba Chore: refactor directive comment processing (#10007) (Teddy Katz) -* 18e15d9 Chore: avoid useless catch clauses that just rethrow errors (#10010) (Teddy Katz) -* a1c3759 Chore: refactor populating configs with defaults in linter (#10006) (Teddy Katz) -* aea07dc Fix: Make max-len ignoreStrings ignore JSXText (fixes #9954) (#9985) (Rachael Sim) - -v4.18.1 - February 20, 2018 - -* f417506 Fix: ensure no-await-in-loop reports the correct node (fixes #9992) (#9993) (Teddy Katz) -* 3e99363 Docs: Fixed typo in key-spacing rule doc (#9987) (Jaid) -* 7c2cd70 Docs: deprecate experimentalObjectRestSpread (#9986) (Toru Nagashima) - -v4.18.0 - February 16, 2018 - -* 70f22f3 Chore: Apply memoization to config creation within glob utils (#9944) (Kenton Jacobsen) -* 0e4ae22 Update: fix indent bug with binary operators/ignoredNodes (fixes #9882) (#9951) (Teddy Katz) -* 47ac478 Update: add named imports and exports for object-curly-newline (#9876) (Nicholas Chua) -* e8efdd0 Fix: support Rest/Spread Properties (fixes #9885) (#9943) (Toru Nagashima) -* f012b8c Fix: support Async iteration (fixes #9891) (#9957) (Toru Nagashima) -* 74fa253 Docs: Clarify no-mixed-operators options (fixes #9962) (#9964) (Ivan Hayes) -* 426868f Docs: clean up key-spacing docs (fixes #9900) (#9963) (Abid Uzair) -* 4a6f22e Update: support eslint-disable-* block comments (fixes #8781) (#9745) (Erin) -* 777283b Docs: Propose fix typo for function (#9965) (John Eismeier) -* bf3d494 Docs: Fix typo in max-len ignorePattern example. (#9956) (Tim Martin) -* d64fbb4 Docs: fix typo in prefer-destructuring.md example (#9930) (Vse Mozhet Byt) -* f8d343f Chore: Fix default issue template (#9946) (Kai Cataldo) - -v4.17.0 - February 2, 2018 - -* 1da1ada Update: Add "multiline" type to padding-line-between-statements (#8668) (Matthew Bennett) -* bb213dc Chore: Use messageIds in some of the core rules (#9648) (Jed Fox) -* 1aa1970 Docs: remove outdated rule naming convention (#9925) (Teddy Katz) -* 3afaff6 Docs: Add prefer-destructuring variable reassignment example (#9873) (LePirlouit) -* d20f6b4 Fix: Typo in error message when running npm (#9866) (Maciej Kasprzyk) -* 51ec6a7 Docs: Use GitHub Multiple PR/Issue templates (#9911) (Kai Cataldo) -* dc80487 Update: space-unary-ops uses astUtils.canTokensBeAdjacent (fixes #9907) (#9906) (Kevin Partington) -* 084351b Docs: Fix the messageId example (fixes #9889) (#9892) (Jed Fox) -* 9cbb487 Docs: Mention the `globals` key in the no-undef docs (#9867) (Dan Dascalescu) - -v4.16.0 - January 19, 2018 - -* e26a25f Update: allow continue instead of if wrap in guard-for-in (fixes #7567) (#9796) (Michael Ficarra) -* af043eb Update: Add NewExpression support to comma-style (#9591) (Frazer McLean) -* 4f898c7 Build: Fix JSDoc syntax errors (#9813) (Matija Marohnić) -* 13bcf3c Fix: Removing curly quotes in no-eq-null report message (#9852) (Kevin Partington) -* b96fb31 Docs: configuration hierarchy for CLIEngine options (fixes #9526) (#9855) (PiIsFour) -* 8ccbdda Docs: Clarify that -c configs merge with `.eslintrc.*` (fixes #9535) (#9847) (Kevin Partington) -* 978574f Docs: Fix examples for no-useless-escape (#9853) (Toru Kobayashi) -* cd5681d Chore: Deactivate consistent-docs-url in internal rules folder (#9815) (Kevin Partington) -* 2e87ddd Docs: Sync messageId examples' style with other examples (#9816) (Kevin Partington) -* 1d61930 Update: use doctrine range information in valid-jsdoc (#9831) (Teddy Katz) -* 133336e Update: fix indent behavior on template literal arguments (fixes #9061) (#9820) (Teddy Katz) -* ea1b15d Fix: avoid crashing on malformed configuration comments (fixes #9373) (#9819) (Teddy Katz) -* add1e70 Update: fix indent bug on comments in ternary expressions (fixes #9729) (#9818) (Teddy Katz) -* 6a5cd32 Fix: prefer-destructuring error with computed properties (fixes #9784) (#9817) (Teddy Katz) -* 601f851 Docs: Minor modification to code comments for clarity (#9821) (rgovind92) -* b9da067 Docs: fix misleading info about RuleTester column numbers (#9830) (Teddy Katz) -* 2cf4522 Update: Rename and deprecate object-property-newline option (#9570) (Jonathan Pool) -* acde640 Docs: Add ES 2018 to Configuring ESLint (#9829) (Kai Cataldo) -* ccfce15 Docs: Minor tweaks to working with rules page (#9824) (Kevin Partington) -* 54b329a Docs: fix substitution of {{ name }} (#9822) (Andres Kalle) - -v4.15.0 - January 6, 2018 - -* 6ab04b5 New: Add context.report({ messageId }) (fixes #6740) (#9165) (Jed Fox) -* fc7f404 Docs: add url to each of the rules (refs #6582) (#9788) (Patrick McElhaney) -* fc44da9 Docs: fix sort-imports rule block language (#9805) (ferhat elmas) -* 65f0176 New: CLIEngine#getRules() (refs #6582) (#9782) (Patrick McElhaney) -* c64195f Update: More detailed assert message for rule-tester (#9769) (Weijia Wang) -* 9fcfabf Fix: no-extra-parens false positive (fixes: #9755) (#9795) (Erin) -* 61e5fa0 Docs: Add table of contents to Node.js API docs (#9785) (Patrick McElhaney) -* 4c87f42 Fix: incorrect error messages of no-unused-vars (fixes #9774) (#9791) (akouryy) -* bbabf34 Update: add `ignoreComments` option to `indent` rule (fixes #9018) (#9752) (Kevin Partington) -* db431cb Docs: HTTP -> HTTPS (fixes #9768) (#9768) (Ronald Eddy Jr) -* cbf0fb9 Docs: describe how to feature-detect scopeManager/visitorKeys support (#9764) (Teddy Katz) -* f7dcb70 Docs: Add note about "patch release pending" label to maintainer guide (#9763) (Teddy Katz) - -v4.14.0 - December 23, 2017 - -* be2f57e Update: support separate requires in one-var. (fixes #6175) (#9441) (薛定谔的猫) -* 370d614 Docs: Fix typos (#9751) (Jed Fox) -* 8196c45 Chore: Reorganize CLI options and associated docs (#9758) (Kevin Partington) -* 75c7419 Update: Logical-and is counted in `complexity` rule (fixes #8535) (#9754) (Kevin Partington) -* eb4b1e0 Docs: reintroduce misspelling in `valid-typeof` example (#9753) (Teddy Katz) -* ae51eb2 New: Add allowImplicit option to array-callback-return (fixes #8539) (#9344) (James C. Davis) -* e9d5dfd Docs: improve no-extra-parens formatting (#9747) (Rich Trott) -* 37d066c Chore: Add unit tests for overrides glob matching. (#9744) (Robert Jackson) -* 805a94e Chore: Fix typo in CLIEngine test name (#9741) (@scriptdaemon) -* 1c2aafd Update: Improve parser integrations (fixes #8392) (#8755) (Toru Nagashima) -* 4ddc131 Upgrade: debug@^3.1.0 (#9731) (Kevin Partington) -* f252c19 Docs: Make the lint message `source` property a little more subtle (#9735) (Jed Fox) -* 5a5c23c Docs: fix the link to contributing page (#9727) (Victor Hom) -* f44ce11 Docs: change beginner to good first issue label text (#9726) (Victor Hom) -* 14baa2e Chore: improve arrow-body-style error message (refs #5498) (#9718) (Teddy Katz) -* f819920 Docs: fix typos (#9723) (Thomas Broadley) -* 43d4ba8 Fix: false positive on rule`lines-between-class-members` (fixes #9665) (#9680) (sakabar) - -v4.13.1 - December 11, 2017 - -* b72dc83 Fix: eol-last allow empty-string to always pass (refs #9534) (#9696) (Kevin Partington) -* d80aa7c Fix: camelcase destructure leading/trailing underscore (fixes #9700) (#9701) (Kevin Partington) -* d49d9d0 Docs: Add missing period to the README (#9702) (Kevin Partington) -* 4564fe0 Chore: no-invalid-meta crash if no export assignment (refs #9534) (#9698) (Kevin Partington) - -v4.13.0 - December 8, 2017 - -* 256481b Update: update handling of destructuring in camelcase (fixes #8511) (#9468) (Erin) -* d067ae1 Docs: Don’t use undocumented array-style configuration for max-len (#9690) (Jed Fox) -* 1ad3091 Chore: fix test-suite to work with node master (#9688) (Myles Borins) -* cdb1488 Docs: Adds an example with try/catch. (#9672) (Jaap Taal) - -v4.12.1 - November 30, 2017 - -* 1e362a0 Revert "Fix: Use XML 1.1 on XML formatters (fixes #9607) (#9608)" (#9667) (Kevin Partington) - -v4.12.0 - November 25, 2017 - -* 76dab18 Upgrade: doctrine@^2.0.2 (#9656) (Kevin Partington) -* 28c9c8e New: add a Linter#defineParser function (#9321) (Ives van Hoorne) -* 5619910 Update: Add autofix for `sort-vars` (#9496) (Trevin Hofmann) -* 71eedbf Update: add `beforeStatementContinuationChars` to semi (fixes #9521) (#9594) (Toru Nagashima) -* 4118f14 New: Adds implicit-arrow-linebreak rule (refs #9510) (#9629) (Sharmila Jesupaul) -* 208fb0f Fix: Use XML 1.1 on XML formatters (fixes #9607) (#9608) (Daniel Reigada) -* 6e04f14 Upgrade: `globals` to 11.0.1 (fixes #9614) (#9632) (Toru Nagashima) -* e13d439 Fix: space-in-parens crash (#9655) (Toru Nagashima) -* 92171cc Docs: Updating migration guide for single-line disable (#9385) (Justin Helmer) -* f39ffe7 Docs: remove extra punctuation from readme (#9640) (Teddy Katz) -* a015234 Fix: prefer-destructuring false positive on "super" (fixes #9625) (#9626) (Kei Ito) -* 0cf081e Update: add importNames option to no-restricted-imports (#9506) (Benjamin R Gibson) -* 332c214 Docs: Add @platinumazure to TSC (#9618) (Ilya Volodin) - -v4.11.0 - November 10, 2017 - -* d4557a6 Docs: disallow use of the comma operator using no-restricted-syntax (#9585) (薛定谔的猫) -* d602f9e Upgrade: espree v3.5.2 (#9611) (Kai Cataldo) -* 4def876 Chore: avoid handling rules instances in config-validator (#9364) (Teddy Katz) -* fe5ac7e Chore: fix incorrect comment in safe-emitter.js (#9605) (Teddy Katz) -* 6672fae Docs: Fixed a typo on lines-between-class-members doc (#9603) (Moinul Hossain) -* 980ecd3 Chore: Update copyright and license info (#9599) (薛定谔的猫) -* cc2c7c9 Build: use Node 8 in appveyor (#9595) (薛定谔的猫) -* 2542f04 Docs: Add missing options for `lines-around-comment` (#9589) (Clément Fiorio) -* b6a7490 Build: ensure fuzzer tests get run with `npm test` (#9590) (Teddy Katz) -* 1073bc5 Build: remove shelljs-nodecli (refs #9533) (#9588) (Teddy Katz) -* 7e3bf6a Fix: edge-cases of semi-style (#9560) (Toru Nagashima) -* e5a37ce Fix: object-curly-newline for flow code (#9458) (Tiddo Langerak) -* 9064b9c Chore: add equalTokens in ast-utils. (#9500) (薛定谔的猫) -* b7c5b19 Fix: Correct [object Object] output of error.data. (#9561) (Jonathan Pool) -* 51c8cf0 Docs: Disambiguate definition of Update tag (#9584) (Jonathan Pool) -* afc3c75 Docs: clarify what eslint-config-eslint is (#9582) (Teddy Katz) -* aedae9d Docs: fix spelling in valid-typeof example (#9574) (Maksim Degtyarev) -* 4c5aaf3 Docs: Fix typo in no-underscore-dangle rule (#9567) (Fabien Lucas) -* 3623600 Chore: upgrade ajv@5.3.0 (#9557) (薛定谔的猫) -* 1b606cd Chore: Remove an indirect dependency on jsonify (#9444) (Rouven Weßling) -* 4d7d7ab Update: Resolve npm installed formatters (#5900) (#9464) (Tom Erik Støwer) -* accc490 Fix: Files with no failures get "passing" testcase (#9547) (Samuel Levy) -* ab0f66d Docs: Add examples to better show rule coverage. (#9548) (Jonathan Pool) -* 88d2303 Chore: Add object-property-newline tests to increase coverage. (#9553) (Jonathan Pool) -* 7f37b1c Build: test Node 9 on Travis (#9556) (Teddy Katz) -* acccfbd Docs: Minor rephrase in `no-invalid-this`. (#9542) (Francisc) -* 8f9c0fe Docs: improve id-match usage advice (#9544) (Teddy Katz) -* a9606a3 Fix: invalid tests with super (fixes #9539) (#9545) (Teddy Katz) -* 8e1a095 Chore: enable a modified version of multiline-comment-style on codebase (#9452) (Teddy Katz) -* cb60285 Chore: remove commented test for HTML formatter (#9532) (Teddy Katz) -* 06b491e Docs: fix duplicate entries in changelog (#9530) (Teddy Katz) -* 2224733 Chore: use eslint-plugin-rulesdir instead of --rulesdir for self-linting (#9164) (Teddy Katz) -* 9cf4ebe Docs: add .md to link(for github users) (#9529) (薛定谔的猫) - -v4.10.0 - October 27, 2017 - -* bb6e60a Fix: Improve the doc for no-restricted-modules rule (fixes #9437) (#9495) (vibss2397) -* c529de9 Docs: Amend rule document to correct and complete it (refs #6251). (#9498) (Jonathan Pool) -* f9c6673 Chore: Add tests to cover array and object values and leading commas. (#9502) (Jonathan Pool) -* 9169258 Chore: remove `npm run check-commit` script (#9513) (Teddy Katz) -* 7d390b2 Docs: Revise contributor documentation on issue labels. (#9469) (Jonathan Pool) -* d80b9d0 Fix: no-var don't fix globals (fixes #9520) (#9525) (Toru Nagashima) -* b8aa071 Fix: allow linting the empty string from stdin (fixes #9515) (#9517) (Teddy Katz) -* 350a72c Chore: regex.test => string.startsWith (#9518) (薛定谔的猫) -* de0bef4 Chore: remove obsolete eslintbot templates (#9512) (Teddy Katz) -* 720b6d5 Docs: Update ISSUE_TEMPLATE.md (#9504) (薛定谔的猫) -* 2fa64b7 Fix: should not convert non-consecutive line comments to a single blo… (#9475) (薛定谔的猫) -* 9725146 Fix: multiline-comment-style fix produces invalid code (fixes #9461). (#9463) (薛定谔的猫) -* b12cff8 Fix: Expected order of jsdoc tags (fixes #9412) (#9451) (Orlando Wenzinger) -* f054ab5 Docs: add `.md` to link (for github users) (#9501) (薛定谔的猫) -* 5ed9cfc Docs: Correct violations of “Variable Declarations” in Code Conventions (#9447) (Jonathan Pool) -* 3171097 Docs: Clears confusion on usage of global and local plugins.(#9492) (Vasili Sviridov) -* 3204773 Chore: enable max-len. (#9414) (薛定谔的猫) -* 0f71fef Docs: Unquote booleans in lines-between-class-members docs (#9497) (Brandon Mills) -* b3d7532 Docs: use consistent terminology & fix link etc. (#9490) (薛定谔的猫) -* 87db8ae Docs: Fix broken links (#9488) (gpiress) -* 51bdb2f Docs: Incorrect link to related rule (#9477) (Gavin King) -* 1a962e8 Docs: Add FAQ for when ESLint cannot find plugin (#9467) (Kevin Partington) -* 8768b2d Fix: multiline-comment-style autofixer added trailing space (#9454) (Teddy Katz) -* e830aa1 Fix: multiline-comment-style reports block comments followed by code (#9450) (Teddy Katz) -* b12e5fe Docs: Repair broken links and add migration links. (#9473) (Jonathan Pool) -* eca01ed Docs: Add missing info about special status of home-dir config files. (#9472) (Jonathan Pool) -* eb8cfb1 Fix: change err report in constant condition (fixes #9398) (#9436) (Victor Hom) -* da77eb4 Chore: Revise no-config-file test to prevent false failure. (#9443) (Jonathan Pool) -* 47e5f6f Docs: ensure "good commit message" examples actually follow guidelines (#9466) (Teddy Katz) -* ebb530d Update: Don't ignore comments (no-trailing-spaces) (#9416) (Chris van Marle) -* 5012661 Build: fix `npm run profile` script (fixes #9397) (#9455) (Teddy Katz) -* ecac0fd Docs: Remove blockBindings references (#9446) (Jan Pilzer) -* 0b89865 Chore: ensure tests for internal rules get run (#9453) (Teddy Katz) -* 052c504 Docs: suggest deleting branches after merging PRs (#9449) (Teddy Katz) -* b31e55a Chore: move internal rules out of lib/ (#9448) (Teddy Katz) -* a7521e3 Docs: improve examples for multiline-comment-style (#9440) (Teddy Katz) - -v4.9.0 - October 14, 2017 - -* 85388fb Fix: Correct error and test messages to fit config search path (#9428) (Jonathan Pool) -* 62a323c Fix: Add class options for `lines-around-comment` (fixes #8564) (#8565) (Ed Lee) -* 8eb4aae New: multiline-comment-style rule (fixes #8320) (#9389) (薛定谔的猫) -* db41408 Chore: avoid applying eslint-env comments twice (#9278) (Teddy Katz) -* febb897 Chore: avoid loose equality assertions (#9415) (Teddy Katz) -* 2247efa Update: Add FunctionExpression to require-jsdoc (fixes #5867) (#9395) (Kai Cataldo) -* 6791d18 Docs: Corrected noun to verb. (#9438) (Jonathan Pool) -* b02fbb6 Update: custom messages for no-restricted-* (refs #8400) (Maja Wichrowska) -* 02732bd Docs: Reorganized to avoid misunderstandings. (#9434) (Jonathan Pool) -* d9466b8 Docs: Correct time forecast for tests. (#9432) (Jonathan Pool) -* f7ed84f Docs: Add instruction re home-directory config files (refs #7729) (#9426) (Jonathan Pool) -* 30d018b Chore: Add Aladdin-ADD & VictorHom to README (#9424) (Kai Cataldo) -* 2d8a303 Docs: fix examples for prefer-numeric-literals (#9155) (Lutz Lengemann) -* d7610f5 Docs: Add jquery warning to prefer-destructuring (#9409) (Thomas Grainger) -* e835dd1 Docs: clarify no-mixed-operators (fixes #8051) (Ruxandra Fediuc) -* 51360c8 Docs: update block-spacing details (fixes #8743) (#9375) (Victor Hom) -* 6767857 Update: fix ignored nodes in indent rule when using tabs (fixes #9392) (#9393) (Robin Houston) -* 37dde77 Chore: Refactor SourceCode#getJSDocComment (#9403) (Kai Cataldo) -* 9fedd51 Chore: Add missing space in blog post template (#9407) (Kevin Partington) -* 7654c99 Docs: add installing prerequisites in readme. (#9401) (薛定谔的猫) -* 786cc73 Update: Add "consistent" option to array-bracket-newline (fixes #9136) (#9206) (Ethan Rutherford) -* e171f6b Docs: add installing prerequisites. (#9394) (薛定谔的猫) -* 74dfc87 Docs: update doc for class-methods-use-this (fixes #8910) (#9374) (Victor Hom) -* b4a9dbf Docs: show console call with no-restricted-syntax (fixes #7806) (#9376) (Victor Hom) -* 8da525f Fix: recognise multiline comments as multiline arrays (fixes #9211) (#9369) (Phil Quinn) -* c581b77 Chore: Error => TypeError (#9390) (薛定谔的猫) -* ee99876 New: lines-between-class-members rule (fixes #5949) (#9141) (薛定谔的猫) -* 9d3f5ad Chore: report unused eslint-disable directives in ESLint codebase (#9371) (Teddy Katz) -* 1167638 Update: add allowElseIf option to no-else-return (fixes #9228) (#9229) (Thomas Grainger) -* 4567ab1 New: Add the fix-dry-run flag (fixes #9076) (#9073) (Rafał Ruciński) - -v4.8.0 - September 29, 2017 - -* 3f2b908 New: add option to report unused eslint-disable directives (fixes #9249) (#9250) (Teddy Katz) -* ff2be59 Fix: dot notation rule failing to catch string template (fixes #9350) (#9357) (Phil Quinn) -* b1372da Chore: remove sourceCode property from Linter (refs #9161) (#9363) (Teddy Katz) -* cef6f8c Docs: remove line about removing rules from semver policy (#9367) (Teddy Katz) -* 06efe87 Fix: Add meta element with charset attribute. (#9365) (H1Gdev) -* 458ca67 Docs: update architecture page (fixes #9337) (#9345) (Victor Hom) -* 1c6bc67 Fix: special EventEmitter keys leak information about other rules (#9328) (Teddy Katz) -* d593e61 Docs: update eslint.org links to use https (#9358) (Teddy Katz) -* 38d0cb2 Fix: fix wrong code-path about try-for-in (fixes #8848) (#9348) (Toru Nagashima) -* 434d9e2 Fix: Invalid font-size property value issue. (#9341) (H1Gdev) -* a7668c2 Chore: Remove unnecessary slice from logging utility (#9343) (Gyandeep Singh) -* 2ff6fb6 Chore: remove unused arguments in codebase (#9340) (Teddy Katz) - -v4.7.2 - September 21, 2017 - -* 4f87732 Fix: Revert setting node.parent early (fixes #9331) (#9336) (Teddy Katz) - -v4.7.1 - September 18, 2017 - -* 08656db Fix: Handle nested disable directive correctly (fixes #9318) (#9322) (Gyandeep Singh) -* 9226495 Revert "Chore: rewrite parseListConfig for a small perf gain." (#9325) (薛定谔的猫) - -v4.7.0 - September 15, 2017 - -* 787b78b Upgrade: Espree v3.5.1 (fixes #9153) (#9314) (Brandon Mills) -* 1488b51 Update: run rules after `node.parent` is already set (fixes #9122) (#9283) (Teddy Katz) -* 4431d68 Docs: fix wrong config in max-len example. (#9309) (薛定谔的猫) -* 7d24dde Docs: Fix code snippet to refer to the correct option (#9313) (Ruben Tytgat) -* 12388d4 Chore: rewrite parseListConfig for a small perf gain. (#9300) (薛定谔的猫) -* ce1f084 Update: fix MemberExpression handling in no-extra-parens (fixes #9156) (jackyho112) -* 0c720a3 Update: allow autofixing when using processors (fixes #7510) (#9090) (Teddy Katz) -* 838df76 Chore: upgrade deps. (#9289) (薛定谔的猫) -* f12def6 Update: indent flatTernary option to handle `return` (fixes #9285) (#9296) (Teddy Katz) -* e220687 Fix: remove autofix for var undef inits (fixes #9231) (#9288) (Victor Hom) -* 002e199 Docs: fix no-restricted-globals wrong config. (#9305) (薛定谔的猫) -* fcfe91a Docs: fix wrong config in id-length example. (#9303) (薛定谔的猫) -* 2731f94 Update: make newline-per-chained-call fixable (#9149) (João Granado) -* 61f1093 Chore: avoid monkeypatching Linter instances in RuleTester (#9276) (Teddy Katz) -* 28929cb Chore: remove Linter#reset (refs #9161) (#9268) (Teddy Katz) -* abc8634 Build: re-run browserify when generating site (#9275) (Teddy Katz) -* 7685fed Fix: IIFE and arrow functions in no-invalid-this (fixes #9126) (#9258) (Toru Nagashima) -* 2b1eba2 Chore: enable eslint-plugin/no-deprecated-context-methods (#9279) (Teddy Katz) -* 981f933 Fix: reuse the AST of source code object in verify (#9256) (Toru Nagashima) -* cd698ba Docs: move RuleTester documentation to Node.js API page (#9273) (Teddy Katz) -* 4ae7ad3 Docs: fix inaccuracy in `npm run perf` description (#9274) (Teddy Katz) -* cad45bd Docs: improve documentation for rule contexts (#9272) (Teddy Katz) -* 3b0c6fd Chore: remove extraneous linter properties (refs #9161) (#9267) (Teddy Katz) -* c3231b3 Docs: Fix typo in array-bracket-newline.md (#9269) (宋文强) -* 51132d6 Fix: Formatters keep trailing '.' if preceded by a space (fixes #9154) (#9247) (i-ron-y) -* 88d5d4d Chore: remove undocumented Linter#markVariableAsUsed method (refs #9161) (#9266) (Teddy Katz) -* 09414cf Chore: remove internal Linter#getDeclaredVariables method (refs #9161) (#9264) (Teddy Katz) -* f31f59d Chore: prefer smaller scope for variables in codebase (#9265) (Teddy Katz) -* 3693e4e Chore: remove undocumented Linter#getScope method (#9253) (Teddy Katz) -* 5d7eb81 Chore: refactor config hash caching in CLIEngine (#9260) (Teddy Katz) -* 1a76c4d Chore: remove SourceCode passthroughs from Linter.prototype (refs #9161) (#9263) (Teddy Katz) -* 40ae27b Chore: avoid relying on Linter#getScope/markVariableAsUsed in tests (#9252) (Teddy Katz) -* b383d81 Chore: make executeOnFile a pure function in CLIEngine (#9262) (Teddy Katz) -* 5e0e579 Chore: avoid internal SourceCode methods in Linter tests (refs #9161) (#9223) (Teddy Katz) -* adab827 Chore: remove unused eslint-disable comment (#9251) (Teddy Katz) -* 31e4ec8 Chore: use consistent names for apply-disable-directives in tests (#9246) (Teddy Katz) -* 7ba46e6 Fix: shebang error in eslint-disable-new-line; add tests (fixes #9238) (#9240) (i-ron-y) -* 8f6546c Chore: remove undocumented defaults() method (refs #9161) (#9237) (Teddy Katz) -* 82d8b73 Docs: Fix error in example code for sort-imports (fixes #8734) (#9245) (i-ron-y) -* a32ec36 Update: refactor eslint-disable comment processing (#9216) (Teddy Katz) -* 583f0b8 Chore: avoid using globals in CLIEngine tests (#9242) (Teddy Katz) -* c8bf687 Chore: upgrade eslint-plugin-eslint-plugin@1.0.0 (#9234) (薛定谔的猫) -* 3c41a05 Chore: always normalize rules to new API in rules.js (#9236) (Teddy Katz) -* c5f4227 Chore: move logic for handling missing rules to rules.js (#9235) (Teddy Katz) -* bf1e344 Chore: create report translators lazily (#9221) (Teddy Katz) -* 2eedc1f Chore: remove currentFilename prop from Linter instances (refs #9161) (#9219) (Teddy Katz) -* 5566e94 Docs: Replace misleading CLA links (#9133) (#9232) (i-ron-y) -* c991630 Chore: remove ConfigOps.normalize in favor of ConfigOps.getRuleSeverity (#9224) (Teddy Katz) -* 171962a Chore: remove internal Linter#getAncestors helper (refs #9161) (#9222) (Teddy Katz) -* a567499 Chore: avoid storing list of problems on Linter instance (refs #9161) (#9214) (Teddy Katz) -* ed6d088 Chore: avoid relying on undocumented Linter#getFilename API in tests (#9218) (Teddy Katz) - -v4.6.1 - September 3, 2017 - -* bdec46d Build: avoid process leak when generating website (#9217) (Teddy Katz) -* cb74b87 Fix: avoid adding globals when an env is used with `false` (fixes #9202) (#9203) (Teddy Katz) -* f9b7544 Docs: Correct a typo in generator-star-spacing documentation (#9205) (Ethan Rutherford) -* e5c5e83 Build: Fixing issue with docs generation (Fixes #9199) (#9200) (Ilya Volodin) - -v4.6.0 - September 1, 2017 - -* 56dd769 Docs: fix link format in prefer-arrow-callback.md (#9198) (Vse Mozhet Byt) -* 6becf91 Update: add eslint version to error output. (fixes #9037) (#9071) (薛定谔的猫) -* 0e09973 New: function-paren-newline rule (fixes #6074) (#8102) (Teddy Katz) -* 88a64cc Chore: Make parseJsonConfig() a pure function in Linter (#9186) (Teddy Katz) -* 1bbac51 Fix: avoid breaking eslint-plugin-eslint-comments (fixes #9193) (#9196) (Teddy Katz) -* 3e8b70a Fix: off-by-one error in eslint-disable comment checking (#9195) (Teddy Katz) -* 73815f6 Docs: rewrite prefer-arrow-callback documentation (fixes #8950) (#9077) (Charles E. Morgan) -* 0d3a854 Chore: avoid mutating report descriptors in report-translator (#9189) (Teddy Katz) -* 2db356b Update: no-unused-vars Improve message to include the allowed patterns (#9176) (Eli White) -* 8fbaf0a Update: Add configurability to generator-star-spacing (#8985) (Ethan Rutherford) -* 8ed779c Chore: remove currentScopes property from Linter instances (refs #9161) (#9187) (Teddy Katz) -* af4ad60 Fix: Handle error when running init without npm (#9169) (Gabriel Aumala) -* 4b94c6c Chore: make parse() a pure function in Linter (refs #9161) (#9183) (Teddy Katz) -* 1be5634 Chore: don't make Linter a subclass of EventEmitter (refs #9161) (#9177) (Teddy Katz) -* e95af9b Chore: don't include internal test helpers in npm package (#9160) (Teddy Katz) -* 6fb32e1 Chore: avoid using private Linter APIs in astUtils tests (refs #9161) (#9173) (Teddy Katz) -* de6dccd Docs: add documentation for Linter methods (refs #6525) (#9151) (Teddy Katz) -* 2d90030 Chore: remove unused assignment. (#9182) (薛定谔的猫) -* d672aef Chore: refactor reporting logic (refs #9161) (#9168) (Teddy Katz) -* 5ab0434 Fix: indent crash on sparse arrays with "off" option (fixes #9157) (#9166) (Teddy Katz) -* c147b97 Chore: Make SourceCodeFixer accept text instead of a SourceCode instance (#9178) (Teddy Katz) -* f127423 Chore: avoid using private Linter APIs in Linter tests (refs #9161) (#9175) (Teddy Katz) -* 2334335 Chore: avoid using private Linter APIs in SourceCode tests (refs #9161) (#9174) (Teddy Katz) -* 2dc243a Chore: avoid using internal Linter APIs in RuleTester (refs #9161) (#9172) (Teddy Katz) -* d6e436f Fix: no-extra-parens reported some parenthesized IIFEs (fixes #9140) (#9158) (Teddy Katz) -* e6b115c Build: Add an edit link to the rule docs’ metadata (#9049) (Jed Fox) -* fcb7bb4 Chore: avoid unnecessarily complex forEach calls in no-extra-parens (#9159) (Teddy Katz) -* ffa021e Docs: quotes rule - when does \n require backticks (#9135) (avimar) -* 60c5148 Chore: improve coverage in lib/*.js (#9130) (Teddy Katz) - -v4.5.0 - August 18, 2017 - -* decdd2c Update: allow arbitrary nodes to be ignored in `indent` (fixes #8594) (#9105) (Teddy Katz) -* 79062f3 Update: fix indentation of multiline `new.target` expressions (#9116) (Teddy Katz) -* d00e24f Upgrade: `chalk` to 2.x release (#9115) (Stephen Edgar) -* 6ef734a Docs: add missing word in processor documentation (#9106) (Teddy Katz) -* a4f53ba Fix: Include files with no messages in junit results (#9093) (#9094) (Sean DuBois) -* 1d6a9c0 Chore: enable eslint-plugin/test-case-shorthand-strings (#9067) (薛定谔的猫) -* f8add8f Fix: don't autofix with linter.verifyAndFix when `fix: false` is used (#9098) (Teddy Katz) -* 77bcee4 Docs: update instructions for adding TSC members (#9086) (Teddy Katz) -* bd09cd5 Update: avoid requiring NaN spaces of indentation (fixes #9083) (#9085) (Teddy Katz) -* c93a853 Chore: Remove extra space in blogpost template (#9088) (Kai Cataldo) - -v4.4.1 - August 7, 2017 - -* ec93614 Fix: no-multi-spaces to avoid reporting consecutive tabs (fixes #9079) (#9087) (Teddy Katz) - -v4.4.0 - August 5, 2017 - -* 89196fd Upgrade: Espree to 3.5.0 (#9074) (Gyandeep Singh) -* b3e4598 Fix: clarify AST and don't use `node.start`/`node.end` (fixes #8956) (#8984) (Toru Nagashima) -* 62911e4 Update: Add ImportDeclaration option to indent rule (#8955) (David Irvine) -* de75f9b Chore: enable object-curly-newline & object-property-newline.(fixes #9042) (#9068) (薛定谔的猫) -* 5ae8458 Docs: fix typo in object-shorthand.md (#9066) (Jon Berry) -* c3d5b39 Docs: clarify options descriptions (fixes #8875) (#9060) (Brandon Mailhiot) -* 37158c5 Docs: clarified behavior of globalReturn option (fixes #8953) (#9058) (Brandon Mailhiot) -* c2f3553 Docs: Update example for MemberExpression option of indent (fixes #9056) (#9057) (Jeff) -* 78a85e0 Fix: no-extra-parens incorrectly reports async function expressions (#9035) (薛定谔的猫) -* c794f86 Fix: getter-return reporting method named 'get' (fixes #8919) (#9004) (薛定谔的猫) -* d0f78ec Docs: update rule deprecation policy (fixes #8635) (#9033) (Teddy Katz) -* 5ab282f Fix: Print error message in bin/eslint.js (fixes #9011) (#9041) (Victor Hom) -* 50e3cf3 Docs: Update sort-keys doc to define natural ordering (fixes #9043) (#9045) (Karan Sharma) -* 7ecfe6a Chore: enable eslint-plugin/test-case-property-ordering (#9040) (薛定谔的猫) -* ad32697 Upgrade: js-yaml to 3.9.1 (refs #9011) (#9044) (Teddy Katz) -* 66c1d43 Docs: Create SUPPORT.md (#9031) (Teddy Katz) -* 7247b6c Update: handle indentation of custom destructuring syntax (fixes #8990) (#9027) (Teddy Katz) -* cdb82f2 Fix: padding-line-between-statements crash on semicolons after blocks (#8748) (Alexander Madyankin) -* 3141872 Chore: remove unnecessary eslint-disable comments in codebase (#9032) (Teddy Katz) -* 0f97279 Fix: refactor no-multi-spaces to avoid regex backtracking (fixes #9001) (#9008) (Teddy Katz) -* b74514d Fix: refactor RuleContext to not modify report locations (fixes #8980) (#8997) (Teddy Katz) -* 31d7fd2 Fix: inconsistent `indent` behavior on computed properties (fixes #8989) (#8999) (Teddy Katz) -* 3393894 Fix: avoid reporting the entire AST for missing rules (#8998) (Teddy Katz) -* b3b95b8 Chore: enable additional rules on ESLint codebase (#9013) (Teddy Katz) -* 9b6c552 Upgrade: eslint-plugin-eslint-plugin@0.8.0 (#9012) (薛定谔的猫) -* acbe86a Chore: disallow .substr and .substring in favor of .slice (#9010) (Teddy Katz) -* d0536d6 Chore: Optimizes adding Linter methods (fixes #9000) (#9007) (Sean C Denison) -* 0a0401f Chore: fix spelling error. (#9003) (薛定谔的猫) -* 3d020b9 Update: emit a warning for ecmaFeatures rather than throwing an error (#8974) (Teddy Katz) -* d2f8f9f Fix: include name of invalid config in validation messages (fixes #8963) (#8973) (Teddy Katz) -* c3ee46b Chore: fix misleading comment in RuleTester (#8995) (Teddy Katz) - -v4.3.0 - July 21, 2017 - -* 91dccdf Update: support more options in prefer-destructuring (#8796) (Victor Hom) -* 3bebcfd Update: Support generator yields in no constant condition (#8762) (Victor Hom) -* 96df8c9 Fix: Handle fixing objects containing comments (fixes #8484) (#8944) (Brian Schemp) -* e39d41d Docs: Make `peerDependencies` package.json snippet valid JSON (#8971) (Sam Adams) -* a5fd101 Fix: duplicated error message if a crash occurs (fixes #8964) (#8965) (Teddy Katz) -* f8d122c Docs: trailing commas not allowed in json (#8969) (Scott Fletcher) -* d09288a Chore: Use `output: null` to assert that a test case is not autofixed. (#8960) (薛定谔的猫) -* e639358 Update: add question to confirm downgrade (fixes #8870) (#8911) (Toru Nagashima) -* 601039d Docs: fix badge in eslint-config-eslint readme (#8954) (Teddy Katz) -* 3c231fa Update: add enforceInMethodNames to no-underscore-dangle (fixes #7065) (#7234) (Gabriele Petronella) -* 128591f Update: prefer-numeric-literals warns Number.parseInt (fixes #8913) (#8929) (Kevin Partington) -* 846f8b1 Docs: Clarified that core PRs require issue in maintainer guide (#8927) (Kevin Partington) -* 55bc35d Fix: Avoid shell mangling during eslint --init (#8936) (Anders Kaseorg) -* 10c3d78 Chore: fix misleading `indent` test (#8925) (Teddy Katz) -* fb8005d Update: no-restricted-globals custom error messages (fixes #8315) (#8932) (Kevin Partington) -* a747b6f Chore: make minor improvements to `indent` internals (#8947) (Teddy Katz) -* 1ea3723 Update: fix indentation of parenthesized MemberExpressions (fixes #8924) (#8928) (Teddy Katz) -* 9abc6f7 Update: fix BinaryExpression indentation edge case (fixes #8914) (#8930) (Teddy Katz) -* 0e90453 Docs: Fixing broken cyclomatic complexity link (fixes #8396) (#8937) (Chris Bargren) -* a8a8350 Chore: improve performance of `indent` rule (#8905) (Teddy Katz) -* 764b2a9 Chore: update header info in `indent` (#8926) (Teddy Katz) -* 597c217 Fix: confusing error if plugins from config is not an array (#8888) (Calvin Freitas) -* 3c1dd6d Docs: add description of no-sync `allowAtRootLevel` option (fixes #8902) (#8906) (Teddy Katz) -* 933a9cf Chore: add a fuzzer to detect bugs in core rules (#8422) (Teddy Katz) -* 45f8cd9 Docs: fix verifyAndFix result property name (#8903) (Tino Vyatkin) -* 1a89e1c Docs: Fix always-multiline example in multiline-ternary docs (#8904) (Nathan Woltman) - -v4.2.0 - July 8, 2017 - -* e0f0101 Update: fix indentation of nested function parameters (fixes #8892) (#8900) (Teddy Katz) -* 9f95a3e Chore: remove unused helper method from `indent` (#8901) (Teddy Katz) -* 11ffe6b Fix: no-regex-spaces rule incorrectly fixes quantified spaces (#8773) (Keri Warr) -* 975dacf Update: fix indentation of EmptyStatements (fixes #8882) (#8885) (Teddy Katz) -* 88ed041 Build: Turnoff CI branch build (fixes #8804) (#8873) (Gyandeep Singh) -* 72f22eb Chore: replace is-my-json-valid with Ajv (#8852) (Gajus Kuizinas) -* 7c8de92 Docs: Clarified PR guidelines in maintainer guide (#8876) (Kevin Partington) -* d1fc408 Docs: Update CLA link in Contributing docs (#8883) (Calvin Freitas) -* 931a9f1 Fix: indent false positive with multi-line await expression (#8837) (薛定谔的猫) -* 3767cda Update: add no-sync option to allow at root level (fixes #7985) (#8859) (Victor Hom) -* 1ce553d Docs: Fix wording of minProperties in object-curly-newline (fixes #8874) (#8878) (solmsted) -* f00854e Fix: --quiet no longer fixes warnings (fixes #8675) (#8858) (Kevin Partington) -* b678535 Chore: Add collapsible block for config in ISSUE_TEMPLATE (#8872) (Gyandeep Singh) -* 1f5bfc2 Update: Add always-multiline option to multiline-ternary (fixes #8770) (#8841) (Nathan Woltman) -* 22116f2 Fix: correct comma-dangle JSON schema (#8864) (Evgeny Poberezkin) -* 676af9e Update: fix indentation of JSXExpressionContainer contents (fixes #8832) (#8850) (Teddy Katz) -* 330dd58 Chore: fix title of linter test suite (#8861) (Teddy Katz) -* 60099ed Chore: enable for-direction rule on ESLint codebase (#8853) (薛定谔的猫) -* e0d1a84 Chore: upgrade eslint-plugin-eslint-plugin & eslint-plugin-node (#8856) (薛定谔的猫) -* 0780d86 Chore: remove identical tests (#8851) (Teddy Katz) -* 5c3ac8e Fix: arrow-parens fixer gets tripped up with trailing comma in args (#8838) (薛定谔的猫) -* c4f2e29 Build: fix race condition in demo (#8827) (Teddy Katz) -* c693be5 New: Allow passing a function as `fix` option (fixes #8039) (#8730) (Ian VanSchooten) -* 8796d55 Docs: add missing item to 4.0 migration guide table of contents (#8835) (薛定谔的猫) -* 742998c doc md update: false -> `false` (#8825) (Erik Vold) -* ce969f9 Docs: add guidelines for patch release communication (fixes #7277) (#8823) (Teddy Katz) -* 5c83c99 Docs: Clarify arrow function parens in no-extra-parens (fixes #8741) (#8822) (Kevin Partington) -* 84d921d Docs: Added note about Node/CJS scoping to no-redeclare (fixes #8814) (#8820) (Kevin Partington) -* 85c9327 Update: fix parenthesized CallExpression indentation (fixes #8790) (#8802) (Teddy Katz) -* be8d354 Update: simplify variable declarator indent handling (fixes #8785) (#8801) (Teddy Katz) -* 9417818 Fix: no-debugger autofixer produced invalid syntax (#8806) (Teddy Katz) -* 8698a92 New: getter-return rule (fixes #8449) (#8460) (薛定谔的猫) -* eac06f2 Fix: no-extra-parens false positives for variables called "let" (#8808) (Teddy Katz) -* 616587f Fix: dot-notation autofix produces syntax errors for object called "let" (#8807) (Teddy Katz) -* a53ef7e Fix: don't require a third argument in linter.verifyAndFix (fixes #8805) (#8809) (Teddy Katz) -* 5ad8b70 Docs: add minor formatting improvement to paragraph about parsers (#8816) (Teddy Katz) - -v4.1.1 - June 25, 2017 - -* f307aa0 Fix: ensure configs from a plugin are cached separately (fixes #8792) (#8798) (Teddy Katz) -* 8b48ae8 Docs: Add doc on parser services (fixes #8390) (#8795) (Victor Hom) -* 0d041e7 Fix: avoid crashing when using baseConfig with extends (fixes #8791) (#8797) (Teddy Katz) -* 03213bb Chore: improve comment explanation of `indent` internal functions (#8800) (Teddy Katz) -* d2e88ed Chore: Fix misleading comment in ConfigCache.js (#8799) (Teddy Katz) - -v4.1.0 - June 23, 2017 - -* e8f1362 Docs: Remove wrong descriptions in `padded-block` rule (#8783) (Plusb Preco) -* 291a783 Update: `enforceForArrowConditionals` to `no-extra-parens` (fixes #6196) (#8439) (Evilebot Tnawi) -* a21dd32 New: Add `overrides`/`files` options for glob-based config (fixes #3611) (#8081) (Sylvan Mably) -* 879688c Update: Add ignoreComments option to no-trailing-spaces (#8061) (Jake Roussel) -* b58ae2e Chore: Only instantiate fileEntryCache when cache flage set (perf) (#8763) (Gyandeep Singh) -* 9851288 Update: fix indent errors on multiline destructure (fixes #8729) (#8756) (Victor Hom) -* 3608f06 Docs: Increase visibility of code of conduct (fixes #8758) (#8764) (Kai Cataldo) -* 673a58b Update: support multiple fixes in a report (fixes #7348) (#8101) (Toru Nagashima) -* 7a1bc38 Fix: don't pass default parserOptions to custom parsers (fixes #8744) (#8745) (Teddy Katz) -* c5b4052 Chore: enable computed-property-spacing on ESLint codebase (#8760) (Teddy Katz) -* 3419f64 Docs: describe how to use formatters on the formatter demo page (#8754) (Teddy Katz) -* a3ff8f2 Chore: combine tests in tests/lib/eslint.js and tests/lib/linter.js (#8746) (Teddy Katz) -* b7cc1e6 Fix: Space-infix-ops should ignore type annotations in TypeScript (#8341) (Reyad Attiyat) -* 46e73ee Fix: eslint --init installs wrong dependencies of popular styles (fixes #7338) (#8713) (Toru Nagashima) -* a82361b Chore: Prevent package-lock.json files from being created (fixes #8742) (#8747) (Teddy Katz) -* 5f81a68 New: Add eslintIgnore support to package.json (fixes #8458) (#8690) (Victor Hom) -* b5a70b4 Update: fix multiline binary operator/parentheses indentation (#8719) (Teddy Katz) -* ab8b016 Update: fix MemberExpression indentation with "off" option (fixes #8721) (#8724) (Teddy Katz) -* eb5d12c Update: Add Fixer method to Linter API (#8631) (Gyandeep Singh) -* 26a2daa Chore: Cache fs reads in ignored-paths (fixes #8363) (#8706) (Victor Hom) - -v4.0.0 - June 11, 2017 - -* 4aefb49 Chore: avoid using deprecated rules on ESLint codebase (#8708) (Teddy Katz) -* 389feba Chore: upgrade deps. (#8684) (薛定谔的猫) -* 3da7b5e Fix: Semi-Style only check for comments when tokens exist (fixes #8696) (#8697) (Reyad Attiyat) -* 3cfe9ee Fix: Add space between async and param on fix (fixes #8682) (#8693) (Reyad Attiyat) -* c702858 Chore: enable no-multiple-empty-lines on ESLint codebase (#8694) (Teddy Katz) -* 34c4020 Update: Add support for parens on left side for-loops (fixes: #8393) (#8679) (Victor Hom) -* 735cd09 Docs: Correct the comment in an example for `no-mixed-requires` (#8686) (Fangzhou Li) -* 026f048 Chore: remove dead code from prefer-const (#8683) (Teddy Katz) - -v4.0.0-rc.0 - June 2, 2017 - -* 0058b0f8 Update: add --fix to no-debugger (#8660) (薛定谔的猫) -* b4daa225 Docs: Note to --fix option for strict rule (#8680) (Vitaliy Potapov) -* 4df33e7c Chore: check for root:true in project sooner (fixes #8561) (#8638) (Victor Hom) -* c9b980ce Build: Add Node 8 on travis (#8669) (Gyandeep Singh) -* 95248336 Fix: Don't check object destructing in integer property (fixes #8654) (#8657) (flowmemo) -* c4ac969c Update: fix parenthesized ternary expression indentation (fixes #8637) (#8649) (Teddy Katz) -* 4f2f9fcb Build: update license checker to allow LGPL (fixes #8647) (#8652) (Teddy Katz) -* b0c83bd1 Docs: suggest pushing new commits to a PR instead of amending (#8632) (Teddy Katz) -* d0e9fd2d Fix: Config merge to correctly account for extends (fixes #8193) (#8636) (Gyandeep Singh) -* 705d88f7 Docs: Update CLA link on Pull Requests page (#8642) (Teddy Katz) -* 794d4d6c Docs: missing paren on readme (#8640) (Dan Beam) -* 7ebd9d6f New: array-element-newline rule (fixes #6075) (#8375) (Jan Peer Stöcklmair) -* f62cff66 Chore: Remove dependency to user-home (fixes #8604) (#8629) (Pavol Madar) -* 936bc174 Docs: Add missing documentation for scoped modules in sharable config developer-guide (#8610) (Jonathan Samines) - -v4.0.0-beta.0 - May 19, 2017 - -* 2f7015b6 New: semi-style rule (fixes #8169) (#8542) (Toru Nagashima) -* 1eaef580 Revert "Breaking: Traverse into type annotations (fixes #7129) (#8365)" (#8584) (Kai Cataldo) -* eb14584a Fix: no-unneeded-ternary change code behavior after fix (fixes #8507) (#8624) (Jan Peer Stöcklmair) -* 3ec436ee Breaking: New Linter API (fixes #8454) (#8465) (Gyandeep Singh) -* 3fc9653a Fix: Call expression consistency in variable declaration (fixes #8607) (#8619) (Reyad Attiyat) -* 5b6093ef Docs: Remove .eslintignore reference to transpiled file filtering (#8622) (Alex Summer) -* 729bbcdb Chore: Fix lgtm alerts. (#8611) (Max Schaefer) -* 3418479a Update: improve indent of `flatTernaryExpressions` (fixes #8481) (#8587) (Toru Nagashima) -* 268d52ef Update: Use sane defaults for JSX indentation (fixes #8425) (#8593) (Teddy Katz) -* d21f5283 Chore: make shelljs a devDependency instead of a dependency (#8608) (Teddy Katz) -* 11493781 Docs: Rephrase in about section (#8609) (Sudarsan G P) -* 23401626 Chore: remove strip-bom dependency (refs #8603) (#8606) (Teddy Katz) -* a93a2f95 New: padding-line-between-statements rule (fixes #7356) (#8099) (Toru Nagashima) -* 0ef09ea0 New: for-direction rule (fixes #8387) (#8519) (薛定谔的猫) -* a73e6c09 Fix: Fix failing uknown node test since #8569 indents class bodies (#8588) (Reyad Attiyat) -* c6c639d6 Fix: Ignore unknown nodes for Indent rule (fixes #8440) (#8504) (Reyad Attiyat) -* df17bc87 Fix: object-shorthand crash on some computed keys (fixes #8576) (#8577) (Teddy Katz) -* 482d5720 New: switch-colon-spacing rule (fixes #7981) (#8540) (Toru Nagashima) -* afa35c68 Update: check allman-style classes correctly in indent (fixes #8493) (#8569) (Teddy Katz) -* de0b4ad7 Fix: Indent Ignore Variable Declaration init operator (fixes #8546) (#8563) (Reyad Attiyat) -* 927ca0dc Fix: invalid syntax from prefer-arrow-callback autofixer (fixes #8541) (#8555) (Teddy Katz) -* 25db3d22 Chore: avoid skipping test for env overrides (refs #8291) (#8556) (Teddy Katz) -* 456f519b Update: make indent MemberExpression handling more robust (fixes #8552) (#8554) (Teddy Katz) -* 873310e5 Fix: run no-unexpected-multiline only if needed (fixes #8550) (#8551) (Ruben Bridgewater) -* 833a0cad Fix: confusing RuleTester error message when options is not an array (#8557) (Teddy Katz) - -v4.0.0-alpha.2 - May 5, 2017 - -* 74ab344 Update: check allman-style blocks correctly in indent rule (fixes #8493) (#8499) (Teddy Katz) -* f6256d4 Update: no-extend-native checks global scope refs only (fixes #8461) (#8528) (Kevin Partington) -* b463045 Docs: add typescript-eslint-parser (#8388) (#8534) (薛定谔的猫) -* 99c56d5 Update: handle multiline parents consistently in indent (fixes #8455) (#8498) (Teddy Katz) -* cf940c6 Update: indent `from` tokens in import statements (fixes #8438) (#8466) (Teddy Katz) -* 0a9a90f Fix: max-len doesn't allow comments longer than code (#8532) (Ken Gregory) -* 734846b Breaking: validate eslintrc properties (fixes #8213) (#8295) (alberto) -* 025e97a Chore: delete duplicated test. (#8527) (薛定谔的猫) -* 6a333ff Upgrade: espree@^3.4.2 (#8526) (Kevin Partington) -* e52d998 Docs: Configuring Cascading and Hierarchy example correction (#8512) (Cheong Yip) -* e135aa5 Docs: Correct code of conduct link on Readme.md (#8517) (Zander Mackie) -* 37e3ba1 Chore: Add license report and scan status (#8503) (Kevin Wang) -* afbea78 Chore: don't pull default options from eslint:recommended (fixes #8374) (#8381) (Teddy Katz) -* d49acc3 Update: fix no-self-compare false negative on non-literals (fixes #7677) (#8492) (Teddy Katz) -* aaa1a81 Fix: avoid creating extra whitespace in brace-style fixer (fixes #7621) (#8491) (Teddy Katz) -* 9c3da77 Docs: list another related rule in no-undefined (#8467) (Ethan) -* f987814 Docs: Update CHANGELOG.md for v4.0.0-alpha.1 release (#8488) (Kai Cataldo) - -v4.0.0-alpha.1 - April 21, 2017 - -* b0dadfe3 Docs: Update comments section of Migrating to v4.0.0 (#8486) (Kai Cataldo) -* b337738f Update: Add `consistent` option to `object-curly-newline` (fixes #6488) (#7720) (Evilebot Tnawi) -* 53fefb3b Update: add fix for no-confusing-arrow (#8347) (Mordy Tikotzky) -* 735d02d5 Update: Deprecate sourceCode.getComments() (fixes #8408) (#8434) (Kai Cataldo) -* ac39e3b0 Update: no-unexpected-multiline to flag confusing division (fixes #8469) (#8475) (Teddy Katz) -* e35107f0 Fix: indent crash on arrow functions without parens at start of line (#8477) (Teddy Katz) -* 973adeb6 Docs: State that functions option only applies in ES2017 (fixes #7809) (#8468) (Thenaesh Elango) -* 7bc6fe0a New: array-bracket-newline rule (#8314) (Jan Peer Stöcklmair) -* 10a1a2d7 Chore: Do not use cache when testing (#8464) (Kai Cataldo) -* 9f540fd2 Update: no-unused-vars false negative about destructuring (fixes #8442) (#8459) (Toru Nagashima) -* 741ed393 Docs: Clarify how to run local ESLint installation (#8463) (Kai Cataldo) -* fac53890 Breaking: Remove array-callback-return from recommended (fixes #8428) (#8433) (Kai Cataldo) -* 288c96c1 Upgrade: dependencies (#8304) (alberto) -* 48700fc8 Docs: Remove extra header line from LICENSE (#8448) (Teddy Katz) -* 161ee4ea Chore: avoid cloning comments array in TokenStore (#8436) (Teddy Katz) -* 0c2a386e Docs: clarify new indent behavior with MemberExpressions (#8432) (Teddy Katz) -* 446b8876 Docs: update space-before-function-paren docs for 4.0 (fixes #8430) (#8431) (Teddy Katz) - -v4.0.0-alpha.0 - April 7, 2017 - -* 950874f Docs: add 4.0.0 migration guide (fixes #8306) (#8313) (Teddy Katz) -* 2754141 Fix: more autofix token-combining bugs (#8394) (Teddy Katz) -* f5a7e42 Breaking: log number of fixable problems (fixes #7364) (#8324) (alberto) -* 769b121 Chore: Fix indentation errors in indent-legacy (#8424) (Kai Cataldo) -* 8394e48 Update: add deprecated indent-legacy rule as v3.x indent rule snapshot (#8286) (Teddy Katz) -* 3c87e85 Fix: no-multi-spaces false positive with irregular indent whitespace (#8412) (Teddy Katz) -* cc53481 Breaking: rewrite indent (fixes #1801, #3737, #3845, #6007, ...16 more) (#7618) (Teddy Katz) -* 867dd2e Breaking: Calculate leading/trailing comments in core (#7516) (Kai Cataldo) -* de9f1a0 Docs: ES6 syntax vs globals configuration (fixes #7984) (#8350) (Zander Mackie) -* 66af53e Breaking: Traverse into type annotations (fixes #7129) (#8365) (Kai Cataldo) -* 86cf3e4 New: no-buffer-constructor rule (fixes #5614) (#8413) (Teddy Katz) -* f560c06 Update: fix space-unary-ops behavior with postfix UpdateExpressions (#8391) (Teddy Katz) -* 936af66 Fix: no-multiple-empty-lines crash on space after last \n (fixes #8401) (#8402) (Teddy Katz) -* e395919 Breaking: Resolve patterns from .eslintignore directory (fixes #6759) (#7678) (Ian VanSchooten) -* c778676 Breaking: convert RuleTester to ES6 class (refs #8231) (#8263) (Teddy Katz) -* 6f7757e Breaking: convert SourceCode to ES6 class (refs #8231) (#8264) (Teddy Katz) -* 8842d7e Chore: fix comment spacing in tests (#8405) (Teddy Katz) -* 9a9d916 Breaking: update eslint:recommended for 4.0.0 (fixes #8236) (#8372) (Teddy Katz) -* b0c63f0 Breaking: infer endLine and endColumn from a reported node (fixes #8004) (#8234) (Teddy Katz) -* 40b8c69 Breaking: no-multi-spaces check around inline comments (fixes #7693) (#7696) (Kai Cataldo) -* 034a575 Breaking: convert CLIEngine to ES6 class (refs #8231) (#8262) (Teddy Katz) -* 7dd890d Breaking: tweak space-before-function-paren default option (fixes #8267) (#8285) (Teddy Katz) -* 0e0dd27 Breaking: Remove `ecmaFeatures` from `eslint:recommended` (#8239) (alberto) -* 2fa7502 Breaking: disallow scoped plugin references without scope (fixes #6362) (#8233) (Teddy Katz) -* 4673f6e Chore: Switch to eslint-scope from escope (#8280) (Corbin Uselton) -* e232464 Breaking: change defaults for padded-blocks (fixes #7879) (#8134) (alberto) - -v3.19.0 - March 31, 2017 - -* e09132f Fix: no-extra-parens false positive with exports and object literals (#8359) (Teddy Katz) -* 91baed4 Update: allow custom messages in no-restricted-syntax (fixes #8298) (#8357) (Vitor Balocco) -* 35c93e6 Fix: prevent space-before-function-paren from checking type annotations (#8349) (Teddy Katz) -* 3342e9f Fix: don't modify operator precedence in operator-assignment autofixer (#8358) (Teddy Katz) -* f88375f Docs: clarify that no-unsafe-negation is in eslint:recommended (#8371) (Teddy Katz) -* 02f0d27 Docs: Add soda0289 to Development Team (#8367) (Kai Cataldo) -* 155424c Fix: ignore empty path in patterns (fixes #8362) (#8364) (alberto) -* 27616a8 Fix: prefer-const false positive with object spread (fixes #8187) (#8297) (Vitor Balocco) -* 8569a90 Docs: add note about git's linebreak handling to linebreak-style docs (#8361) (Teddy Katz) -* 5878593 Chore: fix invalid syntax in no-param-reassign test (#8360) (Teddy Katz) -* 1b1046b Fix: don't classify plugins that throw errors as "missing" (fixes #6874) (#8323) (Teddy Katz) -* 29f4ba5 Fix: no-useless-computed-key invalid autofix for getters and setters (#8335) (Teddy Katz) -* 0541eaf Fix: no-implicit-coercion invalid autofix with consecutive identifiers (#8340) (Teddy Katz) -* 41b9786 Fix: no-extra-parens false positive with objects following arrows (#8339) (Teddy Katz) -* 3146167 Fix: `eslint.verify` should not mutate config argument (fixes #8329) (#8334) (alberto) -* 927de90 Fix: dot-notation autofix produces invalid syntax for integer properties (#8332) (Teddy Katz) -* a9d1bea Fix: comma-style autofix produces errors on parenthesized elements (#8331) (Teddy Katz) -* d52173f Fix: don't generate invalid options in config-rule (#8326) (Teddy Katz) -* 6eda3b5 Fix: no-extra-parens invalid autofix in for-of statements (#8337) (Teddy Katz) -* 6c819d8 Fix: dot-notation autofix produces errors on parenthesized computed keys (#8330) (Teddy Katz) -* 2d883d7 Fix: object-shorthand autofix produces errors on parenthesized functions (#8328) (Teddy Katz) -* cd9b774 Fix: quotes false positive with backtick option in method names (#8327) (Teddy Katz) -* d064ba2 Fix: no-else-return false positive for ifs in single-statement position (#8338) (Teddy Katz) -* 6a718ba Chore: enable max-statements-per-line on ESLint codebase (#8321) (Teddy Katz) -* 614b62e Chore: update sinon calls to deprecated API. (#8310) (alberto) -* 0491572 Chore: use precalculated counts in codeframe formatter (#8296) (Vitor Balocco) -* 8733e6a Chore: Fix incorrect error location properties in tests (#8307) (alberto) -* c4ffb49 Chore: Fix typos in test option assertions (#8305) (Teddy Katz) -* 79a97cb Upgrade: devDependencies (#8303) (alberto) -* e4da200 Upgrade: Mocha to 3.2.0 (#8299) (Ilya Volodin) -* 2f144ca Fix: operator-assignment autofix errors with parentheses (fixes #8293) (#8294) (Teddy Katz) -* 7521cd5 Chore: update token logic in rules to use ast-utils (#8288) (Teddy Katz) -* 9b509ce Chore: refactor space-before-function-paren rule (#8284) (Teddy Katz) -* ddc6350 Fix: no-param-reassign false positive on destructuring (fixes #8279) (#8281) (Teddy Katz) -* f8176b3 Chore: improve test coverage for node-event-generator (#8287) (Teddy Katz) -* 602e9c2 Docs: fix incorrect selector examples (#8278) (Teddy Katz) - -v3.18.0 - March 17, 2017 - -* 85f74ca Fix: broken code path of direct nested loops (fixes #8248) (#8274) (Toru Nagashima) -* a61c359 Fix: Ignore hidden folders when resolving globs (fixes #8259) (#8270) (Ian VanSchooten) -* 6f05546 Chore: convert StubModuleResolver in config tests to ES6 class (#8265) (Teddy Katz) -* 0c0fc31 Fix: false positive of no-extra-parens about spread and sequense (#8275) (Toru Nagashima) -* e104973 Docs: remove self-reference in no-restricted-syntax docs (#8277) (Vitor Balocco) -* 23eca51 Update: Add allowTaggedTemplates to no-unused-expressions (fixes #7632) (#8253) (Kevin Partington) -* f9ede3f Upgrade: doctrine to 2.0.0 (#8269) (alberto) -* 1b678a6 New: allow rules to listen for AST selectors (fixes #5407) (#7833) (Teddy Katz) -* 63ca0c5 Chore: use precalculated counts in stylish formatter (#8251) (alberto) -* 47c3171 Fix: typo in console.error (#8258) (Jan Peer Stöcklmair) -* e74ed6d Chore: convert Traverser to ES6 class (refs #7849) (#8232) (Teddy Katz) -* 13eead9 Fix: sort-vars crash on mixed destructuring declarations (#8245) (Teddy Katz) -* 133f489 Fix: func-name-matching crash on destructuring assignment to functions (#8247) (Teddy Katz) -* a34b9c4 Fix: func-name-matching crash on non-string literal computed keys (#8246) (Teddy Katz) -* 7276e6d Docs: remove unneeded semicolons in arrow-parens.md (#8249) (Dmitry Gershun) -* 8c40a25 concat-stream known to be vulnerable prior 1.5.2 (#8228) (Samuel) -* 149c055 Upgrade: mock-fs to v4.2.0 (fixes #8194) (#8243) (Teddy Katz) -* a83bff9 Build: remove unneeded json config in demo (fixes #8237) (#8242) (alberto) -* df12137 Docs: fix typos (#8235) (Gyandeep Singh) -* b5e9788 Chore: rename no-extra-parens methods (#8225) (Vitor Balocco) -* 7f8afe6 Update: no-extra-parens overlooked spread and superClass (fixes #8175) (#8209) (Toru Nagashima) -* ce6ff56 Docs: set recommended true for no-global-assign (fixes #8215) (#8218) (BinYi LIU) -* 5b5c236 Fix: wrong comment when module not found in config (fixes #8192) (#8196) (alberto) - -v3.17.1 - March 6, 2017 - -* f8c8e6e Build: change mock-fs path without SSH (fixes #8207) (#8208) (Toru Nagashima) -* f713f11 Fix: nonblock-statement-body-position multiline error (fixes #8202) (#8203) (Teddy Katz) -* 41e3d9c Fix: `operator-assignment` with parenthesized expression (fixes #8190) (#8197) (alberto) -* 5e3bca7 Chore: add eslint-plugin-eslint-plugin (#8198) (Teddy Katz) -* 580da36 Chore: add missing `output` property to tests (#8195) (alberto) - -v3.17.0 - March 3, 2017 - -* 4fdf6d7 Update: deprecate `applyDefaultPatterns` in `line-comment-position` (#8183) (alberto) -* 25e5817 Fix: Don't autofix `+ +a` to `++a` in space-unary-ops (#8176) (Alan Pierce) -* a6ce8f9 Build: Sort rules before dumping them to doc files (#8154) (Danny Andrews) -* 0af9057 Chore: Upgrade to a patched version of mock-fs (fixes #8177) (#8188) (Teddy Katz) -* bf4d8cf Update: ignore eslint comments in lines-arount-comment (fixes #4345) (#8155) (alberto) -* dad20ad New: add SourceCode#getLocFromIndex and #getIndexFromLoc (fixes #8073) (#8158) (Teddy Katz) -* 18a519f Update: let RuleTester cases assert that no autofix occurs (fixes #8157) (#8163) (Teddy Katz) -* a30eb8d Docs: improve documentation for RuleTester cases (#8162) (Teddy Katz) -* a78ec9f Chore: upgrade `coveralls` to ^2.11.16 (#8161) (alberto) -* d02bd11 Fix: padded-blocks autofix problems with comments (#8149) (alberto) -* 9994889 Docs: Add missing space to `create` in `no-use-before-define` (#8166) (Justin Anastos) -* 4d542ba Docs: Remove unneeded statement about autofix (#8164) (alberto) -* 20daea5 New: no-compare-neg-zero rule (#8091) (薛定谔的猫) -* 4d35a81 Fix: Add a utility to avoid autofix conflicts (fixes #7928, fixes #8026) (#8067) (Alan Pierce) -* 287e882 New: nonblock-statement-body-position rule (fixes #6067) (#8108) (Teddy Katz) -* 7f1f4e5 Chore: remove unneeded devDeps `linefix` and `gh-got` (#8160) (alberto) -* ca1694b Update: ignore negative ranges in fixes (#8133) (alberto) -* 163d751 Docs: `lines-around-comment` doesn't disallow empty lines (#8151) (alberto) -* 1c84922 Chore: upgrade eslint-plugin-node (#8156) (alberto) -* 1ee5c27 Fix: Make RuleTester handle empty-string cases gracefully (fixes #8142) (#8143) (Teddy Katz) -* 044bc10 Docs: Add details about "--fix" option for "sort-imports" rule (#8077) (Olivier Audard) -* 3fec54a Add option to ignore property in no-param-reassign (#8087) (Christian Bundy) -* 4e52cfc Fix: Improve keyword-spacing typescript support (fixes #8110) (#8111) (Reyad Attiyat) -* 7ff42e8 New: Allow regexes in RuleTester (fixes #7837) (#8115) (Daniel Lo Nigro) -* cbd7ded Build: display rules’ meta data in their docs (fixes #5774) (#8127) (Wilson Kurniawan) -* da8e8af Update: include function name in report message if possible (fixes #7260) (#8058) (Dieter Luypaert) -* 8f91e32 Fix: `ignoreRestSiblings` option didn't cover arguments (fixes #8119) (#8120) (Toru Nagashima) - -v3.16.1 - February 22, 2017 - -* ff8a80c Fix: duplicated autofix output for inverted fix ranges (fixes #8116) (#8117) (Teddy Katz) -* a421897 Docs: fix typo in arrow-parens.md (#8132) (Will Chen) -* 22d7fbf Chore: fix invalid redeclared variables in tests (#8130) (Teddy Katz) -* 8d95598 Chore: fix output assertion typos in rule tests (#8129) (Teddy Katz) -* 9fa2559 Docs: Add missing quotes in key-spacing rule (#8121) (Glenn Reyes) -* f3a6ced Build: package.json update for eslint-config-eslint release (ESLint Jenkins) - -v3.16.0 - February 20, 2017 - -* d89d0b4 Update: fix quotes false negative for string literals as template tags (#8107) (Teddy Katz) -* 21be366 Chore: Ensuring eslint:recommended rules are sorted. (#8106) (Kevin Partington) -* 360dbe4 Update: Improve error message when extend config missing (fixes #6115) (#8100) (alberto) -* f62a724 Chore: use updated token iterator methods (#8103) (Kai Cataldo) -* daf6f26 Fix: check output in RuleTester when errors is a number (fixes #7640) (#8097) (alberto) -* cfb65c5 Update: make no-lone-blocks report blocks in switch cases (fixes #8047) (#8062) (Teddy Katz) -* 290fb1f Update: Add includeComments to getTokenByRangeStart (fixes #8068) (#8069) (Kai Cataldo) -* ff066dc Chore: Incorrect source code test text (#8096) (Jack Ford) -* 14d146d Docs: Clarify --ext only works with directories (fixes #7939) (#8095) (alberto) -* 013a454 Docs: Add TSC meeting quorum requirement (#8086) (Kevin Partington) -* 7516303 Fix: `sourceCode.getTokenAfter` shouldn't skip tokens after comments (#8055) (Toru Nagashima) -* c53e034 Fix: unicode-bom fixer insert BOM in appropriate location (fixes #8083) (#8084) (pantosha) -* 55ac302 Chore: fix the timing to define rules for tests (#8082) (Toru Nagashima) -* c7e64f3 Upgrade: mock-fs (#8070) (Toru Nagashima) -* acc3301 Update: handle uncommon linebreaks consistently in rules (fixes #7949) (#8049) (Teddy Katz) -* 591b74a Chore: enable operator-linebreak on ESLint codebase (#8064) (Teddy Katz) -* 6445d2a Docs: Add documentation for /* exported */ (fixes #7998) (#8065) (Lee Yi Min) -* fcc38db Chore: simplify and improve performance for autofix (#8035) (Toru Nagashima) -* b04fde7 Chore: improve performance of SourceCode constructor (#8054) (Teddy Katz) -* 90fd555 Update: improve null detection in eqeqeq for ES6 regexes (fixes #8020) (#8042) (Teddy Katz) -* 16248e2 Fix: no-extra-boolean-cast incorrect Boolean() autofixing (fixes #7977) (#8037) (Jonathan Wilsson) -* 834f45d Update: rewrite TokenStore (fixes #7810) (#7936) (Toru Nagashima) -* 329dcdc Chore: unify checks for statement list parents (#8048) (Teddy Katz) -* c596690 Docs: Clarify generator-star-spacing config example (fixes #8027) (#8034) (Hòa Trần) -* a11d4a6 Docs: fix a typo in shareable configs documentation (#8036) (Dan Homola) -* 1e3d4c6 Update: add fixer for no-unused-labels (#7841) (Teddy Katz) -* f47fb98 Update: ensure semi-spacing checks import/export declarations (#8033) (Teddy Katz) -* e228d56 Update: no-undefined handles properties/classes/modules (fixes #7964) (#7966) (Kevin Partington) -* 7bc92d9 Chore: fix invalid test cases (#8030) (Toru Nagashima) - -v3.15.0 - February 3, 2017 - -* f2a3580 Fix: `no-extra-parens` incorrect precedence (fixes #7978) (#7999) (alberto) -* d6b6ba1 Fix: no-var should fix ForStatement.init (#7993) (Toru Nagashima) -* 99d386d Upgrade: Espree v3.4.0 (#8019) (Kai Cataldo) -* 42390fd Docs: update README.md for team (#8016) (Toru Nagashima) -* d7ffd88 Chore: enable template-tag-spacing on ESLint codebase (#8005) (Teddy Katz) -* f2be7e3 Docs: Fix typo in object-curly-newline.md (#8002) (Danny Andrews) -* df2351a Docs: Fix misleading section in brace-style documentation (#7996) (Teddy Katz) -* 5ae6e00 Chore: avoid unnecessary feature detection for Symbol (#7992) (Teddy Katz) -* 5d57c57 Chore: fix no-else-return lint error (refs #7986) (#7994) (Vitor Balocco) -* 62fb054 Chore: enable no-else-return on ESLint codebase (#7986) (Teddy Katz) -* c59a0ba Update: add ignoreRestSiblings option to no-unused-vars (#7968) (Zack Argyle) -* 5cdfa99 Chore: enable no-unneeded-ternary on ESLint codebase (#7987) (Teddy Katz) -* fbd7c13 Update: ensure operator-assignment handles exponentiation operators (#7970) (Teddy Katz) -* c5066ce Update: add "variables" option to no-use-before-define (fixes #7111) (#7948) (Teddy Katz) -* 09546a4 New: `template-tag-spacing` rule (fixes #7631) (#7913) (Jonathan Wilsson) - -v3.14.1 - January 25, 2017 - -* 791f32b Fix: brace-style false positive for keyword method names (fixes #7974) (#7980) (Teddy Katz) -* d7a0add Docs: Add ESLint tutorial embed to getting started (#7971) (Jamis Charles) -* 72d41f0 Fix: no-var autofix syntax error in single-line statements (fixes #7961) (#7962) (Teddy Katz) -* b9e5b68 Fix: indent rule crash on sparse array with object (fixes #7959) (#7960) (Gyandeep Singh) -* a7bd66a Chore: Adding assign/redeclare tests to no-undefined (refs #7964) (#7965) (Kevin Partington) -* 8bcbf5d Docs: typo in prefer-promise-reject-errors (#7958) (Patrick McElhaney) - -v3.14.0 - January 20, 2017 - -* 506324a Fix: `no-var` does not fix if causes ReferenceError (fixes #7950) (#7953) (Toru Nagashima) -* 05e7432 New: no-chained-assignments rule (fixes #6424) (#7904) (Stewart Rand) -* 243e47d Update: Add fixer for no-else-return (fixes #7863) (#7864) (Xander Dumaine) -* f091d95 New: `prefer-promise-reject-errors` rule (fixes #7685) (#7689) (Teddy Katz) -* ca01e00 Fix: recognize all line terminators in func-call-spacing (fixes #7923) (#7924) (Francesco Trotta) -* a664e8a Update: add ignoreJSX option to no-extra-parens (Fixes #7444) (#7926) (Robert Rossmann) -* 8ac3518 Fix: no-useless-computed-key false positive with `__proto__` (#7934) (Teddy Katz) -* c835e19 Docs: remove reference to deleted rule (#7942) (Alejandro Oviedo) -* 3c1e63b Docs: Improve examples for no-case-declarations (fixes #6716) (#7920) (Kevin Rangel) -* 7e04b33 Fix: Ignore inline plugin rule config in autoconfig (fixes #7860) (#7919) (Ian VanSchooten) -* 6448ba0 Fix: add parentheses in no-extra-boolean-cast autofixer (fixes #7912) (#7914) (Szymon Przybylski) -* b3f2094 Fix: brace-style crash with lone block statements (fixes #7908) (#7909) (Teddy Katz) -* 5eb2e88 Docs: Correct typos in configuring.md (#7916) (Gabriel Delépine) -* bd5e219 Update: ensure brace-style validates class bodies (fixes #7608) (#7871) (Teddy Katz) -* 427543a Fix: catastrophic backtracking in astUtils linebreak regex (fixes #7893) (#7898) (Teddy Katz) -* 995554c Fix: Correct typos in no-alert.md and lib/ast-utils.js (#7905) (Stewart Rand) -* d6150e3 Chore: Enable comma-dangle on ESLint codebase (fixes #7725) (#7906) (Teddy Katz) -* 075ec25 Chore: update to use ES6 classes (refs #7849) (#7891) (Claire Dranginis) -* 55f0cb6 Update: refactor brace-style and fix inconsistencies (fixes #7869) (#7870) (Teddy Katz) - -v3.13.1 - January 9, 2017 - -* 3fc4e3f Fix: prefer-destructuring reporting compound assignments (fixes #7881) (#7882) (Teddy Katz) -* f90462e Fix: no-extra-label autofix should not remove labels used elsewhere (#7885) (Teddy Katz) - -v3.13.0 - January 6, 2017 - -* cd4c025 Update: add fixer for no-extra-label (#7840) (Teddy Katz) -* aa75c92 Fix: Ensure prefer-const fixes destructuring assignments (fixes #7852) (#7859) (Teddy Katz) -* 4008022 Chore: Refactor to use ES6 Classes (Part 3)(refs #7849) (#7865) (Gyandeep Singh) -* c9ba40a Update: add fixer for `no-unneeded-ternary` (#7540) (Teddy Katz) -* dd56d87 Update: add object-shorthand option for arrow functions (fixes #7564) (#7746) (Teddy Katz) -* fbafdc0 Docs: `padded-blocks` `never` case (fixes #7868) (#7878) (alberto) -* ca1f841 Fix: no-useless-return stack overflow on loops after throw (fixes #7855) (#7856) (Teddy Katz) -* d80d994 Update: add fixer for object-property-newline (fixes #7740) (#7808) (Teddy Katz) -* bf3ea3a Fix: capitalized-comments: Ignore consec. comments if first is invalid (#7835) (Kevin Partington) -* 616611a Chore: Refactor to use ES6 Classes (Part 2)(refs #7849) (#7847) (Gyandeep Singh) -* 856084b Chore: Refactor to use ES6 Classes (Part 1)(refs #7849) (#7846) (Gyandeep Singh) -* bf45893 Docs: Clarify that we only support Stage 4 proposals (#7845) (Kevin Partington) -* 0fc24f7 Fix: adapt new-paren rule so it handles TypeScript (fixes #7817) (#7820) (Philipp A) -* df0b06b Fix: no-multiple-empty-lines perf issue on large files (fixes #7803) (#7843) (Teddy Katz) -* 18fa521 Chore: use ast-utils helper functions in no-multiple-empty-lines (#7842) (Teddy Katz) -* 7122205 Docs: Array destructuring example for no-unused-vars (fixes #7838) (#7839) (Remco Haszing) -* e21b36b Chore: add integration tests for cache files (refs #7748) (#7794) (Teddy Katz) -* 2322733 Fix: Throw error if ruletester is missing required test scenarios (#7388) (Teddy Katz) -* 1beecec Update: add fixer for `operator-linebreak` (#7702) (Teddy Katz) -* c5c3b21 Fix: no-implied-eval false positive on 'setTimeoutFoo' (fixes #7821) (#7836) (Teddy Katz) -* 00dd96c Chore: enable array-bracket-spacing on ESLint codebase (#7830) (Teddy Katz) -* ebcae1f Update: no-return-await with with complex `return` argument (fixes #7594) (#7595) (Dalton Santos) -* fd4cd3b Fix: Disable no-var autofixer in some incorrect cases in loops (#7811) (Alan Pierce) -* 1f25834 Docs: update outdated info in Architecture page (#7816) (Teddy Katz) -* f20b9e9 Fix: Relax no-useless-escape's handling of ']' in regexes (fixes #7789) (#7793) (Teddy Katz) -* 3004c1e Fix: consistent-return shouldn't report class constructors (fixes #7790) (#7797) (Teddy Katz) -* b938f1f Docs: Add an example for the spread operator to prefer-spread.md (#7802) (#7804) (butlermd) -* b8ce2dc Docs: Remove .html extensions from links in developer-guide (#7805) (Kevin Partington) -* aafebb2 Docs: Wrap placeholder sample in {% raw %} (#7798) (Daniel Lo Nigro) -* bb6b73b Chore: replace unnecessary function callbacks with arrow functions (#7795) (Teddy Katz) -* 428fbdf Fix: func-call-spacing "never" doesn't fix w/ line breaks (fixes #7787) (#7788) (Kevin Partington) -* 6e61070 Fix: `semi` false positive before regex/template literals (fixes #7782) (#7783) (Teddy Katz) -* ff0c050 Fix: remove internal property from config generation (fixes #7758) (#7761) (alberto) -* 27424cb New: `prefer-destructuring` rule (fixes #6053) (#7741) (Alex LaFroscia) -* bb648ce Docs: fix unclear example for no-useless-escape (#7781) (Teddy Katz) -* 8c3a962 Fix: syntax errors from object-shorthand autofix (fixes #7744) (#7745) (Teddy Katz) -* 8b296a2 Docs: fix in semi.md: correct instead of incorrect (#7779) (German Prostakov) -* 3493241 Upgrade: strip-json-comments ~v2.0.1 (Janus Troelsen) -* 75b7ba4 Chore: enable object-curly-spacing on ESLint codebase (refs #7725) (#7770) (Teddy Katz) -* 7d1dc7e Update: Make default-case comment case-insensitive (fixes #7673) (#7742) (Robert Rossmann) -* f1bf5ec Chore: convert remaining old-style context.report() calls to the new API (#7763) (Teddy Katz) - -v3.12.2 - December 14, 2016 - -* dec3ec6 Fix: indent bug with AssignmentExpressions (fixes #7747) (#7750) (Teddy Katz) -* 5344751 Build: Don't create blogpost links from rule names within other words (#7754) (Teddy Katz) -* 639b798 Docs: Use `Object.prototype` in examples (#7755) (Alex Reardon) - -v3.12.1 - December 12, 2016 - -* 0ad4d33 Fix: `indent` regression with function calls (fixes #7732, fixes #7733) (#7734) (Teddy Katz) -* ab246dd Docs: Rules restricting globals/properties/syntax are linked together (#7743) (Kevin Partington) -* df2f115 Docs: Add eslint-config-mdcs to JSCS Migration Guide (#7737) (Joshua Koo) -* 4b77333 Build: avoid creating broken rule links in the changelog (#7731) (Teddy Katz) - -v3.12.0 - December 9, 2016 - -* e569225 Update: fix false positive/negative of yoda rule (fixes #7676) (#7695) (Toru Nagashima) -* e95a230 Fix: indent "first" option false positive on nested arrays (fixes #7727) (#7728) (Teddy Katz) -* 81f9e7d Fix: Allow duplicated let declarations in `prefer-const` (fixes #7712) (#7717) (Teddy Katz) -* 1d0d61d New: Add no-await-in-loop rule (#7563) (Nat Mote) -* 2cdfb4e New: Additional APIs (fixes #6256) (#7669) (Ilya Volodin) -* 4278c42 Update: make no-obj-calls report errors for Reflect (fixes #7700) (#7710) (Tomas Echeverri Valencia) -* 4742d82 Docs: clarify the default behavior of `operator-linebreak` (fixes #7459) (#7726) (Teddy Katz) -* a8489e2 Chore: Avoid parserOptions boilerplate in tests for ES6 rules (#7724) (Teddy Katz) -* b921d1f Update: add `indent` options for array and object literals (fixes #7473) (#7681) (Teddy Katz) -* 7079c89 Update: Add airbnb-base to init styleguides (fixes #6986) (#7699) (alberto) -* 63bb3f8 Docs: improve the documentation for the autofix API (#7716) (Teddy Katz) -* f8786fb Update: add fixer for `capitalized-comments` (#7701) (Teddy Katz) -* abfd24f Fix: don't validate schemas for disabled rules (fixes #7690) (#7692) (Teddy Katz) -* 2ac07d8 Upgrade: Update globals dependency to 9.14.0 (#7683) (Aleksandr Oleynikov) -* 90a5d29 Docs: Remove incorrect info about issue requirements from PR guide (#7691) (Teddy Katz) -* f80c278 Docs: Add sails-hook-lint to integrations list (#7679) (Anthony M) -* e96da3f Docs: link first instance of `package.json` (#7684) (Kent C. Dodds) -* bf20e20 Build: include links to rule pages in release blogpost (#7671) (Teddy Katz) -* b30116c Docs: Fix code-blocks in spaced-comment docs (#7524) (Michał Gołębiowski) -* 0a2a7fd Fix: Allow \u2028 and \u2029 as string escapes in no-useless-escape (#7672) (Teddy Katz) -* 76c33a9 Docs: Change Sails.js integration to active npm package (#7675) (Anthony M) - -v3.11.1 - November 28, 2016 - -* be739d0 Fix: capitalized-comments fatal error fixed (fixes #7663) (#7664) (Rich Trott) -* cc4cedc Docs: Fix a typo in array-bracket-spacing documentation (#7667) (Alex Guerrero) -* f8adadc Docs: fix a typo in capitalized-comments documentation (#7666) (Teddy Katz) - -v3.11.0 - November 25, 2016 - -* ad56694 New: capitalized-comments rule (fixes #6055) (#7415) (Kevin Partington) -* 7185567 Update: add fixer for `operator-assignment` (#7517) (Teddy Katz) -* faf5f56 Update: fix false negative of `quotes` with \n in template (fixes #7646) (#7647) (Teddy Katz) -* 474e444 Update: add fixer for `sort-imports` (#7535) (Teddy Katz) -* f9b70b3 Docs: Enable example highlighting in rules examples (ref #6444) (#7644) (Alex Guerrero) -* d50f6c1 Fix: incorrect location for `no-useless-escape` errors (fixes #7643) (#7645) (Teddy Katz) -* 54a993c Docs: Fix a typo in the require-yield.md (#7652) (Vse Mozhet Byt) -* eadd808 Chore: Fix prefer-arrow-callback lint errors (#7651) (Kevin Partington) -* 89bd8de New: `require-await` rule (fixes #6820) (#7435) (Toru Nagashima) -* b7432bd Chore: Ensure JS files are checked out with LF (#7624) (Kevin Partington) -* 32a3547 Docs: Add absent quotes in rules documentation (#7625) (Denis Sikuler) -* 5c9a4ad Fix: Prevent `quotes` from fixing templates to directives (fixes #7610) (#7617) (Teddy Katz) -* d90ca46 Upgrade: Update markdownlint dependency to 0.3.1 (fixes #7589) (#7592) (David Anson) -* 07124d1 Docs: add missing quote mark (+=" → "+=") (#7613) (Sean Juarez) -* 8998043 Docs: fix wording in docs for no-extra-parens config (Michael Ficarra) - -v3.10.2 - November 15, 2016 - -* 0643bfe Fix: correctly handle commented code in `indent` autofixer (fixes #7604) (#7606) (Teddy Katz) -* bd0514c Fix: syntax error after `key-spacing` autofix with comment (fixes #7603) (#7607) (Teddy Katz) -* f56c1ef Fix: `indent` crash on parenthesized global return values (fixes #7573) (#7596) (Teddy Katz) -* 100c6e1 Docs: Fix example for curly "multi-or-nest" option (#7597) (Will Chen) -* 6abb534 Docs: Update code of conduct link (#7599) (Nicholas C. Zakas) -* 8302cdb Docs: Update no-tabs to match existing standards & improve readbility (#7590) (Matt Stow) - -v3.10.1 - November 14, 2016 - -* 8a0e92a Fix: handle try/catch correctly in `no-return-await` (fixes #7581) (#7582) (Teddy Katz) -* c4dd015 Fix: no-useless-return stack overflow on unreachable loops (fixes #7583) (#7584) (Teddy Katz) - -v3.10.0 - November 11, 2016 - -* 7ee039b Update: Add comma-style options for calls, fns, imports (fixes #7470) (Max Englander) -* 670e060 Chore: make the `object-shorthand` tests more readable (#7580) (Teddy Katz) -* c3f4809 Update: Allow `func-names` to recognize inferred ES6 names (fixes #7235) (#7244) (Logan Smyth) -* b8d6e48 Fix: syntax errors created by `object-shorthand` autofix (fixes #7574) (#7575) (Teddy Katz) -* 1b3b65c Chore: ensure that files in tests/conf are linted (#7579) (Teddy Katz) -* 2bd1dd7 Update: avoid creating extra whitespace in `arrow-body-style` fixer (#7504) (Teddy Katz) -* 66fe9ff New: `no-return-await` rule. (fixes #7537) (#7547) (Jordan Harband) -* 759525e Chore: Use process.exitCode instead of process.exit() in bin/eslint.js (#7569) (Teddy Katz) -* 0d60db7 Fix: Curly rule doesn't account for leading comment (fixes #7538) (#7539) (Will Chen) -* 5003b1c Update: fix in/instanceof handling with `space-infix-ops` (fixes #7525) (#7552) (Teddy Katz) -* 3e6131e Docs: explain config option merging (#7499) (Danny Andrews) -* 1766524 Update: "Error type should be" assertion in rule-tester (fixes 6106) (#7550) (Frans Jaspers) -* 44eb274 Docs: Missing semicolon report was missing a comma (#7553) (James) -* 6dbda15 Docs: Document the optional defaults argument for RuleTester (#7548) (Teddy Katz) -* e117b80 Docs: typo fix (#7546) (oprogramador) -* 25e5613 Chore: Remove incorrect test from indent.js. (#7531) (Scott Stern) -* c0f4937 Fix: `arrow-parens` supports type annotations (fixes #7406) (#7436) (Toru Nagashima) -* a838b8e Docs: `func-name-matching`: update with “always”/“never” option (#7536) (Jordan Harband) -* 3c379ff Update: `no-restricted-{imports,modules}`: add “patterns” (fixes #6963) (#7433) (Jordan Harband) -* f5764ee Docs: Update example of results returned from `executeOnFiles` (#7362) (Simen Bekkhus) -* 4613ba0 Fix: Add support for escape char in JSX. (#7461) (Scott Stern) -* ea0970d Fix: `curly` false positive with no-semicolon style (#7509) (Teddy Katz) -* af1fde1 Update: fix `brace-style` false negative on multiline node (fixes #7493) (#7496) (Teddy Katz) -* 3798aea Update: max-statements to report function name (refs #7260) (#7399) (Nicholas C. Zakas) -* 0c215fa Update: Add `ArrowFunctionExpression` support to `require-jsdoc` rule (#7518) (Gyandeep Singh) -* 578c373 Build: handle deprecated rules with no 'replacedBy' (refs #7471) (#7494) (Vitor Balocco) -* a7f3976 Docs: Specify min ESLint version for new rule format (#7501) (cowchimp) -* 8a3e717 Update: Fix `lines-around-directive` semicolon handling (fixes #7450) (#7483) (Teddy Katz) -* e58cead Update: add a fixer for certain statically-verifiable `eqeqeq` cases (#7389) (Teddy Katz) -* 0dea0ac Chore: Add Node 7 to travis ci build (#7506) (Gyandeep Singh) -* 36338f0 Update: add fixer for `no-extra-boolean-cast` (#7387) (Teddy Katz) -* 183def6 Chore: enable `prefer-arrow-callback` on ESLint codebase (fixes #6407) (#7503) (Teddy Katz) -* 4f1fa67 Docs: Update copyright (#7497) (Nicholas C. Zakas) - -v3.9.1 - October 31, 2016 - -* 2012258 Fix: incorrect `indent` check for array property access (fixes #7484) (#7485) (Teddy Katz) -* 8a71d4a Fix: `no-useless-return` false positive on conditionals (fixes #7477) (#7482) (Teddy Katz) -* 56a662b Fix: allow escaped backreferences in `no-useless-escape` (fixes #7472) (#7474) (Teddy Katz) -* fffdf13 Build: Fix prefer-reflect rule to not crash site gen build (#7471) (Ilya Volodin) -* 8ba68a3 Docs: Update broken link (#7490) (Devinsuit) -* 65231d8 Docs: add the "fixable" icon for `no-useless-return` (#7480) (Teddy Katz) - -v3.9.0 - October 28, 2016 - -* d933516 New: `no-useless-return` rule (fixes #7309) (#7441) (Toru Nagashima) -* 5e7af30 Update: Add `CallExpression` option for `indent` (fixes #5946) (#7189) (Teddy Katz) -* b200086 Fix: Support type annotations in array-bracket-spacing (#7445) (Jimmy Jia) -* 5ed8b9b Update: Deprecate prefer-reflect (fixes #7226) (#7464) (Kai Cataldo) -* 92ad43b Chore: Update deprecated rules in conf/eslint.json (#7467) (Kai Cataldo) -* e46666b New: Codeframe formatter (fixes #5860) (#7437) (Vitor Balocco) -* fe0d903 Upgrade: Shelljs to ^0.7.5 (fixes #7316) (#7465) (Gyandeep Singh) -* 1d5146f Update: fix wrong indentation about `catch`,`finally` (#7371) (Toru Nagashima) -* 77e3a34 Chore: Pin mock-fs dev dependency (#7466) (Gyandeep Singh) -* c675d7d Update: Fix `no-useless-escape` false negative in regexes (fixes #7424) (#7425) (Teddy Katz) -* ee3bcea Update: add fixer for `newline-after-var` (fixes #5959) (#7375) (Teddy Katz) -* 6e9ff08 Fix: indent.js to support multiline array statements. (#7237) (Scott Stern) -* f8153ad Build: Ensure absolute links in docs retain .md extensions (fixes #7419) (#7438) (Teddy Katz) -* 16367a8 Fix: Return statement spacing. Fix for indent rule. (fixes #7164) (#7197) (Imad Elyafi) -* 3813988 Update: fix false negative of `no-extra-parens` (fixes #7122) (#7432) (Toru Nagashima) -* 23062e2 Docs: Fix typo in no-unexpected-multiline (fixes #7442) (#7447) (Denis Sikuler) -* d257428 Update: `func-name-matching`: add “always”/“never” option (fixes #7391) (#7428) (Jordan Harband) -* c710584 Fix: support for MemberExpression with function body. (#7400) (Scott Stern) -* 2c8ed2d Build: ensure that all files are linted on bash (fixes #7426) (#7427) (Teddy Katz) -* 18ff70f Chore: Enable `no-useless-escape` (#7403) (Vitor Balocco) -* 8dfd802 Fix: avoid `camelcase` false positive with NewExpressions (fixes #7363) (#7409) (Teddy Katz) -* e8159b4 Docs: Fix typo and explain static func calls for class-methods-use-this (#7421) (Scott O'Hara) -* 85d7e24 Docs: add additional examples for MemberExpressions in Indent rule. (#7408) (Scott Stern) -* 2aa1107 Docs: Include note on fatal: true in the node.js api section (#7376) (Simen Bekkhus) -* e064a25 Update: add fixer for `arrow-body-style` (#7240) (Teddy Katz) -* e0fe727 Update: add fixer for `brace-style` (fixes #7074) (#7347) (Teddy Katz) -* cbbe420 New: Support enhanced parsers (fixes #6974) (#6975) (Nicholas C. Zakas) -* 644d25b Update: Add an ignoreRegExpLiterals option to max-len (fixes #3229) (#7346) (Wilfred Hughes) -* 6875576 Docs: Remove broken links to jslinterrors.com (fixes #7368) (#7369) (Dannii Willis) - -v3.8.1 - October 17, 2016 - -* 681c78a Fix: `comma-dangle` was confused by type annotations (fixes #7370) (#7372) (Toru Nagashima) -* 7525042 Fix: Allow useless escapes in tagged template literals (fixes #7383) (#7384) (Teddy Katz) -* 9106964 Docs: Fix broken link for stylish formatter (#7386) (Vitor Balocco) -* 49d3c1b Docs: Document the deprecated meta property (#7367) (Randy Coulman) -* 19d2996 Docs: Relax permission for merging PRs (refs eslint/tsc-meetings#20) (#7360) (Brandon Mills) - -v3.8.0 - October 14, 2016 - -* ee60acf Chore: add integration tests for autofixing (fixes #5909) (#7349) (Teddy Katz) -* c8796e9 Update: `comma-dangle` supports trailing function commas (refs #7101) (#7181) (Toru Nagashima) -* c4abaf0 Update: `space-before-function-paren` supports async/await (refs #7101) (#7180) (Toru Nagashima) -* d0d3b28 Fix: id-length rule incorrectly firing on member access (fixes #6475) (#7365) (Burak Yiğit Kaya) -* 2729d94 Fix: Don't report setter params in class bodies as unused (fixes #7351) (#7352) (Teddy Katz) -* 0b85004 Chore: Enable prefer-template (fixes #6407) (#7357) (Kai Cataldo) -* ca1947b Chore: Update pull request template (refs eslint/tsc-meetings#20) (#7359) (Brandon Mills) -* d840afe Docs: remove broken link from no-loop-func doc (#7342) (Michael McDermott) -* 5266793 Update: no-useless-escape checks template literals (fixes #7331) (#7332) (Kai Cataldo) -* b08fb91 Update: add source property to LintResult object (fixes #7098) (#7304) (Vitor Balocco) -* 0db4164 Chore: run prefer-template autofixer on test files (refs #6407) (#7354) (Kai Cataldo) -* c1470b5 Update: Make the `prefer-template` fixer unescape quotes (fixes #7330) (#7334) (Teddy Katz) -* 5d08c33 Fix: Handle parentheses correctly in `yoda` fixer (fixes #7326) (#7327) (Teddy Katz) -* cd72bba New: `func-name-matching` rule (fixes #6065) (#7063) (Annie Zhang) -* 55b5146 Fix: `RuleTester` didn't support `mocha --watch` (#7287) (Toru Nagashima) -* f8387c1 Update: add fixer for `prefer-spread` (#7283) (Teddy Katz) -* 52da71e Fix: Don't require commas after rest properties (fixes #7297) (#7298) (Teddy Katz) -* 3b11d3f Chore: refactor `no-multiple-empty-lines` (#7314) (Teddy Katz) -* 16d495d Docs: Updating CLI overview with latest changes (#7335) (Kevin Partington) -* 52dfce5 Update: add fixer for `one-var-declaration-per-line` (#7295) (Teddy Katz) -* 0e994ae Update: Improve the error messages for `no-unused-vars` (fixes #7282) (#7315) (Teddy Katz) -* 93214aa Chore: Convert non-lib/test files to template literals (refs #6407) (#7329) (Kai Cataldo) -* 72f394d Update: Fix false negative of `no-multiple-empty-lines` (fixes #7312) (#7313) (Teddy Katz) -* 756bc5a Update: Use characters instead of code units for `max-len` (#7299) (Teddy Katz) -* c9a7ec5 Fix: Improving optionator configuration for --print-config (#7206) (Kevin Partington) -* 51bfade Fix: avoid `object-shorthand` crash with spread properties (fixes #7305) (#7306) (Teddy Katz) -* a12d1a9 Update: add fixer for `no-lonely-if` (#7202) (Teddy Katz) -* 1418384 Fix: Don't require semicolons before `++`/`--` (#7252) (Adrian Heine né Lang) -* 2ffe516 Update: add fixer for `curly` (#7105) (Teddy Katz) -* ac3504d Update: add functionPrototypeMethods to wrap-iife (fixes #7212) (#7284) (Eli White) -* 5e16fb4 Update: add fixer for `no-extra-bind` (#7236) (Teddy Katz) - -v3.7.1 - October 3, 2016 - -* 3dcae13 Fix: Use the correct location for `comma-dangle` errors (fixes #7291) (#7292) (Teddy Katz) -* cb7ba6d Fix: no-implicit-coercion should not fix ~. (fixes #7272) (#7289) (Eli White) -* ce590e2 Chore: Add additional tests for bin/eslint.js (#7290) (Teddy Katz) -* 8ec82ee Docs: change links of templates to raw data (#7288) (Toru Nagashima) - -v3.7.0 - September 30, 2016 - -* 2fee8ad Fix: object-shorthand's consistent-as-needed option (issue #7214) (#7215) (Naomi Jacobs) -* c05a19c Update: add fixer for `prefer-numeric-literals` (#7205) (Teddy Katz) -* 2f171f3 Update: add fixer for `no-undef-init` (#7210) (Teddy Katz) -* 876d747 Docs: Steps for adding new committers/TSCers (#7221) (Nicholas C. Zakas) -* dffb4fa Fix: `no-unused-vars` false positive (fixes #7250) (#7258) (Toru Nagashima) -* 4448cec Docs: Adding missing ES8 reference to configuring (#7271) (Kevin Partington) -* 332d213 Update: Ensure `indent` handles nested functions correctly (fixes #7249) (#7265) (Teddy Katz) -* c36d842 Update: add fixer for `no-useless-computed-key` (#7207) (Teddy Katz) -* 18376cf Update: add fixer for `lines-around-directive` (#7217) (Teddy Katz) -* f8e8fab Update: add fixer for `wrap-iife` (#7196) (Teddy Katz) -* 558b444 Docs: Add @not-an-aardvark to development team (#7279) (Ilya Volodin) -* cd1dc57 Update: Add a fixer for `dot-location` (#7186) (Teddy Katz) -* 89787b2 Update: for `yoda`, add a fixer (#7199) (Teddy Katz) -* 742ae67 Fix: avoid indent and no-mixed-spaces-and-tabs conflicts (fixes #7248) (#7266) (Teddy Katz) -* 85b8714 Fix: Use error templates even when reading from stdin (fixes #7213) (#7223) (Teddy Katz) -* 66adac1 Docs: correction in prefer-reflect docs (fixes #7069) (#7150) (Scott Stern) -* e3f95de Update: Fix `no-extra-parens` false negative (fixes #7229) (#7231) (Teddy Katz) -* 2909c19 Docs: Fix typo in object-shorthand docs (#7267) (Brian Donovan) -* 7bb800d Chore: add internal rule to enforce meta.docs conventions (fixes #6954) (#7155) (Vitor Balocco) -* 722c68c Docs: add code fences to the issue template (#7254) (Teddy Katz) - -v3.6.1 - September 26, 2016 - -* b467436 Upgrade: Upgrade Espree to 3.3.1 (#7253) (Ilya Volodin) -* 299a563 Build: Do not strip .md extension from absolute URLs (#7222) (Kai Cataldo) -* 27042d2 Chore: removed unused code related to scopeMap (#7218) (Yang Su) -* d154204 Chore: Lint bin/eslint.js (#7243) (Kevin Partington) -* 87625fa Docs: Improve eol-last examples in docs (#7227) (Chainarong Tangsurakit) -* de8eaa4 Docs: `class-methods-use-this`: fix option name (#7224) (Jordan Harband) -* 2355f8d Docs: Add Brunch plugin to integrations (#7225) (Aleksey Shvayka) -* a5817ae Docs: Default option from `operator-linebreak` is `after`and not always (#7228) (Konstantin Pschera) - -v3.6.0 - September 23, 2016 - -* 1b05d9c Update: add fixer for `strict` (fixes #6668) (#7198) (Teddy Katz) -* 0a36138 Docs: Update ecmaVersion instructions (#7195) (Nicholas C. Zakas) -* aaa3779 Update: Allow `space-unary-ops` to handle await expressions (#7174) (Teddy Katz) -* 91bf477 Update: add fixer for `prefer-template` (fixes #6978) (#7165) (Teddy Katz) -* 745343f Update: `no-extra-parens` supports async/await (refs #7101) (#7178) (Toru Nagashima) -* 8e1fee1 Fix: Handle number literals correctly in `no-whitespace-before-property` (#7185) (Teddy Katz) -* 462a3f7 Update: `keyword-spacing` supports async/await (refs #7101) (#7179) (Toru Nagashima) -* 709a734 Update: Allow template string in `valid-typeof` comparison (fixes #7166) (#7168) (Teddy Katz) -* f71937a Fix: Don't report async/generator callbacks in `array-callback-return` (#7172) (Teddy Katz) -* 461b015 Fix: Handle async functions correctly in `prefer-arrow-callback` fixer (#7173) (Teddy Katz) -* 7ea3e4b Fix: Handle await expressions correctly in `no-unused-expressions` (#7175) (Teddy Katz) -* 16bb802 Update: Ensure `arrow-parens` handles async arrow functions correctly (#7176) (Teddy Katz) -* 2d10657 Chore: add tests for `generator-star-spacing` and async (refs #7101) (#7182) (Toru Nagashima) -* c118d21 Update: Let `no-restricted-properties` check destructuring (fixes #7147) (#7151) (Teddy Katz) -* 9e0b068 Fix: valid-jsdoc does not throw on FieldType without value (fixes #7184) (#7187) (Kai Cataldo) -* 4b5d9b7 Docs: Update process for evaluating proposals (fixes #7156) (#7183) (Kai Cataldo) -* 95c777a Update: Make `no-restricted-properties` more flexible (fixes #7137) (#7139) (Teddy Katz) -* 0fdf23c Update: fix `quotes` rule's false negative (fixes #7084) (#7141) (Toru Nagashima) -* f2a789d Update: fix `no-unused-vars` false negative (fixes #7124) (#7143) (Toru Nagashima) -* 6148d85 Fix: Report columns for `eol-last` correctly (fixes #7136) (#7149) (kdex) -* e016384 Update: add fixer for quote-props (fixes #6996) (#7095) (Teddy Katz) -* 35f7be9 Upgrade: espree to 3.2.0, remove tests with SyntaxErrors (fixes #7169) (#7170) (Teddy Katz) -* 28ddcf8 Fix: `max-len`: `ignoreTemplateLiterals`: handle 3+ lines (fixes #7125) (#7138) (Jordan Harband) -* 660e091 Docs: Update rule descriptions (fixes #5912) (#7152) (Kenneth Williams) -* 8b3fc32 Update: Make `indent` report lines with mixed spaces/tabs (fixes #4274) (#7076) (Teddy Katz) -* b39ac2c Update: add fixer for `no-regex-spaces` (#7113) (Teddy Katz) -* cc80467 Docs: Update PR templates for formatting (#7128) (Nicholas C. Zakas) -* 76acbb5 Fix: include LogicalExpression in indent length calc (fixes #6731) (#7087) (Alec) -* a876673 Update: no-implicit-coercion checks TemplateLiterals (fixes #7062) (#7121) (Kai Cataldo) -* 8db4f0c Chore: Enable `typeof` check for `no-undef` rule in eslint-config-eslint (#7103) (Teddy Katz) -* 7e8316f Docs: Update release process (#7127) (Nicholas C. Zakas) -* 22edd8a Update: `class-methods-use-this`: `exceptMethods` option (fixes #7085) (#7120) (Jordan Harband) -* afd132a Fix: line-comment-position "above" string option now works (fixes #7100) (#7102) (Kevin Partington) -* 1738b2e Chore: fix name of internal-no-invalid-meta test file (#7142) (Vitor Balocco) -* ac0bb62 Docs: Fixes examples for allowTemplateLiterals (fixes #7115) (#7135) (Zoe Ingram) -* bcfa3e5 Update: Add `always`/`never` option to `eol-last` (fixes #6938) (#6952) (kdex) -* 0ca26d9 Docs: Distinguish examples for space-before-blocks (#7132) (Timo Tijhof) -* 9a2aefb Chore: Don't require an issue reference in check-commit npm script (#7104) (Teddy Katz) -* c85fd84 Fix: max-statements-per-line rule to force minimum to be 1 (fixes #7051) (#7092) (Scott Stern) -* e462e47 Docs: updates category of no-restricted-properties (fixes #7112) (#7118) (Alec) -* 6ae660b Fix: Don't report comparisons of two typeof expressions (fixes #7078) (#7082) (Teddy Katz) -* 710f205 Docs: Fix typos in Issues section of Maintainer's Guide (#7114) (Kai Cataldo) -* 546a3ca Docs: Clarify that linter does not process configuration (fixes #7108) (#7110) (Kevin Partington) -* 0d50943 Docs: Elaborate on `guard-for-in` best practice (fixes #7071) (#7094) (Dallon Feldner) -* 58e6d76 Docs: Fix examples for no-restricted-properties (#7099) (not-an-aardvark) -* 6cfe519 Docs: Corrected typo in line-comment-position rule doc (#7097) (Alex Mercier) -* f02e52a Docs: Add fixable note to no-implicit-coercion docs (#7096) (Brandon Mills) - -v3.5.0 - September 9, 2016 - -* 08fa538 Update: fix false negative of `arrow-spacing` (fixes #7079) (#7080) (Toru Nagashima) -* cec65e3 Update: add fixer for no-floating-decimal (fixes #7070) (#7081) (not-an-aardvark) -* 2a3f699 Fix: Column number for no-multiple-empty-lines (fixes #7086) (#7088) (Ian VanSchooten) -* 6947299 Docs: Add info about closing accepted issues to docs (fixes #6979) (#7089) (Kai Cataldo) -* d30157a Docs: Add link to awesome-eslint in integrations page (#7090) (Vitor Balocco) -* 457be1b Docs: Update so issues are not required (fixes #7015) (#7072) (Nicholas C. Zakas) -* d9513b7 Fix: Allow linting of .hidden files/folders (fixes #4828) (#6844) (Ian VanSchooten) -* 6d97c18 New: `max-len`: `ignoreStrings`+`ignoreTemplateLiterals` (fixes #5805) (#7049) (Jordan Harband) -* 538d258 Update: make no-implicit-coercion support autofixing. (fixes #7056) (#7061) (Eli White) -* 883316d Update: add fixer for prefer-arrow-callback (fixes #7002) (#7004) (not-an-aardvark) -* 7502eed Update: auto-fix for `comma-style` (fixes #6941) (#6957) (Gyandeep Singh) -* 645dda5 Update: add fixer for dot-notation (fixes #7014) (#7054) (not-an-aardvark) -* 2657846 Fix: `no-console` ignores user-defined console (fixes #7010) (#7058) (Toru Nagashima) -* 656bb6e Update: add fixer for newline-before-return (fixes #5958) (#7050) (Vitor Balocco) -* 1f995c3 Fix: no-implicit-coercion string concat false positive (fixes #7057) (#7060) (Kai Cataldo) -* 6718749 Docs: Clarify that `es6` env also sets `ecmaVersion` to 6 (#7067) (Jérémie Astori) -* e118728 Update: add fixer for wrap-regex (fixes #7013) (#7048) (not-an-aardvark) -* f4fcd1e Update: add more `indent` options for functions (fixes #6052) (#7043) (not-an-aardvark) -* 657eee5 Update: add fixer for new-parens (fixes #6994) (#7047) (not-an-aardvark) -* ff19aa9 Update: improve `max-statements-per-line` message (fixes #6287) (#7044) (Jordan Harband) -* 3960617 New: `prefer-numeric-literals` rule (fixes #6068) (#7029) (Annie Zhang) -* fa760f9 Chore: no-regex-spaces uses internal rule message format (fixes #7052) (#7053) (Kevin Partington) -* 22c7e09 Update: no-magic-numbers false negative on reassigned vars (fixes #4616) (#7028) (not-an-aardvark) -* be29599 Update: Throw error if whitespace found in plugin name (fixes #6854) (#6960) (Jesse Ostrander) -* 4063a79 Fix: Rule message placeholders can be inside braces (fixes #6988) (#7041) (Kevin Partington) -* 52e8d9c Docs: Clean up sort-vars (#7045) (Matthew Dunsdon) -* 4126f12 Chore: Rule messages use internal rule message format (fixes #6977) (#6989) (Kevin Partington) -* 46cb690 New: `no-restricted-properties` rule (fixes #3218) (#7017) (Eli White) -* 00b3042 Update: Pass file path to parse function (fixes #5344) (#7024) (Annie Zhang) -* 3f13325 Docs: Add kaicataldo and JamesHenry to our teams (#7039) (alberto) -* 8e77f16 Update: `new-parens` false negative (fixes #6997) (#6999) (Toru Nagashima) -* 326f457 Docs: Add missing 'to' in no-restricted-modules (#7022) (Oskar Risberg) -* 8277357 New: `line-comment-position` rule (fixes #6077) (#6953) (alberto) -* c1f0d76 New: `lines-around-directive` rule (fixes #6069) (#6998) (Kai Cataldo) -* 61f1de0 Docs: Fix typo in no-debugger (#7019) (Denis Ciccale) -* 256c4a2 Fix: Allow separate mode option for multiline and align (fixes #6691) (#6991) (Annie Zhang) -* a989a7c Docs: Declaring dependency on eslint in shared config (fixes #6617) (#6985) (alberto) -* 6869c60 Docs: Fix minor typo in no-extra-parens doc (#6992) (Jérémie Astori) -* 28f1619 Docs: Update the example of SwitchCase (#6981) (fish) - -v3.4.0 - August 26, 2016 - -* c210510 Update: add fixer for no-extra-parens (fixes #6944) (#6950) (not-an-aardvark) -* ca3d448 Fix: `prefer-const` false negative about `eslintUsed` (fixes #5837) (#6971) (Toru Nagashima) -* 1153955 Docs: Draft of JSCS migration guide (refs #5859) (#6942) (Nicholas C. Zakas) -* 3e522be Fix: false negative of `indent` with `else if` statements (fixes #6956) (#6965) (not-an-aardvark) -* 2dfb290 Docs: Distinguish examples in rules under Stylistic Issues part 7 (#6760) (Kenneth Williams) -* 3c710c9 Fix: rename "AirBnB" => "Airbnb" init choice (fixes #6969) (Harrison Shoff) -* 7660b39 Fix: `object-curly-spacing` for type annotations (fixes #6940) (#6945) (Toru Nagashima) -* 21ab784 New: do not remove non visited files from cache. (fixes #6780) (#6921) (Roy Riojas) -* 3a1763c Fix: enable `@scope/plugin/ruleId`-style specifier (refs #6362) (#6939) (Toru Nagashima) -* d6fd064 Update: Add never option to multiline-ternary (fixes #6751) (#6905) (Kai Cataldo) -* 0d268f1 New: `symbol-description` rule (fixes #6778) (#6825) (Jarek Rencz) -* a063d4e Fix: no-cond-assign within a function expression (fixes #6908) (#6909) (Patrick McElhaney) -* 16db93a Build: Tag docs, publish release notes (fixes #6892) (#6934) (Nicholas C. Zakas) -* 0cf1d55 Chore: Fix object-shorthand errors (fixes #6958) (#6959) (Kai Cataldo) -* 8851ddd Fix: Improve pref of globbing by inheriting glob.GlobSync (fixes #6710) (#6783) (Kael Zhang) -* cf2242c Update: `requireStringLiterals` option for `valid-typeof` (fixes #6698) (#6923) (not-an-aardvark) -* 8561389 Fix: `no-trailing-spaces` wrong fixing (fixes #6933) (#6937) (Toru Nagashima) -* 6a92be5 Docs: Update semantic versioning policy (#6935) (alberto) -* a5189a6 New: `class-methods-use-this` rule (fixes #5139) (#6881) (Gyandeep Singh) -* 1563808 Update: add support for ecmaVersion 20xx (fixes #6750) (#6907) (Kai Cataldo) -* d8b770c Docs: Change rule descriptions for consistent casing (#6915) (Brandon Mills) -* c676322 Chore: Use object-shorthand batch 3 (refs #6407) (#6914) (Kai Cataldo) - -v3.3.1 - August 15, 2016 - -* a2f06be Build: optimize rule page title for small browser tabs (fixes #6888) (#6904) (Vitor Balocco) -* 02a00d6 Docs: clarify rule details for no-template-curly-in-string (#6900) (not-an-aardvark) -* b9b3446 Fix: sort-keys ignores destructuring patterns (fixes #6896) (#6899) (Kai Cataldo) -* 3fe3a4f Docs: Update options in `object-shorthand` (#6898) (Grant Snodgrass) -* cd09c96 Chore: Use object-shorthand batch 2 (refs #6407) (#6897) (Kai Cataldo) -* 2841008 Chore: Use object-shorthand batch 1 (refs #6407) (#6893) (Kai Cataldo) - -v3.3.0 - August 12, 2016 - -* 683ac56 Build: Add CI release scripts (fixes #6884) (#6885) (Nicholas C. Zakas) -* ebf8441 Update: `prefer-rest-params` relax for member accesses (fixes #5990) (#6871) (Toru Nagashima) -* df01c4f Update: Add regex support for exceptions (fixes #5187) (#6883) (Annie Zhang) -* 055742c Fix: `no-dupe-keys` type errors (fixes #6886) (#6889) (Toru Nagashima) -* e456fd3 New: `sort-keys` rule (fixes #6076) (#6800) (Toru Nagashima) -* 3e879fc Update: Rule "eqeqeq" to have more specific null handling (fixes #6543) (#6849) (Simon Sturmer) -* e8cb7f9 Chore: use eslint-plugin-node (refs #6407) (#6862) (Toru Nagashima) -* e37bbd8 Docs: Remove duplicate statement (#6878) (Richard Käll) -* 11395ca Fix: `no-dupe-keys` false negative (fixes #6801) (#6863) (Toru Nagashima) -* 1ecd2a3 Update: improve error message in `no-control-regex` (#6839) (Jordan Harband) -* d610d6c Update: make `max-lines` report the actual number of lines (fixes #6766) (#6764) (Jarek Rencz) -* b256c50 Chore: Fix glob for core js files for lint (fixes #6870) (#6872) (Gyandeep Singh) -* f8ab8f1 New: func-call-spacing rule (fixes #6080) (#6749) (Brandon Mills) -* be68f0b New: no-template-curly-in-string rule (fixes #6186) (#6767) (Jeroen Engels) -* 80789ab Chore: don't throw if rule is in old format (fixes #6848) (#6850) (Vitor Balocco) -* d47c505 Fix: `newline-after-var` false positive (fixes #6834) (#6847) (Toru Nagashima) -* bf0afcb Update: validate void operator in no-constant-condition (fixes #5726) (#6837) (Vitor Balocco) -* 5ef839e New: Add consistent and ..-as-needed to object-shorthand (fixes #5438) (#5439) (Martijn de Haan) -* 7e1bf01 Fix: update peerDependencies of airbnb option for `--init` (fixes #6843) (#6846) (Vitor Balocco) -* 8581f4f Fix: `no-invalid-this` false positive (fixes #6824) (#6827) (Toru Nagashima) -* 90f78f4 Update: add `props` option to `no-self-assign` rule (fixes #6718) (#6721) (Toru Nagashima) -* 30d71d6 Update: 'requireForBlockBody' modifier for 'arrow-parens' (fixes #6557) (#6558) (Nicolas Froidure) -* cdded07 Chore: use native `Object.assign` (refs #6407) (#6832) (Gyandeep Singh) -* 579ec49 Chore: Add link to rule change guidelines in "needs info" template (fixes #6829) (#6831) (Kevin Partington) -* 117e7aa Docs: Remove incorrect "constructor" statement from `no-new-symbol` docs (#6830) (Jarek Rencz) -* aef18b4 New: `no-unsafe-negation` rule (fixes #2716) (#6789) (Toru Nagashima) -* d94e945 Docs: Update Getting Started w/ Readme installation instructions (#6823) (Kai Cataldo) -* dfbc112 Upgrade: proxyquire to 1.7.10 (fixes #6821) (#6822) (alberto) -* 4c5e911 Chore: enable `prefer-const` and apply it to our codebase (refs #6407) (#6805) (Toru Nagashima) -* e524d16 Update: camelcase rule fix for import declarations (fixes #6755) (#6784) (Lorenzo Zottar) -* 8f3509d Update: make `eslint:all` excluding deprecated rules (fixes #6734) (#6756) (Toru Nagashima) -* 2b17459 New: `no-global-assign` rule (fixes #6586) (#6746) (alberto) - -v3.2.2 - August 1, 2016 - -* 510ce4b Upgrade: file-entry-cache@^1.3.1 (fixes #6816, refs #6780) (#6819) (alberto) -* 46b14cd Fix: ignore MemberExpression in VariableDeclarators (fixes #6795) (#6815) (Nicholas C. Zakas) - -v3.2.1 - August 1, 2016 - -* 584577a Build: Pin file-entry-cache to avoid licence issue (refs #6816) (#6818) (alberto) -* 38d0d23 Docs: clarify minor releases and suggest using `~ to version (#6804) (Henry Zhu) -* 4ca809e Fix: Normalizes messages so all end with a period (fixes #6762) (#6807) (Patrick McElhaney) -* c7488ac Fix: Make MemberExpression option opt-in (fixes #6797) (#6798) (Rich Trott) -* 715e8fa Docs: Update issue closing policy (fixes #6765) (#6808) (Nicholas C. Zakas) -* 288f7bf Build: Fix site generation (fixes #6791) (#6793) (Nicholas C. Zakas) -* 261a9f3 Docs: Update JSCS status in README (#6802) (alberto) -* 5ae0887 Docs: Update no-void.md (#6799) (Daniel Hritzkiv) - -v3.2.0 - July 29, 2016 - -* 2438ee2 Upgrade: Update markdownlint dependency to 0.2.0 (fixes #6781) (#6782) (David Anson) -* 4fc0018 Chore: dogfooding `no-var` rule and remove `var`s (refs #6407) (#6757) (Toru Nagashima) -* b22eb5c New: `no-tabs` rule (fixes #6079) (#6772) (Gyandeep Singh) -* ddea63a Chore: Updated no-control-regex tests to cover all cases (fixes #6438) (#6752) (Efe Gürkan YALAMAN) -* 1025772 Docs: Add plugin example to disabling with comments guide (fixes #6742) (#6747) (Brandon Mills) -* 628aae4 Docs: fix inconsistent spacing inside block comment (#6768) (Brian Jacobel) -* 2983c32 Docs: Add options to func-names config comments (#6748) (Brandon Mills) -* 2f94443 Docs: fix wrong path (#6763) (molee1905) -* 6f3faa4 Revert "Build: Remove support for Node v5 (fixes #6743)" (#6758) (Nicholas C. Zakas) -* 99dfd1c Docs: fix grammar issue in rule-changes page (#6761) (Vitor Balocco) -* e825458 Fix: Rule no-unused-vars had missing period (fixes #6738) (#6739) (Brian Mock) -* 71ae64c Docs: Clarify cache file deletion (fixes #4943) (#6712) (Nicholas C. Zakas) -* 26c85dd Update: merge warnings of consecutive unreachable nodes (fixes #6583) (#6729) (Toru Nagashima) -* 106e40b Fix: Correct grammar in object-curly-newline reports (fixes #6725) (#6728) (Vitor Balocco) -* e00754c Chore: Dogfooding ES6 rules (refs #6407) (#6735) (alberto) -* 181b26a Build: Remove support for Node v5 (fixes #6743) (#6744) (alberto) -* 5320a6c Update: `no-use-before-define` false negative on for-in/of (fixes #6699) (#6719) (Toru Nagashima) -* a2090cb Fix: space-infix-ops doesn't fail for type annotations(fixes #5211) (#6723) (Nicholas C. Zakas) -* 9c36ecf Docs: Add @vitorbal and @platinumazure to development team (Ilya Volodin) -* e09d1b8 Docs: describe all RuleTester options (fixes #4810, fixes #6709) (#6711) (Nicholas C. Zakas) -* a157f47 Chore: Update CLIEngine option desc (fixes #5179) (#6713) (Nicholas C. Zakas) -* a0727f9 Chore: fix `.gitignore` for vscode (refs #6383) (#6720) (Toru Nagashima) -* 75d2d43 Docs: Clarify Closure type hint expectation (fixes #5231) (#6714) (Nicholas C. Zakas) -* 95ea25a Update: Check indentation of multi-line chained properties (refs #1801) (#5940) (Rich Trott) -* e7b1e1c Docs: Edit issue/PR waiting period docs (fixes #6009) (#6715) (Nicholas C. Zakas) -* 053aa0c Update: Added 'allowSuper' option to `no-underscore-dangle` (fixes #6355) (#6662) (peteward44) -* 8929045 Build: Automatically generate rule index (refs #2860) (#6658) (Ilya Volodin) -* f916ae5 Docs: Fix multiline-ternary typos (#6704) (Cédric Malard) -* c64b0c2 Chore: First ES6 refactoring (refs #6407) (#6570) (Nicholas C. Zakas) - -v3.1.1 - July 18, 2016 - -* 565e584 Fix: `eslint:all` causes regression in 3.1.0 (fixes #6687) (#6696) (alberto) -* cb90359 Fix: Allow named recursive functions (fixes #6616) (#6667) (alberto) -* 3f206dd Fix: `balanced` false positive in `spaced-comment` (fixes #6689) (#6692) (Grant Snodgrass) -* 57f1676 Docs: Add missing brackets from code examples (#6700) (Plusb Preco) -* 124f066 Chore: Remove fixable key from multiline-ternary metadata (fixes #6683) (#6688) (Kai Cataldo) -* 9f96086 Fix: Escape control characters in XML. (fixes #6673) (#6672) (George Chung) - -v3.1.0 - July 15, 2016 - -* e8f8c6c Fix: incorrect exitCode when eslint is called with --stdin (fixes #6677) (#6682) (Steven Humphrey) -* 38639bf Update: make `no-var` fixable (fixes #6639) (#6644) (Toru Nagashima) -* dfc20e9 Fix: `no-unused-vars` false positive in loop (fixes #6646) (#6649) (Toru Nagashima) -* 2ba75d5 Update: relax outerIIFEBody definition (fixes #6613) (#6653) (Stephen E. Baker) -* 421e4bf Chore: combine multiple RegEx replaces with one (fixes #6669) (#6661) (Sakthipriyan Vairamani) -* 089ee2c Docs: fix typos,wrong path,backticks (#6663) (molee1905) -* ef827d2 Docs: Add another pre-commit hook to integrations (#6666) (David Alan Hjelle) -* a343b3c Docs: Fix option typo in no-underscore-dangle (Fixes #6674) (#6675) (Luke Page) -* 5985eb2 Chore: add internal rule that validates meta property (fixes #6383) (#6608) (Vitor Balocco) -* 4adb15f Update: Add `balanced` option to `spaced-comment` (fixes #4133) (#6575) (Annie Zhang) -* 1b13c25 Docs: fix incorrect example being mark as correct (#6660) (David Björklund) -* a8b4e40 Fix: Install required eslint plugin for "standard" guide (fixes #6656) (#6657) (Feross Aboukhadijeh) -* 720686b New: `endLine` and `endColumn` of the lint result. (refs #3307) (#6640) (Toru Nagashima) -* 54faa46 Docs: Small tweaks to CLI documentation (fixes #6627) (#6642) (Kevin Partington) -* e108850 Docs: Added examples and structure to `padded-blocks` (fixes #6628) (#6643) (alberto) -* 350e1c0 Docs: Typo (#6650) (Peter Rood) -* b837c92 Docs: Correct a term in max-len.md (fixes #6637) (#6641) (Vse Mozhet Byt) -* baeb313 Fix: Warning behavior for executeOnText (fixes #6611) (#6632) (Nicholas C. Zakas) -* e6004be Chore: Enable preferType in valid-jsdoc (refs #5188) (#6634) (Nicholas C. Zakas) -* ca323cf Fix: Use default assertion messages (fixes #6532) (#6615) (Dmitrii Abramov) -* 2bdf22c Fix: Do not throw exception if baseConfig is provided (fixes #6605) (#6625) (Kevin Partington) -* e42cacb Upgrade: mock-fs to 3.10, fixes for Node 6.3 (fixes #6621) (#6624) (Tim Schaub) -* 8a263ae New: multiline-ternary rule (fixes #6066) (#6590) (Kai Cataldo) -* e951303 Update: Adding new `key-spacing` option (fixes #5613) (#5907) (Kyle Mendes) -* 10c3e91 Docs: Remove reference from 3.0.0 migration guide (refs #6605) (#6618) (Kevin Partington) -* 5010694 Docs: Removed non-existing resource (#6609) (Moritz Kröger) -* 6d40d85 Docs: Note that PR requires ACCEPTED issue (refs #6568) (#6604) (Patrick McElhaney) - -v3.0.1 - July 5, 2016 - -* 27700cf Fix: `no-unused-vars` false positive around callback (fixes #6576) (#6579) (Toru Nagashima) -* 124d8a3 Docs: Pull request template (#6568) (Nicholas C. Zakas) -* e9a2ed9 Docs: Fix rules\id-length exceptions typos (fixes #6397) (#6593) (GramParallelo) -* a2cfa1b Fix: Make outerIIFEBody work correctly (fixes #6585) (#6596) (Nicholas C. Zakas) -* 9c451a2 Docs: Use string severity in example (#6601) (Kenneth Williams) -* 8308c0b Chore: remove path-is-absolute in favor of the built-in (fixes #6598) (#6600) (shinnn) -* 7a63717 Docs: Add missing pull request step (fixes #6595) (#6597) (Nicholas C. Zakas) -* de3ed84 Fix: make `no-unused-vars` ignore for-in (fixes #2342) (#6126) (Oleg Gaidarenko) -* 6ef2cbe Fix: strip Unicode BOM of config files (fixes #6556) (#6580) (Toru Nagashima) -* ee7fcfa Docs: Correct type of `outerIIFEBody` in `indent` (fixes #6581) (#6584) (alberto) -* 25fc7b7 Fix: false negative of `max-len` (fixes #6564) (#6565) (not-an-aardvark) -* f6b8452 Docs: Distinguish examples in rules under Stylistic Issues part 6 (#6567) (Kenneth Williams) - -v3.0.0 - July 1, 2016 - -* 66de9d8 Docs: Update installation instructions on README (#6569) (Nicholas C. Zakas) -* dc5b78b Breaking: Add `require-yield` rule to `eslint:recommended` (fixes #6550) (#6554) (Gyandeep Singh) -* 7988427 Fix: lib/config.js tests pass if personal config exists (fixes #6559) (#6566) (Kevin Partington) -* 4c05967 Docs: Update rule docs for new format (fixes #5417) (#6551) (Nicholas C. Zakas) -* 70da5a8 Docs: Correct link to rules page (#fixes 6553) (#6561) (alberto) -* e2b2030 Update: Check RegExp strings for `no-regex-spaces` (fixes #3586) (#6379) (Jackson Ray Hamilton) -* 397e51b Update: Implement outerIIFEBody for indent rule (fixes #6259) (#6382) (David Shepherd) -* 666da7c Docs: 3.0.0 migration guide (#6521) (Nicholas C. Zakas) -* b9bf8fb Docs: Update Governance Policy (fixes #6452) (#6522) (Nicholas C. Zakas) -* 1290657 Update: `no-unused-vars` ignores read it modifies itself (fixes #6348) (#6535) (Toru Nagashima) -* d601f6b Fix: Delete cache only when executing on files (fixes #6459) (#6540) (Kai Cataldo) -* e0d4b19 Breaking: Error thrown/printed if no config found (fixes #5987) (#6538) (Kevin Partington) -* 18663d4 Fix: false negative of `no-useless-rename` (fixes #6502) (#6506) (Toru Nagashima) -* 0a7936d Update: Add fixer for prefer-const (fixes #6448) (#6486) (Nick Heiner) -* c60341f Chore: Update index and `meta` for `"eslint:recommended"` (refs #6403) (#6539) (Mark Pedrotti) -* 73da28d Better wording for the error reported by the rule "no-else-return" #6411 (#6413) (Olivier Thomann) -* e06a5b5 Update: Add fixer for arrow-parens (fixes #4766) (#6501) (madmed88) -* 5f8f3e8 Docs: Remove Box as a sponsor (#6529) (Nicholas C. Zakas) -* 7dfe0ad Docs: fix max-lines samples (fixes #6516) (#6515) (Dmitriy Shekhovtsov) -* fa05119 Breaking: Update eslint:recommended (fixes #6403) (#6509) (Nicholas C. Zakas) -* e96177b Docs: Add "Proposing a Rule Change" link to CONTRIBUTING.md (#6511) (Kevin Partington) -* bea9096 Docs: Update pull request steps (fixes #6474) (#6510) (Nicholas C. Zakas) -* 7bcf6e0 Docs: Consistent example headings & text pt3 (refs #5446) (#6492) (Guy Fraser) -* 1a328d9 Docs: Consistent example headings & text pt4 (refs #5446) (#6493) (Guy Fraser) -* ff5765e Docs: Consistent example headings & text pt2 (refs #5446)(#6491) (Guy Fraser) -* 01384fa Docs: Fixing typos (refs #5446)(#6494) (Guy Fraser) -* 4343ae8 Fix: false negative of `object-shorthand` (fixes #6429) (#6434) (Toru Nagashima) -* b7d8c7d Docs: more accurate yoda-speak (#6497) (Tony Lukasavage) -* 3b0ab0d Fix: add warnIgnored flag to CLIEngine.executeOnText (fixes #6302) (#6305) (Robert Levy) -* c2c6cec Docs: Mark object-shorthand as fixable. (#6485) (Nick Heiner) -* 5668236 Fix: Allow objectsInObjects exception when destructuring (fixes #6469) (#6470) (Adam Renklint) -* 17ac0ae Fix: `strict` rule reports a syntax error for ES2016 (fixes #6405) (#6464) (Toru Nagashima) -* 4545123 Docs: Rephrase documentation for `no-duplicate-imports` (#6463) (Simen Bekkhus) -* 1b133e3 Docs: improve `no-native-reassign` and specifying globals (fixes #5358) (#6462) (Toru Nagashima) -* b179373 Chore: Remove dead code in excuteOnFiles (fixes #6467) (#6466) (Andrew Hutchings) -* 18fbc4b Chore: Simplify eslint process exit code (fixes #6368) (#6371) (alberto) -* 58542e4 Breaking: Drop support for node < 4 (fixes #4483) (#6401) (alberto) -* f50657e Breaking: use default for complexity in eslint:recommended (fixes #6021) (#6410) (alberto) -* 3e690fb Fix: Exit init early if guide is chosen w/ no package.json (fixes #6476) (#6478) (Kai Cataldo) - -v2.13.1 - June 20, 2016 - -* 434de7f Fix: wrong baseDir (fixes #6450) (#6457) (Toru Nagashima) -* 3c9ce09 Fix: Keep indentation when fixing `padded-blocks` "never" (fixes #6454) (#6456) (Ed Lee) -* a9d4cb2 Docs: Fix typo in max-params examples (#6471) (J. William Ashton) -* 1e185b9 Fix: no-multiple-empty-lines errors when no line breaks (fixes #6449) (#6451) (strawbrary) - -v2.13.0 - June 17, 2016 - -* cf223dd Fix: add test for a syntax error (fixes #6013) (#6378) (Toru Nagashima) -* da30cf9 Update: Add fixer for object-shorthand (fixes #6412) (#6418) (Nick Heiner) -* 2cd90eb Chore: Fix rule meta description inconsistencies (refs #5417) (#6422) (Mark Pedrotti) -* d798b2c Added quotes around "classes" option key (#6441) (Guy Fraser) -* 852b6df Docs: Delete empty table of links from Code Path Analysis (#6423) (Mark Pedrotti) -* 5e9117e Chore: sort rules in eslint.json (fixes #6425) (#6426) (alberto) -* c2b5277 Docs: Add gitter chat link to Reporting Bugs (#6430) (Mark Pedrotti) -* 1316db0 Update: Add `never` option for `func-names` (fixes #6059) (#6392) (alberto) -* 1c123e2 Update: Add autofix for `padded-blocks` (fixes #6320) (#6393) (alberto) -* 8ec89c8 Fix: `--print-config` return config inside subdir (fixes #6329) (#6385) (alberto) -* 4f73240 Fix: `object-curly-newline` multiline with comments (fixes #6381) (#6396) (Toru Nagashima) -* 77697a7 Chore: Fake config hierarchy fixtures (fixes #6206) (#6402) (Gyandeep Singh) -* 73a9a6d Docs: Fix links in Configuring ESLint (#6421) (Mark Pedrotti) -* ed84c4c Fix: improve `newline-per-chained-call` message (fixes #6340) (#6360) (Toru Nagashima) -* 9ea4e44 Docs: Update parser reference to `espree` instead of `esprima` (#6404) (alberto) -* 7f57467 Docs: Make `fix` param clearer (fixes #6366) (#6367) (Nick Heiner) -* fb49c7f Fix: nested `extends` with relative path (fixes #6358) (#6359) (Toru Nagashima) -* 5122f73 Update: no-multiple-empty-lines fixer (fixes #6225) (#6226) (Ruurd Moelker) -* 0e7ce72 Docs: Fix rest-spread-spacing's name (#6365) (cody) -* cfdd524 Fix: allow semi as braceless body of statements (fixes #6386) (#6391) (alberto) -* 6b08cfc Docs: key-spacing fixable documenation notes (fixes #6375) (#6376) (Ruurd Moelker) -* 4b4be3b Docs: `max-lines` option: fix `skipComments` typo (#6374) (Jordan Harband) -* 20ab4f6 Docs: Fix wrong link in object-curly-newline (#6373) (Grant Snodgrass) -* 412ce8d Docs: Fix broken links in no-mixed-operators (#6372) (Grant Snodgrass) - -v2.12.0 - June 10, 2016 - -* 54c30fb Update: Add explicit default option `always` for `eqeqeq` (refs #6144) (#6342) (alberto) -* 2d63370 Update: max-len will warn indented comment lines (fixes #6322) (#6324) (Kai Cataldo) -* dcd4ad7 Docs: clarify usage of inline disable comments (fixes #6335) (#6347) (Kai Cataldo) -* c03300b Docs: Clarified how plugin rules look in plugin configs (fixes #6346) (#6351) (Kevin Partington) -* 9c87709 Docs: Add semantic versioning policy (fixes #6244) (#6343) (Nicholas C. Zakas) -* 5affab1 Docs: Describe values under Extending Configuration Files (refs #6240) (#6336) (Mark Pedrotti) -* 2520f5a New: `max-lines` rule (fixes #6078) (#6321) (alberto) -* 9bfbc64 Update: Option for object literals in `arrow-body-style` (fixes #5936) (#6216) (alberto) -* 977cdd5 Chore: remove unused method from FileFinder (fixes #6344) (#6345) (alberto) -* 477fbc1 Docs: Add section about customizing RuleTester (fixes #6227) (#6331) (Jeroen Engels) -* 0e14016 New: `no-mixed-operators` rule (fixes #6023) (#6241) (Toru Nagashima) -* 6e03c4b Update: Add never option to arrow-body-style (fixes #6317) (#6318) (Andrew Hyndman) -* f804397 New: Add `eslint:all` option (fixes #6240) (#6248) (Robert Fletcher) -* dfe05bf Docs: Link JSCS rules to their corresponding page. (#6334) (alberto) -* 1cc4356 Docs: Remove reference to numeric config (fixes #6309) (#6327) (Kevin Partington) -* 2d4efbe Docs: Describe options in rule under Strict Mode (#6312) (Mark Pedrotti) -* c1953fa Docs: Typo fix 'and' -> 'any' (#6326) (Stephen Edgar) -* d49ab4b Docs: Code conventions improvements (#6313) (Kevin Partington) -* 316a507 Fix: one-var allows uninitialized vars in ForIn/ForOf (fixes #5744) (#6272) (Kai Cataldo) -* 6cbee31 Docs: Typo fix 'colum' -> 'column' (#6306) (Andrew Cobby) -* 2663569 New: `object-curly-newline` (fixes #6072) (#6223) (Toru Nagashima) -* 72c2ea5 Update: callback-return allows for object methods (fixes #4711) (#6277) (Kai Cataldo) -* 89580a4 Docs: Distinguish examples in rules under Stylistic Issues part 5 (#6291) (Kenneth Williams) -* 1313804 New: rest-spread-spacing rule (fixes #5391) (#6278) (Kai Cataldo) -* 61dfe68 Fix: `no-useless-rename` false positive in babel-eslint (fixes #6266) (#6290) (alberto) -* c78c8cb Build: Remove commit check from appveyor (fixes #6292) (#6294) (alberto) -* 3e38fc1 Chore: more tests for comments at the end of blocks (refs #6090) (#6273) (Kai Cataldo) -* 38dccdd Docs: `--no-ignore` disables all forms of ignore (fixes #6260) (#6304) (alberto) -* bb69380 Fix: no-useless-rename handles ExperimentalRestProperty (fixes #6284) (#6288) (Kevin Partington) -* fca0679 Update: Improve perf not traversing default ignored dirs (fixes #5679) (#6276) (alberto) -* 320e8b0 Docs: Describe options in rules under Possible Errors part 4 (#6270) (Mark Pedrotti) -* 3e052c1 Docs: Mark no-useless-rename as fixable in rules index (#6297) (Dalton Santos) - -v2.11.1 - May 30, 2016 - -* 64b0d0c Fix: failed to parse `/*eslint` comments by colon (fixes #6224) (#6258) (Toru Nagashima) -* c8936eb Build: Don't check commit count (fixes #5935) (#6263) (Nicholas C. Zakas) -* 113c1a8 Fix: `max-statements-per-line` false positive at exports (fixes #6264) (#6268) (Toru Nagashima) -* 03beb27 Fix: `no-useless-rename` false positives (fixes #6266) (#6267) (alberto) -* fe89037 Docs: Fix rule name in example (#6279) (Kenneth Williams) - -v2.11.0 - May 27, 2016 - -* 77dd2b4 Fix: On --init, print message when package.json is invalid (fixes #6257) (#6261) (Kai Cataldo) -* 7f60186 Fix: `--ignore-pattern` can't uningnore files (fixes #6127) (#6253) (alberto) -* fea8fe6 New: no-useless-rename (fixes #6058) (#6249) (Kai Cataldo) -* b4cff9d Fix: Incorrect object-property-newline behavior (fixes #6207) (#6213) (Rafał Ruciński) -* 35b4656 Docs: Edit arrow-parens.md to show correct output value (#6245) (Adam Terlson) -* ee0cd58 Fix: `newline-before-return` shouldn't disallow newlines (fixes #6176) (#6217) (alberto) -* d4f5526 Fix: `vars-on-top` crashs at export declarations (fixes #6210) (#6220) (Toru Nagashima) -* 088bda9 New: `unicode-bom` rule to allow or disallow BOM (fixes #5502) (#6230) (Andrew Johnston) -* 14bfc03 Fix: `comma-dangle` wrong autofix (fixes #6233) (#6235) (Toru Nagashima) -* cdd65d7 Docs: added examples for arrow-body-style (refs #5498) (#6242) (Tieme van Veen) -* c10c07f Fix: lost code in autofixing (refs #6233) (#6234) (Toru Nagashima) -* e6d5b1f Docs: Add rule deprecation section to user guide (fixes #5845) (#6201) (Kai Cataldo) -* 777941e Upgrade: doctrine to 1.2.2 (fixes #6121) (#6231) (alberto) -* 74c458d Update: key-spacing rule whitespace fixer (fixes #6167) (#6169) (Ruurd Moelker) -* 04bd586 New: Disallow use of Object.prototype methods on objects (fixes #2693) (#6107) (Andrew Levine) -* 53754ec Update: max in `max-statements-per-line` should be >=0 (fixes #6171) (#6172) (alberto) -* 54d1201 Update: Add treatUndefinedAsUnspecified option (fixes #6026) (#6194) (Kenneth Williams) -* 18152dd Update: Add checkLoops option to no-constant-condition (fixes #5477) (#6202) (Kai Cataldo) -* 7644908 Fix: no-multiple-empty-lines BOF and EOF defaults (fixes #6179) (#6180) (Ruurd Moelker) -* 72335eb Fix: `max-statements-per-line` false positive (fixes #6173, fixes #6153) (#6192) (Toru Nagashima) -* 9fce04e Fix: `generator-star-spacing` false positive (fixes #6135) (#6168) (Toru Nagashima) - -v2.10.2 - May 16, 2016 - -* bda5de5 Fix: Remove default parser from CLIEngine options (fixes #6182) (#6183) (alberto) -* e59e5a0 Docs: Describe options in rules under Possible Errors part 3 (#6105) (Mark Pedrotti) -* 842ab2e Build: Run phantomjs tests using karma (fixes #6128) (#6178) (alberto) - -v2.10.1 - May 14, 2016 - -* 9397135 Fix: `valid-jsdoc` false positive at default parameters (fixes #6097) (#6170) (Toru Nagashima) -* 2166ad4 Fix: warning & error count in `CLIEngine.getErrorResults` (fixes #6155) (#6157) (alberto) -* 1e0a652 Fix: ignore empty statements in max-statements-per-line (fixes #6153) (#6156) (alberto) -* f9ca0d6 Fix: `no-extra-parens` to check for nulls (fixes #6161) (#6164) (Gyandeep Singh) -* d095ee3 Fix: Parser merge sequence in config (fixes #6158) (#6160) (Gyandeep Singh) -* f33e49f Fix: `no-return-assign` to check for null tokens (fixes #6159) (#6162) (Gyandeep Singh) - -v2.10.0 - May 13, 2016 - -* 098cd9c Docs: Distinguish examples in rules under Stylistic Issues part 4 (#6136) (Kenneth Williams) -* 805742c Docs: Clarify JSX option usage (#6132) (Richard Collins) -* 10b0933 Fix: Optimize no-irregular-whitespace for the common case (fixes #6116) (#6117) (Andres Suarez) -* 36bec90 Docs: linkify URLs in development-environment.md (#6150) (chrisjshull) -* 29c401a Docs: Convert rules in index under Removed from list to table (#6091) (Mark Pedrotti) -* e13e696 Fix: `_` and `$` in isES5Constructor (fixes #6085) (#6094) (Kevin Locke) -* 67916b9 Fix: `no-loop-func` crashed (fixes #6130) (#6138) (Toru Nagashima) -* d311a62 Fix: Sort fixes consistently even if they overlap (fixes #6124) (#6133) (alberto) -* 6294459 Docs: Correct syntax for default ignores and `.eslintignore` example (#6118) (alberto) -* 067db14 Fix: Replace `assert.deepEqual` by `lodash.isEqual` (fixes #6111) (#6112) (alberto) -* 52fdf04 Fix: `no-multiple-empty-lines` duplicate errors at BOF (fixes #6113) (#6114) (alberto) -* e6f56da Docs: Document `--ignore-pattern` (#6120) (alberto) -* ef739cd Fix: Merge various command line configs at the same time (fixes #6104) (#6108) (Ed Lee) -* 767da6f Update: add returnAssign option to no-extra-parens (fixes #6036) (#6095) (Kai Cataldo) -* 06f6252 Build: Use split instead of slice/indexOf for commit check (fixes #6109) (#6110) (Ed Lee) -* c4fc39b Docs: Update headings of rules under Removed (refs #5774) (#6102) (Mark Pedrotti) -* 716345f Build: Match rule id at beginning of heading (refs #5774) (#6089) (Mark Pedrotti) -* 0734967 Update: Add an option to `prefer-const` (fixes #5692) (#6040) (Toru Nagashima) -* 7941d5e Update: Add autofix for `lines-around-comment` (fixes #5956) (#6062) (alberto) -* dc538aa Build: Pin proxyquire to ">=1.0.0 <1.7.5" (fixes #6096) (#6100) (alberto) -* 04563ca Docs: Describe options in rules under Possible Errors part 2 (#6063) (Mark Pedrotti) -* 5d390b2 Chore: Replace deprecated calls to context - batch 4 (fixes #6029) (#6087) (alberto) -* 6df4b23 Fix: `no-return-assign` warning nested expressions (fixes #5913) (#6041) (Toru Nagashima) -* 16fad58 Merge pull request #6088 from eslint/docs-one-var-per-line (alberto) -* 0b67170 Docs: Correct default for `one-var-declaration-per-line` (fixes #6017) (#6022) (Ed Lee) -* d40017f Fix: comma-style accounts for parens in array (fixes #6006) (#6038) (Kai Cataldo) -* 992d9cf Docs: Fix typography/teriminology in indent doc (fixes #6045) (#6044) (Rich Trott) -* 4ae39d2 Chore: Replace deprecated calls to context - batch 3 (refs #6029) (#6056) (alberto) -* 8633e4d Update: multipass should not exit prematurely (fixes #5995) (#6048) (alberto) -* 3c44c2c Update: Adds an avoidQuotes option for object-shorthand (fixes #3366) (#5870) (Chris Sauvé) -* a9a4652 Fix: throw when rule uses `fix` but `meta.fixable` not set (fixes #5970) (#6043) (Vitor Balocco) -* ad10106 Docs: Update comma-style docs (#6039) (Kai Cataldo) -* 388d6f8 Fix: `no-sequences` false negative at arrow expressions (fixes #6082) (#6083) (Toru Nagashima) -* 8e96064 Docs: Clarify rule example in README since we allow string error levels (#6061) (Kevin Partington) -* a66bf19 Fix: `lines-around-comment` multiple errors on same line (fixes #5965) (#5994) (alberto) -* a2cc54e Docs: Organize meta and describe visitor in Working with Rules (#5967) (Mark Pedrotti) -* ef8cbff Fix: object-shorthand should only lint computed methods (fixes #6015) (#6024) (Kai Cataldo) -* cd1b057 Chore: Replace deprecated calls to context - batch 2 (refs #6029) (#6049) (alberto) -* a3a6e06 Update: no-irregal-whitespace in a regular expression (fixes #5840) (#6018) (Linda_pp) -* 9b9d76c Chore: Replace deprecated calls to context - batch 1 (refs #6029) (#6034) (alberto) -* dd8bf93 Fix: blockless else in max-statements-per-line (fixes #5926) (#5993) (Glen Mailer) -* f84eb80 New: Add new rule `object-property-newline` (fixes #5667) (#5933) (Vitor Balocco) -* d5f4104 Docs: mention parsing errors in strict mode (fixes #5485) (#5991) (Mark Pedrotti) -* 249732e Docs: Move docs from eslint.github.io (fixes #5964) (#6012) (Nicholas C. Zakas) -* 4c2de6c Docs: Add example of diff clarity to comma-dangle rule docs (#6035) (Vitor Balocco) -* 3db2e89 Fix: Do not swallow exceptions in CLIEngine.getFormatter (fixes #5977) (#5978) (Gustav Nikolaj) -* eb2fb44 Fix: Always ignore defaults unless explicitly passed (fixes #5547) (#5820) (Ian VanSchooten) -* ab57e94 Docs: Add example of diff clarity to newline-per-chained-call (#5986) (Vitor Balocco) -* 88bc014 Docs: Update readme info about jshint (#6027) (alberto) -* a2c15cc Docs: put config example in code block (#6005) (Amos Wenger) -* a5011cb Docs: Fix a wrong examples' header of `prefer-arrow-callback`. (#6020) (Toru Nagashima) -* 1484ede Docs: Typo in nodejs-api (#6025) (alberto) -* ade6a9b Docs: typo: "eslint-disable-line" not "eslint disable-line" (#6019) (Will Day) -* 2f15354 Fix: Removed false positives of break and continue (fixes #5972) (#6000) (Onur Temizkan) - -v2.9.0 - April 29, 2016 - -* a8a2cd8 Fix: Avoid autoconfig crashes from inline comments (fixes #5992) (#5999) (Ian VanSchooten) -* 23b00e0 Upgrade: npm-license to 0.3.2 (fixes #5996) (#5998) (alberto) -* 377167d Upgrade: ignore to 3.1.2 (fixes #5979) (#5988) (alberto) -* 141b778 Fix: no-control-regex literal handling fixed. (fixes #5737) (#5943) (Efe Gürkan YALAMAN) -* 577757d Fix: Clarify color option (fixes #5928) (#5974) (Grant Snodgrass) -* e7e6581 Docs: Update CLA link (#5980) (Gustav Nikolaj) -* 0be26bc Build: Add nodejs 6 to travis (fixes #5971) (#5973) (Gyandeep Singh) -* e606523 New: Rule `no-unsafe-finally` (fixes #5808) (#5932) (Onur Temizkan) -* 42d1ecc Chore: Add metadata to existing rules - Batch 7 (refs #5417) (#5969) (Vitor Balocco) -* e2ad1ec Update: object-shorthand lints computed methods (fixes #5871) (#5963) (Chris Sauvé) -* d24516a Chore: Add metadata to existing rules - Batch 6 (refs #5417) (#5966) (Vitor Balocco) -* 1e7a3ef Fix: `id-match` false positive in property values (fixes #5885) (#5960) (Mike Sherov) -* 51ddd4b Update: Use process @abstract when processing @return (fixes #5941) (#5945) (Simon Schick) -* 52a4bea Update: Add autofix for `no-whitespace-before-property` (fixes #5927) (#5951) (alberto) -* 46e058d Docs: Correct typo in configuring.md (#5957) (Nick S. Plekhanov) -* 5f8abab Chore: Add metadata to existing rules - Batch 5 (refs #5417) (#5944) (Vitor Balocco) -* 0562f77 Chore: Add missing newlines to test cases (fixes #5947) (Rich Trott) -* fc78e78 Chore: Enable quote-props rule in eslint-config-eslint (refs #5188) (#5938) (Gyandeep Singh) -* 43f6d05 Docs: Update docs to refer to column (#5937) (Sashko Stubailo) -* 586478e Update: Add autofix for `comma-dangle` (fixes #3805) (#5925) (alberto) -* a4f9c5a Docs: Distinguish examples in rules under Stylistic Issues part 3 (Kenneth Williams) -* e7c0737 Chore: Enable no-console rule in eslint-config-eslint (refs #5188) (Kevin Partington) -* 0023fe6 Build: Add “chore” to commit tags (fixes #5880) (#5929) (Mike Sherov) -* 25d626a Upgrade: espree 3.1.4 (fixes #5923, fixes #5756) (Kai Cataldo) -* a01b412 New: Add `no-useless-computed-key` rule (fixes #5402) (Burak Yigit Kaya) -* 9afb9cb Chore: Remove workaround for espree and escope bugs (fixes #5852) (alberto) -* 3ffc582 Chore: Update copyright and license info (alberto) -* 249eb40 Docs: Clarify init sets up local installation (fixes #5874) (Kai Cataldo) -* 6cd8c86 Docs: Describe options in rules under Possible Errors part 1 (Mark Pedrotti) -* f842d18 Fix: `no-this-before-super` crash on unreachable paths (fixes #5894) (Toru Nagashima) -* a02960b Docs: Fix missing delimiter in README links (Kevin Partington) -* 3a9e72c Docs: Update developer guide with new standards (Nicholas C. Zakas) -* cb78585 Update: Add `allowUnboundThis` to `prefer-arrow-callback` (fixes #4668) (Burak Yigit Kaya) -* 02be29f Chore: Remove CLA check from bot (Nicholas C. Zakas) -* 220713e Chore: Add metadata to existing rules - Batch 4 (refs #5417) (Vitor Balocco) -* df53414 Chore: Include jQuery Foundation info (Nicholas C. Zakas) -* f1b2992 Fix: `no-useless-escape` false positive in JSXAttribute (fixes #5882) (Toru Nagashima) -* 74674ad Docs: Move `sort-imports` to 'ECMAScript 6' (Kenneth Williams) -* ae69ddb Docs: Fix severity type in example (Kenneth Williams) -* 19f6fff Update: Autofixing does multiple passes (refs #5329) (Nicholas C. Zakas) -* 1e4b0ca Docs: Reduce length of paragraphs in rules index (Mark Pedrotti) -* 8cfe1eb Docs: Fix a wrong option (Zach Orlovsky) -* 8f6739f Docs: Add alberto as reviewer (alberto) -* 2ae4938 Docs: Fix message for `inline-config` option (alberto) -* 089900b Docs: Fix a wrong rule name in an example (Toru Nagashima) -* c032b41 Docs: Fix emphasis (Toru Nagashima) -* ae606f0 Docs: Update JSCS info in README (alberto) -* a9c5323 Fix: Install ESLint on init if not installed (fixes #5833) (Kai Cataldo) -* ed38358 Docs: Removed incorrect example (James M. Greene) -* af3113c Docs: Fix config comments in indent docs (Brandon Mills) -* 2b39461 Update: `commentPattern` option for `default-case` rule (fixes #5803) (Artyom Lvov) - -v2.8.0 - April 15, 2016 - -* a8821a5 Docs: Distinguish examples in rules under Stylistic Issues part 2 (Kenneth Williams) -* 76913b6 Update: Add metadata to existing rules - Batch 3 (refs #5417) (Vitor Balocco) -* 34ad8d2 Fix: Check that module.paths exists (fixes #5791) (Nicholas C. Zakas) -* 37239b1 Docs: Add new members of the team (Ilya Volodin) -* fb3c2eb Update: allow template literals (fixes #5234) (Jonathan Haines) -* 5a4a935 Update: Add metadata to existing rules - Batch 2 (refs #5417) (Vitor Balocco) -* ea2e625 Fix: newline-before-return handles return as first token (fixes #5816) (Kevin Partington) -* f8db9c9 Update: add nestedBinaryExpressions to no-extra-parens (fixes #3065) (Ilya Volodin) -* 0045d57 Update: `allowNamedFunctions` in `prefer-arrow-callback` (fixes #5675) (alberto) -* 19da72a Update: Add metadata to existing rules - Batch 1 (refs #5417) (Vitor Balocco) -* cc14e43 Fix: `no-fallthrough` empty case with comment (fixes #5799) (alberto) -* 13c8b14 Fix: LogicalExpression checks for short circuit (fixes #5693) (Vamshi krishna) -* 73b225e Fix: Document and fix metadata (refs #5417) (Ilya Volodin) -* 882d199 Docs: Improve options description in `no-redeclare` (alberto) -* 6a71ceb Docs: Improve options description in `no-params-reassign` (alberto) -* 24b6215 Update: Include 'typeof' in rule 'no-constant-condition' (fixes #5228) (Vamshi krishna) -* a959063 Docs: Remove link to deprecated ESLintTester project (refs #3110) (Trey Thomas) -* 6fd7d82 Update: Change order in `eslint --init` env options (fixes #5742) (alberto) -* c59d909 Fix: Extra paren check around object arrow bodies (fixes #5789) (Brandon Mills) -* 6f88546 Docs: Use double quotes for better Win compatibility (fixes #5796) (alberto) -* 02743d5 Fix: catch self-assignment operators in `no-magic-number` (fixes #4400) (alberto) -* c94e74e Docs: Make rule descriptions more consistent (Kenneth Williams) -* 6028252 Docs: Distinguish examples in rules under Stylistic Issues part 1 (Mark Pedrotti) -* ccd8ca9 Fix: Added property onlyDeclaration to id-match rule (fixes #3488) (Gajus Kuizinas) -* 6703c02 Update: no-useless-escape / exact locations of errors (fixes #5751) (Onur Temizkan) -* 3d84b91 Fix: ignore trailing whitespace in template literal (fixes #5786) (Kai Cataldo) -* b0e6bc4 Update: add allowEmptyCatch option to no-empty (fixes #5800) (Kai Cataldo) -* f1f1dd7 Docs: Add @pedrottimark as a committer (Brandon Mills) -* 228f201 Update: `commentPattern` option for `no-fallthrough` rule (fixes #5757) (Artyom Lvov) -* 41db670 Docs: Clarify disable inline comments (Kai Cataldo) -* 9c9a295 Docs: Add note about shell vs node glob parameters in cli (alberto) -* 5308ff9 Docs: Add code backticks to sentence in fixable rules (Mark Pedrotti) -* 965ec06 Docs: fix the examples for space-before-function-paren. (Craig Silverstein) -* 2b202fc Update: Add ignore option to space-before-function-parens (fixes #4127) (Craig Silverstein) -* 24c12ba Fix: improve `constructor-super` errors for literals (fixes #5449) (Toru Nagashima) - -v2.7.0 - April 4, 2016 - -* 134cb1f Revert "Update: adds nestedBinaryExpressions for no-extra-parens rule (fixes #3065)" (Ilya Volodin) -* 7e80867 Docs: Update sentence in fixable rules (Mark Pedrotti) -* 1b6d5a3 Update: adds nestedBinaryExpressions for no-extra-parens (fixes #3065) (Nick Fisher) -* 4f93c32 Docs: Clarify `array-bracket-spacing` with newlines (fixes #5768) (alberto) -* 161ddac Fix: remove `console.dir` (fixes #5770) (Toru Nagashima) -* 0c33f6a Fix: indent rule uses wrong node for class indent level (fixes #5764) (Paul O’Shannessy) - -v2.6.0 - April 1, 2016 - -* ce2accd Fix: vars-on-top now accepts exported variables (fixes #5711) (Olmo Kramer) -* 7aacba7 Update: Deprecate option `maximum` in favor of `max` (fixes #5685) (Vitor Balocco) -* 5fe6fca Fix: no-useless-escape \B regex escape (fixes #5750) (Onur Temizkan) -* 9b73ffd Update: `destructuring` option of `prefer-const` rule (fixes #5594) (Toru Nagashima) -* 8ac9206 Docs: Typo in `sort-imports` (alberto) -* 12902c5 Fix: valid-jsdoc crash w/ Field & Array Type (fixes #5745) (fixes #5746) (Burak Yigit Kaya) -* 2c8b65a Docs: Edit examples for a few rules (Mark Pedrotti) -* d736bc2 Fix: Treat SwitchCase like a block in lines-around-comment (fixes #5718) (Scott O'Hara) -* 24a61a4 Update: make `no-useless-escape` allowing line breaks (fixes #5689) (Toru Nagashima) -* 4ecd45e Fix: Ensure proper lookup of config files (fixes #5175, fixes #5468) (Nicholas C. Zakas) -* 088e26b Fix: Update doctrine to allow hyphens in JSDoc names (fixes #5612) (Kai Cataldo) -* 692fd5d Upgrade: Old Chalk.JS deprecated method (fixes #5716) (Morris Singer) -* f59d91d Update: no-param-reassign error msgs (fixes #5705) (Isaac Levy) -* c1b16cd Fix: Object spread throws error in key-spacing rule. (fixes #5724) (Ziad El Khoury Hanna) -* 3091613 Docs: Correct explanation about properties (James Monger) -* cb0f0be Fix: Lint issue with `valid-jsdoc` rule (refs #5188) (Gyandeep Singh) -* aba1954 Build: Ignore jsdoc folder internally (fixes #5714) (alberto) -* a35f127 Fix: Lint for eslint project in regards to vars (refs #5188) (Gyandeep Singh) -* d9ab4f0 Fix: Windows scoped package configs (fixes #5644) (Nicholas C. Zakas) -* 8d0cd0d Update: Basic valid-jsdoc default parameter support (fixes #5658) (Tom Andrews) - -v2.5.3 - March 28, 2016 - -* 8749ac5 Build: Disable bundling dependencies (fixes #5687) (Nicholas C. Zakas) - -v2.5.2 - March 28, 2016 - -* 1cc7f8e Docs: Remove mention of minimatch for .eslintignore (Ian VanSchooten) -* 5bd69a9 Docs: Reorder FAQ in README (alberto) -* 98e6bd9 Fix: Correct default for indentation in `eslint --init` (fixes #5698) (alberto) -* 679095e Fix: make the default of `options.cwd` in runtime (fixes #5694) (Toru Nagashima) -* 4f06f2f Docs: Distinguish examples in rules under Best Practices part 2 (Mark Pedrotti) -* 013a18e Build: Fix bundling script (fixes #5680) (Nicholas C. Zakas) -* 8c5d954 Docs: Typo fix (István Donkó) -* 09659d6 Docs: Use string severity (Kenneth Williams) -* a4ae769 Docs: Manual changelog update for v2.5.1 (Nicholas C. Zakas) -* c41fab9 Fix: don't use path.extname with undefined value (fixes #5678) (Myles Borins) - -v2.5.1 - March 25, 2016 - -* Build: No functional changes, just republished with a working package. - -v2.5.0 - March 25, 2016 - -* 7021aa9 Fix: lines-around-comment in ESLint repo, part 2 (refs #5188) (Kevin Partington) -* 095c435 Docs: Remove ES2016 from experimental section of README (Kevin Partington) -* 646f863 Build: Bundle dependencies in package.json (fixes #5013) (Nicholas C. Zakas) -* ea06868 Docs: Clarify --ext does not apply to globs (fixes #5452) (Ian VanSchooten) -* 569c478 Build: Fix phantomjs CI problems (fixes #5666) (alberto) -* 6022426 Docs: Add link to chat room in README primary links (alberto) -* 2fbb530 Docs: Add link to "Proposing a Rule Change" in README (alberto) -* 25bf491 Upgrade: globals 9.x (fixes #5668) (Toru Nagashima) -* d6f8409 New: Rule - No useless escape (fixes #5460) (Onur Temizkan) -* 12a43f1 Docs: remove brace expansion from configuring.md (refs #5314) (Jonathan Haines) -* 92d1749 New: max-statements-per-line (fixes #5424) (Kenneth Williams) -* aaf324a Fix: missing support for json sub configs (fixes #5413) (Noam Okman) -* 48ad5fe Update: Add 'caughtErrors' to rule no-unused-vars (fixes #3837) (vamshi) -* ad90c2b Fix: incorrect config message (fixes #5653) (s0ph1e) -* a551831 Docs: Distinguish examples in rules under Node.js and CommonJS (Mark Pedrotti) -* 83cd651 Upgrade: chai to 3.5.0 (fixes #5647) (alberto) -* 32748dc Fix: `radix` rule false positive at shadowed variables (fixes #5639) (Toru Nagashima) -* 66db38d Fix: `--no-ignore` should not un-ignore default ignores (fixes #5547) (alberto) -* e3e06f3 Docs: Distinguish examples in rules under Best Practices part 4 (Mark Pedrotti) -* a9f0865 Docs: Update no-sequences rule docs for clarity (fixes #5536) (Kai Cataldo) -* bae7b30 Docs: Add michaelficarra as committer (alberto) -* e2990e7 Docs: Consistent wording in rules README (alberto) -* 49b4d2a Docs: Update team list with new members (Ilya Volodin) -* d0ae66c Update: Allow autoconfiguration for JSX code (fixes #5511) (Ian VanSchooten) -* 38a0a64 Docs: Clarify `linebreak-style` docs (fixes #5628) (alberto) -* 4b7305e Fix: Allow default ignored files to be unignored (fixes #5410) (Ian VanSchooten) -* 4b05ce6 Update: Enforce repo coding conventions via ESLint (refs #5188) (Kevin Partington) -* 051b255 Docs: Remove or rewrite references to former ecmaFeatures (Mark Pedrotti) -* 9a22625 Fix: `prefer-const` false positive at non-blocked if (fixes #5610) (Toru Nagashima) -* b1fd482 Fix: leading comments added from previous node (fixes #5531) (Kai Cataldo) -* c335650 Docs: correct the no-confusing-arrow docs (Daniel Norman) -* e94b77d Fix: Respect 'ignoreTrailingComments' in max-len rule (fixes #5563) (Vamshi Krishna) -* 9289ef8 Fix: handle personal package.json without config (fixes #5496) (Denny Christochowitz) -* 87d74b2 Fix: `prefer-const` got to not change scopes (refs #5284) (Toru Nagashima) -* 5a881e7 Docs: Fix typo in code snippet for no-unmodified-loop-condition rule (Chris Rebert) -* 03037c2 Update: Overrides for space-unary-ops (fixes #5060) (Afnan Fahim) -* 24d986a Update: replace MD5 hashing of cache files with MurmurHash (fixes #5522) (Michael Ficarra) -* f405030 Fix: Ensure allowing `await` as a property name (fixes #5564) (Toru Nagashima) -* aefc90c Fix: `no-useless-constructor` clash (fixes #5573) (Toru Nagashima) -* 9eaa20d Docs: Fix typo in CLI help message (ryym) -* a7c3e67 Docs: Invalid json in `configuring.md` (alberto) -* 4e50332 Docs: Make `prefer-template` examples consistent. (alberto) -* cfc14a9 Fix: valid-jsdoc correctly checks type union (fixes #5260) (Kai Cataldo) -* 689cb7d Fix: `quote-props` false positive on certain keys (fixes #5532) (Burak Yigit Kaya) -* 167a03a Fix: `brace-style` erroneously ignoring certain errors (fixes #5197) (Burak Yigit Kaya) -* 3133f28 Fix: object-curly-spacing doesn't know types (fixes #5537) (fixes #5538) (Burak Yigit Kaya) -* d0ca171 Docs: Separate parser and config questions in issue template (Kevin Partington) -* bc769ca Fix: Improve file path resolution (fixes #5314) (Ian VanSchooten) -* 9ca8567 Docs: Distinguish examples in rules under Best Practices part 3 (Mark Pedrotti) -* b9c69f1 Docs: Distinguish examples in rules under Variables part 2 (Mark Pedrotti) -* c289414 New: `no-duplicate-imports` rule (fixes #3478) (Simen Bekkhus) - -v2.4.0 - March 11, 2016 - -* 97b2466 Fix: estraverse/escope to work with unknowns (fixes #5476) (Nicholas C. Zakas) -* 641b3f7 Fix: validate the type of severity level (fixes #5499) (Shinnosuke Watanabe) -* 9ee8869 Docs: no-unused-expressions - add more edge unusable and usable examples (Brett Zamir) -* 56bf864 Docs: Create parity between no-sequences examples (Brett Zamir) -* 13ef1c7 New: add `--parser-options` to CLI (fixes #5495) (Jordan Harband) -* ae1ee54 Docs: fix func-style arrow exception option (Craig Martin) -* 91852fd Docs: no-lone-blocks - show non-problematic (and problematic) label (Brett Zamir) -* b34458f Docs: Rearrange rules for better categories (and improve rule summaries) (Brett Zamir) -* 1198b26 Docs: Minor README clarifications (Brett Zamir) -* 03e6869 Fix: newline-before-return: bug with comment (fixes #5480) (mustafa) -* ad100fd Fix: overindent in VariableDeclarator parens or brackets (fixes #5492) (David Greenspan) -* 9b8e04b Docs: Replace all node references to Node.js which is the official name (Brett Zamir) -* cc1f2f0 Docs: Minor fixes in no-new-func (Brett Zamir) -* 6ab81d4 Docs: Distinguish examples in rules under Best Practices part 1 (Mark Pedrotti) -* 9c6c70c Update: add `allowParens` option to `no-confusing-arrow` (fixes #5332) (Burak Yigit Kaya) -* 979c096 Docs: Document linebreak-style as fixable. (Afnan Fahim) -* 9f18a81 Fix: Ignore destructuring assignment in `object-shorthand` (fixes #5488) (alberto) -* 5d9a798 Docs: README.md, prefer-const; change modified to reassigned (Michiel de Bruijne) -* 38eb7f1 Fix: key-spacing checks ObjectExpression is multiline (fixes #5479) (Kevin Partington) -* 9592c45 Fix: `no-unmodified-loop-condition` false positive (fixes #5445) (Toru Nagashima) - -v2.3.0 - March 4, 2016 - -* 1b2c6e0 Update: Proposed no-magic-numbers option: ignoreJSXNumbers (fixes #5348) (Brandon Beeks) -* 63c0b7d Docs: Fix incorrect environment ref. in Rules in Plugins. (fixes #5421) (Jesse McCarthy) -* 124c447 Build: Add additional linebreak to docs (fixes #5464) (Ilya Volodin) -* 0d3831b Docs: Add RuleTester parserOptions migration steps (Kevin Partington) -* 50f4d5a Fix: extends chain (fixes #5411) (Toru Nagashima) -* 0547072 Update: Replace getLast() with lodash.last() (fixes #5456) (Jordan Eldredge) -* 8c29946 Docs: Distinguish examples in rules under Possible Errors part 1 (Mark Pedrotti) -* 5319b4a Docs: Distinguish examples in rules under Possible Errors part 2 (Mark Pedrotti) -* 1da2420 Fix: crash when SourceCode object was reused (fixes #5007) (Toru Nagashima) -* 9e9daab New: newline-before-return rule (fixes #5009) (Kai Cataldo) -* e1bbe45 Fix: Check space after anonymous generator star (fixes #5435) (alberto) -* 119e0ed Docs: Distinguish examples in rules under Variables (Mark Pedrotti) -* 905c049 Fix: `no-undef` false positive at new.target (fixes #5420) (Toru Nagashima) -* 4a67b9a Update: Add ES7 support (fixes #5401) (Brandon Mills) -* 89c757d Docs: Replace ecmaFeatures with parserOptions in working-with-rules (Kevin Partington) -* 804c08e Docs: Add parserOptions to RuleTester section of working-with-rules (Kevin Partington) -* 1982c50 Docs: Document string option for `no-unused-vars`. (alberto) -* 4f82b2b Update: Support classes in `padded-blocks` (fixes #5092) (alberto) -* ed5564f Docs: Specify results of `no-unused-var` with `args` (fixes #5334) (chinesedfan) -* de0a4ef Fix: `getFormatter` throws an error when called as static (fixes #5378) (cowchimp) -* 78f7ca9 Fix: Prevent crash from swallowing console.log (fixes #5381) (Ian VanSchooten) -* 34b648d Fix: remove tests which have invalid syntax (fixes #5405) (Toru Nagashima) -* 7de5ae4 Docs: Missing allow option in docs (Scott O'Hara) -* cf14c71 Fix: `no-useless-constructor` rule crashes sometimes (fixes #5290) (Burak Yigit Kaya) -* 70e3a02 Update: Allow string severity in config (fixes #3626) (Nicholas C. Zakas) -* 13c7c19 Update: Exclude ES5 constructors from consistent-return (fixes #5379) (Kevin Locke) -* 784d3bf Fix: Location info in `dot-notation` rule (fixes #5397) (Gyandeep Singh) -* 6280b2d Update: Support switch statements in padded-blocks (fixes #5056) (alberto) -* 25a5b2c Fix: Allow irregular whitespace in comments (fixes #5368) (Christophe Porteneuve) -* 560c0d9 New: no-restricted-globals rule implementation (fixes #3966) (Benoît Zugmeyer) -* c5bb478 Fix: `constructor-super` false positive after a loop (fixes #5394) (Toru Nagashima) -* 6c0c4aa Docs: Add Issue template (fixes #5313) (Kai Cataldo) -* 1170e67 Fix: indent rule doesn't handle constructor instantiation (fixes #5384) (Nate Cavanaugh) -* 6bc9932 Fix: Avoid magic numbers in rule options (fixes #4182) (Brandon Beeks) -* 694e1c1 Fix: Add tests to cover default magic number tests (fixes #5385) (Brandon Beeks) -* 0b5349d Fix: .eslintignore paths should be absolute (fixes #5362) (alberto) -* 8f6c2e7 Update: Better error message for plugins (refs #5221) (Nicholas C. Zakas) -* 972d41b Update: Improve error message for rule-tester (fixes #5369) (Jeroen Engels) -* fe3f6bd Fix: `no-self-assign` false positive at shorthand (fixes #5371) (Toru Nagashima) -* 2376291 Docs: Missing space in `no-fallthrough` doc. (alberto) -* 5aedb87 Docs: Add mysticatea as reviewer (Nicholas C. Zakas) -* 1f9fd10 Update: no-invalid-regexp allows custom flags (fixes #5249) (Afnan Fahim) -* f1eab9b Fix: Support for dash and slash in `valid-jsdoc` (fixes #1598) (Gyandeep Singh) -* cd12a4b Fix:`newline-per-chained-call` should only warn on methods (fixes #5289) (Burak Yigit Kaya) -* 0d1377d Docs: Add missing `symbol` type into valid list (Plusb Preco) -* 6aa2380 Update: prefer-const; change modified to reassigned (fixes #5350) (Michiel de Bruijne) -* d1d62c6 Fix: indent check for else keyword with Stroustrup style (fixes #5218) (Gyandeep Singh) -* 7932f78 Build: Fix commit message validation (fixes #5340) (Nicholas C. Zakas) -* 1c347f5 Fix: Cleanup temp files from tests (fixes #5338) (Nick) -* 2f3e1ae Build: Change rules to warnings in perf test (fixes #5330) (Brandon Mills) -* 36f40c2 Docs: Achieve consistent order of h2 in rule pages (Mark Pedrotti) - -v2.2.0 - February 19, 2016 - -* 45a22b5 Docs: remove esprima-fb from suggested parsers (Henry Zhu) -* a4d9cd3 Docs: Fix semi rule typo (Brandon Mills) -* 9d005c0 Docs: Correct option name in `no-implicit-coercion` rule (Neil Kistner) -* 2977248 Fix: Do not cache `.eslintrc.js` (fixes #5067) (Nick) -* 211eb8f Fix: no-multi-spaces conflicts with smart tabs (fixes #2077) (Afnan Fahim) -* 6dc9483 Fix: Crash in `constructor-super` (fixes #5319) (Burak Yigit Kaya) -* 3f48875 Docs: Fix yield star spacing examples (Dmitriy Lazarev) -* 4dab76e Docs: Update `preferType` heading to keep code format (fixes #5307) (chinesedfan) -* 7020b82 Fix: `sort-imports` warned between default and members (fixes #5305) (Toru Nagashima) -* 2f4cd1c Fix: `constructor-super` and `no-this-before-super` false (fixes #5261) (Toru Nagashima) -* 59e9c5b New: eslint-disable-next-line (fixes #5206) (Kai Cataldo) -* afb6708 Fix: `indent` rule forgot about some CallExpressions (fixes #5295) (Burak Yigit Kaya) -* d18d406 Docs: Update PR creation bot message (fixes #5268) (Nicholas C. Zakas) -* 0b1cd19 Fix: Ignore parser option if set to default parser (fixes #5241) (Kai Cataldo) - -v2.1.0 - February 15, 2016 - -* 7981ef5 Build: Fix release script (Nicholas C. Zakas) -* c9c34ea Fix: Skip computed members in `newline-per-chained-call` (fixes #5245) (Burak Yigit Kaya) -* b32ddad Build: `npm run perf` command should check the exit code (fixes #5279) (Burak Yigit Kaya) -* 6580d1c Docs: Fix incorrect `api.verify` JSDoc for `config` param (refs #5104) (Burak Yigit Kaya) -* 1f47868 Docs: Update yield-star-spacing documentation for 2.0.0 (fixes #5272) (Burak Yigit Kaya) -* 29da8aa Fix: `newline-after-var` crash on a switch statement (fixes #5277) (Toru Nagashima) -* 86c5a20 Fix: `func-style` should ignore ExportDefaultDeclarations (fixes #5183) (Burak Yigit Kaya) -* ba287aa Fix: Consolidate try/catches to top levels (fixes #5243) (Ian VanSchooten) -* 3ef5da1 Docs: Update no-magic-numbers#ignorearrayindexes. (KazuakiM) -* 0d6850e Update: Allow var declaration at end of block (fixes #5246) (alberto) -* c1e3a73 Fix: Popular style init handles missing package.json keys (refs #5243) (Brandon Mills) -* 68c6e22 Docs: fix default value of `keyword-spacing`'s overrides option. (Toru Nagashima) -* 00fe46f Upgrade: inquirer (fixes #5265) (Bogdan Chadkin) -* ef729d7 Docs: Remove option that is not being used in max-len rule (Thanos Lefteris) -* 4a5ddd5 Docs: Fix rule config above examples for require-jsdoc (Thanos Lefteris) -* c5cbc1b Docs: Add rule config above each example in jsx-quotes (Thanos Lefteris) -* f0aceba Docs: Correct alphabetical ordering in rule list (Randy Coulman) -* 1651ffa Docs: update migrating to 2.0.0 (fixes #5232) (Toru Nagashima) -* 9078537 Fix: `indent` on variable declaration with separate array (fixes #5237) (Burak Yigit Kaya) -* f8868b2 Docs: Typo fix in consistent-this rule doc fixes #5240 (Nicolas Froidure) -* 44f6915 Fix: ESLint Bot mentions the wrong person for extra info (fixes #5229) (Burak Yigit Kaya) -* c612a8e Fix: `no-empty-function` crash (fixes #5227) (Toru Nagashima) -* ae663b6 Docs: Add links for issue documentation (Nicholas C. Zakas) -* 717bede Build: Switch to using eslint-release (fixes #5223) (Nicholas C. Zakas) -* 980e139 Fix: Combine all answers for processAnswers (fixes #5220) (Ian VanSchooten) -* 1f2a1d5 Docs: Remove inline errors from doc examples (fixes #4104) (Burak Yigit Kaya) - -v2.0.0 - February 12, 2016 - -* cc3a66b Docs: Issue message when more info is needed (Nicholas C. Zakas) -* 2bc40fa Docs: Simplify hierarchy of headings in rule pages (Mark Pedrotti) -* 1666254 Docs: Add note about only-whitespace rule for `--fix` (fixes #4774) (Burak Yigit Kaya) -* 2fa09d2 Docs: Add `quotes` to related section of `prefer-template` (fixes #5192) (Burak Yigit Kaya) -* 7b12995 Fix: `key-spacing` not enforcing no-space in minimum mode (fixes #5008) (Burak Yigit Kaya) -* c1c4f4d Breaking: new `no-empty-function` rule (fixes #5161) (Toru Nagashima) - -v2.0.0-rc.1 - February 9, 2016 - -* 4dad82a Update: Adding shared environment for node and browser (refs #5196) (Eli White) -* b46c893 Fix: Config file relative paths (fixes #5164, fixes #5160) (Nicholas C. Zakas) -* aa5b2ac Fix: no-whitespace-before-property fixes (fixes #5167) (Kai Cataldo) -* 4e99924 Update: Replace several dependencies with lodash (fixes #5012) (Gajus Kuizinas) -* 718dc68 Docs: Remove periods in rules' README for consistency. (alberto) -* 7a47085 Docs: Correct `arrow-spacing` overview. (alberto) -* a4cde1b Docs: Clarify global-require inside try/catch (fixes #3834) (Brandon Mills) -* fd07925 Docs: Clarify docs for api.verify (fixes #5101, fixes #5104) (Burak Yigit Kaya) -* 413247f New: Add a --print-config flag (fixes #5099) (Christopher Crouzet) -* efeef42 Update: Implement auto fix for space-in-parens (fixes #5050) (alberto) -* e07fdd4 Fix: code path analysis and labels (fixes #5171) (Toru Nagashima) -* 2417bb2 Fix: `no-unmodified-loop-condition` false positive (fixes #5166) (Toru Nagashima) -* fae1884 Fix: Allow same-line comments in padded-blocks (fixes #5055) (Brandon Mills) -* a24d8ad Fix: Improve autoconfig logging (fixes #5119) (Ian VanSchooten) -* e525923 Docs: Correct obvious inconsistencies in rules h2 elements (Mark Pedrotti) -* 9675b5e Docs: `avoid-escape` does not allow backticks (fixes #5147) (alberto) -* a03919a Fix: `no-unexpected-multiline` false positive (fixes #5148) (Feross Aboukhadijeh) -* 74360d6 Docs: Note no-empty applies to empty block statements (fixes #5105) (alberto) -* 6eeaa3f Build: Remove pending tests (fixes #5126) (Ian VanSchooten) -* 02c83df Docs: Update docs/rules/no-plusplus.md (Sheldon Griffin) -* 0c4de5c New: Added "table" formatter (fixes #4037) (Gajus Kuizinas) -* 0a59926 Update: 'implied strict mode' ecmaFeature (fixes #4832) (Nick Evans) -* 53a6eb3 Fix: Handle singular case in rule-tester error message (fixes #5141) (Bryan Smith) -* 97ac91c Build: Increment eslint-config-eslint (Nicholas C. Zakas) - -v2.0.0-rc.0 - February 2, 2016 - -* 973c499 Fix: `sort-imports` crash (fixes #5130) (Toru Nagashima) -* e64b2c2 Breaking: remove `no-empty-label` (fixes #5042) (Toru Nagashima) -* 79ebbc9 Breaking: update `eslint:recommended` (fixes #5103) (Toru Nagashima) -* e1d7368 New: `no-extra-label` rule (fixes #5059) (Toru Nagashima) -* c83b48c Fix: find ignore file only in cwd (fixes #5087) (Nicholas C. Zakas) -* 3a24240 Docs: Fix jsdoc param names to match function param names (Thanos Lefteris) -* 1d79746 Docs: Replace ecmaFeatures setting with link to config page (Thanos Lefteris) -* e96ffd2 New: `template-curly-spacing` rule (fixes #5049) (Toru Nagashima) -* 4b02902 Update: Extended no-console rule (fixes #5095) (EricHenry) -* 757651e Docs: Remove reference to rules enabled by default (fixes #5100) (Brandon Mills) -* 0d87f5d Docs: Clarify eslint-disable comments only affect rules (fixes #5005) (Brandon Mills) -* 1e791a2 New: `no-self-assign` rule (fixes #4729) (Toru Nagashima) -* c706eb9 Fix: reduced `no-loop-func` false positive (fixes #5044) (Toru Nagashima) -* 3275e86 Update: Add extra aliases to consistent-this rule (fixes #4492) (Zachary Alexander Belford) -* a227360 Docs: Replace joyent org with nodejs (Thanos Lefteris) -* b2aedfe New: Rule to enforce newline after each call in the chain (fixes #4538) (Rajendra Patil) -* d67bfdd New: `no-unused-labels` rule (fixes #5052) (Toru Nagashima) - -v2.0.0-beta.3 - January 29, 2016 - -* 86a3e3d Update: Remove blank lines at beginning of files (fixes #5045) (Jared Sohn) -* 4fea752 New: Autoconfiguration from source inspection (fixes #3567) (Ian VanSchooten) -* 519f39f Breaking: Remove deprecated rules (fixes #5032) (Gyandeep Singh) -* c75ee4a New: Add support for configs in plugins (fixes #3659) (Ilya Volodin) -* 361377f Fix: `prefer-const` false positive reading before writing (fixes #5074) (Toru Nagashima) -* ff2551d Build: Improve `npm run perf` command (fixes #5028) (Toru Nagashima) -* bcca69b Update: add int32Hint option to `no-bitwise` rule (fixes #4873) (Maga D. Zandaqo) -* e3f2683 Update: config extends dependency lookup (fixes #5023) (Nicholas C. Zakas) -* a327a06 Fix: Indent rule for allman brace style scenario (fixes #5064) (Gyandeep Singh) -* afdff6d Fix: `no-extra-bind` false positive (fixes #5058) (Toru Nagashima) -* c1fad4f Update: add autofix support for spaced-comment (fixes #4969, fixes #5030) (Maga D. Zandaqo) -* 889b942 Revert "Docs: Update readme for legend describing rules icons (refs #4355)" (Nicholas C. Zakas) -* b0f21a0 Fix: `keyword-spacing` false positive in template strings (fixes #5043) (Toru Nagashima) -* 53fa5d1 Fix: `prefer-const` false positive in a loop condition (fixes #5024) (Toru Nagashima) -* 385d399 Docs: Update readme for legend describing rules icons (Kai Cataldo) -* 505f1a6 Update: Allow parser to be relative to config (fixes #4985) (Nicholas C. Zakas) -* 79e8a0b New: `one-var-declaration-per-line` rule (fixes #1622) (alberto) -* 654e6e1 Update: Check extra Boolean calls in no-extra-boolean-cast (fixes #3650) (Andrew Sutton) - -v2.0.0-beta.2 - January 22, 2016 - -* 3fa834f Docs: Fix formatter links (fixes #5006) (Gyandeep Singh) -* 54b1bc8 Docs: Fix link in strict.md (fixes #5026) (Nick Evans) -* e0c5cf7 Upgrade: Espree to 3.0.0 (fixes #5018) (Ilya Volodin) -* 69f149d Docs: language tweaks (Andres Kalle) -* 2b33c74 Update: valid-jsdoc to not require @return in constructors (fixes #4976) (Maga D. Zandaqo) -* 6ac2e01 Docs: Fix description of exported comment (Mickael Jeanroy) -* 29392f8 New: allow-multiline option on comma-dangle (fixes #4967) (Alberto Gimeno) -* 05b8cb3 Update: Module overrides all 'strict' rule options (fixes #4936) (Nick Evans) -* 8470474 New: Add metadata to few test rules (fixes #4494) (Ilya Volodin) -* ba11c1b Docs: Add Algolia as sponsor to README (Nicholas C. Zakas) -* b28a19d Breaking: Plugins envs and config removal (fixes #4782, fixes #4952) (Nicholas C. Zakas) -* a456077 Docs: newline-after-var doesn't allow invalid options. (alberto) -* 3e6a24e Breaking: Change `strict` default mode to "safe" (fixes #4961) (alberto) -* 5b96265 Breaking: Update eslint:recommended (fixes #4953) (alberto) -* 7457a4e Upgrade: glob to 6.x (fixes #4991) (Gyandeep Singh) -* d3f4bdd Build: Cleanup for code coverage (fixes #4983) (Gyandeep Singh) -* b8fbaa0 Fix: multiple message in TAP formatter (fixes #4975) (Simon Degraeve) -* 990f8da Fix: `getNodeByRangeIndex` performance issue (fixes #4989) (Toru Nagashima) -* 8ac1dac Build: Update markdownlint dependency to 0.1.0 (fixes #4988) (David Anson) -* 5cd5429 Fix: function expression doc in call expression (fixes #4964) (Tim Schaub) -* 4173baa Fix: `no-dupe-class-members` false positive (fixes #4981) (Toru Nagashima) -* 12fe803 Breaking: Supports Unicode BOM (fixes #4878) (Toru Nagashima) -* 1fc80e9 Build: Increment eslint-config-eslint (Nicholas C. Zakas) -* e0a9024 Update: Report newline between template tag and literal (fixes #4210) (Rajendra Patil) -* da3336c Update: Rules should get `sourceType` from Program node (fixes #4960) (Nick Evans) -* a2ac359 Update: Make jsx-quotes fixable (refs #4377) (Gabriele Petronella) -* ee1014d Fix: Incorrect error location for object-curly-spacing (fixes #4957) (alberto) -* b52ed17 Fix: Incorrect error location for space-in-parens (fixes #4956) (alberto) -* 9c1bafb Fix: Columns of parse errors are off by 1 (fixes #4896) (alberto) -* 5e4841e New: 'id-blacklist' rule (fixes #3358) (Keith Cirkel) -* 700b8bc Update: Add "allow" option to allow specific operators (fixes #3308) (Rajendra Patil) -* d82eeb1 Update: Add describe around rule tester blocks (fixes #4907) (Ilya Volodin) -* 2967402 Update: Add minimum value to integer values in schema (fixes #4941) (Ilya Volodin) -* 7b632f8 Upgrade: Globals to ^8.18.0 (fixes #4728) (Gyandeep Singh) -* 86e6e57 Fix: Incorrect error at EOF for no-multiple-empty-lines (fixes #4917) (alberto) -* 7f058f3 Fix: Incorrect location for padded-blocks (fixes #4913) (alberto) -* b3de8f7 Fix: Do not show ignore messages for default ignored files (fixes #4931) (Gyandeep Singh) -* b1360da Update: Support multiLine and singleLine options (fixes #4697) (Rajendra Patil) -* 82fbe09 Docs: Small semantic issue in documentation example (fixes #4937) (Marcelo Zarate) -* 13a4e30 Docs: Formatting inconsistencies (fixes #4912) (alberto) -* d487013 Update: Option to allow extra parens for cond assign (fixes #3317) (alberto) -* 0f469b4 Fix: JSDoc for function expression on object property (fixes #4900) (Tim Schaub) -* c2dee27 Update: Add module tests to no-extra-semi (fixes #4915) (Nicholas C. Zakas) -* 5a633bf Update: Add `preferType` option to `valid-jsdoc` rule (fixes #3056) (Gyandeep Singh) -* ebd01b7 Build: Fix version number on release (fixes #4921) (Nicholas C. Zakas) -* 2d626a3 Docs: Fix typo in changelog (Nicholas C. Zakas) -* c4c4139 Fix: global-require no longer warns if require is shadowed (fixes #4812) (Kevin Partington) -* bbf7f27 New: provide config.parser via `parserName` on RuleContext (fixes #3670) (Ben Mosher) - -v2.0.0-beta.1 - January 11, 2016 - -* 6c70d84 Build: Fix prerelease script (fixes #4919) (Nicholas C. Zakas) -* d5c9435 New: 'sort-imports' rule (refs #3143) (Christian Schuller) -* a8cfd56 Fix: remove duplicate of eslint-config-eslint (fixes #4909) (Toru Nagashima) -* 19a9fbb Breaking: `space-before-blocks` ignores after keywords (fixes #1338) (Toru Nagashima) -* c275b41 Fix: no-extra-parens ExpressionStatement restricted prods (fixes #4902) (Michael Ficarra) -* b795850 Breaking: don't load ~/.eslintrc when using --config flag (fixes #4881) (alberto) -* 3906481 Build: Add AppVeyor CI (fixes #4894) (Gyandeep Singh) -* 6390862 Docs: Fix missing footnote (Yoshiya Hinosawa) -* e5e06f8 Fix: Jsdoc comment for multi-line function expressions (fixes #4889) (Gyandeep Singh) -* 7c9be60 Fix: Fix path errors in windows (fixes #4888) (Gyandeep Singh) -* a1840e7 Fix: gray text was invisible on Solarized Dark theme (fixes #4886) (Jack Leigh) -* fc9f528 Docs: Modify unnecessary flag docs in quote-props (Matija Marohnić) -* 186e8f0 Update: Ignore camelcase in object destructuring (fixes #3185) (alberto) -* 7c97201 Upgrade: doctrine version to 1.1.0 (fixes #4854) (Tim Schaub) -* ceaf324 New: Add no-new-symbol rule (fixes #4862) (alberto) -* e2f2b66 Breaking: Remove defaults from `eslint:recommended` (fixes #4809) (Ian VanSchooten) -* 0b3c01e Docs: Specify default for func-style (fixes #4834) (Ian VanSchooten) -* 008ea39 Docs: Document default for operator assignment (fixes #4835) (alberto) -* b566f56 Docs: no-new-func typo (alberto) -* 1569695 Update: Adds default 'that' for consistent-this (fixes #4833) (alberto) -* f7b28b7 Docs: clarify `requireReturn` option for valid-jsdoc rule (fixes #4859) (Tim Schaub) -* 407f329 Build: Fix prerelease script (Nicholas C. Zakas) -* 688f277 Fix: Set proper exit code for Node > 0.10 (fixes #4691) (Nicholas C. Zakas) -* 58715e9 Fix: Use single quotes in context.report messages (fixes #4845) (Joe Lencioni) -* 5b7586b Fix: do not require a @return tag for @interface (fixes #4860) (Tim Schaub) -* d43f26c Breaking: migrate from minimatch to node-ignore (fixes #2365) (Stefan Grönke) -* c07ca39 Breaking: merges keyword spacing rules (fixes #3869) (Toru Nagashima) -* 871f534 Upgrade: Optionator version to 0.8.1 (fixes #4851) (Eric Johnson) -* 82d4cd9 Update: Add atomtest env (fixes #4848) (Andres Suarez) -* 9c9beb5 Update: Add "ignore" override for operator-linebreak (fixes #4294) (Rajendra Patil) -* 9c03abc Update: Add "allowCall" option (fixes #4011) (Rajendra Patil) -* 29516f1 Docs: fix migration guide for no-arrow-condition rule (Peter Newnham) -* 2ef7549 Docs: clarify remedy to some prefer-const errors (Turadg Aleahmad) -* 1288ba4 Update: Add default limit to `complexity` (fixes #4808) (Ian VanSchooten) -* d3e8179 Fix: env is rewritten by modules (fixes #4814) (Toru Nagashima) -* fd72aba Docs: Example fix for `no-extra-parens` rule (fixes #3527) (Gyandeep Singh) -* 315f272 Fix: Change max-warnings type to Int (fixes #4660) (George Zahariev) -* 5050768 Update: Ask for `commonjs` under config init (fixes #3553) (Gyandeep Singh) -* 4665256 New: Add no-whitespace-before-property rule (fixes #1086) (Kai Cataldo) -* f500d7d Fix: allow extending @scope/eslint/file (fixes #4800) (André Cruz) -* 5ab564e New: 'ignoreArrayIndexes' option for 'no-magic-numbers' (fixes #4370) (Christian Schuller) -* 97cdb95 New: Add no-useless-constructor rule (fixes #4785) (alberto) -* b9bcbaf Fix: Bug in no-extra-bind (fixes #4806) (Andres Kalle) -* 246a6d2 Docs: Documentation fix (Andres Kalle) -* 9ea6b36 Update: Ignore case in jsdoc tags (fixes #4576) (alberto) -* acdda24 Fix: ignore argument parens in no-unexpected-multiline (fixes #4658) (alberto) -* 4931f56 Update: optionally allow bitwise operators (fixes #4742) (Swaagie) - -v2.0.0-alpha-2 - December 23, 2015 - -* Build: Add prerelease script (Nicholas C. Zakas) -* Update: Allow to omit semi for one-line blocks (fixes #4385) (alberto) -* Fix: Handle getters and setters in key-spacing (fixes #4792) (Brandon Mills) -* Fix: ObjectRestSpread throws error in key-spacing rule (fixes #4763) (Ziad El Khoury Hanna) -* Docs: Typo in generator-star (alberto) -* Fix: Backtick behavior in quotes rule (fixes #3090) (Nicholas C. Zakas) -* Fix: Empty schemas forbid any options (fixes #4789) (Brandon Mills) -* Fix: Remove `isMarkedAsUsed` function name (fixes #4783) (Gyandeep Singh) -* Fix: support arrow functions in no-return-assign (fixes #4743) (alberto) -* Docs: Add license header to Working with Rules guide (Brandon Mills) -* Fix: RuleTester to show parsing errors (fixes #4779) (Nicholas C. Zakas) -* Docs: Escape underscores in no-path-concat (alberto) -* Update: configuration for classes in space-before-blocks (fixes #4089) (alberto) -* Docs: Typo in no-useless-concat (alberto) -* Docs: fix typos, suggests (molee1905) -* Docs: Typos in space-before-keywords and space-unary-ops (fixes #4771) (alberto) -* Upgrade: beefy to ^2.0.0, fixes installation errors (fixes #4760) (Kai Cataldo) -* Docs: Typo in no-unexpected-multiline (fixes #4756) (alberto) -* Update: option to ignore top-level max statements (fixes #4309) (alberto) -* Update: Implement auto fix for semi-spacing rule (fixes #3829) (alberto) -* Fix: small typos in code examples (Plusb Preco) -* Docs: Add section on file extensions to user-guide/configuring (adam) -* Fix: Comma first issue in `indent` (fixes #4739, fixes #3456) (Gyandeep Singh) -* Fix: no-constant-condition false positive (fixes #4737) (alberto) -* Fix: Add source property for fatal errors (fixes #3325) (Gyandeep Singh) -* New: Add a comment length option to the max-len rule (fixes #4665) (Ian) -* Docs: RuleTester doesn't require any tests (fixes #4681) (alberto) -* Fix: Remove path analysis from debug log (fixes #4631) (Ilya Volodin) -* Fix: Set null to property ruleId when fatal is true (fixes #4722) (Sébastien Règne) -* New: Visual Studio compatible formatter (fixes #4708) (rhpijnacker) -* New: Add greasemonkey environment (fixes #4715) (silverwind) -* Fix: always-multiline for comma-dangle import (fixes #4704) (Nicholas C. Zakas) -* Fix: Check 1tbs non-block else (fixes #4692) (Nicholas C. Zakas) -* Fix: Apply environment configs last (fixes #3915) (Nicholas C. Zakas) -* New: `no-unmodified-loop-condition` rule (fixes #4523) (Toru Nagashima) -* Breaking: deprecate `no-arrow-condition` rule (fixes #4417) (Luke Karrys) -* Update: Add cwd option for cli-engine (fixes #4472) (Ilya Volodin) -* New: Add no-confusing-arrow rule (refs #4417) (Luke Karrys) -* Fix: ensure `ConfigOps.merge` do a deep copy (fixes #4682) (Toru Nagashima) -* Fix: `no-invalid-this` allows this in static method (fixes #4669) (Toru Nagashima) -* Fix: Export class syntax for `require-jsdoc` rule (fixes #4667) (Gyandeep Singh) -* Update: Add "safe" mode to strict (fixes #3306) (Brandon Mills) - -v2.0.0-alpha-1 - December 11, 2015 - -* Breaking: Correct links between variables and references (fixes #4615) (Toru Nagashima) -* Fix: Update rule tests for parser options (fixes #4673) (Nicholas C. Zakas) -* Breaking: Implement parserOptions (fixes #4641) (Nicholas C. Zakas) -* Fix: max-len rule overestimates the width of some tabs (fixes #4661) (Nick Evans) -* New: Add no-implicit-globals rule (fixes #4542) (Joshua Peek) -* Update: `no-use-before-define` checks invalid initializer (fixes #4280) (Toru Nagashima) -* Fix: Use oneValuePerFlag for --ignore-pattern option (fixes #4507) (George Zahariev) -* New: `array-callback-return` rule (fixes #1128) (Toru Nagashima) -* Upgrade: Handlebars to >= 4.0.5 for security reasons (fixes #4642) (Jacques Favreau) -* Update: Add class body support to `indent` rule (fixes #4372) (Gyandeep Singh) -* Breaking: Remove space-after-keyword newline check (fixes #4149) (Nicholas C. Zakas) -* Breaking: Treat package.json like the rest of configs (fixes #4451) (Ilya Volodin) -* Docs: writing mistake (molee1905) -* Update: Add 'method' option to no-empty (fixes #4605) (Kai Cataldo) -* Breaking: Remove autofix from eqeqeq (fixes #4578) (Ilya Volodin) -* Breaking: Remove ES6 global variables from builtins (fixes #4085) (Brandon Mills) -* Fix: Handle forbidden LineTerminators in no-extra-parens (fixes #4229) (Brandon Mills) -* Update: Option to ignore constructor Fns object-shorthand (fixes #4487) (Kai Cataldo) -* Fix: Check YieldExpression argument in no-extra-parens (fixes #4608) (Brandon Mills) -* Fix: Do not cache `package.json` (fixes #4611) (Spain) -* Build: Consume no-underscore-dangle allowAfterThis option (fixes #4599) (Kevin Partington) -* New: Add no-restricted-imports rule (fixes #3196) (Guy Ellis) -* Docs: no-extra-semi no longer refers to deprecated rule (fixes #4598) (Kevin Partington) -* Fix: `consistent-return` checks the last (refs #3530, fixes #3373) (Toru Nagashima) -* Update: add class option to `no-use-before-define` (fixes #3944) (Toru Nagashima) -* Breaking: Simplify rule schemas (fixes #3625) (Nicholas C. Zakas) -* Docs: Update docs/rules/no-plusplus.md (Xiangyun Chi) -* Breaking: added bower_components to default ignore (fixes #3550) (Julian Laval) -* Fix: `no-unreachable` with the code path (refs #3530, fixes #3939) (Toru Nagashima) -* Fix: `no-this-before-super` with the code path analysis (refs #3530) (Toru Nagashima) -* Fix: `no-fallthrough` with the code path analysis (refs #3530) (Toru Nagashima) -* Fix: `constructor-super` with the code path analysis (refs #3530) (Toru Nagashima) -* Breaking: Switch to Espree 3.0.0 (fixes #4334) (Nicholas C. Zakas) -* Breaking: Freeze context object (fixes #4495) (Nicholas C. Zakas) -* Docs: Add Code of Conduct (fixes #3095) (Nicholas C. Zakas) -* Breaking: Remove warnings of readonly from `no-undef` (fixes #4504) (Toru Nagashima) -* Update: allowAfterThis option in no-underscore-dangle (fixes #3435) (just-boris) -* Fix: Adding options unit tests for --ignore-pattern (refs #4507) (Kevin Partington) -* Breaking: Implement yield-star-spacing rule (fixes #4115) (Bryan Smith) -* New: `prefer-rest-params` rule (fixes #4108) (Toru Nagashima) -* Update: `prefer-const` begins to cover separating init (fixes #4474) (Toru Nagashima) -* Fix: `no-eval` come to catch indirect eval (fixes #4399, fixes #4441) (Toru Nagashima) -* Breaking: Default no-magic-numbers to none. (fixes #4193) (alberto) -* Breaking: Allow empty arrow body (fixes #4411) (alberto) -* New: Code Path Analysis (fixes #3530) (Toru Nagashima) - -v1.10.3 - December 1, 2015 - -* Docs: Update strict rule docs (fixes #4583) (Nicholas C. Zakas) -* Docs: Reference .eslintrc.* in contributing docs (fixes #4532) (Kai Cataldo) -* Fix: Add for-of to `curly` rule (fixes #4571) (Kai Cataldo) -* Fix: Ignore space before function in array start (fixes #4569) (alberto) - -v1.10.2 - November 27, 2015 - -* Upgrade: escope@3.3.0 (refs #4485) (Nicholas C. Zakas) -* Upgrade: Pinned down js-yaml to avoid breaking dep (fixes #4553) (alberto) -* Fix: lines-around-comment with multiple comments (fixes #3509) (alberto) -* Upgrade: doctrine@0.7.1 (fixes #4545) (Kevin Partington) -* Fix: Bugfix for eqeqeq autofix (fixes #4540) (Kevin Partington) -* Fix: Add for-in to `curly` rule (fixes #4436) (Kai Cataldo) -* Fix: `valid-jsdoc` unneeded require check fix (fixes #4527) (Gyandeep Singh) -* Fix: `brace-style` ASI fix for if-else condition (fixes #4520) (Gyandeep Singh) -* Build: Add branch update during release process (fixes #4491) (Gyandeep Singh) -* Build: Allow revert commits in commit messages (fixes #4452) (alberto) -* Fix: Incorrect location in no-fallthrough (fixes #4516) (alberto) -* Fix: `no-spaced-func` had been crashed (fixes #4508) (Toru Nagashima) -* Fix: Add a RestProperty test of `no-undef` (fixes #3271) (Toru Nagashima) -* Docs: Load badge from HTTPS (Brian J Brennan) -* Build: Update eslint bot messages (fixes #4497) (Nicholas C. Zakas) - -v1.10.1 - November 20, 2015 - -* Fix: Revert freezing context object (refs #4495) (Nicholas C. Zakas) -* 1.10.0 (Nicholas C. Zakas) - -v1.10.0 - November 20, 2015 - -* Docs: Remove dupes from changelog (Nicholas C. Zakas) -* Update: --init to create extensioned files (fixes #4476) (Nicholas C. Zakas) -* Docs: Update description of exported comment (fixes #3916) (Nicholas C. Zakas) -* Docs: Move legacy rules to stylistic (files #4111) (Nicholas C. Zakas) -* Docs: Clean up description of recommended rules (fixes #4365) (Nicholas C. Zakas) -* Docs: Fix home directory config description (fixes #4398) (Nicholas C. Zakas) -* Update: Add class support to `require-jsdoc` rule (fixes #4268) (Gyandeep Singh) -* Update: return type error in `valid-jsdoc` rule (fixes #4443) (Gyandeep Singh) -* Update: Display errors at the place where fix should go (fixes #4470) (nightwing) -* Docs: Fix typo in default `cacheLocation` value (Andrew Hutchings) -* Fix: Handle comments in block-spacing (fixes #4387) (alberto) -* Update: Accept array for `ignorePattern` (fixes #3982) (Jesse McCarthy) -* Update: replace label and break with IIFE and return (fixes #4459) (Ilya Panasenko) -* Fix: space-before-keywords false positive (fixes #4449) (alberto) -* Fix: Improves performance (refs #3530) (Toru Nagashima) -* Fix: Autofix quotes produces invalid javascript (fixes #4380) (nightwing) -* Docs: Update indent.md (Nathan Brown) -* New: Disable comment config option (fixes #3901) (Matthew Riley MacPherson) -* New: Config files with extensions (fixes #4045, fixes #4263) (Nicholas C. Zakas) -* Revert "Update: Add JSX exceptions to no-extra-parens (fixes #4229)" (Brandon Mills) -* Update: Add JSX exceptions to no-extra-parens (fixes #4229) (Brandon Mills) -* Docs: Replace link to deprecated rule with newer rule (Andrew Marshall) -* Fix: `no-extend-native` crashed at empty defineProperty (fixes #4438) (Toru Nagashima) -* Fix: Support empty if blocks in lines-around-comment (fixes #4339) (alberto) -* Fix: `curly` warns wrong location for `else` (fixes #4362) (Toru Nagashima) -* Fix: `id-length` properties never option (fixes #4347) (Toru Nagashima) -* Docs: missing close rbracket in example (@storkme) -* Revert "Update: Allow empty arrow body (fixes #4411)" (Nicholas C. Zakas) -* Fix: eqeqeq autofix avoids clashes with space-infix-ops (fixes #4423) (Kevin Partington) -* Docs: Document semi-spacing behaviour (fixes #4404) (alberto) -* Update: Allow empty arrow body (fixes #4411) (alberto) -* Fix: Handle comments in comma-spacing (fixes #4389) (alberto) -* Update: Refactor eslint.verify args (fixes #4395) (Nicholas C. Zakas) -* Fix: no-undef-init should ignore const (fixes #4284) (Nicholas C. Zakas) -* Fix: Add the missing "as-needed" docs to the radix rule (fixes #4364) (Michał Gołębiowski) -* Fix: Display singular/plural version of "line" in message (fixes #4359) (Marius Schulz) -* Update: Add Popular Style Guides (fixes #4320) (Jamund Ferguson) -* Fix: eslint.report can be called w/o node if loc provided (fixes #4220) (Kevin Partington) -* Update: no-implicit-coercion validate AssignmentExpression (fixes #4348) (Ilya Panasenko) - -v1.9.0 - November 6, 2015 - -* Update: Make radix accept a "as-needed" option (fixes #4048) (Michał Gołębiowski) -* Fix: Update the message to include number of lines (fixes #4342) (Brian Delahunty) -* Docs: ASI causes problem whether semicolons are used or not (Thai Pangsakulyanont) -* Fix: Fixer to not overlap ranges among fix objects (fixes #4321) (Gyandeep Singh) -* Update: Add default to `max-nested-callbacks` (fixes #4297) (alberto) -* Fix: Check comments in space-in-parens (fixes #4302) (alberto) -* Update: Add quotes to error messages to improve clarity (fixes #4313) (alberto) -* Fix: tests failing due to differences in temporary paths (fixes #4324) (alberto) -* Fix: Make tests compatible with Windows (fixes #4315) (Ian VanSchooten) -* Update: Extract glob and filesystem logic from cli-engine (fixes #4305) (Ian VanSchooten) -* Build: Clarify commit-check messages (fixes #4256) (Ian VanSchooten) -* Upgrade: Upgrade various dependencies (fixes #4303) (Gyandeep Singh) -* Build: Add node 5 to travis build (fixes #4310) (Gyandeep Singh) -* Fix: ensure using correct estraverse (fixes #3951) (Toru Nagashima) -* Docs: update docs about using gitignore (Mateusz Derks) -* Update: Detect and fix wrong linebreaks (fixes #3981) (alberto) -* New: Add no-case-declarations rule (fixes #4278) (Erik Arvidsson) - -v1.8.0 - October 30, 2015 - -* Fix: Check for node property before testing type (fixes #4298) (Ian VanSchooten) -* Docs: Specify 'double' as default for quotes (fixes #4270) (Ian VanSchooten) -* Fix: Missing errors in space-in-parens (fixes #4257, fixes #3996) (alberto) -* Docs: fixed typo (Mathieu M-Gosselin) -* Fix: `cacheLocation` handles paths in windows style. (fixes #4285) (royriojas) -* Docs: fixed typo (mpal9000) -* Update: Add support for class in `valid-jsdoc` rule (fixes #4279) (Gyandeep Singh) -* Update: cache-file accepts a directory. (fixes #4241) (royriojas) -* Update: Add `maxEOF` to no-multiple-empty-lines (fixes #4235) (Adrien Vergé) -* Update: fix option for comma-spacing (fixes #4232) (HIPP Edgar (PRESTA EXT)) -* Docs: Fix use of wrong word in configuration doc (Jérémie Astori) -* Fix: Prepare config before verifying SourceCode (fixes #4230) (Ian VanSchooten) -* Update: RuleTester come to check AST was not modified (fixes #4156) (Toru Nagashima) -* Fix: wrong count for 'no-multiple-empty-lines' on last line (fixes #4228) (alberto) -* Update: Add `allow` option to `no-shadow` rule (fixes #3035) (Gyandeep Singh) -* Doc: Correct the spelling of Alberto's surname (alberto) -* Docs: Add alberto as a committer (Gyandeep Singh) -* Build: Do not stub console in testing (fixes #1328) (Gyandeep Singh) -* Fix: Check node exists before checking type (fixes #4231) (Ian VanSchooten) -* Update: Option to exclude afterthoughts from no-plusplus (fixes #4093) (Brody McKee) -* New: Add rule no-arrow-condition (fixes #3280) (Luke Karrys) -* Update: Add linebreak style option to eol-last (fixes #4148) (alberto) -* New: arrow-body-style rule (fixes #4109) (alberto) - -v1.7.3 - October 21, 2015 - -* Fix: Support comma-first style in key-spacing (fixes #3877) (Brandon Mills) -* Fix: no-magic-numbers: variable declarations (fixes #4192) (Ilya Panasenko) -* Fix: Support ES6 shorthand in key-spacing (fixes #3678) (Brandon Mills) -* Fix: `indent` array with memberExpression (fixes #4203) (Gyandeep Singh) -* Fix: `indent` param function on sameline (fixes #4174) (Gyandeep Singh) -* Fix: no-multiple-empty-lines fails when empty line at EOF (fixes #4214) (alberto) -* Fix: `comma-dangle` false positive (fixes #4200) (Nicholas C. Zakas) -* Fix: `valid-jsdoc` prefer problem (fixes #4205) (Nicholas C. Zakas) -* Docs: Add missing single-quote (Kevin Lamping) -* Fix: correct no-multiple-empty-lines at EOF (fixes #4140) (alberto) - -v1.7.2 - October 19, 2015 - -* Fix: comma-dangle confused by parens (fixes #4195) (Nicholas C. Zakas) -* Fix: no-mixed-spaces-and-tabs (fixes #4189, fixes #4190) (alberto) -* Fix: no-extend-native disallow using Object.properties (fixes #4180) (Nathan Woltman) -* Fix: no-magic-numbers should ignore Number.parseInt (fixes #4167) (Henry Zhu) - -v1.7.1 - October 16, 2015 - -* Fix: id-match schema (fixes #4155) (Nicholas C. Zakas) -* Fix: no-magic-numbers should ignore parseInt (fixes #4167) (Nicholas C. Zakas) -* Fix: `indent` param function fix (fixes #4165, fixes #4164) (Gyandeep Singh) - -v1.7.0 - October 16, 2015 - -* Fix: array-bracket-spacing for empty array (fixes #4141) (alberto) -* Fix: `indent` arrow function check fix (fixes #4142) (Gyandeep Singh) -* Update: Support .js files for config (fixes #3102) (Gyandeep Singh) -* Fix: Make eslint-config-eslint work (fixes #4145) (Nicholas C. Zakas) -* Fix: `prefer-arrow-callback` had been wrong at arguments (fixes #4095) (Toru Nagashima) -* Docs: Update various rules docs (Nicholas C. Zakas) -* New: Create eslint-config-eslint (fixes #3525) (Nicholas C. Zakas) -* Update: RuleTester allows string errors in invalid cases (fixes #4117) (Kevin Partington) -* Docs: Reference no-unexpected-multiline in semi (fixes #4114) (alberto) -* Update: added exceptions to `lines-around-comment` rule. (fixes #2965) (Mathieu M-Gosselin) -* Update: Add `matchDescription` option to `valid-jsdoc` (fixes #2449) (Gyandeep Singh) -* Fix: check for objects or arrays in array-bracket-spacing (fixes #4083) (alberto) -* Docs: Alphabetize Rules lists (Kenneth Chung) -* Fix: message templates fail when no parameters are passed (fixes #4080) (Ilya Volodin) -* Fix: `indent` multi-line function call (fixes #4073, fixes #4075) (Gyandeep Singh) -* Docs: Improve comma-dangle documentation (Gilad Peleg) -* Fix: no-mixed-tabs-and-spaces fails with some comments (fixes #4086) (alberto) -* Fix: `semi` to check for do-while loops (fixes #4090) (Gyandeep Singh) -* Build: Fix path related failures on Windows in tests (fixes #4061) (Burak Yigit Kaya) -* Fix: `no-unused-vars` had been missing some parameters (fixes #4047) (Toru Nagashima) -* Fix: no-mixed-spaces-and-tabs with comments and templates (fixes #4077) (alberto) -* Update: Add `allow` option for `no-underscore-dangle` rule (fixes #2135) (Gyandeep Singh) -* Update: `allowArrowFunctions` option for `func-style` rule (fixes #1897) (Gyandeep Singh) -* Fix: Ignore template literals in no-mixed-tabs-and-spaces (fixes #4054) (Nicholas C. Zakas) -* Build: Enable CodeClimate (fixes #4068) (Nicholas C. Zakas) -* Fix: `no-cond-assign` had needed double parens in `for` (fixes #4023) (Toru Nagashima) -* Update: Ignore end of function in newline-after-var (fixes #3682) (alberto) -* Build: Performance perf to not ignore jshint file (refs #3765) (Gyandeep Singh) -* Fix: id-match bug incorrectly errors on `NewExpression` (fixes #4042) (Burak Yigit Kaya) -* Fix: `no-trailing-spaces` autofix to handle linebreaks (fixes #4050) (Gyandeep Singh) -* Fix: renamed no-magic-number to no-magic-numbers (fixes #4053) (Vincent Lemeunier) -* New: add "consistent" option to the "curly" rule (fixes #2390) (Benoît Zugmeyer) -* Update: Option to ignore for loops in init-declarations (fixes #3641) (alberto) -* Update: Add webextensions environment (fixes #4051) (Blake Winton) -* Fix: no-cond-assign should report assignment location (fixes #4040) (alberto) -* New: no-empty-pattern rule (fixes #3668) (alberto) -* Upgrade: Upgrade globals to 8.11.0 (fixes #3599) (Burak Yigit Kaya) -* Docs: Re-tag JSX code fences (fixes #4020) (Brandon Mills) -* New: no-magic-number rule (fixes #4027) (Vincent Lemeunier) -* Docs: Remove list of users from README (fixes #3881) (Brandon Mills) -* Fix: `no-redeclare` and `no-sahadow` for builtin globals (fixes #3971) (Toru Nagashima) -* Build: Add `.eslintignore` file for the project (fixes #3765) (Gyandeep Singh) - -v1.6.0 - October 2, 2015 - -* Fix: cache is basically not working (fixes #4008) (Richard Hansen) -* Fix: a test failure on Windows (fixes #3968) (Toru Nagashima) -* Fix: `no-invalid-this` had been missing globals in node (fixes #3961) (Toru Nagashima) -* Fix: `curly` with `multi` had false positive (fixes #3856) (Toru Nagashima) -* Build: Add load performance check inside perf function (fixes #3994) (Gyandeep Singh) -* Fix: space-before-keywords fails with super keyword (fixes #3946) (alberto) -* Fix: CLI should not fail on account of ignored files (fixes #3978) (Dominic Barnes) -* Fix: brace-style rule incorrectly flagging switch (fixes #4002) (Aparajita Fishman) -* Update: Implement auto fix for space-unary-ops rule (fixes #3976) (alberto) -* Update: Implement auto fix for computed-property-spacing (fixes #3975) (alberto) -* Update: Implement auto fix for no-multi-spaces rule (fixes #3979) (alberto) -* Fix: Report shorthand method names in complexity rule (fixes #3955) (Tijn Kersjes) -* Docs: Add note about typeof check for isNaN (fixes #3985) (Daniel Lo Nigro) -* Update: ESLint reports parsing errors with clear prefix. (fixes #3555) (Kevin Partington) -* Build: Update markdownlint dependency (fixes #3954) (David Anson) -* Update: `no-mixed-require` to have non boolean option (fixes #3922) (Gyandeep Singh) -* Fix: trailing spaces auto fix to check for line breaks (fixes #3940) (Gyandeep Singh) -* Update: Add `typeof` option to `no-undef` rule (fixes #3684) (Gyandeep Singh) -* Docs: Fix explanation and typos for accessor-pairs (alberto) -* Docs: Fix typos for camelcase (alberto) -* Docs: Fix typos for max-statements (Danny Guo) -* Update: Implement auto fix for object-curly-spacing (fixes #3857) (alberto) -* Update: Implement auto fix for array-bracket-spacing rule (fixes #3858) (alberto) -* Fix: Add schema to `global-require` rule (fixes #3923) (Gyandeep Singh) -* Update: Apply lazy loading for rules (fixes #3930) (Gyandeep Singh) -* Docs: Fix typo for arrow-spacing (Danny Guo) -* Docs: Fix typos for wrap-regex (Danny Guo) -* Docs: Fix explanation for space-before-keywords (Danny Guo) -* Docs: Fix typos for operator-linebreak (Danny Guo) -* Docs: Fix typos for callback-return (Danny Guo) -* Fix: no-trailing-spaces autofix to account for blank lines (fixes #3912) (Gyandeep Singh) -* Docs: Fix example in no-negated-condition.md (fixes #3908) (alberto) -* Update:warn message use @return when prefer.returns=return (fixes #3889) (闲耘™) -* Update: Implement auto fix for generator-star-spacing rule (fixes #3873) (alberto) -* Update: Implement auto fix for arrow-spacing rule (fixes #3860) (alberto) -* Update: Implement auto fix for block-spacing rule (fixes #3859) (alberto) -* Fix: Support allman style for switch statement (fixes #3903) (Gyandeep Singh) -* New: no-negated-condition rule (fixes #3740) (alberto) -* Docs: Fix typo in blog post template (Nicholas C. Zakas) -* Update: Add env 'nashorn' to support Java 8 Nashorn Engine (fixes #3874) (Benjamin Winterberg) -* Docs: Prepare for rule doc linting (refs #2271) (Ian VanSchooten) - -v1.5.1 - September 22, 2015 - -* Fix: valid-jsdoc fix for param with properties (fixes #3476) (Gyandeep Singh) -* Fix: valid-jsdoc error with square braces (fixes #2270) (Gyandeep Singh) -* Upgrade: `doctrine` to 0.7.0 (fixes #3891) (Gyandeep Singh) -* Fix: `space-before-keywords` had been wrong on getters (fixes #3854) (Toru Nagashima) -* Fix: `no-dupe-args` had been wrong for nested destructure (fixes #3867) (Toru Nagashima) -* Docs: io.js is the new Node.js (thefourtheye) -* Docs: Fix method signature on working-with-rules docs (fixes #3862) (alberto) -* Docs: Add related ternary links (refs #3835) (Ian VanSchooten) -* Fix: don’t ignore config if cwd is the home dir (fixes #3846) (Mathias Schreck) -* Fix: `func-style` had been warning arrows with `this` (fixes #3819) (Toru Nagashima) -* Fix: `space-before-keywords`; allow opening curly braces (fixes #3789) (Marko Raatikka) -* Build: Fix broken .gitattributes generation (fixes #3566) (Nicholas C. Zakas) -* Build: Fix formatter docs generation (fixes #3847) (Nicholas C. Zakas) - -v1.5.0 - September 18, 2015 - -* Fix: invalidate cache when config changes. (fixes #3770) (royriojas) -* Fix: function body indent issues (fixes #3614, fixes #3799) (Gyandeep Singh) -* Update: Add configuration option to `space-before-blocks` (fixes #3758) (Phil Vargas) -* Fix: space checking between tokens (fixes #2211) (Nicholas C. Zakas) -* Fix: env-specified ecmaFeatures had been wrong (fixes #3735) (Toru Nagashima) -* Docs: Change example wording from warnings to problems (fixes #3676) (Ian VanSchooten) -* Build: Generate formatter example docs (fixes #3560) (Ian VanSchooten) -* New: Add --debug flag to CLI (fixes #2692) (Nicholas C. Zakas) -* Docs: Update no-undef-init docs (fixes #3170) (Nicholas C. Zakas) -* Docs: Update no-unused-expressions docs (fixes #3685) (Nicholas C. Zakas) -* Docs: Clarify node types in no-multi-spaces (fixes #3781) (Nicholas C. Zakas) -* Docs: Update new-cap docs (fixes #3798) (Nicholas C. Zakas) -* Fix: `space-before-blocks` had conflicted `arrow-spacing` (fixes #3769) (Toru Nagashima) -* Fix: `comma-dangle` had not been checking imports/exports (fixes #3794) (Toru Nagashima) -* Fix: tests fail due to differences in temporary paths. (fixes #3778) (royriojas) -* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas) -* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas) -* Update: Implement auto fix for `space-infix-ops` rule (fixes #3801) (Gyandeep Singh) -* Fix: `no-warning-comments` can't be set via config comment (fixes #3619) (Burak Yigit Kaya) -* Update: `key-spacing` should allow 1+ around colon (fixes #3363) (Burak Yigit Kaya) -* Fix: false alarm of semi-spacing with semi set to never (fixes #1983) (Chen Yicai) -* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas) -* Docs: add more examples + tests for block-scoped-var (fixes #3791) (JT) -* Update: Implement auto fix for `indent` rule (fixes #3734) (Gyandeep Singh) -* Fix: `space-before-keywords` fails to handle some cases (fixes #3756) (Marko Raatikka) -* Docs: Add if-else example (fixes #3722) (Ian VanSchooten) -* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck) -* Docs: Fix closing code fence on cli docs (Ian VanSchooten) -* Update: Implement auto fix for `space-before-blocks` rule (fixes #3776) (Gyandeep Singh) -* Update: Implement auto fix for `space-after-keywords` rule (fixes #3773) (Gyandeep Singh) -* Fix: `semi-spacing` had conflicted with `block-spacing` (fixes #3721) (Toru Nagashima) -* Update: Implement auto fix for `space-before-keywords` rule (fixes #3771) (Gyandeep Singh) -* Update: auto fix for space-before-function-paren rule (fixes #3766) (alberto) -* Update: Implement auto fix for `no-extra-semi` rule (fixes #3745) (Gyandeep Singh) -* Update: Refactors the traversing logic (refs #3530) (Toru Nagashima) -* Update: Implement auto fix for `space-return-throw-case` (fixes #3732) (Gyandeep Singh) -* Update: Implement auto fix for `no-spaced-func` rule (fixes #3728) (Gyandeep Singh) -* Update: Implement auto fix for `eol-last` rule (fixes #3725) (Gyandeep Singh) -* Update: Implement auto fix for `no-trailing-spaces` rule (fixes #3723) (Gyandeep Singh) - -v1.4.3 - September 15, 2015 - -* Fix: Directory ignoring should work (fixes #3812) (Nicholas C. Zakas) -* Fix: jsx-quotes exception for attributes without value (fixes #3793) (Mathias Schreck) - -v1.4.2 - September 15, 2015 - -* Fix: Ensure **/node_modules works in ignore files (fixes #3788) (Nicholas C. Zakas) -* Fix: Ensure ./ works correctly with CLI (fixes #3792) (Nicholas C. Zakas) - -v1.4.1 - September 11, 2015 - -* Fix: CLIEngine default cache parameter name (fixes #3755) (Daniel G. Taylor) -* Fix: Glob pattern from .eslintignore not applied (fixes #3750) (Burak Yigit Kaya) -* Fix: Skip JSDoc from NewExpression (fixes #3744) (Nicholas C. Zakas) -* Docs: Shorten and simplify autocomment for new issues (Nicholas C. Zakas) - -v1.4.0 - September 11, 2015 - -* Docs: Add new formatters to API docs (Ian VanSchooten) -* New: Implement autofixing (fixes #3134) (Nicholas C. Zakas) -* Fix: Remove temporary `"allow-null"` (fixes #3705) (Toru Nagashima) -* Fix: `no-unused-vars` had been crashed at `/*global $foo*/` (fixes #3714) (Toru Nagashima) -* Build: check-commit now checks commit message length. (fixes #3706) (Kevin Partington) -* Fix: make getScope acquire innermost scope (fixes #3700) (voideanvalue) -* Docs: Fix spelling mistake (domharrington) -* Fix: Allow whitespace in rule message parameters. (fixes #3690) (Kevin Partington) -* Fix: Eqeqeq rule with no option does not warn on 'a == null' (fixes #3699) (fediev) -* Fix: `no-unused-expressions` with `allowShortCircuit` false positive if left has no effect (fixes #3675) (Toru Nagashima) -* Update: Add Node 4 to travis builds (fixes #3697) (Ian VanSchooten) -* Fix: Not check for punctuator if on same line as last var (fixes #3694) (Gyandeep Singh) -* Docs: Make `quotes` docs clearer (fixes #3646) (Nicholas C. Zakas) -* Build: Increase mocha timeout (fixes #3692) (Nicholas C. Zakas) -* Fix: `no-extra-bind` to flag all arrow funcs (fixes #3672) (Nicholas C. Zakas) -* Docs: Update README with release and sponsor info (Nicholas C. Zakas) -* Fix: `object-curly-spacing` had been crashing on an empty object pattern (fixes #3658) (Toru Nagashima) -* Fix: `no-extra-parens` false positive at IIFE with member accessing (fixes #3653) (Toru Nagashima) -* Fix: `comma-dangle` with `"always"`/`"always-multiline"` false positive after a rest element (fixes #3627) (Toru Nagashima) -* New: `jsx-quotes` rule (fixes #2011) (Mathias Schreck) -* Docs: Add linting for second half of rule docs (refs #2271) (Ian VanSchooten) -* Fix: `no-unused-vars` had not shown correct locations for `/*global` (fixes #3617) (Toru Nagashima) -* Fix: `space-after-keywords` not working for `catch` (fixes #3654) (Burak Yigit Kaya) -* Fix: Incorrectly warning about ignored files (fixes #3649) (Burak Yigit Kaya) -* Fix: Indent rule VariableDeclarator doesn't apply to arrow functions (fixes #3661) (Burak Yigit Kaya) -* Upgrade: Consuming handlebars@^4.0.0 (fixes #3632) (Kevin Partington) -* Docs: Fixing typos in plugin processor section. (fixes #3648) (Kevin Partington) -* Fix: Invalid env keys would cause an unhandled exception.(fixes #3265) (Ray Booysen) -* Docs: Fixing broken link in documentation (Ilya Volodin) -* Update: Check for default assignment in no-unneeded-ternary (fixes #3232) (cjihrig) -* Fix: `consistent-as-needed` mode with `keyword: true` (fixes #3636) (Alex Guerrero) -* New: Implement cache in order to only operate on changed files since previous run. (fixes #2998) (Roy Riojas) -* Update: Grouping related CLI options. (fixes #3612) (Kevin Partington) -* Update: Using @override does not require @param or @returns (fixes #3629) (Whitney Young) -* Docs: Use eslint-env in no-undef (fixes #3616) (Ian VanSchooten) -* New: `require-jsdoc` rule (fixes #1842) (Gyandeep Singh) -* New: Support glob path on command line (fixes #3402) (Burak Yigit Kaya) -* Update: Short circuit and ternary support in no-unused-expressions (fixes #2733) (David Warkentin) -* Docs: Replace to npmjs.com (Ryuichi Okumura) -* Fix: `indent` should only indent chain calls if the first call is single line (fixes #3591) (Burak Yigit Kaya) -* Fix: `quote-props` should not crash for object rest spread syntax (fixes #3595) (Joakim Carlstein) -* Update: Use `globals` module for the `commonjs` globals (fixes #3606) (Sindre Sorhus) -* New: `no-restricted-syntax` rule to forbid certain syntax (fixes #2422) (Burak Yigit Kaya) -* Fix: `no-useless-concat` false positive at numbers (fixes #3575, fixes #3589) (Toru Nagashima) -* New: Add --max-warnings flag to CLI (fixes #2769) (Kevin Partington) -* New: Add `parser` as an option (fixes #3127) (Gyandeep Singh) -* New: `space-before-keywords` rule (fixes #1631) (Marko Raatikka) -* Update: Allowing inline comments to disable eslint rules (fixes #3472) (Whitney Young) -* Docs: Including for(;;) as valid case in no-constant-condition (Kevin Partington) -* Update: Add quotes around the label in `no-redeclare` error messages (fixes #3583) (Ian VanSchooten) -* Docs: correct contributing URL (Dieter Luypaert) -* Fix: line number for duplicate object keys error (fixes #3573) (Elliot Lynde) -* New: global-require rule (fixes #2318) (Jamund Ferguson) - -v1.3.1 - August 29, 2015 - -* Fix: `indent` to not crash on empty files (fixes #3570) (Gyandeep Singh) -* Fix: Remove unused config file (fixes #2227) (Gyandeep Singh) - -v1.3.0 - August 28, 2015 - -* Build: Autogenerate release blog post (fixes #3562) (Nicholas C. Zakas) -* New: `no-useless-concat` rule (fixes #3506) (Henry Zhu) -* Update: Add `keywords` flag to `consistent-as-needed` mode in `quote-props` (fixes #3532) (Burak Yigit Kaya) -* Update: adds `numbers` option to quote-props (fixes #2914) (Jose Roberto Vidal) -* Fix: `quote-props` rule should ignore computed and shorthand properties (fixes #3557) (fixes #3544) (Burak Yigit Kaya) -* Docs: Add config comments for rule examples 'accessor-pairs' to 'no-extra-semi' (refs #2271) (Ian VanSchooten) -* Update: Return to accept `undefined` type (fixes #3382) (Gyandeep Singh) -* New: Added HTML formatter (fixes #3505) (Julian Laval) -* Fix: check space after yield keyword in space-unary-ops (fixes #2707) (Mathias Schreck) -* Docs: (curly) Fix broken code in example (Kent C. Dodds) -* Update: Quote var name in `no-unused-vars` error messages (refs #3526) (Burak Yigit Kaya) -* Update: Move methods to SourceCode (fixes #3516) (Nicholas C. Zakas) -* Fix: Don't try too hard to find fault in `no-implicit-coercion` (refs #3402) (Burak Yigit Kaya) -* Fix: Detect ternary operator in operator-linebreak rule (fixes #3274) (Burak Yigit Kaya) -* Docs: Clearer plugin rule configuration (fixes #2022) (Nicholas C. Zakas) -* Update: Add quotes around the label in `no-empty-label` error reports (fixes #3526) (Burak Yigit Kaya) -* Docs: Turn off Liquid in example (Nicholas C. Zakas) -* Docs: Mention CommonJS along with Node.js (fixes #3388) (Nicholas C. Zakas) -* Docs: Make it clear which rules are recommended (fixes #3398) (Nicholas C. Zakas) -* Docs: Add links to JSON Schema resources (fixes #3411) (Nicholas C. Zakas) -* Docs: Add more info to migration guide (fixes #3439) (Nicholas C. Zakas) -* Fix: ASI indentation issue (fixes #3514) (Burak Yigit Kaya) -* Fix: Make `no-implicit-coercion` smarter about numerical expressions (fixes #3510) (Burak Yigit Kaya) -* Fix: `prefer-template` had not been handling TemplateLiteral as literal node (fixes #3507) (Toru Nagashima) -* Update: `newline-after-var` Allow comment + blank after var (fixes #2852) (Ian VanSchooten) -* Update: Add `unnecessary` option to `quote-props` (fixes #3381) (Burak Yigit Kaya) -* Fix: `indent` shouldn't check the last line unless it is a punctuator (fixes #3498) (Burak Yigit Kaya) -* Fix: `indent` rule does not indent when doing multi-line chain calls (fixes #3279) (Burak Yigit Kaya) -* Fix: sort-vars rule fails when memo is undefined (fixes #3474) (Burak Yigit Kaya) -* Fix: `brace-style` doesn't report some closing brace errors (fixes #3486) (Burak Yigit Kaya) -* Update: separate options for block and line comments in `spaced-comment` rule (fixes #2897) (Burak Yigit Kaya) -* Fix: `indent` does not check FunctionDeclaration nodes properly (fixes #3173) (Burak Yigit Kaya) -* Update: Added "properties" option to `id-length` rule to ignore property names. (fixes #3450) (Mathieu M-Gosselin) -* Update: add new ignore pattern options to no-unused-vars (fixes #2321) (Mathias Schreck) -* New: Protractor environment (fixes #3457) (James Whitney) -* Docs: Added section to shareable config (Gregory Waxman) -* Update: Allow pre-parsed code (fixes #1025, fixes #948) (Nicholas C. Zakas) - -v1.2.1 - August 20, 2015 - -* Fix: "key-spacing" crashes eslint on object literal shorthand properties (fixes #3463) (Burak Yigit Kaya) -* Fix: ignore leading space check for `null` elements in comma-spacing (fixes #3392) (Mathias Schreck) -* Fix: `prefer-arrow-callback` false positive at recursive functions (fixes #3454) (Toru Nagashima) -* Fix: one-var rule doesn’t have default options (fixes #3449) (Burak Yigit Kaya) -* Fix: Refactor `no-duplicate-case` to be simpler and more efficient (fixes #3440) (Burak Yigit Kaya) -* Docs: Fix trailing spaces in README (Nicholas C. Zakas) -* Docs: Update gyandeeps and add byk (Nicholas C. Zakas) -* Docs: Update plugins documentation for 1.0.0 (Nicholas C. Zakas) -* Docs: `object-curly-spacing` doc is inaccurate about exceptions (Burak Yigit Kaya) -* Fix: `object-curly-spacing` shows the incorrect column for opening brace (fixes #3438) (Burak Yigit Kaya) - -v1.2.0 - August 18, 2015 - -* Update: add support for semicolon in comma-first setup in indent rule (fixes #3423) (Burak Yigit Kaya) -* Docs: better JSDoc for indent rule (Burak Yigit Kaya) -* Docs: Document the second argument of `CLIEngine.executeOnText()` (Sindre Sorhus) -* New: `no-dupe-class-members` rule (fixes #3294) (Toru Nagashima) -* Fix: exclude `AssignmentExpression` and `Property` nodes from extra indentation on first line (fixes #3391) (Burak Yigit Kaya) -* Update: Separate indent options for var, let and const (fixes #3339) (Burak Yigit Kaya) -* Fix: Add AssignmentPattern to space-infix-ops (fixes #3380) (Burak Yigit Kaya) -* Docs: Fix typo: exception label (tienslebien) -* Update: Clean up tests for CLI config support (refs #2543) (Gyandeep Singh) -* New: `block-spacing` rule (fixes #3303) (Toru Nagashima) -* Docs: Update docs for no-iterator (fixes #3405) (Nicholas C. Zakas) -* Upgrade: bump `espree` dependency to `2.2.4` (fixes #3403) (Burak Yigit Kaya) -* Fix: false positive on switch 'no duplicate case', (fixes #3408) (Cristian Carlesso) -* Fix: `valid-jsdoc` test does not recognize aliases for `@param` (fixes #3399) (Burak Yigit Kaya) -* New: enable `-c` flag to accept a shareable config (fixes #2543) (Shinnosuke Watanabe) -* Fix: Apply plugin given in CLI (fixes #3383) (Ian VanSchooten) -* New: Add commonjs environment (fixes #3377) (Nicholas C. Zakas) -* Docs: Update no-unused-var docs (Nicholas C. Zakas) -* Fix: trailing commas in object-curly-spacing for import/export (fixes #3324) (Henry Zhu) -* Update: Make `baseConfig` to behave as other config options (fixes #3371) (Gyandeep Singh) -* Docs: Add "Compatibility" section to linebreak-style (Vitor Balocco) -* New: `prefer-arrow-callback` rule (fixes #3140) (Toru Nagashima) -* Docs: Clarify what an unused var is (fixes #2342) (Nicholas C. Zakas) -* Docs: Mention double-byte character limitation in max-len (fixes #2370) (Nicholas C. Zakas) -* Fix: object curly spacing incorrectly warning for import with default and multiple named specifiers (fixes #3370) (Luke Karrys) -* Fix: Indent rule errors with array of objects (fixes #3329) (Burak Yigit Kaya) -* Update: Make it clear that `space-infix-ops` support `const` (fixes #3299) (Burak Yigit Kaya) -* New: `prefer-template` rule (fixes #3014) (Toru Nagashima) -* Docs: Clarify `no-process-env` docs (fixes #3318) (Nicholas C. Zakas) -* Docs: Fix arrow name typo (fixes #3309) (Nicholas C. Zakas) -* Update: Improve error message for `indent` rule violation (fixes #3340) (Burak Yigit Kaya) -* Fix: radix rule does not apply for Number.parseInt (ES6) (fixes #3364) (Burak Yigit Kaya) -* Fix: `key-spacing.align` doesn't pay attention to non-whitespace before key (fixes #3267) (Burak Yigit Kaya) -* Fix: arrow-parens & destructuring/default params (fixes #3353) (Jamund Ferguson) -* Update: Add support for Allman to brace-style rule, brackets on newline (fixes #3347) (Burak Yigit Kaya) -* Fix: Regression no-catch-shadow (1.1.0) (fixes #3322) (Burak Yigit Kaya) -* Docs: remove note outdated in 1.0.0 (Denis Sokolov) -* Build: automatically convert line endings in release script (fixes #2642) (Burak Yigit Kaya) -* Update: allow disabling new-cap on object methods (fixes #3172) (Burak Yigit Kaya) -* Update: Improve checkstyle format (fixes #3183) (Burak Yigit Kaya) -* Fix: Indent rule errors if an array literal starts a new statement (fixes #3328) (Burak Yigit Kaya) -* Update: Improve validation error messages (fixes #3193) (Burak Yigit Kaya) -* Docs: fix syntax error in space-before-function-paren (Fabrício Matté) -* Fix: `indent` rule to check for last line correctly (fixes #3327) (Gyandeep Singh) -* Fix: Inconsistent off-by-one errors with column numbers (fixes #3231) (Burak Yigit Kaya) -* Fix: Keyword "else" must not be followed by a newline (fixes #3226) (Burak Yigit Kaya) -* Fix: `id-length` does not work for most of the new ES6 patterns (fixes #3286) (Burak Yigit Kaya) -* Fix: Spaced Comment Exceptions Not Working (fixes #3276) (Jamund Ferguson) - -v1.1.0 - August 7, 2015 - -* Update: Added as-needed option to arrow-parens (fixes #3277) (Jamund Ferguson) -* Fix: curly-spacing missing import case (fixes #3302) (Jamund Ferguson) -* Fix: `eslint-env` in comments had not been setting `ecmaFeatures` (fixes #2134) (Toru Nagashima) -* Fix: `es6` env had been missing `spread` and `newTarget` (fixes #3281) (Toru Nagashima) -* Fix: Report no-spaced-func on last token before paren (fixes #3289) (Benjamin Woodruff) -* Fix: Check for null elements in indent rule (fixes #3272) (Gyandeep Singh) -* Docs: Use backticks for option heading (Gyandeep Singh) -* Fix: `no-invalid-this` had been missing jsdoc comment (fixes #3287) (Toru Nagashima) -* Fix: `indent` rule for multi-line objects and arrays (fixes #3236) (Gyandeep Singh) -* Update: add new `multi-or-nest` option for the `curly` rule (fixes #1806) (Ivan Nikulin) -* Fix: `no-cond-assign` had been missing simplest pattern (fixes #3249) (Toru Nagashima) -* Fix: id-length rule doesn't catch violations in arrow function parameters (fixes #3275) (Burak Yigit Kaya) -* New: Added grep-style formatter (fixes #2991) (Nobody Really) -* Update: Split out generic AST methods into utility (fixes #962) (Gyandeep Singh) -* Fix: `accessor-pairs` false positive (fixes #3262) (Toru Nagashima) -* Fix: `context.getScope()` returns correct scope in blockBindings (fixes #3254) (Toru Nagashima) -* Update: Expose `getErrorResults` as a static method on `CLIEngine` (fixes #3242) (Gyandeep Singh) -* Update: Expose `getFormatter` as a static method on `CLIEngine` (fixes #3239) (Gyandeep Singh) -* Docs: use correct encoding for id-match.md (fixes #3246) (Matthieu Larcher) -* Docs: place id-match rule at correct place in README.md (fixes #3245) (Matthieu Larcher) -* Docs: Update no-proto.md (Joe Zimmerman) -* Docs: Fix typo in object-shorthand docs (Gunnar Lium) -* Upgrade: inquirer dependency (fixes #3241) (Gyandeep Singh) -* Fix: `indent` rule for objects and nested one line blocks (fixes #3238, fixes #3237) (Gyandeep Singh) -* Docs: Fix wrong options in examples of key-spacing (keik) -* Docs: Adds missing "not" to semi.md (Marius Schulz) -* Docs: Update no-multi-spaces.md (Kenneth Powers) -* Fix: `indent` to not error on same line nodes (fixes #3228) (Gyandeep Singh) -* New: Jest environment (fixes #3212) (Darshak Parikh) - -v1.0.0 - July 31, 2015 - -* Update: merge `no-reserved-keys` into `quote-props` (fixes #1539) (Jose Roberto Vidal) -* Fix: `indent` error message (fixes #3220) (Gyandeep Singh) -* Update: Add embertest env (fixes #3205) (ismay) -* Docs: Correct documentation errors for `id-length` rule. (Jess Telford) -* Breaking: `indent` rule to have node specific options (fixes #3210) (Gyandeep Singh) -* Fix: space-after-keyword shouldn't allow newlines (fixes #3198) (Brandon Mills) -* New: Add JSON formatter (fixes #3036) (Burak Yigit Kaya) -* Breaking: Switch to RuleTester (fixes #3186) (Nicholas C. Zakas) -* Breaking: remove duplicate warnings of `no-undef` from `block-scoped-var` (fixes #3201) (Toru Nagashima) -* Fix: `init-declarations` ignores in for-in/of (fixes #3202) (Toru Nagashima) -* Fix: `quotes` with `"backtick"` ignores ModuleSpecifier and LiteralPropertyName (fixes #3181) (Toru Nagashima) -* Fix: space-in-parens in Template Strings (fixes #3182) (Ian VanSchooten) -* Fix: Check for concatenation in no-throw-literal (fixes #3099, fixes #3101) (Ian VanSchooten) -* Build: Remove `eslint-tester` from devDependencies (fixes #3189) (Gyandeep Singh) -* Fix: Use new ESLintTester (fixes #3187) (Nicholas C. Zakas) -* Update: `new-cap` supports fullnames (fixes #2584) (Toru Nagashima) -* Fix: Non object rule options merge (fixes #3179) (Gyandeep Singh) -* New: add id-match rule (fixes #2829) (Matthieu Larcher) -* Fix: Rule options merge (fixes #3175) (Gyandeep Singh) -* Fix: `spaced-comment` allows a mix of markers and exceptions (fixes #2895) (Toru Nagashima) -* Fix: `block-scoped-var` issues (fixes #2253, fixes #2747, fixes #2967) (Toru Nagashima) -* New: Add id-length rule (fixes #2784) (Burak Yigit Kaya) -* Update: New parameters for quote-props rule (fixes #1283, fixes #1658) (Tomasz Olędzki) - -v1.0.0-rc-3 - July 24, 2015 - -* Fix: Make Chai and Mocha as a dependency (fixes #3156) (Gyandeep Singh) -* Fix: traverse `ExperimentalSpread/RestProperty.argument` (fixes #3157) (Toru Nagashima) -* Fix: Check shareable config package prefix correctly (fixes #3146) (Gyandeep Singh) -* Update: move redeclaration checking for builtins (fixes #3070) (Toru Nagashima) -* Fix: `quotes` with `"backtick"` allows directive prologues (fixes #3132) (Toru Nagashima) -* Fix: `ESLintTester` path in exposed API (fixes #3149) (Gyandeep Singh) -* Docs: Remove AppVeyor badge (Gyandeep Singh) -* Fix: Check no-new-func on CallExpressions (fixes #3145) (Benjamin Woodruff) - -v1.0.0-rc-2 - July 23, 2015 - -* Docs: Mention eslint-tester in migration guide (Nicholas C. Zakas) -* Docs: Mention variables defined in a global comment (fixes #3137) (William Becker) -* Docs: add documentation about custom-formatters. (fixes #1260) (royriojas) -* Fix: Multi-line variable declarations indent (fixes #3139) (Gyandeep Singh) -* Fix: handles blocks in no-use-before-define (fixes #2960) (Jose Roberto Vidal) -* Update: `props` option of `no-param-reassign` (fixes #1600) (Toru Nagashima) -* New: Support shared configs named `@scope/eslint-config`, with shortcuts of `@scope` and `@scope/` (fixes #3123) (Jordan Harband) -* New: Add ignorePattern, ignoreComments, and ignoreUrls options to max-len (fixes #2934, fixes #2221, fixes #1661) (Benjamin Woodruff) -* Build: Increase Windows Mocha timeout (fixes #3133) (Ian VanSchooten) -* Docs: incorrect syntax in the example for rule «one-var» (Alexander Burtsev) -* Build: Check commit message format at end of tests (fixes #3058) (Ian VanSchooten) -* Update: Move eslint-tester into repo (fixes #3110) (Nicholas C. Zakas) -* Fix: Not load configs outside config with `root: true` (fixes #3109) (Gyandeep Singh) -* Docs: Add config information to README (fixes #3074) (Nicholas C. Zakas) -* Docs: Add mysticatea as committer (Nicholas C. Zakas) -* Docs: Grammar fixes in rule descriptions (refs #3038) (Greg Cochard) -* Fix: Update sort-vars to ignore Array and ObjectPattern (fixes #2954) (Harry Ho) -* Fix: block-scoped-var rule incorrectly flagging break/continue with label (fixes #3082) (Aparajita Fishman) -* Fix: spaces trigger wrong in `no-useless-call` and `prefer-spread` (fixes #3054) (Toru Nagashima) -* Fix: `arrow-spacing` allow multi-spaces and line-endings (fixes #3079) (Toru Nagashima) -* Fix: add missing loop scopes to one-var (fixes #3073) (Jose Roberto Vidal) -* New: the `no-invalid-this` rule (fixes #2815) (Toru Nagashima) -* Fix: allow empty loop body in no-extra-semi (fixes #3075) (Mathias Schreck) -* Update: Add qunit to environments (fixes #2870) (Nicholas C. Zakas) -* Fix: `space-before-blocks` to consider classes (fixes #3062) (Gyandeep Singh) -* Fix: Include phantomjs globals (fixes #3064) (Linus Unnebäck) -* Fix: no-else-return handles multiple else-if blocks (fixes #3015) (Jose Roberto Vidal) -* Fix: `no-*-assgin` rules support destructuring (fixes #3029) (Toru Nagashima) -* New: the `no-implicit-coercion` rule (fixes #1621) (Toru Nagashima) -* Fix: Make no-implied-eval match more types of strings (fixes #2898) (Benjamin Woodruff) -* Docs: Clarify that bot message is automatic (Ian VanSchooten) -* Fix: Skip rest properties in no-dupe-keys (fixes 3042) (Nicholas C. Zakas) -* Docs: New issue template (fixes #3048) (Nicholas C. Zakas) -* Fix: strict rule supports classes (fixes #2977) (Toru Nagashima) -* New: the `prefer-reflect` rule (fixes #2939) (Keith Cirkel) -* Docs: make grammar consistent in rules index (Greg Cochard) -* Docs: Fix unmatched paren in rule description (Greg Cochard) -* Docs: Small typo fix in no-useless-call documentation (Paul O’Shannessy) -* Build: readd phantomjs dependency with locked down version (fixes #3026) (Mathias Schreck) -* Docs: Add IanVS as committer (Nicholas C. Zakas) -* docs: additional computed-property-spacing documentation (fixes #2941) (Jamund Ferguson) -* Docs: Add let and const examples for newline-after-var (fixes #3020) (James Whitney) -* Build: Remove unnecessary phantomjs devDependency (fixes #3021) (Gyandeep Singh) -* Update: added shared builtins list (fixes #2972) (Jose Roberto Vidal) - -v1.0.0-rc-1 - July 15, 2015 - -* Upgrade: Espree to 2.2.0 (fixes #3011) (Nicholas C. Zakas) -* Docs: fix a typo (bartmichu) -* Fix: indent rule should recognize single line statements with ASI (fixes #3001, fixes #3000) (Mathias Schreck) -* Update: Handle CRLF line endings in spaced-comment rule - 2 (fixes #3005) (Burak Yigit Kaya) -* Fix: Indent rule error on empty block body (fixes #2999) (Gyandeep Singh) -* New: the `no-class-assign` rule (fixes #2718) (Toru Nagashima) -* New: the `no-const-assign` rule (fixes #2719) (Toru Nagashima) -* Docs: Add 1.0.0 migration guide (fixes #2994) (Nicholas C. Zakas) -* Docs: Update changelog for 0.24.1 (fixes #2976) (Nicholas C. Zakas) -* Breaking: Remove deprecated rules (fixes #1898) (Ian VanSchooten) -* Fix: multi-line + fat arrow indent (fixes #2239) (Gyandeep Singh) -* Breaking: Create eslint:recommended and add to --init (fixes #2713) (Greg Cochard) -* Fix: Indent rule (fixes #1797, fixes #1799, fixes #2248, fixes #2343, fixes #2278, fixes #1800) (Gyandeep Singh) -* New: `context.getDeclaredVariables(node)` (fixes #2801) (Toru Nagashima) -* New: the `no-useless-call` rule (fixes #1925) (Toru Nagashima) -* New: the `prefer-spread` rule (fixes #2946) (Toru Nagashima) -* Fix: `valid-jsdoc` counts `return` for arrow expressions (fixes #2952) (Toru Nagashima) -* New: Add exported comment option (fixes #1200) (Jamund Ferguson) -* Breaking: Default to --reset behavior (fixes #2100) (Brandon Mills) -* New: Add arrow-parens and arrow-spacing rule (fixes #2628) (Jxck) -* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh) -* Add: Warn on missing rule definition or deprecation (fixes #1549) (Ian VanSchooten) -* Update: adding some tests for no-redeclare to test named functions (fixes #2953) (Dominic Barnes) -* New: Add support for root: true in config files (fixes #2736) (Ian VanSchooten) -* Fix: workaround for leading and trailing comments in padded-block (fixes #2336 and fixes #2788) (Mathias Schreck) -* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson) -* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh) -* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten) -* Update: `no-loop-func` allows block-scoped variables (fixes #2517) (Toru Nagashima) -* Docs: remove mistaken "off by default" (Jan Schär) -* Build: Add appveyor CI system (fixes #2923) (Gyandeep Singh) -* Docs: Fix typo in the shareable configs doc (Siddharth Kannan) -* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck) -* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck) -* Docs: clarification in no-unused-vars (Jan Schär) -* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima) -* Docs: missing quotes in JSON (Jan Schär) -* Breaking: Switch to 1-based columns (fixes #2284) (Nicholas C. Zakas) -* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills) -* Docs: Add spaced-line-comment deprecation notice (Brandon Mills) -* Docs: Add space-in-brackets deprecation notice (Brandon Mills) -* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun) -* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh) -* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin) -* New: Add init-declarations rule (fixes #2606) (cjihrig) -* Docs: Fix typo in array-bracket-spacing rule (zallek) -* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin) -* Build: gensite target supports rule removal (refs #1898) (Brandon Mills) -* Update: Handle CRLF line endings in spaced-comment rule (fixes #2884) (David Anson) -* Update: Attach parent in getNodeByRangeIndex (fixes #2863) (Brandon Mills) -* Docs: Fix typo (Bryan Smith) -* New: Add serviceworker environment (fixes #2557) (Gyandeep Singh) -* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig) -* Update: Loosens regex rules around intentional fall through comments (Fixes #2811) (greg5green) -* Update: Add missing schema to rules (fixes #2858) (Ilya Volodin) -* New: `require-yield` rule (fixes #2822) (Toru Nagashima) -* New: add callback-return rule (fixes #994) (Jamund Ferguson) - -v0.24.1 - July 10, 2015 - -* Docs: Clarify when not to use space-before-blocks (Ian VanSchooten) -* Docs: remove mistaken "off by default" (Jan Schär) -* Docs: remove mistaken "off by default" (Jan Schär) -* Docs: Fix typo in the shareable configs doc (Siddharth Kannan) -* Docs: clarification in no-unused-vars (Jan Schär) -* Docs: missing quotes in JSON (Jan Schär) -* Fix: Revert 1-based column changes in tests for patch (refs #2284) (Nicholas C. Zakas) -* Fix: Shallow cloning issues in eslint config (fixes #2961) (Gyandeep Singh) -* Fix: object-shorthand computed props (fixes #2937) (Jamund Ferguson) -* Fix: Remove invalid check inside `getJSDocComment` function (fixes #2938) (Gyandeep Singh) -* Fix: max-len to report correct column number (fixes #2926) (Mathias Schreck) -* Fix: add destructuring support to comma-dangle rule (fixes #2911) (Mathias Schreck) -* Fix: `no-redeclare` checks module scopes (fixes #2903) (Toru Nagashima) -* Fix: Include execScript in no-implied-eval rule (fixes #2873) (Frederik Braun) -* Fix: Support class syntax for line-around-comment rule (fixes #2894) (Gyandeep Singh) -* Fix: lines-around-comment was crashing in some cases due to a missing check (fixes #2892) (Mathieu M-Gosselin) -* Fix: Added missing export syntax support to the block-scoped-var rule. (fixes #2887) (Mathieu M-Gosselin) -* Fix: Yoda should ignore comparisons where both sides are constants (fixes #2867) (cjihrig) -* Docs: array-bracket-spacing examples used space-in-brackets (Brandon Mills) -* Docs: Add spaced-line-comment deprecation notice (Brandon Mills) -* Docs: Add space-in-brackets deprecation notice (Brandon Mills) - -v0.24.0 - June 26, 2015 - -* Upgrade: eslint-tester to 0.8.1 (Nicholas C. Zakas) -* Fix: no-dupe-args sparse array crash (fixes #2848) (Chris Walker) -* Fix: space-after-keywords should ignore extra parens (fixes #2847) (Mathias Schreck) -* New: add no-unexpected-multiline rule (fixes #746) (Glen Mailer) -* Update: refactor handle-callback-err to improve performance (fixes #2841) (Mathias Schreck) -* Fix: Add --init to the CLI options (fixes #2817) (Gyandeep Singh) -* Update: Add `except-parens` option to `no-return-assign` rule (fixes #2809) (Toru Nagashima) -* Fix: handle-callback-err missing arrow functions (fixes #2823) (Jamund Ferguson) -* Fix: `no-extra-semi` in class bodies (fixes #2794) (Toru Nagashima) -* Fix: Check type to be file when looking for config files (fixes #2790) (Gyandeep Singh) -* Fix: valid-jsdoc to work for object getters (fixes #2407) (Gyandeep Singh) -* Update: Add an option as an object to `generator-star-spacing` rule (fixes #2787) (Toru Nagashima) -* Build: Update markdownlint dependency (David Anson) -* Fix: context report message to handle more scenarios (fixes #2746) (Gyandeep Singh) -* Update: Ignore JsDoc comments by default for `spaced-comment` (fixes #2766) (Gyandeep Singh) -* Fix: one-var 'never' option for mixed initialization (Fixes #2786) (Ian VanSchooten) -* Docs: Fix a minor typo in a prefer-const example (jviide) -* Fix: comma-dangle always-multiline: no comma right before the last brace (fixes #2091) (Benoît Zugmeyer) -* Fix: Allow blocked comments with markers and new-line (fixes #2777) (Gyandeep Singh) -* Docs: small fix in quote-props examples (Jose Roberto Vidal) -* Fix: object-shorthand rule should not warn for NFEs (fixes #2748) (Michael Ficarra) -* Fix: arraysInObjects for object-curly-spacing (fixes #2752) (Jamund Ferguson) -* Docs: Clarify --rule description (fixes #2773) (Nicholas C. Zakas) -* Fix: object literals in arrow function bodies (fixes #2702) (Jose Roberto Vidal) -* New: `constructor-super` rule (fixes #2720) (Toru Nagashima) -* New: `no-this-before-super` rule (fixes #2721) (Toru Nagashima) -* Fix: space-unary-ops flags expressions starting w/ keyword (fixes #2764) (Michael Ficarra) -* Update: Add block options to `lines-around-comment` rule (fixes #2667) (Gyandeep Singh) -* New: array-bracket-spacing (fixes #2226) (Jamund Ferguson) -* Fix: No-shadow rule duplicating error messages (fixes #2706) (Aliaksei Shytkin) - -v0.23.0 - June 14, 2015 - -* Build: Comment out auto publishing of release notes (refs #2640) (Ilya Volodin) -* Fix: "extends" within package.json (fixes #2754) (Gyandeep Singh) -* Upgrade: globals@8.0.0 (fixes #2759) (silverwind) -* Docs: eol-last docs fix (fixes #2755) (Gyandeep Singh) -* Docs: btmills is a reviewer (Nicholas C. Zakas) -* Build: Revert lock io.js to v2.1.0 (refs #2745) (Brandon Mills) -* New: computed-property-spacing (refs #2226) (Jamund Ferguson) -* Build: Pin Sinon version (fixes #2742) (Ilya Volodin) -* Fix: `prefer-const` treats `for-in`/`for-of` with the same way (Fixes #2739) (Toru Nagashima) -* Docs: Add links to team members profile (Gyandeep Singh) -* Docs: add team and ES7 info to readme (Nicholas C. Zakas) -* Fix: don't try to strip "line:" prefix from parser errors with no such prefix (fixes #2698) (Tim Cuthbertson) -* Fix: never ignore config comment options (fixes #2725) (Brandon Mills) -* Update: Add clarification to spaced-comment (refs #2588) (Greg Cochard) -* Update: Add markers to spaced-comment (fixes #2588) (Greg Cochard) -* Fix: no-trailing-spaces now handles skipBlankLines (fixes #2575) (Greg Cochard) -* Docs: Mark global-strict on by default (fixes #2629) (Ilya Volodin) -* New: Allow extends to be an array (fixes #2699) (Justin Morris) -* New: globals@7.1.0 (fixes #2682) (silverwind) -* New: `prefer-const` rule (fixes #2333) (Toru Nagashima) -* Fix: remove hard-coded list of unary keywords in space-unary-ops rule (fixes #2696) (Tim Cuthbertson) -* Breaking: Automatically validate rule options (fixes #2595) (Brandon Mills) -* Update: no-lone-blocks does not report block-level scopes (fixes #2119) (Jose Roberto Vidal) -* Update: yoda onlyEquality option (fixes #2638) (Denis Sokolov) -* Docs: update comment to align with source code it's referencing (Michael Ficarra) -* Fix: Misconfigured default option for lines-around-comment rule (fixes #2677) (Gyandeep Singh) -* Fix: `no-shadow` allows shadowing in the TDZ (fixes #2568) (Toru Nagashima) -* New: spaced-comment rule (fixes #1088) (Gyandeep Singh) -* Fix: Check unused vars in exported functions (fixes #2678) (Gyandeep Singh) -* Build: Stringify payload of release notes (fixes #2640) (Greg Cochard) -* Fix: Allowing u flag in regex to properly lint no-empty-character-class (fixes #2679) (Dominic Barnes) -* Docs: deprecate no-wrap-func (fixes #2644) (Jose Roberto Vidal) -* Docs: Fixing grammar: then -> than (E) -* Fix: trailing commas in object-curly-spacing (fixes #2647) (Jamund Ferguson) -* Docs: be consistent about deprecation status (Matthew Dapena-Tretter) -* Docs: Fix mistakes in object-curly-spacing docs (Matthew Dapena-Tretter) -* New: run processors when calling executeOnText (fixes #2331) (Mordy Tikotzky) -* Update: move executeOnText() tests to the correct describe block (fixes #2648) (Mordy Tikotzky) -* Update: add tests to assert that the preprocessor is running (fixes #2651) (Mordy Tikotzky) -* Build: Lock io.js to v2.1.0 (fixes #2653) (Ilya Volodin) - -v0.22.1 - May 30, 2015 - -* Build: Remove release notes auto-publish (refs #2640) (Ilya Volodin) - -v0.22.0 - May 30, 2015 - -* Upgrade: escope 3.1.0 (fixes #2310, #2405) (Toru Nagashima) -* Fix: “consistent-this” incorrectly flagging destructuring of `this` (fixes #2633) (David Aurelio) -* Upgrade: eslint-tester to 0.7.0 (Ilya Volodin) -* Update: allow shadowed references in no-alert (fixes #1105) (Mathias Schreck) -* Fix: no-multiple-empty-lines and template strings (fixes #2605) (Jamund Ferguson) -* New: object-curly-spacing (fixes #2225) (Jamund Ferguson) -* Docs: minor fix for one-var rule (Jamund Ferguson) -* Fix: Shared config being clobbered by other config (fixes #2592) (Dominic Barnes) -* Update: adds "functions" option to no-extra-parens (fixes #2477) (Jose Roberto Vidal) -* Docs: Fix json formatting for lines-around-comments rule (Gyandeep Singh) -* Fix: Improve around function/class names of `no-shadow` (fixes #2556, #2552) (Toru Nagashima) -* Fix: Improve code coverage (fixes #2590) (Ilya Volodin) -* Fix: Allow scoped configs to have sub-configs (fixes #2594) (Greg Cochard) -* Build: Add auto-update of release tag on github (fixes #2566) (Greg Cochard) -* New: lines-around-comment (fixes #1344) (Jamund Ferguson) -* Build: Unblock build by increasing code coverage (Ilya Volodin) -* New: accessor-pairs rule to object initializations (fixes #1638) (Gyandeep Singh) -* Fix: counting of variables statements in one-var (fixes #2570) (Mathias Schreck) -* Build: Add sudo:false for Travis (fixes #2582) (Ilya Volodin) -* New: Add rule schemas (refs #2179) (Brandon Mills) -* Docs: Fix typo in shareable-configs example (fixes #2571) (Ted Piotrowski) -* Build: Relax markdownlint rules by disabling style-only items (David Anson) -* Fix: Object shorthand rule incorrectly flagging getters/setters (fixes #2563) (Brad Dougherty) -* New: Add config validator (refs #2179) (Brandon Mills) -* New: Add worker environment (fixes #2442) (Ilya Volodin) -* New no-empty-character class (fixes #2508) (Jamund Ferguson) -* New: Adds --ignore-pattern option. (fixes #1742) (Patrick McElhaney) - -v0.21.2 - May 18, 2015 - -* 0.21.2 (Nicholas C. Zakas) -* Fix: one-var exception for ForStatement.init (fixes #2505) (Brandon Mills) -* Fix: Don't throw spurious shadow errors for classes (fixes #2545) (Jimmy Jia) -* Fix: valid-jsdoc rule to support exported functions (fixes #2522) (Gyandeep Singh) -* Fix: Allow scoped packages in configuration extends (fixes #2544) (Eric Isakson) -* Docs: Add chatroom to FAQ (Nicholas C. Zakas) -* Docs: Move Gitter badge (Nicholas C. Zakas) - -v0.21.1 - May 15, 2015 - -* 0.21.1 (Nicholas C. Zakas) -* Fix: loc obj in report fn expects column (fixes #2481) (Varun Verma) -* Build: Make sure that all md files end with empty line (fixes #2520) (Ilya Volodin) -* Added Gitter badge (The Gitter Badger) -* Fix: forced no-shadow to check all scopes (fixes #2294) (Jose Roberto Vidal) -* Fix: --init indent setting (fixes #2493) (Nicholas C. Zakas) -* Docs: Mention bundling multiple shareable configs (Nicholas C. Zakas) -* Fix: Not to override the required extended config object directly (fixes #2487) (Gyandeep Singh) -* Build: Update markdownlint dependency (David Anson) -* Docs: added recursive function example to no-unused-vars (Jose Roberto Vidal) -* Docs: Fix typo (then -> than) (Vladimir Agafonkin) -* Revert "Fix: sanitise Jekyll interpolation during site generation (fixes #2297)" (Nicholas C. Zakas) -* Fix: dot-location should use correct dot token (fixes #2504) (Mathias Schreck) -* Fix: Stop linebreak-style from crashing (fixes #2490) (James Whitney) -* Fix: rule no-duplicate-case problem with CallExpressions. (fixes #2499) (Matthias Osswald) -* Fix: Enable full support for eslint-env comments (refs #2134) (Ilya Volodin) -* Build: Speed up site generation (fixes #2475) (Ilya Volodin) -* Docs: Fixing trailing spaces (Fixes #2478) (Ilya Volodin) -* Docs: Update README FAQs (Nicholas C. Zakas) -* Fix: Allow comment before comma for comma-spacing rule (fixes #2408) (Gyandeep Singh) - -v0.21.0 - May 9, 2015 - -* 0.21.0 (Nicholas C. Zakas) -* New: Shareable configs (fixes #2415) (Nicholas C. Zakas) -* Fix: Edge cases for no-wrap-func (fixes #2466) (Nicholas C. Zakas) -* Docs: Update ecmaFeatures description (Nicholas C. Zakas) -* New: Add dot-location rule. (fixes #1884) (Greg Cochard) -* New: Add addPlugin method to CLI-engine (Fixes #1971) (Ilya Volodin) -* Breaking: Do not check unset declaration types (Fixes #2448) (Ilya Volodin) -* Fix: no-redeclare switch scoping (fixes #2337) (Nicholas C. Zakas) -* Fix: Check extra scope in no-use-before-define (fixes #2372) (Nicholas C. Zakas) -* Fix: Ensure baseConfig isn't changed (fixes #2380) (Nicholas C. Zakas) -* Fix: Don't warn for member expression functions (fixes #2402) (Nicholas C. Zakas) -* New: Adds skipBlankLines option to the no-trailing-spaces rule (fixes #2303) (Andrew Vaughan) -* Fix: Adding exception for last line (Refs #2423) (Greg Cochard) -* Fix: crash on 0 max (fixes #2423) (gcochard) -* Fix object-shorthand arrow functions (fixes #2414) (Jamund Ferguson) -* Fix: Improves detection of self-referential functions (fixes #2363) (Jose Roberto Vidal) -* Update: key-spacing groups must be consecutive lines (fixes #1728) (Brandon Mills) -* Docs: grammar fix in no-sync (Tony Lukasavage) -* Docs: Update configuring.md to fix incorrect link. (Ans) -* New: Check --stdin-filename by ignore settings (fixes #2432) (Aliaksei Shytkin) -* Fix: `no-loop-func` rule allows functions at init part (fixes #2427) (Toru Nagashima) -* New: Add init command (fixes #2302) (Ilya Volodin) -* Fix: no-irregular-whitespace should work with irregular line breaks (fixes #2316) (Mathias Schreck) -* Fix: generator-star-spacing with class methods (fixes #2351) (Brandon Mills) -* New: no-unneeded-ternary rule to disallow boolean literals in conditional expressions (fixes #2391) (Gyandeep Singh) -* Docs: Add `restParams` to `ecmaFeatures` options list (refs: #2346) (Bogdan Savluk) -* Fix: space-in-brackets Cannot read property 'range' (fixes #2392) (Gyandeep Singh) -* Docs: Sort the rules (Lukas Böcker) -* Add: Exception option for `no-extend-native` and `no-native-reassign` (fixes #2355) (Gyandeep Singh) -* Fix: space-in-brackets import declaration (fixes #2378) (Gyandeep Singh) -* Update: Add uninitialized and initialized options (fixes #2206) (Ian VanSchooten) -* Fix: brace-style to not warn about curly mix ifStatements (fixes #1739) (Gyandeep Singh) -* Fix: npm run profile script should use espree (fixes #2150) (Mathias Schreck) -* New: Add support for extending configurations (fixes #1637) (Espen Hovlandsdal) -* Fix: Include string literal keys in object-shorthand (Fixes #2374) (Jamund Ferguson) -* Docs: Specify language for all code fences, enable corresponding markdownlint rule. (David Anson) -* New: linebreak-style rule (fixes #1255) (Erik Müller) -* Update: Add "none" option to operator-linebreak rule (fixes #2295) (Casey Visco) -* Fix: sanitise Jekyll interpolation during site generation (fixes #2297) (Michael Ficarra) - -v0.20.0 - April 24, 2015 - -* 0.20.0 (Nicholas C. Zakas) -* Fix: support arrow functions in no-extra-parens (fixes #2367) (Michael Ficarra) -* Fix: Column position in space-infix-ops rule (fixes #2354) (Gyandeep Singh) -* Fix: allow plugins to be namespaced (fixes #2360) (Seth Pollack) -* Update: one-var: enable let & const (fixes #2301) (Joey Baker) -* Docs: Add meteor to avaiable environments list (bartmichu) -* Update: Use `Object.assign()` polyfill for all object merging (fixes #2348) (Sindre Sorhus) -* Docs: Update markdownlint dependency, resolve/suppress new issues. (David Anson) -* Fix: newline-after-var declare and export (fixes #2325) (Gyandeep Singh) -* Docs: Some typos and grammar. (AlexKVal) -* Fix: newline-after-var to ignore declare in for specifiers (fixes #2317) (Gyandeep Singh) -* New: add --stdin-filename option (fixes #1950) (Mordy Tikotzky) -* Fix: Load .eslintrc in $HOME only if no other .eslintrc is found (fixes #2279) (Jasper Woudenberg) -* Fix: Add `v8` module to no-mixed-requires rule (fixes #2320) (Gyandeep Singh) -* Fix: key-spacing with single properties (fixes #2311) (Brandon Mills) -* Docs: `no-invalid-regexp`: add `ecmaFeatures` flags for `u`/`y` (Jordan Harband) -* New: object-shorthand rule (refs: #1617) (Jamund Ferguson) -* Update: backticks support for quotes rule (fixes #2153) (borislavjivkov) -* Fix: space-in-brackets to work with modules (fixes #2216) (Nicholas C. Zakas) - -v0.19.0 - April 11, 2015 - -* 0.19.0 (Nicholas C. Zakas) -* Upgrade: Espree to 2.0.1 (Nicholas C. Zakas) -* Docs: Update one-var documentation (fixes #2210) (Nicholas C. Zakas) -* Update: Add test for no-undef (fixes #2214) (Nicholas C. Zakas) -* Fix: Report better location for padded-blocks error (fixes #2224) (Nicholas C. Zakas) -* Fix: Don't check concise methods in quote-props (fixes #2251) (Nicholas C. Zakas) -* Fix: Consider tabs for space-in-parens rule (fixes #2191) (Josh Quintana) -* Fix: block-scoped-var to work with classes (fixes #2280) (Nicholas C. Zakas) -* Docs: Remove trailing spaces, enable corresponding markdownlint rule. (David Anson) -* Fix: padded-blocks with ASI (fixes #2273) (Brandon Mills) -* Fix: Handle comment lines in newline-after-var (fixed #2237) (Casey Visco) -* Docs: Standardize on '*' for unordered lists, enable corresponding markdownlint rule. (David Anson) -* Fix: no-undef and no-underscore-dangle to use double quotes (fixes #2258) (Gyandeep Singh) -* Docs: Improve grammar and style in comma-dangle.md (Nate Eagleson) -* Docs: Improve grammar and style in padded-blocks.md (Nate Eagleson) -* Docs: Update URL in no-wrap-func.md to resolve 404 (Nate Eagleson) -* Docs: Fix typo in command-line-interface.md (Nate Eagleson) -* Docs: Fix typo in working-with-rules.md (Nate Eagleson) -* Docs: Remove hard tabs from *.md, enable corresponding markdownlint rule. (David Anson) -* Fix: Function id missing in parent scope when using ecmaFeature `modules` for rule block-scoped-var (fixes #2242) (Michael Ferris) -* Fix: Ignore single lines for vertical alignment (fixes #2018) (Ian VanSchooten) -* Fix: Allow inline comments in newline-after-var rule (fixes #2229) (Casey Visco) -* Upgrade: Espree 2.0.0 and escope 3.0.0 (fixes #2234, fixes #2201, fixes (Nicholas C. Zakas) -* Docs: Update --no-ignore warning (Brandon Mills) -* Build: Remove jshint files (fixes #2222) (Jeff Tan) -* Docs: no-empty fix comment change (refs #2188) (Gyandeep Singh) -* Fix: duplicate semi and no-extra-semi errors (fixes #2207) (Brandon Mills) -* Docs: Update processors description (Nicholas C. Zakas) -* Fix: semi error on export declaration (fixes #2194) (Brandon Mills) -* New: operator-linebreak rule (fixes #1405) (Benoît Zugmeyer) -* Docs: Fixing broken links in documentation (Ilya Volodin) -* Upgrade: Espree to 0.12.3 (fixes #2195) (Gyandeep Singh) -* Fix: camelcase rule with {properties: never} shouldn't check assignment (fixes #2189) (Gyandeep Singh) -* New: Allow modifying base config (fixes #2143) (Meo) -* New: no-continue rule (fixes #1945) (borislavjivkov) -* Fix: `no-empty` rule should allow any comments (fixes #2188) (Gyandeep Singh) -* Docs: Fix spell in camelcase doc (fixes #2190) (Gyandeep Singh) -* Fix: Require semicolon after import/export statements (fixes #2174) (Gyandeep Singh) -* Build: Add linting of Markdown files to "npm test" script (fixes #2182) (David Anson) -* Build: Fixing site generation (Ilya Volodin) -* Build: Fix gensite task to work even if files are missing (Nicholas C. Zakas) - -v0.18.0 - March 28, 2015 - -* 0.18.0 (Nicholas C. Zakas) -* Fix: Mark variables as used in module scope (fixes #2137) (Nicholas C. Zakas) -* Fix: arrow functions need wrapping (fixes #2113) (Nicholas C. Zakas) -* Fix: Don't crash on empty array pattern item (fixes #2111) (Nicholas C. Zakas) -* Fix: Don't error on destructured params (fixes #2051) (Nicholas C. Zakas) -* Docs: Fixing broken links (Ilya Volodin) -* Fix: no-constant-condition should not flag += (fixes #2155) (Nicholas C. Zakas) -* Fix: Ensure piped in code will trigger correct errors (fixes #2154) (Nicholas C. Zakas) -* Fix: block-scoped-var to handle imports (fixes #2087) (Nicholas C. Zakas) -* Fix: no-dupe-args to work with destructuring (fixes #2148) (Nicholas C. Zakas) -* Fix: key-spacing crash on computed properties (fixes #2120) (Brandon Mills) -* Fix: indent crash on caseless switch (fixes #2144) (Brandon Mills) -* Fix: Don't warn about destructured catch params (fixes #2125) (Nicholas C. Zakas) -* Update: Omit setter param from no-unused-vars (fixes #2133) (Nicholas C. Zakas) -* Docs: Cleaning dead links (Ilya Volodin) -* Docs: Moving documentation out of the repository and modifying build scripts (Ilya Volodin) -* Docs: Update link to Documentation (Kate Lizogubova) -* Docs: Adding back deprecated space-unary-word-ops documentation (Ilya Volodin) -* Fix: Unused recursive functions should be flagged (issue2095) (Nicholas C. Zakas) -* Breaking: Remove JSX support from no-undef (fixes #2093) (Nicholas C. Zakas) -* Fix: markVariableAsUsed() should work in Node.js env (fixes #2089) (Nicholas C. Zakas) -* New: Add "always" and "never" options to "one-var" rule. (fixes #1619) (Danny Fritz) -* New: newline-after-var rule (fixes #2057) (Gopal Venkatesan) -* Fix: func-names with ES6 classes (fixes #2103) (Marsup) -* Fix: Add "Error" to the "new-cap" rule exceptions (fixes #2098) (Mickaël Tricot) -* Fix: vars-on-top conflict with ES6 import (fixes #2099) (Gyandeep Singh) -* Docs: Fixed JSON syntax (Sajin) -* New: space-before-function-paren rule (fixes #2028) (Brandon Mills) -* Breaking: rule no-empty also checking for empty catch blocks. (fixes #1841) (Dieter Oberkofler) -* Update: rule camelcase to allow snake_case in object literals. (fixes #1919) (Dieter Oberkofler) -* New: Added option int32Hint for space-infix-ops (fixes #1295) (Kirill Efimov) -* New: no-param-reassign rule (fixes #1599) (Nat Burns) - -v0.17.1 - March 17, 2015 - -* 0.17.1 (Nicholas C. Zakas) -* Fix: no-func-assign should not fail on import declarations (fixes #2060) (Igor Zalutsky) -* Fix: block-scoped-var to work with destructuring (fixes #2059) (Nicholas C. Zakas) -* Fix: no-redeclare should check Node.js scope (fixes #2064) (Nicholas C. Zakas) -* Fix: space-before-function-parentheses generator methods (fixes #2082) (Brandon Mills) -* Fix: Method name resolution in complexity rule (fixes #2049) (Nicholas C. Zakas) -* Fix: no-unused-vars crash from escope workaround (fixes #2042) (Brandon Mills) -* Fix: restrict dot-notation keywords to actual ES3 keywords (fixes #2075) (Michael Ficarra) -* Fix: block-scoped-var to work with classes (fixes #2048) (Nicholas C. Zakas) -* Docs: Update no-new documentation (fixes #2044) (Nicholas C. Zakas) -* Fix: yoda range exceptions with this (fixes #2063) (Brandon Mills) -* Docs: Fix documentation on configuring eslint with comments (Miguel Ping) -* Fix: rule no-duplicate-case problem with MemberExpressions. (fixes #2038) (Dieter Oberkofler) -* Fix: Exempt \0 from no-octal-escape (fixes #1923) (Michael Ficarra) - -v0.17.0 - March 14, 2015 - -* 0.17.0 (Nicholas C. Zakas) -* Fix: module import specifiers should be defined (refs #1978) (Nicholas C. Zakas) -* Fix: Ignore super in no-undef (refs #1968) (Nicholas C. Zakas) -* Upgrade: Espree to v0.12.0 (refs #1968) (Nicholas C. Zakas) -* Fix: destructured arguments should work in block-scoped-var (fixes #1996) (Nicholas C. Zakas) -* Fix: Line breaking with just carriage return (fixes #2005) (Nicholas C. Zakas) -* Fix: location of new-cap error messages (fixes #2025) (Mathias Schreck) -* Breaking: Stop checking JSX variable use, expose API instead (fixes #1911) (Glen Mailer) -* Fix: Check spacing of class methods (fixes #1989) (Nicholas C. Zakas) -* New: no-duplicate-case rule to disallow a duplicate case label (fixes #2015) (Dieter Oberkofler) -* Clarify issue requirement for doc pull requests (Ian) -* Add quotes around object key (Ian) -* Fix: Add comma-dangle allow-multiline (fixes #1984) (Keith Cirkel) -* Fix: Don't explode on default export function (fixes #1985) (Nicholas C. Zakas) -* Update: Add AST node exceptions to comma-style. (fixes #1932) (Evan Simmons) -* Docs: Add spread operator to available language options (Nicholas C. Zakas) -* New: generator-star-spacing rule (fixes #1680, fixes #1949) (Brandon Mills) - -v0.16.2 - March 10, 2015 - -* 0.16.2 (Nicholas C. Zakas) -* Fix: Ensure globalReturn isn't on when node:false (fixes #1995) (Nicholas C. Zakas) -* Downgrade: escope pegged to 2.0.6 (refs #2001) (Nicholas C. Zakas) -* Upgrade: escope to 2.0.7 (fixes #1978) (Nicholas C. Zakas) -* Docs: Update descriptive text for --no-ignore option. (David Anson) -* Upgrade: estraverse to latest for ESTree support (fixes #1986) (Nicholas C. Zakas) -* Fix: Global block-scope-var check should work (fixes #1980) (Nicholas C. Zakas) -* Fix: Don't warn about parens around yield (fixes #1981) (Nicholas C. Zakas) - -v0.16.1 - March 8, 2015 - -* 0.16.1 (Nicholas C. Zakas) -* Fix: Node.js scoping in block-scoped-var (fixes #1969) (Nicholas C. Zakas) -* Update: Enable ES6 scoping for more options (Nicholas C. Zakas) -* Fix: Ensure all export nodes are traversable (fixes #1965) (Nicholas C. Zakas) -* Fix: Ensure class names are marked as used (fixes #1967) (Nicholas C. Zakas) -* Fix: remove typo that caused a crash (fixes #1963) (Fabricio C Zuardi) -* Docs: Added missing "are" (Sean Wilkinson) - -v0.16.0 - March 7, 2015 - -* 0.16.0 (Nicholas C. Zakas) -* Fix: Pass correct sourceType to escope (fixes #1959) (Nicholas C. Zakas) -* Fix: Scoping for Node.js (fixes #892) (Nicholas C. Zakas) -* Fix: strict rule should honor module code (fixes #1956) (Nicholas C. Zakas) -* New: Add es6 environment (fixes #1864, fixes #1944) (Nicholas C. Zakas) -* Docs: Update ecmaFeatures list (fixes #1942) (Nicholas C. Zakas) -* Fix: Make no-unused-vars ignore exports (fixes #1903) (Nicholas C. Zakas) -* Upgrade: Espree to v1.11.0 (Nicholas C. Zakas) -* Fix: Comment configuration of rule doesn't work (fixes #1792) (Jary) -* Fix: Rest args should work in no-undef and block-scoped-var (fixes #1543) (Nicholas C. Zakas) -* Breaking: change no-comma-dangle to comma-dangle (fixes #1350) (Mathias Schreck) -* Update: space-before-function-parentheses to support generators (fixes #1929) (Brandon Mills) -* New: Adding support for "// eslint-disable-line rule" style comments (Billy Matthews) -* Fix: Use unversioned sinon file in browser test (fixes #1947) (Nicholas C. Zakas) -* Docs: Add mention of compatible parsers (Nicholas C. Zakas) -* Fix: Better error when given null as rule config (fixes #1760) (Glen Mailer) -* Update: no-empty to check TryStatement.handler (fixes #1930) (Brandon Mills) -* Fix: space-before-function-parentheses and object methods (fixes #1920) (Brandon Mills) -* New: no-dupe-args rule (fixes #1880) (Jamund Ferguson) -* Fix: comma-spacing should ignore JSX text (fixes #1916) (Brandon Mills) -* Breaking: made eol-last less strict (fixes #1460) (Glen Mailer) -* New: generator-star middle option (fixes #1808) (Jamund Ferguson) -* Upgrade: Espree to 1.10.0 for classes support (Nicholas C. Zakas) -* Docs: no-plusplus.md - auto semicolon insertion (Miroslav Obradović) -* Docs: Use union types in TokenStore JSDoc (refs #1878) (Brandon Mills) -* Fix: block-scoped-var to work with destructuring (fixes #1863) (Nicholas C. Zakas) -* Docs: Update docs for token-related methods (fixes #1878) (Nicholas C. Zakas) -* Update: Remove preferGlobal from package.json (fixes #1877) (Nicholas C. Zakas) -* Fix: allow block bindings in no-inner-declarations (fixes #1893) (Roberto Vidal) -* Fix: getScope and no-use-before-define for arrow functions (fixes #1895) (Brandon Mills) -* Fix: Make no-inner-declarations look for arrow functions (fixes #1892) (Brandon Mills) -* Breaking: Change no-space-before-semi to semi-spacing and add "after" option (fixes #1671) (Mathias Schreck) -* Update: Add support for custom preprocessors (fixes #1817) (Ilya Volodin) - -v0.15.1 - February 26, 2015 - -* 0.15.1 (Nicholas C. Zakas) -* Build: Fix release task (Nicholas C. Zakas) -* Fix: check all semicolons in no-space-before-semi (fixes #1885) (Mathias Schreck) -* Fix: Refactor comma-spacing (fixes #1587, fixes #1845) (Roberto Vidal) -* Fix: Allow globalReturn in consistent-return (fixes #1868) (Brandon Mills) -* Fix: semi rule should check throw statements (fixes #1873) (Mathias Schreck) -* Docs: Added HolidayCheck AG as user (0xPIT) -* Upgrade: `chalk` to 1.0.0 (Sindre Sorhus) -* Docs: Add CustomInk to the list of companies (Derek Lindahl) -* Docs: Alphabetize project & company usage list (Derek Lindahl) -* Docs: fix typo (Henry Zhu) -* Docs: Fix typo (Brenard Cubacub) - -v0.15.0 - February 21, 2015 - -* 0.15.0 (Nicholas C. Zakas) -* Upgrade: Espree to 1.9.1 (fixes #1816, fixes #1805) (Nicholas C. Zakas) -* Fix: make rules work with for-of statements (fixes #1859) (Mathias Schreck) -* Fix: Enable globalReturn for Node.js environment (fixes #1158) (Nicholas C. Zakas) -* Fix: Location of extra paren message (fixes #1814) (Nicholas C. Zakas) -* Fix: Remove unnecessary file exists check (fixes #1831) (Nicholas C. Zakas) -* Fix: Don't count else-if in max-depth (fixes #1835) (Nicholas C. Zakas) -* Fix: Don't flag for-of statement (fixes #1852) (Nicholas C. Zakas) -* Build: Test using io.js as well (Nicholas C. Zakas) -* Change customformat value to path (suisho) -* Docs: Add a missing word in the Contributing doc (Ben Linskey) -* Docs: Fix typo in wrap-iife rule doc title (Ben Linskey) -* Docs: Update pages to fix rendering of lists (David Anson) -* Fix: new-cap should allow defining exceptions (fixes #1424) (Brian Di Palma) -* Update: Add requireReturnDescription for valid-jsdoc (fixes #1833) (Brian Di Palma) -* New: rule no-throw-literal added (fixes #1791) (Dieter Oberkofler) -* New: multi-line option for the curly rule (fixes #1812) (Hugo Wood) -* Docs: fix typo in configuring docs (mendenhallmagic) -* Update: Backslashes in path (fixes #1818) (Jan Schär) -* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson) -* Docs: add webpack loader to the docs/integrations page (Maxime Thirouin) -* Breaking: space-before-function-parentheses replaces space-after-function-name and checkFunctionKeyword (fixes #1618) (Mathias Schreck) - -v0.14.1 - February 8, 2015 - -* 0.14.1 (Nicholas C. Zakas) -* Fix: Exit code should be 1 for any number of errors (fixes #1795) (Nicholas C. Zakas) -* Fix: Check indentation of first line (fixes #1796) (Nicholas C. Zakas) -* Fix: strict rules shouldn't throw on arrow functions (fixes #1789) (Nicholas C. Zakas) - -v0.14.0 - February 7, 2015 - -* 0.14.0 (Nicholas C. Zakas) -* Update: Fix indentation of comment (Nicholas C. Zakas) -* Fix: comma-spacing for template literals (fixes #1736) (Nicholas C. Zakas) -* Build: Add Node.js 0.12 testing (Nicholas C. Zakas) -* Breaking: Remove node from results (fixes #957) (Nicholas C. Zakas) -* Breaking: Exit code is now error count (Nicholas C. Zakas) -* Docs: Correct getFormatter() documentation (refs #1723) (Nicholas C. Zakas) -* Update: Make rules work with arrow functions (fixes #1508, fixes #1509, fixes #1493) (Nicholas C. Zakas) -* Fix: Ensure template string references count (fixes #1542) (Nicholas C. Zakas) -* Fix: no-undef to work with arrow functions (fixes #1604) (Nicholas C. Zakas) -* Upgrade: Espree to version 1.8.0 (Nicholas C. Zakas) -* Fix: Don't throw error for arguments (fixes #1759) (Nicholas C. Zakas) -* Fix: Don't warn on computed nonliteral properties (fixes #1762) (Nicholas C. Zakas) -* New: Allow parser to be configured (fixes #1624) (Nicholas C. Zakas) -* Docs: Added double quotes for JSON keys for comma-spacing and key-spacing rule (Dmitry Polovka) -* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov) -* Revert "New: Rule indent (fixes #1022)" (Nicholas C. Zakas) -* Update: fix eslint indentations (fixes #1770) (Dmitriy Shekhovtsov) -* Fix: Scoping issues for no-unused-vars (fixes #1741) (Nicholas C. Zakas) -* Docs: Added `eslint-enable` inline (Ivan Fraixedes) -* New: Add predefined Meteor globals (fixes #1763) (Johan Brook) -* New: Rule indent (fixes #1022) (Dmitriy Shekhovtsov) -* Update: Check all assignments for consistent-this (fixes #1513) (Timothy Jones) -* Fix: Support exceptions in no-multi-spaces (fixes #1755) (Brandon Mills) -* Docs: Forgotten parentheses in code snippet (Ivan Fraixedes) -* Update: CLIEngine results include warning and error count (fixes #1732) (gyandeeps) -* Fix: Scoping issues for no-unused-vars (fixes #1733) (Nicholas C. Zakas) -* Update: Add getNodeByRangeIndex method (refs #1755) (Brandon Mills) -* Update: Replace getTokenByRange(Index->Start) (refs #1721) (Brandon Mills) -* Update: Fast-path for empty input (fixes #546) (Nicholas C. Zakas) -* Fix: Allow single line else-if (fixes #1739) (Nicholas C. Zakas) -* Fix: Don't crash when $HOME isn't set (fixes #1465) (Nicholas C. Zakas) -* Fix: Make no-multi-spaces work for every case (fixes #1603, fixes #1659) (Nicholas C. Zakas) -* Breaking: Show error and warning counts in stylish summary (fixes #1746) (Brandon Mills) -* Docs: fixed typo in no-lone-blocks docs (Vitor Balocco) -* Docs: fixed typo in consistent-return docs (Vitor Balocco) -* Breaking: remove implied eval check from no-eval (fixes #1202) (Mathias Schreck) -* Update: Improve CLIEngine.getFormatter() (refs #1723) (Nicholas C. Zakas) -* Docs: Add Backbone plugin link (Ilya Volodin) -* Docs: use npm's keyword route (Tom Vincent) -* Build: Update sitegen script (Closes #1725) (Ilya Volodin) - -v0.13.0 - January 24, 2015 - -* 0.13.0 (Nicholas C. Zakas) -* Update: The rule spaced-line-comment now also allows tabs and not only spaces as whitespace. (fixes #1713) (Dieter Oberkofler) -* Docs: add Jasmine rules and eslintplugin npm links (Tom Vincent) -* Fix: Make no-redeclare work with let (fixes #917) (Nicholas C. Zakas) -* Update: Add CLIEngine.getFormatter() (fixes #1653) (Nicholas C. Zakas) -* Breaking: Update escope (fixes #1642) (Nicholas C. Zakas) -* Update: Switch to using estraverse-fb (fixes #1712) (Nicholas C. Zakas) -* Docs: Update README FAQ (Nicholas C. Zakas) -* Update: no-warning-comments matches on whole word only (fixes #1709) (Nick Fisher) -* Build: Add JSDoc generation (fixes #1363) (Nicholas C. Zakas) -* Docs: Add more info about context (fixes #1330) (Nicholas C. Zakas) -* Upgrade: Espree to 1.7.1 (fixes #1706) (Nicholas C. Zakas) -* Docs: Make CLA notice more prominent (Nicholas C. Zakas) -* Update: Added globals for: phantom,jquery, prototypejs, shelljs (fixes #1704) (Dmitriy Shekhovtsov) -* Docs: Fixed example for the space-return-throw-case rule (mpal9000) -* Fix: Except object literal methods from func-names (fixes #1699) (Brandon Mills) -* Update: use global strict mode everywhere (fixes #1691) (Brandon Mills) -* Update: Add allowPattern option for dot-notation rule (fixes #1679) (Tim Schaub) -* Fix: Missing undeclared variables in JSX (fixes #1676) (Yannick Croissant) -* Fix: no-unused-expressions rule incorrectly flagging yield (fixes #1672) (Rémi Gérard-Marchant) -* Update: Combine strict mode rules (fixes #1246) (Brandon Mills) -* Fix: disregards leading './' in ignore pattern or file name (fixes #1685) (Chris Montrois) -* Upgrade: globals module to latest (fixes #1670) (Nicholas C. Zakas) -* Fix: generator-star should allow params (fixes #1677) (Brandon Mills) -* Fix: no-unused-vars for JSX (fixes #1673 and fixes #1534) (Yannick Croissant) -* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY) - -v0.12.0 - January 17, 2015 - -* 0.12.0 (Nicholas C. Zakas) -* Fix: Track JSX global variable correctly (fixes #1534) (Nicholas C. Zakas) -* Fix: Property regex flag checking (fixes #1537) (Nicholas C. Zakas) -* Docs: Add angularjs-eslint link into the integration doc (Emmanuel DEMEY) -* Update: Expose ecmaFeatures on context (fixes #1648) (Nicholas C. Zakas) -* Docs: Added Fitbit to the list of companies (Igor Zalutsky) -* New: gen-star rule (refs #1617) (Jamund Ferguson) -* New: no-var rule (refs #1617) (Jamund Ferguson) -* Fix: Support JSX spread operator (fixes #1634) (Nicholas C. Zakas) -* Docs: Document ecmaFeatures (Nicholas C. Zakas) -* Upgrade: several dependencies (fixes #1377) (Nicholas C. Zakas) -* Fix: Broken JSX test (Nicholas C. Zakas) -* Fix: no-bitwise reports on bitwise assignment expressions (fixes #1643) (Mathias Schreck) -* Fix: Find JSXIdentifier refs in no-unused-vars (fixes #1534) (Nicholas C. Zakas) -* Update: Add a couple JSX tests (Nicholas C. Zakas) -* Fix: quotes rule ignores JSX literals (fixes #1477) (Nicholas C. Zakas) -* Fix: Don't warn on JSX literals with newlines (fixes #1533) (Nicholas C. Zakas) -* Update: Fully enable JSX support (fixes #1640) (Nicholas C. Zakas) -* Breaking: Allow parser feature flips (fixes #1602) (Nicholas C. Zakas) -* Fix: Allow comments in key-spacing groups (fixes #1632) (Brandon Mills) -* Fix: block-scoped-var reports labels (fixes #1630) (Michael Ficarra) -* Docs: add newline to no-process-env (fixes #1627) (Tom Vincent) -* Fix: Update optionator, --no in help (fixes #1134) (George Zahariev) -* Fix: Allow individual newlines in space-in-brackets (fixes #1614) (Brandon Mills) -* Docs: Correct alignment in example project tree (Tim Schaub) -* Docs: Remove references to Esprima (Nicholas C. Zakas) -* Docs: Remove illegal code fence (Nicholas C. Zakas) - -v0.11.0 - December 30, 2014 - -* 0.11.0 (Nicholas C. Zakas) -* Fix: Adding regexp literal exception (fixes #1589) (Greg Cochard) -* Fix: padded-blocks incorrectly complained on comments (fixes #1416) (Mathias Schreck) -* Fix: column location of key-spacing with additional tokens (fixes #1458) (Mathias Schreck) -* Build: tag correct commit (refs #1606) (Mathias Schreck) -* Upgrade: Updat Espree to 1.3.1 (Nicholas C. Zakas) -* Fix: add es3 config option to dot-notation rule (fixes #1484) (Michael Ficarra) -* Fix: valid-jsdoc should recognize @class (fixes #1585) (Nicholas C. Zakas) -* Update: Switch to use Espree (fixes #1595) (Nicholas C. Zakas) -* Fix: brace-style stroustrup should report on cuddled elseif (fixes #1583) (Ian Christian Myers) -* New: Configuration via package.json (fixes #698) (Michael Mclaughlin) -* Update: Set environments w/ globals (fixes #1577) (Elan Shanker) -* Fix: yoda treats negative numbers as literals (fixes #1571) (Brandon Mills) -* Fix: function arguments now count towards no-shadow check (fixes #1584) (Glen Mailer) -* Fix: check if next statement is on newline when warning against extra semicolons. (fixes #1580) (Evan You) -* Update: add yoda exception for range tests (fixes #1561) (Brandon Mills) -* New: space-after-function-name (fixes #1340) (Roberto Vidal) - -v0.10.2 - December 12, 2014 - -* 0.10.2 (Nicholas C. Zakas) -* Fix: detect for...in in no-loop-func (fixes #1573) (Greg Cochard) -* Update: simplify comma-spacing logic (fixes #1562) (Brandon Mills) -* Fix: operator-assignment addition is non-commutative (fixes#1556) (Brandon Mills) -* 0.10.1 (Nicholas C. Zakas) -* Update: Add new-cap exception configurations. (Fixes #1487) - `newCapsAllowed` - `nonNewCapsAllowed` (Jordan Harband) - -v0.10.1 - December 6, 2014 - -* 0.10.1 (Nicholas C. Zakas) -* Docs: Fix v0.10.0 changelog (Nicholas C. Zakas) -* Build: Ensure changelog works with large semver versions (Nicholas C. Zakas) -* Fix: comma-spacing and comma-style to work with array literals (fixes #1492) (Nicholas C. Zakas) -* Update: better operator regex in use-isnan rule (fixes #1551) (Michael Ficarra) -* Fix: wrong op index in no-multi-spaces (fixes #1547) (Brandon Mills) -* Fix: Restrict use-isnan violations to comparison operators. (Fixes #1535) (Jordan Harband) -* Fix: comma-spacing has false positives when parenthesis are used (fixes #1457) (Jamund Ferguson) -* Docs: alphabetize the "Stylistic Issues" section (Jeff Williams) -* Build: make the "gensite" target work when DOCS_DIR does not exist (fixes #1530) (Jeff Williams) -* Docs: badges should only refer to master branch (Mathias Schreck) -* Fix: prevent crash on empty blocks in no-else-return (fixes #1527) (Mathias Schreck) -* Build: Fix md to html conversion regex (fixes #1525) (Brandon Mills) -* 0.10.0 (Nicholas C. Zakas) - -v0.10.0 - November 27, 2014 - -* 0.10.0 (Nicholas C. Zakas) -* Fix: Add Object and Function as exceptions in new-cap (refs #1487) (Nicholas C. Zakas) -* Breaking: Allow extensionless files to be passed on CLI (fixes #1131) (Nicholas C. Zakas) -* Fix: typo: iffe to iife, none to non (Michael Ficarra) -* Update: refactor tokens API (refs #1212) (Brandon Mills) -* New: Allow other file extensions (fixes #801) (Nicholas C. Zakas) -* Update: Add Event to browser globals (fixes #1474) (Nicholas C. Zakas) -* Fix: check function call arguments in comma-spacing (fixes #1515) (Mathias Schreck) -* Update: Add no-cond-assign option to disallow nested assignments in conditionals (fixes #1444) (Jeff Williams) -* Fix: crash in no-multi-spaces on empty array elements (fixes #1418) (Brandon Mills) -* Fix: Don't explode on directory traversal (fixes #1452) (Nicholas C. Zakas) -* Fix: no-fallthrough should work when semis are missing (fixes #1447) (Nicholas C. Zakas) -* Fix: JSDoc parsing by updating doctrine (fixes #1442) (Nicholas C. Zakas) -* Update: restore the "runs" global present in Jasmine 1.3 (fixes #1498) (Michał Gołębiowski) -* Fix: ignore undefined identifiers in typeof (fixes #1482) (Mathias Schreck) -* Fix: Ignoring empty comments. (fixes #1488) (Greg Cochard) -* New: Add space-unary-ops rules (#1346) (Marcin Kumorek) -* Update: Remove shebang workaround in spaced-line-comment (fixes #1433) (Michael Ficarra) -* Docs: change 'and' to 'an' in docs/rules/valid-jsdoc.md (fixes #1441) (Michael Ficarra) -* Update: Add `beforeAll` and `afterAll` to the Jasmine globals (fixes #1478) (Gyandeep Singh) -* Update: Add exception options to space-in-parens (fixes #1368) (David Clark) -* Build: Add check for license issues (fixes #782) (Brandon Mills) -* Docs: update badges (Yoshua Wuyts) -* Docs: Update pages to fix rendering of lists and fenced code blocks (David Anson) -* Fix: env rules merging for command line config (fixes #1271) (Roberto Vidal) -* Fix: Collect variables declare in switch-case.(fixes #1453) (chris) -* Fix: remove extra capture group (Nate-Wilkins) -* Update: allow distinct alignment groups in key-spacing (fixes #1439) (Brandon Mills) -* Fix: message for numeric property names in quote-props (fixes #1459) (Brandon Mills) -* Docs: Remove assumption about the rule config (Alexander Schmidt) -* New: Add ability to time individual rules (fixes #1437) (Brandon Mills) -* Fix: single quotes (Nate-Wilkins) -* Docs: Fix broken code fences in key-spacing docs (Brandon Mills) -* Docs: Explain .eslintignore features (fixes #1094) (Brandon Mills) -* Breaking: ignore node_modules by default (fixes #1163) (Brandon Mills) -* Fix: Adds clamping to getSource beforeCount (fixes #1427) (Greg Gianforcaro) -* New: add no-inline-comment rule (fixes #1366) (Greg Cochard) -* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins) -* Build: Filter and sort versions in gensite (fixes #1430) (Brandon Mills) -* Build: Escape period in regex (fixes #1428) (Brandon Mills) -* Revert "Fix: '.md' to '.html' with anchors (fixes #1415)" (Nicholas C. Zakas) -* 0.9.2 (Nicholas C. Zakas) -* New: Add operator-assignment rule (fixes #1420) (Brandon Mills) - -v0.9.2 - November 1, 2014 - -* 0.9.2 (Nicholas C. Zakas) -* Fix: '.md' to '.html' with anchors (fixes #1415) (Nate-Wilkins) -* Fix: Allow line breaks in key-spacing rule (fixes #1407) (Brandon Mills) -* Build: add coveralls integration (fixes #1411) (Mathias Schreck) -* Fix: add severity flag for ignored file warning (fixes #1401) (Mathias Schreck) -* Fix: Keep sinon at ~1.10.3 (fixes #1406) (Brandon Mills) -* Fix: ! negates .eslintignore patterns (fixes #1093) (Brandon Mills) -* Fix: let fs.stat throw if a file does not exist (fixes #1296) (Mathias Schreck) -* Fix: check switch statements in space-before-blocks (fixes #1397) (Mathias Schreck) -* Docs: fix rule name in example configuration (Mathias Schreck) -* Fix: disable colors during test run (fixes #1395) (Mathias Schreck) -* New: add isPathIgnored method to CLIEngine (fixes #1392) (Mathias Schreck) -* Docs: changing eslint to ESLint and add missing backtick (Mathias Schreck) -* Docs: Documents the functionality to load a custom formatter from a file (Adam Baldwin) -* 0.9.1 (Nicholas C. Zakas) -* Update: Option type for mixed tabs and spaces (fixes #1374) (Max Nordlund) -* Fix: Nested occurrences of no-else-return now show multiple reports (fixes #1369) (Jordan Hawker) - -v0.9.1 - October 25, 2014 - -* 0.9.1 (Nicholas C. Zakas) -* Docs: fix link on governance model (azu) -* Fix: plugins without rulesConfig causes crash (fixes #1388) (Mathias Schreck) -* 0.9.0 (Nicholas C. Zakas) - -v0.9.0 - October 24, 2014 - -* 0.9.0 (Nicholas C. Zakas) -* New: Allow reading from STDIN (fixes #368) (Nicholas C. Zakas) -* New: add --quiet option (fixes #905) (Mathias Schreck) -* Update: Add support for plugin default configuration (fixes #1358) (Ilya Volodin) -* Fix: Make sure shebang comment node is removed (fixes #1352) (Nicholas C. Zakas) -* New: Adding in rule for irregular whitespace checking. (fixes #1024) (Jonathan Kingston) -* Fix: space-in-parens should not throw for multiline statements (fixes #1351) (Jary) -* Docs: Explain global vs. local plugins (fixes #1238) (Nicholas C. Zakas) -* Docs: Add docs on Node.js API (fixes #1247) (Nicholas C. Zakas) -* Docs: Add recommended keywords for plugins (fixes #1248) (Nicholas C. Zakas) -* Update: Add CLIEngine#getConfigForFile (fixes #1309) (Nicholas C. Zakas) -* Update: turn on comma-style for project (fixes #1316) (Nicholas C. Zakas) -* Fix: Ensure messages are sorted by line (fixes #1343) (Nicholas C. Zakas) -* Update: Added arraysInObjects and objectsInObjects options to space-in-brackets rule (fixes #1265, fixes #1302) (vegetableman) -* Breaking: Removed comma spacing check from space-infix-ops (fixes #1361) (vegetableman) -* Fix: addressed linting errors (Nicholas C. Zakas) -* Docs: Add Contributor Model (fixes #1341) (Nicholas C. Zakas) -* Docs: Add reference to CLA (Nicholas C. Zakas) -* Build: add version numbers to docs (fixes #1170) (Mathias Schreck) -* Fix: no-fallthrough incorrectly flagged falls through annotations (fixes #1353) (Mathias Schreck) -* Build: separate site publishing form generation (fixes #1356) (Mathias Schreck) -* New: Add key-spacing rule (fixes #1280) (Brandon Mills) -* New: add spaced-line-comment rule (fixes #1345) (Greg Cochard) -* Docs: added more Related Rules sections (fixes #1347) (Delapouite) -* Fix: resolve linting issue in (fixes #1339) (Nicholas C. Zakas) -* New: add space-before-blocks rule (fixes #1277) (Mathias Schreck) -* Docs: Remove moot integration plugins (Sindre Sorhus) -* New: add rule for multiple empty lines (fixes #1254) (Greg Cochard) -* Fix: no-shadow rule should consider function expressions (fixes #1322) (Mathias Schreck) -* Update: remove globals present only in Jasmine plugins (fixes #1326) (Michał Gołębiowski) -* New: added no-multi-spaces rule (fixes #630) (vegetableman) -* New: Added comma-spacing rule (Fixes #628, Fixes #1319) (vegetableman) -* New: add rule for padded blocks (fixes #1278) (Mathias Schreck) -* Docs: fix eqeqeq isNullCheck comment (Denis Sokolov) -* Fix: no-comma-dangle violation in unit test and Makefile.js/lint not checking return codes (fixes #1306) (David Anson) -* Fix: allow comma-last with object properties having line breaks (fixes #1314) (vegetableman) -* New: Added comma-style rule (fixes #1282) (vegetableman) -* Update: add space after function keyword check (fixes #1276) (Mathias Schreck) -* Update: Add missing environments and fix sorting/grouping of rules (fixes #1307, fixes #1308) (David Anson) -* Docs: Fix sorting of rules within each section (David Anson) -* Docs: Correct a few misspelled words (David Anson) -* Docs: Update multiple pages to fix rendering of fenced code blocks (David Anson) -* New: Added no-process-env rule (fixes #657) (vegetableman) -* Fix: add rule ensuring #1258 is fixed by recent rewrite (fixes #1258) (Michael Ficarra) -* Update: split propertyName from singleValue in space-in-brackets (fixes #1253) (Michael Ficarra) -* Update: add "as-needed" option to quote-props rule (fixes #1279) (Michael Ficarra) -* Docs: fixed broken link and changed warning level to error level (vegetableman) -* Docs: Added "the native web" to the list of companies that use ESLint. (Golo Roden) -* Docs: Add BountySource badge to README (Nicholas C. Zakas) -* 0.8.2 (Nicholas C. Zakas) - -v0.8.2 - September 20, 2014 - -* 0.8.2 (Nicholas C. Zakas) -* Docs: Updated contribution guidelines to add accepted/bounty issues descriptions (Nicholas C. Zakas) -* Docs: Update README with links and FAQs (Nicholas C. Zakas) -* Docs: add finally to space-after-keywords documentation (Mathias Schreck) -* New: add ignoreCase option to sort-vars (fixes #1272) (Mathias Schreck) -* Docs: fix typo (Barry Handelman) -* Docs: Fix broken Markdown on configuration page (Nicholas C. Zakas) -* Docs: Fix reference to wrong rule name (Harry Wolff) -* Upgrade: Most dev dependencies (Nicholas C. Zakas) -* Upgrade: shelljs to 0.3.0 (Nicholas C. Zakas) -* Upgrade: doctrine to 0.5.2 (Nicholas C. Zakas) -* Upgrade: esprima to 1.2.2 (Nicholas C. Zakas) -* Upgrade: eslint-tester to latest (Nicholas C. Zakas) -* Fix: Load .eslintrc in directory with $HOME as an ancestor (fixes #1266) (Beau Gunderson) -* Fix: load .eslintrc from HOME (fixes #1262) (Beau Gunderson) -* New: Add sharable rule settings (fixes #1233) (Ilya Volodin) -* Upgrade: upgrade outdated dependencies (fixes #1251) (Mathias Schreck) -* Docs: fix typo in no-ex-assign documentation (Michael Ficarra) -* Docs: add intellij plugin to integrations (ido) -* Docs: Changing NPM to npm (Peter deHaan) -* Fix: strict should check function expressions (fixes #1244) (Brandon Mills) -* Docs: fix vars-on-top documentation (fixes #1234) (Mathias Schreck) -* 0.8.1 (Nicholas C. Zakas) -* Docs: Fixed a typo in brace-style.md (Anton Antonov) - -v0.8.1 - September 9, 2014 - -* 0.8.1 (Nicholas C. Zakas) -* Fix: Ensure exit code is 1 when there's a syntax error (fixes #1239) (Nicholas C. Zakas) -* Docs: fix up vars-on-top documentation (fixes #1234) (Michael Ficarra) -* Fix: vars-on-top directive support (fixes #1235) (Michael Ficarra) -* Fix: Avoid mutating node.range in max-len (fixes #1224) (Brandon Mills) -* Docs: Typo, add missing quotation mark (Ádám Lippai) -* Update: space-in-brackets to allow exceptions (fixes #1142) (Brandyn Bennett) -* 0.8.0 (Nicholas C. Zakas) - -v0.8.0 - September 5, 2014 - -* 0.8.0 (Nicholas C. Zakas) -* Perf-related revert "Fix: Speed up tokens API (refs #1212)" (Nicholas C. Zakas) -* Fix: no-fallthrough: continue affects control flow, too (fixes #1220) (Michael Ficarra) -* Fix: rewrite no-unused-vars rule (refs #1212) (Michael Ficarra) -* Fix: Error when there's a \r in .eslintrc (#1172) (Gyandeep Singh) -* Added rule disallowing reserved words being used as keys (fixes #1144) (Emil Bay) -* Fix: rewrite no-spaced-func rule (refs #1212) (Michael Ficarra) -* Fix: Speed up getScope() (refs #1212) (Brandon Mills) -* Fix: no-extra-strict behavior for named function expressions (fixes #1209) (Mathias Schreck) -* Add Date.UTC to allowed capitalized functions (David Brockman Smoliansky) -* New: Adding 'vars-on-top' rule (fixes #1148) (Gyandeep Singh) -* Fix: Speed up tokens API (refs #1212) (Brandon Mills) -* Docs: document plugin usage (fixes #1117) (Mathias Schreck) -* New: accept plugins from cli (fixes #1113) (Mathias Schreck) -* Docs: fix some typos. (Mathias Schreck) -* New: Load plugins from configs (fixes #1115). (Mathias Schreck) -* Fix: no-unused-expressions better directive detection (fixes #1195) (Michael Ficarra) -* Fix: no-unused-expressions directive support (fixes #1185) (Michael Ficarra) -* Update: Add 'allowSingleLine' option to brace-style (fixes #1089) (John Gozde) -* Docs: Spell checking and one extra closing curly in code example (Juga Paazmaya) -* Fix: mergeConfigs ensures the plugins property exists (fixes #1191). (Mathias Schreck) -* Update: Declare ES6 collections (Map, Set, WeakMap, WeakSet) as built-in globals (fixes #1189) (Michał Gołębiowski) -* New: Adding 'plugin' CLI option (fixes #1112) (Greg) -* Fix: Correct a typo in the error message in tests (Michał Gołębiowski) -* New: Add no-extra-bind rule to flag unnecessary bind calls (fixes #982) (Bence Dányi) -* Fix: Useless bind call in cli-engine (fixes #1181) (Bence Dányi) -* Docs: Updates `amd` description (fixes #1175) (James Whitney) -* New: Adds support for the `jasmine` env (fixes #1176) (James Whitney) -* Fix: for-in support to no-empty-label rule (fixes #1161) (Marc Harter) -* docs: Update link (Mathias Bynens) -* Fix: crash when loading empty eslintrc file (fixes #1164) (Michael Ficarra) -* Fix: no-unused-var should respect compound assignments (fixes #1166) (Michael Ficarra) -* Update: ES3 `ReservedWord`s (fixes #1151) Adds ES3 `ReservedWord`s to the list of keywords in the `dot-notation` rule (fixes #1151) (Emil Bay) -* Update: Update comment parser to read rule slashes (fixes #1116) (Jary) -* New: add no-void rule (fixes #1017). (Mike Sidorov) -* New: Add rules.import() (fixes #1114) (Mathias Schreck) -* New: Make mergeConfigs() merge plugin entries (fixes #1111) (Mathias Schreck) -* Breaking: Change no-global-strict to global-strict and add "always" option (fixes #989) (Brandon Mills) -* Fix: no-unreachable should check top-level statements (fixes #1138) (Brandon Mills) -* Fix: Speed up no-unreachable (fixes #1135) (Brandon Mills) -* New: advanced handle-callback-err configuration (fixes #1124) (Mathias Schreck) -* New: Expose CLIEngine (fixes #1083) (Gyandeep Singh) -* Docs: Add link to new Atom linter (fixes #1125) (Gil Pedersen) -* Fix: space-after-keywords checks finally of TryStatement (fixes #1122) (Michael Ficarra) -* Fix: space-after-keywords checks while of DoWhileStatement (fixes #1120) (Michael Ficarra) -* Fix: space-after-keywords w/ "never" should allow else-if (fixes #1118) (Michael Ficarra) -* Fix: dot-notation rule flags non-keyword reserved words (fixes #1102) (Michael Ficarra) -* Update: Use xml-escape instead of inline helper (Ref #848) (jrajav) -* Update: Added comments support to .eslintignore (fixes #1084) (Vitaly Puzrin) -* Update: enabled 'no-trailing-spaces' rule by default (fixes #1051) (Vitaly Puzrin) -* Breaking: Ignore children of all patterns by adding "/**" (Fixes #1069) (jrajav) -* Fix: skip dot files and ignored dirs on traverse (fixes #1077, related to #814) (Vitaly Puzrin) -* Docs: Added Gruntjs plugin on integrations page (Gyandeep Singh) -* Fix: don't break node offsets if hasbang present (fixes #1078) (Vitaly Puzrin) -* Build: Exclude readme/index from rules Resources generation (Fixes #1072) (jrajav) -* Docs: Change eol-last examples to `
` (Fixes #1068) (jrajav)
-* 0.7.4 (Nicholas C. Zakas)
-* New: space-in-parens rule (Closes #627) (jrajav)
-
-v0.7.4 - July 10, 2014
-
-* 0.7.4 (Nicholas C. Zakas)
-* Docs: Fix 'lintinging' typo and ref links (Tom Vincent)
-* Fix: Transform envs option to object in Config (Fixes #1064) (jrajav)
-* 0.7.3 (Nicholas C. Zakas)
-
-v0.7.3 - July 9, 2014
-
-* 0.7.3 (Nicholas C. Zakas)
-* Update: Address code review comment for strict rule (refs #1011) (Nicholas C. Zakas)
-* Docs: Update copyright policy (Nicholas C. Zakas)
-* Docs: Update documentation for max-len to include description of second option (fixes #1006) (Nicholas C. Zakas)
-* Fix: Avoid double warnings for strict rule (fixes #1011) (Nicholas C. Zakas)
-* Fix: Check envs for true/false (Fixes #1059) (jrajav)
-* 0.7.2 (Nicholas C. Zakas)
-
-v0.7.2 - July 8, 2014
-
-* 0.7.2 (Nicholas C. Zakas)
-* Fix: no-mixed-spaces-and-tabs incorrectly flagging multiline comments (fixes #1055) (Nicholas C. Zakas)
-* Fix: new-cap error that throws on non-string member (fixes #1056) (Nicholas C. Zakas)
-* Fix: Always make globals an object (Fixes #1049) (jrajav)
-* 0.7.1 (Nicholas C. Zakas)
-
-v0.7.1 - July 7, 2014
-
-* 0.7.1 (Nicholas C. Zakas)
-* Docs: Add Related Rules sections (Fixes #990) (jrajav)
-* Fix: Check output file isn't dir, fix tests (Fixes #1034) (jrajav)
-* Docs: Updated documentation for several rules (Nicholas C. Zakas)
-* Docs: Updated contributor guide and dev env setup guide (Nicholas C. Zakas)
-* Breaking: Implement configuration hierarchy (fixes #963) (Nicholas C. Zakas)
-* Update: greatly simplify eqeqeq's operator finding logic (fixes #1037) (Michael Ficarra)
-* New: Add getSourceLines() to core and rule context (fixed #1005) (Jary)
-* Build + Docs: Adding generated resource links to rule docs (Fixes #1021) (jrajav)
-* Fix: Ignore unused params for args: 'none' (Fixes #1026) (jrajav)
-* Fix: Point eqeqeq error at operator (Fixes #1029) (jrajav)
-* New: report output to a file (fixes #1027) (Gyandeep Singh)
-* Breaking: CLIEngine abstraction for CLI operations; formatters no longer are passed configs (fixes #935) (Nicholas C. Zakas)
-* Fix: Allow stdout to drain before exiting (fixes #317) (Nicholas C. Zakas)
-* New: add no-undefined rule (fixes #1020) (Michael Ficarra)
-* New: Added no-mixed-spaces-and-tabs rule (fixes #1003) (Jary)
-* New: Added no-trailing-spaces rule (fixes #995) (Vitaly Puzrin)
-* Update: Factor ignores out of Config (fixes #958) (jrajav)
-* Fix: rewrite eol-last rule (fixes #1007) (fixes #1008) (Michael Ficarra)
-* Fix: add additional IIFE exception in no-extra-parens (fixes #1004) (Michael Ficarra)
-* Docs: Removed reference to brace-style Stroustrup default (fixes #1000) (Caleb Troughton)
-* New: Added eol-last rule (Fixes #996) (Vitaly Puzrin)
-* Fix: Put rule severity in messages (Fixes #984); deprecates passing full config to Formatters (jrajav)
-* Fix: no-unused-vars to check only file globals (fixes #975) (Aliaksei Shytkin)
-* Build: Makefile - Check for rule ids in docs titles (Fixes #969) (Delapouite)
-* Docs: guard-for-in - added missing id in title (Fixes #969) (Delapouite)
-* Breaking: Change 'no-yoda' rule to 'yoda' and add "always" option (Fixes #959) (jrajav)
-* Fix: Fixes no-unused-vars to check /*globals*/ (Fixes #955) (jrajav)
-* Update: no-eval to also warn on setTimeout and setInterval (fixes #721) (Nicholas C. Zakas)
-* Remove: experimental match() method (Nicholas C. Zakas)
-* Update: space-in-brackets now always allows empty object and array literals to have no spaces (fixes #797) (Nicholas C. Zakas)
-* New: Allow the cli parameter "color" and "no-color" (fixes #954) (Tom Gallacher)
-* Fix: valid-jsdoc no more warning for multi-level params (Fixes #925) (Delapouite)
-* Update: Search parent directories for .eslintignore (Fixes #933) (jrajav)
-* Fix: Correct order of arguments passed to assert.equal (fixes #945) (Michał Gołębiowski)
-* Update: Write the summary in stylish formatter in yellow if no errors (fixes #906); test coloring of messages (Michał Gołębiowski)
-* Fix: Corrects configs merging into base config (Fixes #838) (jrajav)
-* Fix: Adding check if char is non-alphabetic to new-cap (Fixes #940) (jrajav)
-* Docs: Update about page description (fixes #936) (Nicholas C. Zakas)
-* Docs: Add '/', forgotten in first commit (Fixes #931) (jrajav)
-* Update: Rule `new-cap` checks capitalized functions (fixes #904) (Aliaksei Shytkin)
-* Docs: Mention allowed semicolons in "never" mode for 'semi' rule (fixes #931) (jrajav)
-* Docs: Mention Yeoman generator in dev setup (fixes #914) (Nicholas C. Zakas)
-* Build: Remove flaky perf test from Travis (Nicholas C. Zakas)
-* Breaking: Refactor .eslintignore functionality (refs #928, fixes #901, fixes #837, fixes #853) (Nicholas C. Zakas)
-* 0.6.2 (Nicholas C. Zakas)
-* Breaking: Remove JSON support for .eslintignore (fixes #883) (icebox)
-
-v0.6.2 - May 23, 2014
-
-* 0.6.2 (Nicholas C. Zakas)
-* Fix: Adding per-environment rule configs to docs and doc validation (Fixes #918) (jrajav)
-* Docs: Updated contribution guidelines (Nicholas C. Zakas)
-* Docs: Update description of eqeqeq to mention special cases (fixes #924) (Nicholas C. Zakas)
-* Fix: block-scoped-var CatchClause handling (fixes #922) (Michael Ficarra)
-* Fix: block-scoped-var respects decls in for and for-in (fixes #919) (Michael Ficarra)
-* Update: Implement eqeqeq option "allow-null" (fixes #910) (Michał Gołębiowski)
-* Fix: new-cap should allow non-alpha characters (fixes #897) (Michael Ficarra)
-* Update: Refactor ESLintTester to fix dependency hell (fixes #602) (Nicholas C. Zakas)
-* Fix: Merge configs with ancestors (Fixes #820) (jrajav)
-* Fix: no-fallthrough should respect block statements in case statements (fixes #893) (Nicholas C. Zakas)
-* Docs: Fix layout issue in configuration docs (fixes #889) (Nicholas C. Zakas)
-* Build: Enable default-case rule (fixes #881) (icebox)
-* Build: Enable space-after-keywords (fixes #884) (icebox)
-* Fix api double emit on comment nodes (fixes #876) (Aliaksei Shytkin)
-* 0.6.1 (Nicholas C. Zakas)
-
-v0.6.1 - May 17, 2014
-
-* 0.6.1 (Nicholas C. Zakas)
-* Upgrade: Optionator to 0.4.0 (fixes #885) (Nicholas C. Zakas)
-* 0.6.0 (Nicholas C. Zakas)
-
-v0.6.0 - May 17, 2014
-
-* 0.6.0 (Nicholas C. Zakas)
-* Fix: Remove -r alias for --rule (fixes #882) (Nicholas C. Zakas)
-* Docs: Update dev setup, contributing, default-case descriptions (Nicholas C. Zakas)
-* Update: valid-jsdoc now allows you to optionally turn off parameter description checks (fixes #822) (Nicholas C. Zakas)
-* Breaking: brace-style now disallows block statements where curlies are on the same line (fixes #758) (Nicholas C. Zakas)
-* Add linting Makefile.js (fixes #870) (icebox)
-* add rule flag, closes #692 (George Zahariev)
-* Add check between rules doc and index (fixes #865) (icebox)
-* Add Build Next mention in integrations README. (icebox)
-* document new IIFE exception for no-extra parens added as part of #655 (Michael Ficarra)
-* (fixes #622) Add rule ID on documentation pages (Delapouite)
-* fixes #655: add IIFE exception to no-extra-parens (Michael Ficarra)
-* add new rule "no-new-require" (Wil Moore III)
-* exit with non-zero status when tests fail (fixes #858) (Márton Salomváry)
-* removed unicode zero width space character from messages (fixes #857) (Márton Salomváry)
-* Change: --rulesdir now can be specified multiple times (fixes #830) (Nicholas C. Zakas)
-* Update: Node 0.8 no longer supported (fixes #734) (Nicholas C. Zakas)
-* Update: Add typed arrays into builtin environment globals (fixes #846) (Nicholas C. Zakas)
-* Fix: Add prototype methods to global scope (fixes #700) (Nicholas C. Zakas)
-* Rule: no-restricted-modules (fixes #791) (Christian)
-* Upgrade: Esprima to 1.2 (fixes #842) (Nicholas C. Zakas)
-* Docs: reporting level 2 is an error (fixes #843) (Brandon Mills)
-* Upgrade: Esprima to 1.2, switch to using Esprima comment attachment (fixes #730) (Nicholas C. Zakas)
-* Fix: Semi rule incorrectly flagging extra semicolon (fixes #840) (Nicholas C. Zakas)
-* Build: Update Travis to only test Node 0.10 (refs #734) (Nicholas C. Zakas)
-* Add "nofunc" option (fixes #829) (Conrad Zimmerman)
-* Rule: no-inner-declarations (fixes #587) (Brandon Mills)
-* Rule 'block-scoped-var': correct scope for functions, arguments (fixes #832) (Aliaksei Shytkin)
-* Rule: default-case (fixes #787) (Aliaksei Shytkin)
-* Ignored files are excluded unless --force is passed on the CLI (Nick Fisher)
-* Fixes a typo and a broken link in the documentation (Nick Fisher)
-* Replaces .some() with .indexOf() where appropriate (Nick Fisher)
-* Fix correct config merge for array values (fixes #819) (Aliaksei Shytkin)
-* Remove warning about ESLint being in Alpha (Nick Fisher)
-* Adds `space-after-keywords` rule (fixes #807) (Nick Fisher)
-* Rule: no-lonely-if (fixes #790) (Brandon Mills)
-* Add ignore comments in file (fixes #305) (Aliaksei Shytkin)
-* 0.5.1 (Nicholas C. Zakas)
-* Change: no-unused-vars default to 'all' (fixes #760) (Nicholas C. Zakas)
-
-v0.5.1 - April 17, 2014
-
-* 0.5.1 (Nicholas C. Zakas)
-* Fix general config not to be modified by comment config in files (fixes #806) (Aliaksei Shytkin)
-* SVG badges (Ryuichi Okumura)
-* fixes #804: clean up implementation of #803 (which fixed #781) (Michael Ficarra)
-* Build: Fix perf test to take median of three runs (fixes #781) (Nicholas C. Zakas)
-* Fix: --reset will now properly ignore default rules in environments.json (fixes #800) (Nicholas C. Zakas)
-* Docs: Updated contributor guidelines (Nicholas C. Zakas)
-* Added Mocha global variables for TDD style. Fixes #793. (Golo Roden)
-* Rule: no-sequences (fixes #561) (Brandon Mills)
-* Change .eslintignore to plain text (fixes #761) (Brandon Mills)
-* Change 'no-spaced-func' message (fixes #762) (Aliaksei Shytkin)
-* Rule 'block-scoped-var' works correct when object inits (fixes #783) (Aliaksei Shytkin)
-* Build: Always build docs site on top of origin/master (Nicholas C. Zakas)
-* 0.5.0 (Nicholas C. Zakas)
-
-v0.5.0 - April 10, 2014
-
-* 0.5.0 (Nicholas C. Zakas)
-* Build: Bump perf limit so Travis won't fail every time (fixes #780) (Nicholas C. Zakas)
-* Add tests to cover 100% of eslint.js (Aliaksei Shytkin)
-* Fix: Make sure no-path-concat doesn't flag non-concat operations (fixes #776) (Nicholas C. Zakas)
-* Rule 'no-unused-var' in functional expression with identifier (fixes #775) (Aliaksei Shytkin)
-* Rule: valid-typeof (Ian Christian Myers)
-* Add global cli flag (ref #692) (Brandon Mills)
-* update to latest Optionator (George Zahariev)
-* Add options for rule 'no-unused-vars' to check all arguments in functions (fixes #728) (Aliaksei Shytkin)
-* Fix: Cleanup package.json (Nicholas C. Zakas)
-* New: Experimental support for CSS Auron (fixes #765) (Nicholas C. Zakas)
-* Lint tests on build (fixes #764) (Aliaksei Shytkin)
-* Rule block-scoped-var works correct with object properties (fixes #755) (Aliaksei Shytkin)
-* Breaking: implement eslint-env and remove jshint/jslint environment comment support (fixes #759) (Aliaksei Shytkin)
-* readme: npm i -> npm install (Linus Unnebäck)
-* Add env flag to cli options summary (fixes #752) (Brandon Mills)
-* Fix: Give the perf test a better calculated budget (fixes #749) (Nicholas C. Zakas)
-* give the `env` flag type `[String]`, improve code (fixes #748) (George Zahariev)
-* fixes #735: add new, more efficient getTokens interfaces (Michael Ficarra)
-* Add --env cli flag (ref #692) (Brandon Mills)
-* Fixes #740 - Make sure callbacks exist before marking them as 'handled'. (mstuart)
-* fixes #743: wrap-regex rule warns on regex used in dynamic member access (Michael Ficarra)
-* replace tab indents with 4 spaces in lib/rules/handle-callback-err.js (Michael Ficarra)
-* Adding homepage and bugs links to package.json (Peter deHaan)
-* JSDoc for rules (Anton Rudeshko)
-* 0.4.5 (Nicholas C. Zakas)
-
-v0.4.5 - March 29, 2014
-
-* 0.4.5 (Nicholas C. Zakas)
-* Build: Add perf check into Travis build to better monitor performance regressions (fixes #732) (Nicholas C. Zakas)
-* Fix: Make sure semi reports correct location of missing semicolon (fixes #726) (Nicholas C. Zakas)
-* Add --no-eslintrc cli flag (ref #717) (Brandon Mills)
-* Fix #716 crash with reset flag (Brandon Mills)
-* Fixed JSON formatting and highlighting (Anton Rudeshko (Tesla))
-* fixes #723: block-scoped-var throws on unnamed function expression (Michael Ficarra)
-* Fix: Make stroustrup brace-style closing message make sense (fixes #719) (Nicholas C. Zakas)
-* no-comma-dangle reports correct line number (Andrey Popp)
-* Upgrade: Esprima to 1.1.1 and EScope to 1.0.1 (fixes #718) (Nicholas C. Zakas)
-* Add reset cli flag (refs #692) (Brandon Mills)
-* Relax eqeqeq null check (fixes #669) (Brandon Mills)
-* 0.4.4 (Nicholas C. Zakas)
-* New Rule: handle-callback-err (fixes #567) (Jamund Ferguson)
-
-v0.4.4 - March 25, 2014
-
-* 0.4.4 (Nicholas C. Zakas)
-* Fix no-used-vars to report FunctionExpression params (fixes #697). (Andrey Popp)
-* fixes #711: eslint reports wrong line number for files with shebang (Michael Ficarra)
-* Fix for no-unused-vars and MemberExpression (Andrey Popp)
-* added no-warning-comments rule (Alexander Schmidt)
-* fixes #699: brace-style does not check function expressions (Michael Ficarra)
-* rewrite block-scoped-var (Michael Ficarra)
-* recommend using hasOwnProperty from Object.prototype in guard-for-in docs (Michael Ficarra)
-* change conf/environments.json spacing to be simpler and more consistent (Michael Ficarra)
-* Update API to use context.getFilename() instead of .filename. (Loren Segal)
-* Small changes, JSDoc is clarified (Aliaksei Shytkin)
-* Move FileFinder to separate file (Aliaksei Shytkin)
-* Cache if file is not found (Aliaksei Shytkin)
-* Use cache on config files seach (Aliaksei Shytkin)
-* Added .eslintignore to load from parents folders (fixes #681) (Aliaksei Shytkin)
-* fix 'node-modules' typo in docs (Fred K. Schott)
-* Upgrade to the latest version of doctrine. (Brian Di Palma)
-* Document optional filename and default it to `input`. (Loren Segal)
-* Fix: Compatibility for Node 0.8 (Nicholas C. Zakas)
-* Update: Makefile.js now uses shelljs-nodecli (Nicholas C. Zakas)
-* #681 apply all .eslintignore exclusions (Aliaksei Shytkin)
-* Add RuleContext.filename property (for eslint/eslint#468). (Loren Segal)
-* 0.4.3 (Nicholas C. Zakas)
-
-v0.4.3 - March 18, 2014
-
-* 0.4.3 (Nicholas C. Zakas)
-* fixes #682: rewrite no-constant-condition rule (Michael Ficarra)
-* Fixes #673 allow configuration of @return errors via requireReturn - (fixes #673) (Brian Di Palma)
-* Tweaking inline code formatting for "if, while, dowhile" (Peter deHaan)
-* Fixes #677 getJSDocComment() should not search beyond FunctionExpression or FunctionDeclaration parent nodes. (Brian Di Palma)
-* Relaxed enforcement of camelcase rule (Ian Christian Myers)
-* Fixing issue #675. Incorrect triggering of no-else-return rule. (Brian Di Palma)
-* Added style option for wrap-iife (Mathias Schreck)
-* Fix: Issues with named function expressions in no-unused-vars and no-shadow (fixes #662) (Nicholas C. Zakas)
-* Update: camelcase rule now doesn't flag function calls (fixes #656) (Nicholas C. Zakas)
-* Updating documentation description for: no-space-before-semi rule, changing rules to exempt strings with semicolons and test for that condition. Fixes #629. (Jonathan Kingston)
-* Adding in rule no-space-before-semi to prevent spaces before semicolons. fixes #629 (Jonathan Kingston)
-* show NPM version (Paul Verest)
-* adapt code formatting (Mathias Schreck)
-* Added a TextMate 2 integration to the docs (Nate Silva)
-* 0.4.2 (Nicholas C. Zakas)
-
-v0.4.2 - March 3, 2014
-
-* 0.4.2 (Nicholas C. Zakas)
-* fixes #651: disable no-catch-shadow rule in node environment (Michael Ficarra)
-* Fixed context.report message parsing (Ian Christian Myers)
-* fixe #648: wrap-iife rule should actually check that IIFEs are wrapped (Michael Ficarra)
-* Added "stroustrup" option for brace-style (Ian Christian Myers)
-* 0.4.1 (Nicholas C. Zakas)
-
-v0.4.1 - February 27, 2014
-
-* 0.4.1 (Nicholas C. Zakas)
-* Created space-in-brackets rule (Ian Christian Myers)
-* Update: Allow valid-jsdoc to specify replacement tags (fixes #637) (Nicholas C. Zakas)
-* Fix: Ensure getJSDocComment() works for all function declarations (fixes #638) (Nicholas C. Zakas)
-* Added broccoli-eslint to integration docs (Christian)
-* fixes #634: getters/setters shouldn't trigger no-dupe-keys (Michael Ficarra)
-* Update: semi to also enforce not using semicolons (fixes #618) (Nicholas C. Zakas)
-* New Rule: no-constant-condition  - removed SwitchStatement discriminant check  - removed AssignmentExpression with right Identifier  - fixed copy paste error  - added DoWhileStatement, ForStatement based on discussion: https://github.com/eslint/eslint/pull/624 (fixes #621) (Christian)
-* New Rule: no-constant-condition (fixes #621) (Christian)
-* Adding mimosa-eslint to Build System list (dbashford)
-* Fix: Make sure semi flags return statements without a semicolon (fixes #616) (Nicholas C. Zakas)
-* Fix: stylish formatter blue text -> white text (fixes #607) (Nicholas C. Zakas)
-* Fix: radix rule should warn (not throw error) when parseInt() is called without arguments (fixes #611) (Nicholas C. Zakas)
-* Update README.md (Dmitry)
-* Adding JSDoc comments for TAP format helper functions (Jonathan Kingston)
-* Updating documentation to include TAP format option (Jonathan Kingston)
-* Fixing validation issues to TAP formatter (Jonathan Kingston)
-* Adding TAP formatter and basic tests (Jonathan Kingston)
-* Docs: Updated integrations page (Nicholas C. Zakas)
-* 0.4.0 (Nicholas C. Zakas)
-
-v0.4.0 - February 12, 2014
-
-* 0.4.0 (Nicholas C. Zakas)
-* Change: Switch :after to :exit (fixes #605) (Nicholas C. Zakas)
-* Fix: Make sure no-unused-vars doesn't get confused by nested functions (fixes #584) (Nicholas C. Zakas)
-* Update: .eslintrc to check more things (Nicholas C. Zakas)
-* Fix: Make sure JSDoc parser accepts JSDoc3-style optional parameters (Nicholas C. Zakas)
-* Docs: Update documentation with linking instructions for ESLintTester (Nicholas C. Zakas)
-* New Rule: valid-jsdoc (fixes #536) (Nicholas C. Zakas)
-* #595 improved func-names documentation (Kyle Nunery)
-* #595 added more func-names tests (Kyle Nunery)
-* #595 fix rule message and add more tests (Kyle Nunery)
-* use optionator for option parsing, not optimist (George Zahariev)
-* Include instructions for working with ESLintTester (Nicholas C. Zakas)
-* #595 remove needless 'function Foo() {}' in tests (Kyle Nunery)
-* #595 fix whitespace (Kyle Nunery)
-* #595 fix markdown for js code blocks (Kyle Nunery)
-* Adding information about Yeomen generator (Ilya Volodin)
-* #595 add docs for rule func-names (Kyle Nunery)
-* #595 add func-names rule (Kyle Nunery)
-* migrate variables array to map (Brandon Mills)
-* Perf: Move try-catch out of verify() function to allow V8 optimization (refs #574) (Nicholas C. Zakas)
-* Docs: Added instructions for running npm run profile (Nicholas C. Zakas)
-* refactor variable name lookup into a separate function (Brandon Mills)
-* optimize findVariable() in no-unused-vars (Brandon Mills)
-* move to tests/bench (Chris Dickinson)
-* add `npm run profile`. (Chris Dickinson)
-* #586 refactor based on https://github.com/eslint/eslint/pull/590#discussion_r9476367 (Christian)
-* #586 added no-unreachable jsdoc, documentation note on hoisting case (Christian)
-* #586 add hoisting check to no-unreachable (Christian)
-* readme: Remove stray asterisk (Timo Tijhof)
-* #580 Remove eslint.getAllComments(), related docs, related tests (Christian)
-* Added test for bug fix #582. Test Passes (Shmueli Englard)
-* Added curly braces to if statment (Shmueli Englard)
-* Added new test for fix to #582 (fixes 582) (Shmueli Englard)
-* Bug #582: Added check if node.value isn't a string just exit (Shmueli Englard)
-* Update Rule: implement curly options for single-statement bodies (fixes #511) (Nicholas C. Zakas)
-* New Rule: no-extra-boolean-cast (fixes #557) (Brandon Mills)
-* New Rule: no-sparse-arrays (fixes #499) (Nicholas C. Zakas)
-* Fix: no-spaced-func is now an error (Nicholas C. Zakas)
-* New Rule: no-process-exit (fixes #568) (Nicholas C. Zakas)
-* New Rule: no-labels (fixes #550) (Nicholas C. Zakas)
-* New Rule: no-lone-blocks (fixes #512) (Brandon Mills)
-* Added Emacs/Flycheck integration (Nikolai Prokoschenko)
-* Build: Add perf test (Nicholas C. Zakas)
-* Fix: no-cond-assign shouldn't throw error when there's a for loop with an empty conditional (fixes #53) (Nicholas C. Zakas)
-* Docs: Add docs for no-regex-spaces and all doc errors now break build (closes #562) (Nicholas C. Zakas)
-* Rename: regex-spaces to no-regex-spaces (Nicholas C. Zakas)
-* Docs: Add docs for no-underscore-dangle (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-undef-init (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-return-assign (refs #562) (Nicholas C. Zakas)
-* Fix: Misspelling in no-return-assign message (Nicholas C. Zakas)
-* Docs: Add docs for no-new-wrappers (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-new-object (refs #562) (Nicholas C. Zakas)
-* Docs: Add docs for no-implied-eval (refs #562) (Nicholas C. Zakas)
-* Docs: Updated documentation for developing rules (Nicholas C. Zakas)
-* Testing: Move ESLintTester to be external dependency (fixes #480) (Nicholas C. Zakas)
-* Docs: Add list of known integrations (Nicholas C. Zakas)
-* Fix #570 (dmp42)
-* document no-array-constructor rule (Michael Ficarra)
-* fixes #500: no-array-constructor should not flag 1-argument construction (Michael Ficarra)
-* fixes #501: no-array-constructor recognises CallExpression form (Michael Ficarra)
-* rename no-new-array rule to no-array-constructor; ref #501 (Michael Ficarra)
-* Fix: Make radix rule warn on invalid second parameter (fixes #563) (Nicholas C. Zakas)
-* Docs: Added no-floating-decimal docs (refs #562) (Nicholas C. Zakas)
-* New Rule: no-path-concat (fixes #540) (Nicholas C. Zakas)
-* Docs: Add some missing rule docs (refs #562) (Nicholas C. Zakas)
-* Fix: CLI should not output anything when there are no warnings (fixes #558) (Nicholas C. Zakas)
-* New Rule: no-yoda (fixes #504) (Nicholas C. Zakas)
-* New Rule: consistent-return (fixes #481) (Nicholas C. Zakas)
-* Rewrite configuration documentation to include information about globals (fixes #555) (Nicholas C. Zakas)
-* Allow YAML configuration files (fixes #491) (Nicholas C. Zakas)
-* 0.3.0 (Nicholas C. Zakas)
-
-v0.3.0 - January 20, 2014
-
-* 0.3.0 (Nicholas C. Zakas)
-* Config: Allow comments in JSON configuration files (fixes #492) (Nicholas C. Zakas)
-* Bug: max-len fix to report correct line number (fixes #552) (Nicholas C. Zakas)
-* Build: Use browserify to create browser-ready ESLint (fixes #119) (Nicholas C. Zakas)
-* Docs: Ensure all rules have entry on top-level rules index page (Nicholas C. Zakas)
-* Docs: Add docs for no-fallthrough rule (Nicholas C. Zakas)
-* Update README.md (Peter deHaan)
-* Update README.md (Peter deHaan)
-* Update package.json (Peter deHaan)
-* Docs: Added documentation for semi rule (Nicholas C. Zakas)
-* Build: Reset branch coverage target (Nicholas C. Zakas)
-* Update build system to generate eslint.org during release (Nicholas C. Zakas)
-* Updated setup doc (Nicholas C. Zakas)
-* Fix #525 & #528 (Mangled Deutz)
-* Improve no-negated-in-lhs description (David Bruant)
-* Fixing typo (David Bruant)
-* Update no-new.md (Tamas Fodor)
-* Update no-extra-semi.md (Tamas Fodor)
-* Fixing broken links in documentation (Ilya Volodin)
-* Update about page (Nicholas C. Zakas)
-* Site generation build step and documentation updates to support it (fixes #478) (Nicholas C. Zakas)
-* Change message for brace-style rule (fixes #490) (Nicholas C. Zakas)
-* Add question about ES6 support to FAQ (fixes #530) (Nicholas C. Zakas)
-* Set unlimited number of listeners for event emitter (fixes #524) (Nicholas C. Zakas)
-* Add support for comment events (fixes #531) Add :after events for comments (Nicholas C. Zakas)
-* Add :after events for comments (Nicholas C. Zakas)
-* Allow config files to have any name (fixes #486). (Aparajita Fishman)
-* List available formatters (fixes #533). (Aparajita Fishman)
-* Add support for comment events (fixes #531) (Nicholas C. Zakas)
-* Add Stylish formatter and make it default. Fixes #517 (Sindre Sorhus)
-* Fix missing code exit (Mangled Deutz)
-* Added unit test for calling Config.getConfig with no arguments. (Aparajita Fishman)
-* Typo (Mangled Deutz)
-* Fixed docs typo (Nicholas C. Zakas)
-* Mark functions as used when any method is called on them (Nicholas C. Zakas)
-* Fixed: Config.getConfig is called either with a file path or with no args (fixes #520) (Aparajita Fishman)
-* Fix minor bug in no-empty rule (Nicholas C. Zakas)
-* add more info for failure messages (Nicholas C. Zakas)
-* Add ruleId to all formatters output (fixes #472) (Nicholas C. Zakas)
-* Remove unused code (Nicholas C. Zakas)
-* Correctly handle case with both finally and catch in no-empty (Nicholas C. Zakas)
-* Update documentation for no-unused-vars (Nicholas C. Zakas)
-* Ensure that bound function expressions are reported as being used (fixes #510) (Nicholas C. Zakas)
-* Allow empty catch/finally blocks (fixes #514) and update documentation (fixes #513) (Nicholas C. Zakas)
-* Updated contribution guidelines (Nicholas C. Zakas)
-* Add default setting for no-cond-assign (Nicholas C. Zakas)
-* Add build step to check rule consistency (Nicholas C. Zakas)
-* update docs: explicit cli args are exempt from eslintignore exclusions (Michael Ficarra)
-* fixes #505: no-cond-assign should ignore doubly parenthesised tests (Michael Ficarra)
-* Renamed unnecessary-strict to no-extra-strict (Nicholas C. Zakas)
-* Fixed missing documentation links (Nicholas C. Zakas)
-* Add build task to check for missing docs and tests for rules (Nicholas C. Zakas)
-* Slight reorganization of rule groups (Nicholas C. Zakas)
-* Added one-var and sorted some rules (Nicholas C. Zakas)
-* Updated Travis badge for new location (Nicholas C. Zakas)
-* fixes #494: allow shebangs in processed JS files (Michael Ficarra)
-* fixes #496: lint ignored files when explicitly specified via the CLI (Michael Ficarra)
-* More tests (Ilya Volodin)
-* Upgrade Istanbul (Ilya Volodin)
-* fixes #495: holey arrays cause no-comma-dangle rule to throw (Michael Ficarra)
-* Documentation and minor changes (Ilya Volodin)
-* Adding missing package registration (Ilya Volodin)
-* Adding support for .eslintignore and .jshintignore (Closes #484) (Ilya Volodin)
-* fixes #482: brace-style bug with multiline conditions (Michael Ficarra)
-* Switching Travis to use ESLint (Closes #462) (Ilya Volodin)
-* 0.2.0 (Nicholas C. Zakas)
-
-v0.2.0 - January 1, 2014
-
-* 0.2.0 (Nicholas C. Zakas)
-* Bump code coverage checks (Nicholas C. Zakas)
-* Take care of unreachable code in case statement (Nicholas C. Zakas)
-* Updated rule messaging and added extra tests (Nicholas C. Zakas)
-* Fixing eslint errors and unittests (Ilya Volodin)
-* Rule: max-nested-callbacks (Ian Christian Myers)
-* Fix fall-through rule with nested switch statements (fixes #430) (Nicholas C. Zakas)
-* Fixed trailing comma (Nicholas C. Zakas)
-* Added more tests for func-style (Nicholas C. Zakas)
-* Fixed documentation for func-style (Nicholas C. Zakas)
-* Fixed linting error (Nicholas C. Zakas)
-* Rule to enforce function style (fixes #460) (Nicholas C. Zakas)
-* Rule is off by default. Updated documentation (Ilya Volodin)
-* Rule: sort variables. Closes #457 (Ilya Volodin)
-* Update architecture.md (Nicholas C. Zakas)
-* Change quotes option to avoid-escapes and update docs (fixes #199) (Brandon Payton)
-* Add allow-avoiding-escaped-quotes option to quotes rule (fixes #199) (Brandon Payton)
-* Update no-empty-class.md (Nicholas C. Zakas)
-* Updated titles on all rule documentation (fixes #348) (Nicholas C. Zakas)
-* Fixing eslint errors in codebase (Ilya Volodin)
-* fixes #464: space-infix-ops checks for VariableDeclarator init spacing (Michael Ficarra)
-* Add options to no-unused-vars. Fixes #367 (Ilya Volodin)
-* rename escape function to xmlEscape in checkstyle formatter (Michael Ficarra)
-* The semi rule now reports correct line number (Ian Christian Myers)
-* context.report now takes optional location (Ian Christian Myers)
-* fixes #454: escape values for XML in checkstyle formatter (Michael Ficarra)
-* Add color to Mocha test reporting (Ian Christian Myers)
-* Rule no-nested-ternary (Ian Christian Myers)
-* Fixing no-unused-var and no-redeclare (Ilya Volodin)
-* fixes #449: no-mixed-requires throws TypeError when grouping is enabled (Michael Ficarra)
-* Fixed reported line number for trailing comma error (Ian Christian Myers)
-* Update doc title for quote (Matthew DuVall)
-* fixes #446: join paths without additional delimiters (Michael Ficarra)
-* docs: add documentation for quotes rule (Matthew DuVall)
-* minor style changes to lib/rules/space-infix-ops.js as requested in #444 (Michael Ficarra)
-* remove "function invalid(){ return D }" from some tests (Michael Ficarra)
-* fixes #429: require spaces around infix operators; enabled by default (Michael Ficarra)
-* simplify fix for #442 (Michael Ficarra)
-* Fix broken test, ensure tests get run before a release is pushed (Nicholas C. Zakas)
-* 0.1.4 (Nicholas C. Zakas)
-
-v0.1.4 - December 5, 2013
-
-* 0.1.4 (Nicholas C. Zakas)
-* Add release scripts to package.json (Nicholas C. Zakas)
-* Fixed release error in Makefile (Nicholas C. Zakas)
-* Fix JSHint warnings (Nicholas C. Zakas)
-* Make sure 'default' isn't flagged by no-space-returns-throw rule (fixes #442) (Nicholas C. Zakas)
-* Fixing documentation (Ilya Volodin)
-* Fixing disabling rules with invalid comments Closes #435 (Ilya Volodin)
-* improve assertion on wrong number of errors (Christoph Neuroth)
-* fixes #431: no-unused-expressions should not flag statement level void (Michael Ficarra)
-* fixes #437: fragile no-extend-native rule (Michael Ficarra)
-* change space-* rule documentation headers to be more descriptive (Michael Ficarra)
-* Moved to tabs, added comments, a few more tests (Jamund Ferguson)
-* split GH-332 rule into space-unary-word-ops and space-return-throw-case (Michael Ficarra)
-* fixes #346: validate strings passed to the RegExp constructor (Michael Ficarra)
-* change some documentation extensions from js to md (Michael Ficarra)
-* fixes #332: unary word operators must be followed by whitespace (Michael Ficarra)
-* Add some docs (Jamund Ferguson)
-* DRYing cli tests and improving code coverage (Ilya Volodin)
-* fixes #371: add no-shadow-restricted-names rule (Michael Ficarra)
-* Added Support for Object.defineProperty() checking (Jamund Ferguson)
-* fixes #333: add rule to disallow gratuitously parenthesised expressions (Michael Ficarra)
-* improve rule test coverage (Michael Ficarra)
-* No Extend Native (Jamund Ferguson)
-* change getTokens 2nd/3rd arguments to count tokens, not characters (Michael Ficarra)
-* fixes #416: no-fallthrough flagging last case + reporting wrong line num (Michael Ficarra)
-* fixes #415: fix unnecessary-strict rule false positives (Michael Ficarra)
-* Add missing dependency (Nicholas C. Zakas)
-* Update docs related to running unit tests (Nicholas C. Zakas)
-* Add JSHint as missing dependency (Nicholas C. Zakas)
-* Switch to using ShellJS makefile (fixes #418) (Nicholas C. Zakas)
-* Updated documentation to reflect test changes (refs #417) (Nicholas C. Zakas)
-* Change to eslintTester.addRuleTest (fixes #417) (Nicholas C. Zakas)
-* Fix false positives for no-script-url (fixes #400) (Nicholas C. Zakas)
-* Fix lint warning (Nicholas C. Zakas)
-* Fixing ESLint warnings, introducing Makefile.js (not yet wired in) (Nicholas C. Zakas)
-* fixes #384: include builtin module list to avoid repl dependency (Michael Ficarra)
-* 0.1.3 (Nicholas C. Zakas)
-
-v0.1.3 - November 25, 2013
-
-* 0.1.3 (Nicholas C. Zakas)
-* Updated changelog (Nicholas C. Zakas)
-* Vows is gone. Mocha is now default (Ilya Volodin)
-* fixes #412: remove last remaining false positives in no-spaced-func (Michael Ficarra)
-* fixes #407: no-spaced-func rule flagging non-argument-list spaced parens (Michael Ficarra)
-* Add no-extra-semi to configuration (fixes #386) (Nicholas C. Zakas)
-* Converting formatter tests and core (Ilya Volodin)
-* Don't output anything when there are no errors in compact formatter (fixes #408) (Nicholas C. Zakas)
-* Removing Node 0.11 test - it fails all the time (Nicholas C. Zakas)
-* Completing conversion of rule's tests to mocha (Ilya Volodin)
-* added mocha conversion tests for strict, quote-props and one-var; enhanced one of the invalid one-var tests that was expecting two messages (Michael Paulukonis)
-
-
-v0.1.2 - November 23, 2013
-
-* 0.1.2 (Nicholas C. Zakas)
-* added mocha tests for radix and quotes; fixed some of the internals on quotes from vows annotations (Michael Paulukonis)
-* added tests for regex-spaces, strict, unnecessary-strict; fixed some types in overview/author notes in other tests. (Michael Paulukonis)
-* Converting unittests to mocha (Ilya Volodin)
-* mocha conversions of tests for 'use-isnan' and 'wrap-iife' (Michael Paulukonis)
-* added mocha tests semi.js and wrap-regex.js (Michael Paulukonis)
-* Converting more tests to mocha (Ilya Volodin)
-* Update CONTRIBUTING.md (Nicholas C. Zakas)
-* Cleaning up eslintTester (Ilya Volodin)
-* DRYing unittests and converting them to mocha (Ilya Volodin)
-* Reformatted Gruntfile (Nicholas C. Zakas)
-* Add tests to config load order: base, env, user. (icebox)
-* Fixing indent in gruntfile (Ilya Volodin)
-* Removing jake, adding Grunt, Travis now runs grunt (Ilya Volodin)
-* Add rules per environments to config. (icebox)
-* Add globals property to the environments. (icebox)
-* Fix error about IIFE if the function is in a new (Marsup)
-* Fix a broken link in the docs (Brian J Brennan)
-* Add test coverage for additional cases, fix open paren at beginning of expr (Matthew DuVall)
-* Fixing no-undef for eval use case (Ilya Volodin)
-* fixes #372: disallow negated left operand in `in` operator (Michael Ficarra)
-* Fixing no-self-compare rule to check for operator (Ilya Volodin)
-* bug: open parens in args causes no-spaced-func to trigger (Matthew DuVall)
-* fixes #369: restrict UnaryExpressions to delete in no-unused-expressions (Michael Ficarra)
-* Make sure delete operator isn't flagged as unused expression (fixes #364) (Nicholas C. Zakas)
-* Don't flag ++ or -- as unused expressions (fixes #366) (Nicholas C. Zakas)
-* Ensure that 'use strict' isn't flagged as an unused expression (fixes #361) (Nicholas C. Zakas)
-* Increase test coverage for strict-related rules (refs #361) (Nicholas C. Zakas)
-* Up code coverage numbers (Nicholas C. Zakas)
-* Fixes error in new-cap rule when 'new' is used without a constructor (fixes #360) (Nicholas C. Zakas)
-* added files array in package json (Christian)
-* removed unused jshint dependency (Christian)
-* Add test coverage for new Foo constructor usage (Matt DuVall)
-* Pull code coverage up by removing unused method (Matt DuVall)
-* recognise CallExpression variant of RegExp ctor in no-control-regex rule (Michael Ficarra)
-* Merge smart-eqeqeq into eqeqeq (Matt DuVall)
-* Catch additional cases for a.b, new F, iife (Matt DuVall)
-* 0.2.0-dev (Nicholas C. Zakas)
-* Version 0.1.0 (Nicholas C. Zakas)
-* rule: no-spaced-func disallow spaces between function identifier and application (Matt DuVall)
-
-v0.1.1 - November 09, 2013
-
-* Ensure mergeConfigs() doesn't thrown an error when keys are missing in base config (fixes #358) (Nicholas C. Zakas)
-
-v0.1.0 - November 03, 2013
-
-* Version 0.1.0 (Nicholas C. Zakas)
-* Updated Readme for v0.1.0 (Nicholas C. Zakas)
-* Bump code coverage verification to 95% across the board (Nicholas C. Zakas)
-* Fixed broken links (Nicholas C. Zakas)
-* Added information about runtime rules (Nicholas C. Zakas)
-* Added documentation about configuration files (Nicholas C. Zakas)
-* Added description of -v option (Nicholas C. Zakas)
-* Updated architecture documentation (Nicholas C. Zakas)
-* Fix bug in no-control-regex (fixes #347) (Nicholas C. Zakas)
-* Fix link to architecture doc in readme (azu)
-* Rule: No control characters in regular expressions (fixes #338) (Nicholas C. Zakas)
-* Add escaping \= test (Matt DuVall)
-* Add docs for rule (Matt DuVall)
-* rule: no-div-regex for catching ambiguous division operators in regexes (Matt DuVall)
-* Change context-var to block-scoped-var (Matt DuVall)
-* Implement config.globals (Oleg Grenrus)
-* Add 'config-declared global' test (Oleg Grenrus)
-* Adding ability to separate rules with comma (Ilya Volodin)
-* Added rule for missing 'use strict' (fixes #321) (Nicholas C. Zakas)
-* Fixing unittests and finishing code (Ilya Volodin)
-* Disabling/enabling rules through comments (Ilya Volodin)
-* Rename rule to context-var and add documentation (Matt DuVall)
-* Added link to no-global-strict doc in readme (Nicholas C. Zakas)
-* Add try-catch scoping with tests (Matt DuVall)
-* Fix linting error (Matt DuVall)
-* Store FunctionDeclarations in scope as they can be used as literals (Matt DuVall)
-* Fix to use getTokens and add test for MemberExpression usage (Matt DuVall)
-* rule: block-scope-var to check for variables declared in block-scope (Matt DuVall)
-* no-unused-expressions rule: add test and doc mention for `a && b()` (Michael Ficarra)
-* rule: wrap-regex for parens around regular expression literals (Matt DuVall)
-* fixes #308: implement no-unused-expressions rule; ref. jshint rule W030 (Michael Ficarra)
-* Updated change log script to filter out merge messages (Nicholas C. Zakas)
-* Updated changelog (Nicholas C. Zakas)
-* 0.1.0-dev (Nicholas C. Zakas)
-
-v0.0.9 - October 5, 2013
-
-* Version 0.0.9 release (Nicholas C. Zakas)
-* Added rule for no global strict mode (fixes #322) (Nicholas C. Zakas)
-* Change default on to be errors instead of warnings (fixes #326) (Nicholas C. Zakas)
-* Fixed bug where JSHint was using the wrong file in lint task (Nicholas C. Zakas)
-* Updated docs for no-unused vars rule. (Andrew de Andrade)
-* Removed console.log in tests. (Andrew de Andrade)
-* Added link to roadmap and JSHint feature parity list. (Andrew de Andrade)
-* Fixed warning when unused var declared as param in FunctionExpression/Declaration can be ignored because later param is used (Andrew de Andrade)
-* Rename test for smartereqeqeq.js to smarter-eqeqeq.js (Andrew de Andrade)
-* Keep test filename inline with rule name (Andrew de Andrade)
-* Added further instructions for multiline test cases. (Andrew de Andrade)
-* Protecting private method (Seth McLaughlin)
-* Updating look up algorithm for local config files (Seth McLaughlin)
-* Fixing ESLint errors (Ilya Volodin)
-* Implemented local default config file (Seth McLaughlin)
-* Upgrading escope version and fixing related bugs (Ilya Volodin)
-* Fixing assignment during initialization issue (Ilya Volodin)
-* add plain-English regexp description to no-empty-class rule (Michael Ficarra)
-* fixes #289: no-empty-class flags regexps with... flags (Michael Ficarra)
-* Rule: no-catch-shadow (Ian Christian Myers)
-* Update no-empty for compatibility with esprima@1.0.4 (fixes #290) (Mark Macdonald)
-* Fixing bug with _ in MemberExpression (Ilya Volodin)
-* Rule: no-func-assign (Ian Christian Myers)
-* Fix false warning from no-undef rule (fixes #283) (Mark Macdonald)
-* Adding eslint to jake (Ilya Volodin)
-* Rule no redeclare (Ilya Volodin)
-* Fixing no use before define issues (Ilya Volodin)
-* Rule: no-octal-escape (Ian Christian Myers)
-* Fix for `no-proto` and `no-iterator` false positive (Ian Christian Myers)
-* Rule: no-iterator (Ian Christian Myers)
-* Fixing type in guard-for-in documentation (Ilya Volodin)
-* Rule No use before define (Ilya Volodin)
-* Added documentation for the `no-new` rule (Ian Christian Myers)
-* Added documentation for the `no-eval` rule (Ian Christian Myers)
-* Added documentation for the `no-caller` rule (Ian Christian Myers)
-* Added documentation for the `no-bitwise` rule (Ian Christian Myers)
-* simplify no-empty-class rule (Michael Ficarra)
-* Fix `no-empty-class` false negatives (Ian Christian Myers)
-* Added documentation for the `no-alert` rule (Ian Christian Myers)
-* Added documentation for the `new-parens` rule (Ian Christian Myers)
-* Added documentation for the `max-params` rule (Ian Christian Myers)
-* Added documentation for `max-len` rule (Ian Christian Myers)
-* Created link from rules README.md to no-plusplus.md documentation (Ian Christian Myers)
-* Added documentation for `guard-for-in` rule (Ian Christian Myers)
-* Added documentation for `dot-notation` rule (Ian Christian Myers)
-* Added documentation for `curly` rule (Ian Christian Myers)
-* Updated `camelcase` rule documentation (Ian Christian Myers)
-* Added documentation for `complexity` rule (Ian Christian Myers)
-* Changed `no-dangle` documentation to `no-comma-dangle` (Ian Christian Myers)
-* Rule: no-empty-class (Ian Christian Myers)
-* Increased test coverage for max-depth (Ian Christian Myers)
-* Increased test coverage for no-shadow (Ian Christian Myers)
-* Increased test coverage on no-mixed-requires (Ian Christian Myers)
-* Added docs for eqeqeq and no-with (fixes #262) (Raphael Pigulla)
-* Create camelcase.md (Micah Eschbacher)
-* Fix issues with function in no-unused-vars (Ilya Volodin)
-* Rule: No shadow (Ilya Volodin)
-* fixes #252: semi rule errors on VariableDeclarations in ForInStatements (Michael Ficarra)
-* rule: max-len to lint maximum length of a line (Matt DuVall)
-* Fixes #249 (Raphael Pigulla)
-* Merge branch 'master' of https://github.com/beardtwizzle/eslint (Jonathan Mahoney)
-* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
-* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
-* Rule: no-else-return (Ian Christian Myers)
-* Re-add lines that were accidentally deleted from config (Jonathan Mahoney)
-* Add support for pre-defined environment globals (re: #228) (Jonathan Mahoney)
-* Fix no-unused-vars to report correct line numbers (Ilya Volodin)
-* Rule: no proto (Ilya Volodin)
-* Rule: No Script URL (Ilya Volodin)
-* Rule: max-depth (Ian Christian Myers)
-* Fix: Error severity for rules with options. (Ian Christian Myers)
-* Rule: No wrap func (Ilya Volodin)
-* bug: Fixes semi rule for VariableDeclaration in ForStatement (Matt DuVall)
-* Individual perf tests for rules (Ilya Volodin)
-* Fix loading rules from a rules directory (Ian Christian Myers)
-* Rule no-mixed-requires (fixes #221) (Raphael Pigulla)
-* bug: Add ForStatement for no-cond-assign check (Matthew DuVall)
-* JSLint XML formatter now escapes special characters in the evidence and reason attributes. (Ian Christian Myers)
-* Formatter: JSLint XML (Ian Christian Myers)
-* Refactored `max-statements` rule. (Ian Christian Myers)
-* Fix tests broken due to new rule message text (James Allardice)
-* Merge branch 'master' into match-jshint-messages (James Allardice)
-* Refactored `one-var` rule. (Ian Christian Myers)
-* split eslint.define into eslint.defineRule and eslint.defineRules (Michael Ficarra)
-* Removed unnecessary rules.js test. (Ian Christian Myers)
-* Rule: one-var (Ian Christian Myers)
-* Rule: No unused variables (Ilya Volodin)
-* expose interface for defining new rules at runtime without fs access (Michael Ficarra)
-* disallow 00 in no-octal rule (Michael Ficarra)
-* Increased test coverage for `lib/cli.js`. (Ian Christian Myers)
-* Increased test coverage for `lib/rules.js` (Ian Christian Myers)
-* Increased test coverage for jUnit formatter. (Ian Christian Myers)
-* scripts/bundle: output bundle+map to /build directory (Michael Ficarra)
-* add test for 0X... hex literals in no-octal tests (Michael Ficarra)
-* fixes #200: no-octals should not see leading-0 floats as violations (Michael Ficarra)
-* add back tests for loading rules from a directory (Michael Ficarra)
-* add back in ability to load rules from a directory (Michael Ficarra)
-* Increased test coverage for `complexity` rule. (Ian Christian Myers)
-* Increased test coverage for `max-params` rule. (Ian Christian Myers)
-* also output source map when generating bundle (Michael Ficarra)
-* Rule: unnecessary-strict (Ian Christian Myers)
-* Improve performance of getTokens (Ilya Volodin)
-* Performance jake task (Ilya Volodin)
-* don't force explicit listing of rules; generate listing for bundle (Michael Ficarra)
-* Rule: no-dupe-keys (Ian Christian Myers)
-* fixes #145: create a browser bundle (Michael Ficarra)
-* Fixing no-caller bug (Ilya Volodin)
-* Check for use of underscore library as an exception for var declarations (Matthew DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matthew DuVall)
-* Fixing spelling (Ilya Volodin)
-* Rule: no-empty-label (Ilya Volodin)
-* Add builtin globals to the global scope (fixes #185) (Mark Macdonald)
-* Rule: no-loop-func (Ilya Volodin)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-underscore-dangle (Matt DuVall)
-* Use proper node declarations and __proto__ exception (Matt DuVall)
-* Updating no-undef patch (see pull request #164) - Simplify parseBoolean() - Make knowledge of```/*jshint*/``` and ```/*global */``` internal to eslint object - Put user-declared globals in Program scope (Mark Macdonald)
-* Rule: no-eq-null (Ian Christian Myers)
-* fixed broken merge (Raphael Pigulla)
-* fixes #143 (Raphael Pigulla)
-* added consistent-this rule (Raphael Pigulla)
-* Rule: no-sync to encourage async usage (Matt DuVall)
-* Update eslint.json with no-underscore-dangle rule (Matt DuVall)
-* Rule: no-underscore-dangle for func/var declarations (Matt DuVall)
-* Warn on finding the bitwise NOT operator (James Allardice)
-* Updating no-undef patch (see pull request #164) 3. Move parsing of ```/*global */``` and ```/*jshint */``` to eslint.js (Mark Macdonald)
-* Warn on finding a bitwise shift operator (fixes #170) (James Allardice)
-* Fix broken test (James Allardice)
-* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
-* Removing nasty leading underscores (Patrick Brosset)
-* Added tests and test cases for a few files (Patrick Brosset)
-* CLI: -f now accepts a file path (Ian Christian Myers)
-* Updating no-undef patch (see pull request #164) 1. Move predefined globals to ```conf/environments.json``` 2. Move mixin() to ```lib/util.js``` (Mark Macdonald)
-* Match messages to JS[LH]int where appropriate, and ensure consistent message formatting (closes #163) (James Allardice)
-* Add support for the do-while statement to the curly rule (closes #167) (James Allardice)
-* Removing nasty leading underscores (Patrick Brosset)
-* Added tests and test cases for a few files (Patrick Brosset)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Added acceptance criteria for rules to docs (Nicholas C. Zakas)
-* Add no-undef (fixes #6) (Mark Macdonald)
-* Fixing no-self-compare (Ilya Volodin)
-* Rule: No multiline strings (Ilya Volodin)
-* CLI refactor to remove process.exit(), file not found now a regular error message, updated formatters to handle this case (Nicholas C. Zakas)
-* Rule: no-self-compare (Ilya Volodin)
-* Rule: No unnecessary semicolons (fixes #158) (Nicholas C. Zakas)
-* Fixed error in no-ex-assign when return statement as found in catch clause (Nicholas C. Zakas)
-* Rename no-exc-assign to no-ex-assign and add to config (Nicholas C. Zakas)
-* Renamed count-spaces to regex-spaces (Nicholas C. Zakas)
-* Documentation updates (Nicholas C. Zakas)
-* Put all rules into strict mode and update docs accordingly (Nicholas C. Zakas)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Ensure getScope() works properly when called from Program node (fixes #148) (Nicholas C. Zakas)
-* Rule: wrap-iife (Ilya Volodin)
-* add additional test for no-cond-assign rule (Stephen Murray)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* Experimental support for Jake as a build system (fixes #151) (Nicholas C. Zakas)
-* fixes #152 (Stephen Murray)
-* add docs for no-exc-assign (Stephen Murray)
-* Merge branch 'master' of https://github.com/nzakas/eslint into no-new-object-array-literals (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into count-spaces (Matt DuVall)
-* Added a test for getting global scope from Program node (refs #148) (Nicholas C. Zakas)
-* Add positive test case for `object.Array` (Matthew DuVall)
-* Only support space characters for repetitions (Matthew DuVall)
-* fix line length per code conventions (Stephen Murray)
-* fix indentation per code conventions (Stephen Murray)
-* fixes #149 (Stephen Murray)
-* Rule: no-ternary (Ian Christian Myers)
-* Check that the return statement has an argument before checking its type (James Allardice)
-* Rule: count-spaces for multiple spaces in regular expressions (Matt DuVall)
-* Update eslint.json configuration file for literal rules (Matt DuVall)
-* Created no-label-var rule. (Ian Christian Myers)
-* Rule: no-new-array and no-new-object (Matt DuVall)
-* Added ability to retrieve scope using escope. (Ian Christian Myers)
-* Corrected unused arguments (Patrick Brosset)
-* Reporting function complexity on function:after and using array push/pop to handle nesting (Patrick Brosset)
-* Fixing style issues discovered while npm testing (Patrick Brosset)
-* First draft proposal for a cyclomatic complexity ESLint rule (Patrick Brosset)
-* Corrected file extension on no-plusplus rule documentation. (Ian Christian Myers)
-* Documentation for no-delete-var rule. Closes #129 (Ilya Volodin)
-* Rule: max-statements (Ian Christian Myers)
-* Better documentation for the `no-plusplus` rule. (Ian Christian Myers)
-* Rule: no-plusplus (Ian Christian Myers)
-* Rule: no assignment in return statement (Ilya Volodin)
-* Updating max-params rule name (Ilya Volodin)
-* Rule: Function has too many parameters (Ilya Volodin)
-* Removing merge originals (Ilya Volodin)
-* Rebasing on master (Ilya Volodin)
-* Rule: Variables should not be deleted (Ilya Volodin)
-* Fixes incorrect reporting of missing semicolon (Ian Christian Myers)
-* Rebase against master branch (Mathias Bynens)
-* Rule to warn on use of Math and JSON as functions (James Allardice)
-* Formatter: Checkstyle (Ian Christian Myers)
-* docs: Clean up structure (Mathias Bynens)
-* Merging no-native-reassign and no-redefine (Ilya Volodin)
-* Rule: no native reassignment (Ilya Volodin)
-* 0.0.8-dev (Nicholas C. Zakas)
-* v0.0.7 released (Nicholas C. Zakas)
-* Updated Tests, etc. (Jamund Ferguson)
-* Added jUnit Support (Fixes #16) (Jamund Ferguson)
-
-v0.0.7 - July 22, 2013
-
-* 0.0.7 (Nicholas C. Zakas)
-* Add code coverage checks to npm test and update rule tests to have better coverage (Nicholas C. Zakas)
-* Fixed CLI output on serial programatic executions (Ian Christian Myers)
-* Removes line length from code style convention docs (Josh Perez)
-* Adds escapeRegExp and fixes documentation (Josh Perez)
-* Add quotes rule and test coverage for configuration options (Matt DuVall)
-* Adds templating for lint messages and refactors rules to use it (Josh Perez)
-* Fixes lint rules for unchecked test file (Josh Perez)
-* Changes dotnotation rule to match JSHint style (Josh Perez)
-* Change configInfo to options and add test coverage (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into optional-args-for-rule (Matt DuVall)
-* Adds dot notation lint rule (Josh Perez)
-* Strip trailing underscores in camelcase rule - Fixes #94 (Patrick Brosset)
-* add mailing list link (Douglas Campos)
-* Strip leading underscores in camelcase rule - Fixes #94 (Patrick Brosset)
-* Created no-dangle rule. (Ian Christian Myers)
-* Fixed rule name (James Allardice)
-* Make sure the callee type is Identifier (James Allardice)
-* Add rule for implied eval via setTimeout/Interval (James Allardice)
-* Fix rule name in config (James Allardice)
-* Fixes #90 -- updates docstrings (Stephen Murray)
-* Fixes issue with fs.existsSync on NodeJS 0.6 (Ian Christian Myers)
-* Fixing -c config option. (Ian Christian Myers)
-* Allow arrays to be passed as multiple args to rule (Matt DuVall)
-* Test to make sure empty case with one line break is safe (Matt DuVall)
-* Rule: The Function constructor is eval (Ilya Volodin)
-* Enabled require("eslint") and exposed out CLI. (Ian Christian Myers)
-* Adds test and fix for issue #82 (Mark Macdonald)
-* Merge branch 'master' of https://github.com/nzakas/eslint into ok (Yusuke Suzuki)
-* Created brace-style rule. (Ian Christian Myers)
-* Formatters can now process multiple files at once (Jamund Ferguson)
-* Rule: Do not use 'new' for side effects (Ilya Volodin)
-* Adds smarter-eqeqeq rule (Josh Perez)
-* Add EditorConfig file for consistent editor/IDE behavior (Jed Hunsaker)
-* Fix the positive case for no-unreachable where there is no return statement at all, or if the return is at the end. Those cases should not return any errors. The error condition was not be checked before throwing the rule error. (Joel Feenstra)
-* Adds test and fix for no-octal on 0 literal (Mark Macdonald)
-* Don't report no-empty warnings when a parent is FunctionExpression / FunctionDeclaration (Yusuke Suzuki)
-* Add api.getAncestors (Yusuke Suzuki)
-* Ensure estraverse version 1.2.0 or later (Yusuke Suzuki)
-* Fixes no-alert lint rule for non identifier calls (Josh Perez)
-* Fixes exception when init is null (Josh Perez)
-* Fixes no-octal check to only check for numbers (Josh Perez)
-* 0.0.7-dev (Nicholas C. Zakas)
-* 0.0.6 (Nicholas C. Zakas)
-* Follow the rule naming conventions (James Allardice)
-* Add rule for missing radix argument to parseInt (James Allardice)
-* Allow return, falls-through comment, and throw for falls-through (Matt DuVall)
-* Merge branch 'master' of https://github.com/nzakas/eslint into rule-fall-through (Matt DuVall)
-* Globals are not good, declare len (Matt DuVall)
-* Rule to add no-fall-through (Matt DuVall)
-
-v0.0.6 - July 16, 2013
-
-* 0.0.6 (Nicholas C. Zakas)
-* Changed semi rule to use tokens instead of source (Nicholas C. Zakas)
-* Renaming new-parens rule (Ilya Volodin)
-* Renaming no-new-wrappers rule and adding tests (Ilya Volodin)
-* Add license URL (Nick Schonning)
-* Remove unused sinon requires (Nick Schonning)
-* Remove redundant JSHint directives (Nick Schonning)
-* Rule: Do not use constructor for wrapper objects (Ilya Volodin)
-* Test node 0.11 unstable but allow it to fail (Nick Schonning)
-* Rule: Constructor should use parentheses (Ilya Volodin)
-* Fix reference to "CSS Lint" in Contributing documentation (Brian McKenna)
-* Add git attributes file for line endings (Andy Hu)
-* Rename to create an 'index' file in GH web view (Evan Goer)
-* Avoid accidentally creating a markdown link (Evan Goer)
-* Add headings and correct internal links (Evan Goer)
-* Add wiki files to docs directory (Evan Goer)
-* Add rules for leading/trailing decimal points (James Allardice)
-* Add rule to prevent comparisons with value NaN (James Allardice)
-* Fixing jshint error (Ilya Volodin)
-* Rule: no octal literals (Ilya Volodin)
-* Rule: no undefined when initializing variables (Ilya Volodin)
-* Updated CONTRIBUTING.md (Nicholas C. Zakas)
-* Make sure namespaces are honored in new-cap (Nicholas C. Zakas)
-* Make sure no-empty also checks for ';;' (Nicholas C. Zakas)
-* Add CLI option to output version (Nicholas C. Zakas)
-* Updated contribution guidelines (Nicholas C. Zakas)
-* Fixing jshint complaints. (Joel Feenstra)
-* Converting to a switch statement and declaring variables. (Joel Feenstra)
-* Added .jshintrc file (until ESLint can lint itself) and cleaned up JSHint warnings (Nicholas C. Zakas)
-* Merge branch 'master' of github.com:nzakas/jscheck (Nicholas C. Zakas)
-* A bit of cleanup (Nicholas C. Zakas)
-* Add unreachable code detection for switch cases and after continue/break. (Joel Feenstra)
-* Add support for detecting unreachable code after a throw or return statement. (Joel Feenstra)
-* Fix curly brace check when an if statement is the alternate. (Joel Feenstra)
-* Check for empty switch statements with no cases. (Matt DuVall)
-* Added CONTRIBUTING.md (Nicholas C. Zakas)
-* Added rule to check for missing semicolons (fixes #9) (Nicholas C. Zakas)
-* Verify that file paths exist before reading the file (Matt DuVall)
-* Added guard-for-in rule (fixes #1) (Nicholas C. Zakas)
-* Run linting with npm test as well (Nicholas C. Zakas)
-* Removed foo.txt (Nicholas C. Zakas)
-* Updated config file with new no-caller ID (Nicholas C. Zakas)
-* Changed name of no-arg to no-caller (Nicholas C. Zakas)
-* Increased test coverage (Nicholas C. Zakas)
-* Got npm test to work with istanbul, huzzah\! (Nicholas C. Zakas)
-* Moved /config to /conf (Nicholas C. Zakas)
-* Added script to auto-generate changelog (Nicholas C. Zakas)
-* Add `quote-props` rule (Mathias Bynens)
-* Cleaned up relationship between bin/eslint, lib/cli.js, and lib/eslint.js (Nicholas C. Zakas)
-* Add problem count to compact formatter (Nicholas C. Zakas)
-* Fix merge conflict (Nicholas C. Zakas)
-* Change reporters to formatters, add format command line option. Also added tests for compact format. (Nicholas C. Zakas)
-* Change reporters to formatters, add format command line option (Nicholas C. Zakas)
-* Start development of 0.0.6-dev (Nicholas C. Zakas)
diff --git a/node_modules/eslint/LICENSE b/node_modules/eslint/LICENSE
index 7fe552a86..b607bb36e 100644
--- a/node_modules/eslint/LICENSE
+++ b/node_modules/eslint/LICENSE
@@ -1,4 +1,4 @@
-Copyright JS Foundation and other contributors, https://js.foundation
+Copyright OpenJS Foundation and other contributors, 
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/node_modules/eslint/README.md b/node_modules/eslint/README.md
index 14ba7e2cb..227d40c7c 100644
--- a/node_modules/eslint/README.md
+++ b/node_modules/eslint/README.md
@@ -10,14 +10,14 @@
 # ESLint
 
 [Website](https://eslint.org) |
-[Configuring](https://eslint.org/docs/user-guide/configuring) |
+[Configure ESLint](https://eslint.org/docs/latest/use/configure) |
 [Rules](https://eslint.org/docs/rules/) |
-[Contributing](https://eslint.org/docs/developer-guide/contributing) |
-[Reporting Bugs](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) |
+[Contribute to ESLint](https://eslint.org/docs/latest/contribute) |
+[Report Bugs](https://eslint.org/docs/latest/contribute/report-bugs) |
 [Code of Conduct](https://eslint.org/conduct) |
 [Twitter](https://twitter.com/geteslint) |
-[Mailing List](https://groups.google.com/group/eslint) |
-[Chat Room](https://eslint.org/chat)
+[Discord](https://eslint.org/chat) |
+[Mastodon](https://fosstodon.org/@eslint)
 
 ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:
 
@@ -31,7 +31,7 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J
 2. [Configuration](#configuration)
 3. [Code of Conduct](#code-of-conduct)
 4. [Filing Issues](#filing-issues)
-5. [Frequently Asked Questions](#faq)
+5. [Frequently Asked Questions](#frequently-asked-questions)
 6. [Releases](#releases)
 7. [Security Policy](#security-policy)
 8. [Semantic Versioning Policy](#semantic-versioning-policy)
@@ -41,31 +41,25 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J
 12. [Sponsors](#sponsors)
 13. [Technology Sponsors](#technology-sponsors)
 
-## Installation and Usage
+## Installation and Usage
 
-Prerequisites: [Node.js](https://nodejs.org/) (`^10.12.0`, or `>=12.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.)
+Prerequisites: [Node.js](https://nodejs.org/) (`^12.22.0`, `^14.17.0`, or `>=16.0.0`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.)
 
-You can install ESLint using npm:
+You can install and configure ESLint using this command:
 
-```
-$ npm install eslint --save-dev
-```
-
-You should then set up a configuration file:
-
-```
-$ ./node_modules/.bin/eslint --init
+```shell
+npm init @eslint/config
 ```
 
 After that, you can run ESLint on any file or directory like this:
 
-```
-$ ./node_modules/.bin/eslint yourfile.js
+```shell
+./node_modules/.bin/eslint yourfile.js
 ```
 
-## Configuration
+## Configuration
 
-After running `eslint --init`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
+After running `npm init @eslint/config`, you'll have an `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
 
 ```json
 {
@@ -82,34 +76,34 @@ The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/do
 * `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
 * `"error"` or `2` - turn the rule on as an error (exit code will be 1)
 
-The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/user-guide/configuring)).
+The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/latest/use/configure)).
 
-## Code of Conduct
+## Code of Conduct
 
 ESLint adheres to the [JS Foundation Code of Conduct](https://eslint.org/conduct).
 
-## Filing Issues
+## Filing Issues
 
 Before filing an issue, please be sure to read the guidelines for what you're reporting:
 
-* [Bug Report](https://eslint.org/docs/developer-guide/contributing/reporting-bugs)
-* [Propose a New Rule](https://eslint.org/docs/developer-guide/contributing/new-rules)
-* [Proposing a Rule Change](https://eslint.org/docs/developer-guide/contributing/rule-changes)
-* [Request a Change](https://eslint.org/docs/developer-guide/contributing/changes)
+* [Bug Report](https://eslint.org/docs/latest/contribute/report-bugs)
+* [Propose a New Rule](https://eslint.org/docs/latest/contribute/propose-new-rule)
+* [Proposing a Rule Change](https://eslint.org/docs/latest/contribute/propose-rule-change)
+* [Request a Change](https://eslint.org/docs/latest/contribute/request-change)
 
-## Frequently Asked Questions
+## Frequently Asked Questions
 
 ### I'm using JSCS, should I migrate to ESLint?
 
 Yes. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life) and is no longer supported.
 
-We have prepared a [migration guide](https://eslint.org/docs/user-guide/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration.
+We have prepared a [migration guide](https://eslint.org/docs/latest/use/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration.
 
 We are now at or near 100% compatibility with JSCS. If you try ESLint and believe we are not yet compatible with a JSCS rule/configuration, please create an issue (mentioning that it is a JSCS compatibility issue) and we will evaluate it as per our normal process.
 
 ### Does Prettier replace ESLint?
 
-No, ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use ESLint for everything, or you can combine both using Prettier to format your code and ESLint to catch possible errors.
+No, ESLint and Prettier have diffent jobs: ESLint is a linter (looking for problematic patterns) and Prettier is a code formatter. Using both tools is common, refer to [Prettier's documentation](https://prettier.io/docs/en/install#eslint-and-other-linters) to learn how to configure them to work well with each other.
 
 ### Why can't ESLint find my plugins?
 
@@ -119,23 +113,23 @@ No, ESLint does both traditional linting (looking for problematic patterns) and
 
 ### Does ESLint support JSX?
 
-Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/user-guide/configuring)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
+Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/latest/use/configure)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics.
 
 ### What ECMAScript versions does ESLint support?
 
-ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, and 2020. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/user-guide/configuring).
+ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, and 2023. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/latest/use/configure).
 
 ### What about experimental features?
 
 ESLint's parser only officially supports the latest final ECMAScript standard. We will make changes to core rules in order to avoid crashes on stage 3 ECMAScript syntax proposals (as long as they are implemented using the correct experimental ESTree syntax). We may make changes to core rules to better work with language extensions (such as JSX, Flow, and TypeScript) on a case-by-case basis.
 
-In other cases (including if rules need to warn on more or fewer cases due to new syntax, rather than just not crashing), we recommend you use other parsers and/or rule plugins. If you are using Babel, you can use the [babel-eslint](https://github.com/babel/babel-eslint) parser and [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) to use any option available in Babel.
+In other cases (including if rules need to warn on more or fewer cases due to new syntax, rather than just not crashing), we recommend you use other parsers and/or rule plugins. If you are using Babel, you can use [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser) and [@babel/eslint-plugin](https://www.npmjs.com/package/@babel/eslint-plugin) to use any option available in Babel.
 
-Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/developer-guide/contributing). Until then, please use the appropriate parser and plugin(s) for your experimental feature.
+Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/latest/contribute). Until then, please use the appropriate parser and plugin(s) for your experimental feature.
 
 ### Where to ask for help?
 
-Join our [Mailing List](https://groups.google.com/group/eslint) or [Chatroom](https://eslint.org/chat).
+Open a [discussion](https://github.com/eslint/eslint/discussions) or stop by our [Discord server](https://eslint.org/chat).
 
 ### Why doesn't ESLint lock dependency versions?
 
@@ -147,15 +141,15 @@ We intentionally don't lock dependency versions so that we have the latest compa
 
 The Twilio blog has a [deeper dive](https://www.twilio.com/blog/lockfiles-nodejs) to learn more.
 
-## Releases
+## Releases
 
 We have scheduled releases every two weeks on Friday or Saturday. You can follow a [release issue](https://github.com/eslint/eslint/issues?q=is%3Aopen+is%3Aissue+label%3Arelease) for updates about the scheduling of any particular release.
 
-## Security Policy
+## Security Policy
 
 ESLint takes security seriously. We work hard to ensure that ESLint is safe for everyone and that security issues are addressed quickly and responsibly. Read the full [security policy](https://github.com/eslint/.github/blob/master/SECURITY.md).
 
-## Semantic Versioning Policy
+## Semantic Versioning Policy
 
 ESLint follows [semantic versioning](https://semver.org). However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:
 
@@ -188,7 +182,7 @@ ESLint follows [semantic versioning](https://semver.org). However, due to the na
 
 According to our policy, any minor update may report more linting errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (`~`) in `package.json` e.g. `"eslint": "~3.1.0"` to guarantee the results of your builds.
 
-## Stylistic Rule Updates
+## Stylistic Rule Updates
 
 Stylistic rules are frozen according to [our policy](https://eslint.org/blog/2020/05/changes-to-rules-policies) on how we evaluate new rules and rule changes.
 This means:
@@ -197,15 +191,16 @@ This means:
 * **New ECMAScript features**: We will also make sure stylistic rules are compatible with new ECMAScript features.
 * **New options**: We will **not** add any new options to stylistic rules unless an option is the only way to fix a bug or support a newly-added ECMAScript feature.
 
-## License
+## License
 
 [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Feslint%2Feslint?ref=badge_large)
 
-## Team
+## Team
 
 These folks keep the project moving and are resources for help.
 
 
+
 
 
 ### Technical Steering Committee (TSC)
@@ -214,79 +209,95 @@ The people who manage releases, review feature requests, and meet regularly to e
 
 
-
+Nicholas C. Zakas's Avatar
Nicholas C. Zakas
- -
-Brandon Mills -
-
- -
-Toru Nagashima -
-
-
+Milos Djermanovic's Avatar
Milos Djermanovic
- ### Reviewers The people who review and implement new features.
-
-薛定谔的猫 +唯然's Avatar
+唯然 +
+
+ +Nitin Kumar's Avatar
+Nitin Kumar
- - - ### Committers The people who review and fix bugs and help triage issues.
- -
-Pig Fang +
+Bryan Mishkin's Avatar
+Bryan Mishkin
- -
-Anix +
+Francesco Trotta's Avatar
+Francesco Trotta
- -
-YeonJuan +
+Yosuke Ota's Avatar
+Yosuke Ota +
+
+ +Tanuj Kanti's Avatar
+Tanuj Kanti
+### Website Team + +Team members who focus specifically on eslint.org + +
+ +Amaresh  S M's Avatar
+Amaresh S M +
+
+ +Strek's Avatar
+Strek +
+
+ +Percy Ma's Avatar
+Percy Ma +
+
-## Sponsors +## Sponsors The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://opencollective.com/eslint) to get your logo on our README and website.

Platinum Sponsors

-

Automattic

Gold Sponsors

-

Nx (by Nrwl) Chrome's Web Framework & Tools Performance Fund Shopify Salesforce Airbnb Microsoft Substack

Silver Sponsors

-

Retool Liftoff

Bronze Sponsors

-

Buy.Fineproxy.Org Anagram Solver Bugsnag Stability Monitoring Mixpanel VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Fire Stick Tricks

+

Chrome Frameworks Fund Automattic

Gold Sponsors

+

Salesforce Airbnb

Silver Sponsors

+

Liftoff American Express Workleap

Bronze Sponsors

+

ThemeIsle Anagram Solver Icons8 Discord Transloadit Ignition Nx HeroCoders

-## Technology Sponsors +## Technology Sponsors * Site search ([eslint.org](https://eslint.org)) is sponsored by [Algolia](https://www.algolia.com) * Hosting for ([eslint.org](https://eslint.org)) is sponsored by [Netlify](https://www.netlify.com) diff --git a/node_modules/eslint/bin/eslint.js b/node_modules/eslint/bin/eslint.js index 86291b0f5..eeb4647e7 100755 --- a/node_modules/eslint/bin/eslint.js +++ b/node_modules/eslint/bin/eslint.js @@ -5,13 +5,10 @@ * @author Nicholas C. Zakas */ -/* eslint no-console:off */ +/* eslint no-console:off -- CLI */ "use strict"; -// to use V8's code cache to speed up instantiation time -require("v8-compile-cache"); - // must do this initialization *before* other requires in order to work if (process.argv.includes("--debug")) { require("debug").enable("eslint:*,-eslint:code-path,eslintrc:*"); @@ -66,13 +63,10 @@ function readStdin() { */ function getErrorMessage(error) { - // Lazy loading because those are used only if error happened. - const fs = require("fs"); - const path = require("path"); + // Lazy loading because this is used only if an error happened. const util = require("util"); - const lodash = require("lodash"); - // Foolproof -- thirdparty module might throw non-object. + // Foolproof -- third-party module might throw non-object. if (typeof error !== "object" || error === null) { return String(error); } @@ -80,14 +74,7 @@ function getErrorMessage(error) { // Use templates if `error.messageTemplate` is present. if (typeof error.messageTemplate === "string") { try { - const templateFilePath = path.resolve( - __dirname, - `../messages/${error.messageTemplate}.txt` - ); - - // Use sync API because Node.js should exit at this tick. - const templateText = fs.readFileSync(templateFilePath, "utf-8"); - const template = lodash.template(templateText); + const template = require(`../messages/${error.messageTemplate}.js`); return template(error.messageData || {}); } catch { @@ -105,6 +92,19 @@ function getErrorMessage(error) { return util.format("%o", error); } +/** + * Tracks error messages that are shown to the user so we only ever show the + * same message once. + * @type {Set} + */ +const displayedErrors = new Set(); + +/** + * Tracks whether an unexpected error was caught + * @type {boolean} + */ +let hadFatalError = false; + /** * Catch and report unexpected error. * @param {any} error The thrown error object. @@ -112,16 +112,20 @@ function getErrorMessage(error) { */ function onFatalError(error) { process.exitCode = 2; + hadFatalError = true; const { version } = require("../package.json"); - const message = getErrorMessage(error); - - console.error(` + const message = ` Oops! Something went wrong! :( ESLint: ${version} -${message}`); +${getErrorMessage(error)}`; + + if (!displayedErrors.has(message)) { + console.error(message); + displayedErrors.add(message); + } } //------------------------------------------------------------------------------ @@ -134,13 +138,36 @@ ${message}`); // Call the config initializer if `--init` is present. if (process.argv.includes("--init")) { - await require("../lib/init/config-initializer").initializeConfig(); + + // `eslint --init` has been moved to `@eslint/create-config` + console.warn("You can also run this command directly using 'npm init @eslint/config'."); + + const spawn = require("cross-spawn"); + + spawn.sync("npm", ["init", "@eslint/config"], { encoding: "utf8", stdio: "inherit" }); return; } // Otherwise, call the CLI. - process.exitCode = await require("../lib/cli").execute( + const exitCode = await require("../lib/cli").execute( process.argv, - process.argv.includes("--stdin") ? await readStdin() : null + process.argv.includes("--stdin") ? await readStdin() : null, + true ); + + /* + * If an uncaught exception or unhandled rejection was detected in the meantime, + * keep the fatal exit code 2 that is already assigned to `process.exitCode`. + * Without this condition, exit code 2 (unsuccessful execution) could be overwritten with + * 1 (successful execution, lint problems found) or even 0 (successful execution, no lint problems found). + * This ensures that unexpected errors that seemingly don't affect the success + * of the execution will still cause a non-zero exit code, as it's a common + * practice and the default behavior of Node.js to exit with non-zero + * in case of an uncaught exception or unhandled rejection. + * + * Otherwise, assign the exit code returned from CLI. + */ + if (!hadFatalError) { + process.exitCode = exitCode; + } }()).catch(onFatalError); diff --git a/node_modules/eslint/conf/category-list.json b/node_modules/eslint/conf/category-list.json deleted file mode 100644 index cd3b816b6..000000000 --- a/node_modules/eslint/conf/category-list.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "categories": [ - { "name": "Possible Errors", "description": "These rules relate to possible syntax or logic errors in JavaScript code:" }, - { "name": "Best Practices", "description": "These rules relate to better ways of doing things to help you avoid problems:" }, - { "name": "Strict Mode", "description": "These rules relate to strict mode directives:" }, - { "name": "Variables", "description": "These rules relate to variable declarations:" }, - { "name": "Stylistic Issues", "description": "These rules relate to style guidelines, and are therefore quite subjective:" }, - { "name": "ECMAScript 6", "description": "These rules relate to ES6, also known as ES2015:" } - ], - "deprecated": { - "name": "Deprecated", - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", - "rules": [] - }, - "removed": { - "name": "Removed", - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", - "rules": [ - { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, - { "removed": "global-strict", "replacedBy": ["strict"] }, - { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] }, - { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] }, - { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] }, - { "removed": "no-empty-label", "replacedBy": ["no-labels"] }, - { "removed": "no-extra-strict", "replacedBy": ["strict"] }, - { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] }, - { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] }, - { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] }, - { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] }, - { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] }, - { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] }, - { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] }, - { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] }, - { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] } - ] - } -} diff --git a/node_modules/eslint/conf/eslint-all.js b/node_modules/eslint/conf/eslint-all.js deleted file mode 100644 index 10c5304fd..000000000 --- a/node_modules/eslint/conf/eslint-all.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * @fileoverview Config to enable all rules. - * @author Robert Fletcher - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const builtInRules = require("../lib/rules"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const allRules = {}; - -for (const [ruleId, rule] of builtInRules) { - if (!rule.meta.deprecated) { - allRules[ruleId] = "error"; - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -/** @type {import("../lib/shared/types").ConfigData} */ -module.exports = { rules: allRules }; diff --git a/node_modules/eslint/conf/globals.js b/node_modules/eslint/conf/globals.js new file mode 100644 index 000000000..58710e05b --- /dev/null +++ b/node_modules/eslint/conf/globals.js @@ -0,0 +1,154 @@ +/** + * @fileoverview Globals for ecmaVersion/sourceType + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Globals +//----------------------------------------------------------------------------- + +const commonjs = { + exports: true, + global: false, + module: false, + require: false +}; + +const es3 = { + Array: false, + Boolean: false, + constructor: false, + Date: false, + decodeURI: false, + decodeURIComponent: false, + encodeURI: false, + encodeURIComponent: false, + Error: false, + escape: false, + eval: false, + EvalError: false, + Function: false, + hasOwnProperty: false, + Infinity: false, + isFinite: false, + isNaN: false, + isPrototypeOf: false, + Math: false, + NaN: false, + Number: false, + Object: false, + parseFloat: false, + parseInt: false, + propertyIsEnumerable: false, + RangeError: false, + ReferenceError: false, + RegExp: false, + String: false, + SyntaxError: false, + toLocaleString: false, + toString: false, + TypeError: false, + undefined: false, + unescape: false, + URIError: false, + valueOf: false +}; + +const es5 = { + ...es3, + JSON: false +}; + +const es2015 = { + ...es5, + ArrayBuffer: false, + DataView: false, + Float32Array: false, + Float64Array: false, + Int16Array: false, + Int32Array: false, + Int8Array: false, + Map: false, + Promise: false, + Proxy: false, + Reflect: false, + Set: false, + Symbol: false, + Uint16Array: false, + Uint32Array: false, + Uint8Array: false, + Uint8ClampedArray: false, + WeakMap: false, + WeakSet: false +}; + +// no new globals in ES2016 +const es2016 = { + ...es2015 +}; + +const es2017 = { + ...es2016, + Atomics: false, + SharedArrayBuffer: false +}; + +// no new globals in ES2018 +const es2018 = { + ...es2017 +}; + +// no new globals in ES2019 +const es2019 = { + ...es2018 +}; + +const es2020 = { + ...es2019, + BigInt: false, + BigInt64Array: false, + BigUint64Array: false, + globalThis: false +}; + +const es2021 = { + ...es2020, + AggregateError: false, + FinalizationRegistry: false, + WeakRef: false +}; + +const es2022 = { + ...es2021 +}; + +const es2023 = { + ...es2022 +}; + +const es2024 = { + ...es2023 +}; + + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +module.exports = { + commonjs, + es3, + es5, + es2015, + es2016, + es2017, + es2018, + es2019, + es2020, + es2021, + es2022, + es2023, + es2024 +}; diff --git a/node_modules/eslint/conf/rule-type-list.json b/node_modules/eslint/conf/rule-type-list.json new file mode 100644 index 000000000..6ca730f34 --- /dev/null +++ b/node_modules/eslint/conf/rule-type-list.json @@ -0,0 +1,28 @@ +{ + "types": { + "problem": [], + "suggestion": [], + "layout": [] + }, + "deprecated": [], + "removed": [ + { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, + { "removed": "global-strict", "replacedBy": ["strict"] }, + { "removed": "no-arrow-condition", "replacedBy": ["no-confusing-arrow", "no-constant-condition"] }, + { "removed": "no-comma-dangle", "replacedBy": ["comma-dangle"] }, + { "removed": "no-empty-class", "replacedBy": ["no-empty-character-class"] }, + { "removed": "no-empty-label", "replacedBy": ["no-labels"] }, + { "removed": "no-extra-strict", "replacedBy": ["strict"] }, + { "removed": "no-reserved-keys", "replacedBy": ["quote-props"] }, + { "removed": "no-space-before-semi", "replacedBy": ["semi-spacing"] }, + { "removed": "no-wrap-func", "replacedBy": ["no-extra-parens"] }, + { "removed": "space-after-function-name", "replacedBy": ["space-before-function-paren"] }, + { "removed": "space-after-keywords", "replacedBy": ["keyword-spacing"] }, + { "removed": "space-before-function-parentheses", "replacedBy": ["space-before-function-paren"] }, + { "removed": "space-before-keywords", "replacedBy": ["keyword-spacing"] }, + { "removed": "space-in-brackets", "replacedBy": ["object-curly-spacing", "array-bracket-spacing"] }, + { "removed": "space-return-throw-case", "replacedBy": ["keyword-spacing"] }, + { "removed": "space-unary-word-ops", "replacedBy": ["space-unary-ops"] }, + { "removed": "spaced-line-comment", "replacedBy": ["spaced-comment"] } + ] +} diff --git a/node_modules/eslint/lib/api.js b/node_modules/eslint/lib/api.js index e4b6643b4..cbaac8fef 100644 --- a/node_modules/eslint/lib/api.js +++ b/node_modules/eslint/lib/api.js @@ -5,30 +5,50 @@ "use strict"; -const { CLIEngine } = require("./cli-engine"); -const { ESLint } = require("./eslint"); +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const { ESLint, FlatESLint } = require("./eslint"); +const { shouldUseFlatConfig } = require("./eslint/flat-eslint"); const { Linter } = require("./linter"); const { RuleTester } = require("./rule-tester"); const { SourceCode } = require("./source-code"); +//----------------------------------------------------------------------------- +// Functions +//----------------------------------------------------------------------------- + +/** + * Loads the correct ESLint constructor given the options. + * @param {Object} [options] The options object + * @param {boolean} [options.useFlatConfig] Whether or not to use a flat config + * @param {string} [options.cwd] The current working directory + * @returns {Promise} The ESLint constructor + */ +async function loadESLint({ useFlatConfig, cwd = process.cwd() } = {}) { + + /* + * Note: The v9.x version of this function doesn't have a cwd option + * because it's not used. It's only used in the v8.x version of this + * function. + */ + + const shouldESLintUseFlatConfig = typeof useFlatConfig === "boolean" + ? useFlatConfig + : await shouldUseFlatConfig({ cwd }); + + return shouldESLintUseFlatConfig ? FlatESLint : ESLint; +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + module.exports = { Linter, - CLIEngine, + loadESLint, ESLint, RuleTester, SourceCode }; - -// DOTO: remove deprecated API. -let deprecatedLinterInstance = null; - -Object.defineProperty(module.exports, "linter", { - enumerable: false, - get() { - if (!deprecatedLinterInstance) { - deprecatedLinterInstance = new Linter(); - } - - return deprecatedLinterInstance; - } -}); diff --git a/node_modules/eslint/lib/cli-engine/cli-engine.js b/node_modules/eslint/lib/cli-engine/cli-engine.js index b1befaa04..49c8902c1 100644 --- a/node_modules/eslint/lib/cli-engine/cli-engine.js +++ b/node_modules/eslint/lib/cli-engine/cli-engine.js @@ -27,16 +27,11 @@ const { naming, CascadingConfigArrayFactory, IgnorePattern, - getUsedExtractedConfigs + getUsedExtractedConfigs, + ModuleResolver } } = require("@eslint/eslintrc"); -/* - * For some reason, ModuleResolver must be included via filepath instead of by - * API exports in order to work properly. That's why this is separated out onto - * its own require() statement. - */ -const ModuleResolver = require("@eslint/eslintrc/lib/shared/relative-module-resolver"); const { FileEnumerator } = require("./file-enumerator"); const { Linter } = require("../linter"); @@ -46,7 +41,7 @@ const hash = require("./hash"); const LintResultCache = require("./lint-result-cache"); const debug = require("debug")("eslint:cli-engine"); -const validFixTypes = new Set(["problem", "suggestion", "layout"]); +const validFixTypes = new Set(["directive", "problem", "suggestion", "layout"]); //------------------------------------------------------------------------------ // Typedefs @@ -56,12 +51,14 @@ const validFixTypes = new Set(["problem", "suggestion", "layout"]); /** @typedef {import("../shared/types").ConfigData} ConfigData */ /** @typedef {import("../shared/types").DeprecatedRuleInfo} DeprecatedRuleInfo */ /** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */ /** @typedef {import("../shared/types").ParserOptions} ParserOptions */ /** @typedef {import("../shared/types").Plugin} Plugin */ /** @typedef {import("../shared/types").RuleConf} RuleConf */ /** @typedef {import("../shared/types").Rule} Rule */ -/** @typedef {ReturnType} ConfigArray */ -/** @typedef {ReturnType} ExtractedConfig */ +/** @typedef {import("../shared/types").FormatterFunction} FormatterFunction */ +/** @typedef {ReturnType} ConfigArray */ +/** @typedef {ReturnType} ExtractedConfig */ /** * The options to configure a CLI engine with. @@ -86,7 +83,7 @@ const validFixTypes = new Set(["problem", "suggestion", "layout"]); * @property {string[]} [plugins] An array of plugins to load. * @property {Record} [rules] An object of rules to use. * @property {string[]} [rulePaths] An array of directories to load custom rules from. - * @property {boolean} [reportUnusedDisableDirectives] `true` adds reports for unused eslint-disable directives + * @property {boolean|string} [reportUnusedDisableDirectives] `true`, `"error"` or '"warn"' adds reports for unused eslint-disable directives * @property {boolean} [globInputPaths] Set to false to skip glob resolution of input file paths to lint (default: true). If false, each input file paths is assumed to be a non-glob path to an existing file. * @property {string} [resolvePluginsRelativeTo] The folder where plugins should be resolved from, defaulting to the CWD */ @@ -96,7 +93,9 @@ const validFixTypes = new Set(["problem", "suggestion", "layout"]); * @typedef {Object} LintResult * @property {string} filePath The path to the file that was linted. * @property {LintMessage[]} messages All of the messages for the result. + * @property {SuppressedLintMessage[]} suppressedMessages All of the suppressed messages for the result. * @property {number} errorCount Number of errors for the result. + * @property {number} fatalErrorCount Number of fatal errors for the result. * @property {number} warningCount Number of warnings for the result. * @property {number} fixableErrorCount Number of fixable errors for the result. * @property {number} fixableWarningCount Number of fixable warnings for the result. @@ -109,6 +108,7 @@ const validFixTypes = new Set(["problem", "suggestion", "layout"]); * @typedef {Object} LintReport * @property {LintResult[]} results All of the result. * @property {number} errorCount Number of errors for the result. + * @property {number} fatalErrorCount Number of fatal errors for the result. * @property {number} warningCount Number of warnings for the result. * @property {number} fixableErrorCount Number of fixable errors for the result. * @property {number} fixableWarningCount Number of fixable warnings for the result. @@ -158,9 +158,22 @@ function validateFixTypes(fixTypes) { * @private */ function calculateStatsPerFile(messages) { - return messages.reduce((stat, message) => { + const stat = { + errorCount: 0, + fatalErrorCount: 0, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0 + }; + + for (let i = 0; i < messages.length; i++) { + const message = messages[i]; + if (message.fatal || message.severity === 2) { stat.errorCount++; + if (message.fatal) { + stat.fatalErrorCount++; + } if (message.fix) { stat.fixableErrorCount++; } @@ -170,13 +183,8 @@ function calculateStatsPerFile(messages) { stat.fixableWarningCount++; } } - return stat; - }, { - errorCount: 0, - warningCount: 0, - fixableErrorCount: 0, - fixableWarningCount: 0 - }); + } + return stat; } /** @@ -186,18 +194,25 @@ function calculateStatsPerFile(messages) { * @private */ function calculateStatsPerRun(results) { - return results.reduce((stat, result) => { - stat.errorCount += result.errorCount; - stat.warningCount += result.warningCount; - stat.fixableErrorCount += result.fixableErrorCount; - stat.fixableWarningCount += result.fixableWarningCount; - return stat; - }, { + const stat = { errorCount: 0, + fatalErrorCount: 0, warningCount: 0, fixableErrorCount: 0, fixableWarningCount: 0 - }); + }; + + for (let i = 0; i < results.length; i++) { + const result = results[i]; + + stat.errorCount += result.errorCount; + stat.fatalErrorCount += result.fatalErrorCount; + stat.warningCount += result.warningCount; + stat.fixableErrorCount += result.fixableErrorCount; + stat.fixableWarningCount += result.fixableWarningCount; + } + + return stat; } /** @@ -209,7 +224,7 @@ function calculateStatsPerRun(results) { * @param {ConfigArray} config.config The config. * @param {boolean} config.fix If `true` then it does fix. * @param {boolean} config.allowInlineConfig If `true` then it uses directive comments. - * @param {boolean} config.reportUnusedDisableDirectives If `true` then it reports unused `eslint-disable` comments. + * @param {boolean|string} config.reportUnusedDisableDirectives If `true`, `"error"` or '"warn"', then it reports unused `eslint-disable` comments. * @param {FileEnumerator} config.fileEnumerator The file enumerator to check if a path is a target or not. * @param {Linter} config.linter The linter instance to verify. * @returns {LintResult} The result of linting. @@ -260,6 +275,7 @@ function verifyText({ const result = { filePath, messages, + suppressedMessages: linter.getSuppressedMessages(), ...calculateStatsPerFile(messages) }; @@ -279,7 +295,7 @@ function verifyText({ /** * Returns result with warning by ignore settings * @param {string} filePath File path of checked code - * @param {string} baseDir Absolute path of base directory + * @param {string} baseDir Absolute path of base directory * @returns {LintResult} Result with single warning * @private */ @@ -301,12 +317,16 @@ function createIgnoreResult(filePath, baseDir) { filePath: path.resolve(filePath), messages: [ { + ruleId: null, fatal: false, severity: 1, - message + message, + nodeType: null } ], + suppressedMessages: [], errorCount: 0, + fatalErrorCount: 0, warningCount: 1, fixableErrorCount: 0, fixableWarningCount: 0 @@ -330,6 +350,23 @@ function getRule(ruleId, configArrays) { return builtInRules.get(ruleId) || null; } +/** + * Checks whether a message's rule type should be fixed. + * @param {LintMessage} message The message to check. + * @param {ConfigArray[]} lastConfigArrays The list of config arrays that the last `executeOnFiles` or `executeOnText` used. + * @param {string[]} fixTypes An array of fix types to check. + * @returns {boolean} Whether the message should be fixed. + */ +function shouldMessageBeFixed(message, lastConfigArrays, fixTypes) { + if (!message.ruleId) { + return fixTypes.has("directive"); + } + + const rule = message.ruleId && getRule(message.ruleId, lastConfigArrays); + + return Boolean(rule && rule.meta && fixTypes.has(rule.meta.type)); +} + /** * Collect used deprecated rules. * @param {ConfigArray[]} usedConfigArrays The config arrays which were used. @@ -340,9 +377,7 @@ function *iterateRuleDeprecationWarnings(usedConfigArrays) { // Flatten used configs. /** @type {ExtractedConfig[]} */ - const configs = [].concat( - ...usedConfigArrays.map(getUsedExtractedConfigs) - ); + const configs = usedConfigArrays.flatMap(getUsedExtractedConfigs); // Traverse rule configs. for (const config of configs) { @@ -390,7 +425,7 @@ function isErrorMessage(message) { * a directory or looks like a directory (ends in `path.sep`), in which case the file * name will be the `cacheFile/.cache_hashOfCWD` * - * if cacheFile points to a file or looks like a file then in will just use that file + * if cacheFile points to a file or looks like a file then it will just use that file * @param {string} cacheFile The name of file to be used to store the cache * @param {string} cwd Current working directory * @returns {string} the resolved path to the cache file @@ -462,6 +497,7 @@ function getCacheFile(cacheFile, cwd) { * @param {string[]|null} keys The keys to assign true. * @param {boolean} defaultValue The default value for each property. * @param {string} displayName The property name which is used in error message. + * @throws {Error} Requires array. * @returns {Record} The boolean map. */ function toBooleanMap(keys, defaultValue, displayName) { @@ -525,6 +561,7 @@ function createConfigDataFromOptions(options) { /** * Checks whether a directory exists at the given location * @param {string} resolvedPath A path from the CWD + * @throws {Error} As thrown by `fs.statSync` or `fs.isDirectory`. * @returns {boolean} `true` if a directory exists */ function directoryExists(resolvedPath) { @@ -542,13 +579,18 @@ function directoryExists(resolvedPath) { // Public Interface //------------------------------------------------------------------------------ +/** + * Core CLI. + */ class CLIEngine { /** * Creates a new instance of the core CLI engine. * @param {CLIEngineOptions} providedOptions The options for this instance. + * @param {Object} [additionalData] Additional settings that are not CLIEngineOptions. + * @param {Record|null} [additionalData.preloadedPlugins] Preloaded plugins. */ - constructor(providedOptions) { + constructor(providedOptions, { preloadedPlugins } = {}) { const options = Object.assign( Object.create(null), defaultOptions, @@ -561,6 +603,13 @@ class CLIEngine { } const additionalPluginPool = new Map(); + + if (preloadedPlugins) { + for (const [id, plugin] of Object.entries(preloadedPlugins)) { + additionalPluginPool.set(id, plugin); + } + } + const cacheFilePath = getCacheFile( options.cacheLocation || options.cacheFile, options.cwd @@ -577,8 +626,8 @@ class CLIEngine { useEslintrc: options.useEslintrc, builtInRules, loadRules, - eslintRecommendedPath: path.resolve(__dirname, "../../conf/eslint-recommended.js"), - eslintAllPath: path.resolve(__dirname, "../../conf/eslint-all.js") + getEslintRecommendedConfig: () => require("@eslint/js").configs.recommended, + getEslintAllConfig: () => require("@eslint/js").configs.all }); const fileEnumerator = new FileEnumerator({ configArrayFactory, @@ -622,12 +671,7 @@ class CLIEngine { const originalFix = (typeof options.fix === "function") ? options.fix : () => true; - options.fix = message => { - const rule = message.ruleId && getRule(message.ruleId, lastConfigArrays); - const matches = rule && rule.meta && fixTypes.has(rule.meta.type); - - return matches && originalFix(message); - }; + options.fix = message => shouldMessageBeFixed(message, lastConfigArrays, fixTypes) && originalFix(message); } } @@ -653,11 +697,13 @@ class CLIEngine { results.forEach(result => { const filteredMessages = result.messages.filter(isErrorMessage); + const filteredSuppressedMessages = result.suppressedMessages.filter(isErrorMessage); if (filteredMessages.length > 0) { filtered.push({ ...result, messages: filteredMessages, + suppressedMessages: filteredSuppressedMessages, errorCount: filteredMessages.length, warningCount: 0, fixableErrorCount: result.fixableErrorCount, @@ -680,26 +726,6 @@ class CLIEngine { }); } - - /** - * Add a plugin by passing its configuration - * @param {string} name Name of the plugin. - * @param {Plugin} pluginObject Plugin configuration object. - * @returns {void} - */ - addPlugin(name, pluginObject) { - const { - additionalPluginPool, - configArrayFactory, - lastConfigArrays - } = internalSlotsMap.get(this); - - additionalPluginPool.set(name, pluginObject); - configArrayFactory.clearCache(); - lastConfigArrays.length = 1; - lastConfigArrays[0] = configArrayFactory.getConfigArrayForFile(); - } - /** * Resolves the patterns passed into executeOnFiles() into glob-based patterns * for easier handling. @@ -729,6 +755,7 @@ class CLIEngine { /** * Executes the current configuration on an array of file and directory names. * @param {string[]} patterns An array of file and directory names. + * @throws {Error} As may be thrown by `fs.unlinkSync`. * @returns {LintReport} The results for all files that were linted. */ executeOnFiles(patterns) { @@ -935,6 +962,7 @@ class CLIEngine { * This is the same logic used by the ESLint CLI executable to determine * configuration for each file it processes. * @param {string} filePath The path of the file to retrieve a config object for. + * @throws {Error} If filepath a directory path. * @returns {ConfigData} A configuration object for the file. */ getConfigForFile(filePath) { @@ -983,7 +1011,8 @@ class CLIEngine { * Returns the formatter representing the given format or null if the `format` is not a string. * @param {string} [format] The name of the format to load or the path to a * custom formatter. - * @returns {(Function|null)} The formatter function or null if the `format` is not a string. + * @throws {any} As may be thrown by requiring of formatter + * @returns {(FormatterFunction|null)} The formatter function or null if the `format` is not a string. */ getFormatter(format) { @@ -1003,7 +1032,7 @@ class CLIEngine { let formatterPath; // if there's a slash, then it's a file (TODO: this check seems dubious for scoped npm packages) - if (!namespace && normalizedFormatName.indexOf("/") > -1) { + if (!namespace && normalizedFormatName.includes("/")) { formatterPath = path.resolve(cwd, normalizedFormatName); } else { try { @@ -1018,7 +1047,11 @@ class CLIEngine { try { return require(formatterPath); } catch (ex) { - ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`; + if (format === "table" || format === "codeframe") { + ex.message = `The ${format} formatter is no longer part of core ESLint. Install it manually with \`npm install -D eslint-formatter-${format}\``; + } else { + ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`; + } throw ex; } diff --git a/node_modules/eslint/lib/cli-engine/file-enumerator.js b/node_modules/eslint/lib/cli-engine/file-enumerator.js index bd89ec733..5dff8d09c 100644 --- a/node_modules/eslint/lib/cli-engine/file-enumerator.js +++ b/node_modules/eslint/lib/cli-engine/file-enumerator.js @@ -38,7 +38,7 @@ const fs = require("fs"); const path = require("path"); const getGlobParent = require("glob-parent"); const isGlob = require("is-glob"); -const { escapeRegExp } = require("lodash"); +const escapeRegExp = require("escape-string-regexp"); const { Minimatch } = require("minimatch"); const { @@ -60,7 +60,7 @@ const IGNORED_SILENTLY = 1; const IGNORED = 2; // For VSCode intellisense -/** @typedef {ReturnType} ConfigArray */ +/** @typedef {ReturnType} ConfigArray */ /** * @typedef {Object} FileEnumeratorOptions @@ -114,6 +114,7 @@ function isGlobPattern(pattern) { /** * Get stats of a given path. * @param {string} filePath The path to target file. + * @throws {Error} As may be thrown by `fs.statSync`. * @returns {fs.Stats|null} The stats. * @private */ @@ -121,7 +122,8 @@ function statSafeSync(filePath) { try { return fs.statSync(filePath); } catch (error) { - /* istanbul ignore next */ + + /* c8 ignore next */ if (error.code !== "ENOENT") { throw error; } @@ -132,6 +134,7 @@ function statSafeSync(filePath) { /** * Get filenames in a given path to a directory. * @param {string} directoryPath The path to target directory. + * @throws {Error} As may be thrown by `fs.readdirSync`. * @returns {import("fs").Dirent[]} The filenames. * @private */ @@ -139,7 +142,8 @@ function readdirSafeSync(directoryPath) { try { return fs.readdirSync(directoryPath, { withFileTypes: true }); } catch (error) { - /* istanbul ignore next */ + + /* c8 ignore next */ if (error.code !== "ENOENT") { throw error; } @@ -173,7 +177,6 @@ function createExtensionRegExp(extensions) { */ class NoFilesFoundError extends Error { - // eslint-disable-next-line jsdoc/require-description /** * @param {string} pattern The glob pattern which was not found. * @param {boolean} globDisabled If `true` then the pattern was a glob pattern, but glob was disabled. @@ -190,7 +193,6 @@ class NoFilesFoundError extends Error { */ class AllFilesIgnoredError extends Error { - // eslint-disable-next-line jsdoc/require-description /** * @param {string} pattern The glob pattern which was not found. */ @@ -215,8 +217,8 @@ class FileEnumerator { cwd = process.cwd(), configArrayFactory = new CascadingConfigArrayFactory({ cwd, - eslintRecommendedPath: path.resolve(__dirname, "../../conf/eslint-recommended.js"), - eslintAllPath: path.resolve(__dirname, "../../conf/eslint-all.js") + getEslintRecommendedConfig: () => require("@eslint/js").configs.recommended, + getEslintAllConfig: () => require("@eslint/js").configs.all }), extensions = null, globInputPaths = true, @@ -270,6 +272,7 @@ class FileEnumerator { /** * Iterate files which are matched by given glob patterns. * @param {string|string[]} patternOrPatterns The glob patterns to iterate files. + * @throws {NoFilesFoundError|AllFilesIgnoredError} On an unmatched pattern. * @returns {IterableIterator} The found files. */ *iterateFiles(patternOrPatterns) { @@ -346,7 +349,7 @@ class FileEnumerator { return this._iterateFilesWithFile(absolutePath); } if (globInputPaths && isGlobPattern(pattern)) { - return this._iterateFilesWithGlob(absolutePath, isDot); + return this._iterateFilesWithGlob(pattern, isDot); } return []; @@ -395,15 +398,17 @@ class FileEnumerator { _iterateFilesWithGlob(pattern, dotfiles) { debug(`Glob: ${pattern}`); - const directoryPath = path.resolve(getGlobParent(pattern)); - const globPart = pattern.slice(directoryPath.length + 1); + const { cwd } = internalSlotsMap.get(this); + const directoryPath = path.resolve(cwd, getGlobParent(pattern)); + const absolutePath = path.resolve(cwd, pattern); + const globPart = absolutePath.slice(directoryPath.length + 1); /* * recursive if there are `**` or path separators in the glob part. * Otherwise, patterns such as `src/*.js`, it doesn't need recursive. */ const recursive = /\*\*|\/|\\/u.test(globPart); - const selector = new Minimatch(pattern, minimatchOpts); + const selector = new Minimatch(absolutePath, minimatchOpts); debug(`recursive? ${recursive}`); diff --git a/node_modules/eslint/lib/cli-engine/formatters/codeframe.js b/node_modules/eslint/lib/cli-engine/formatters/codeframe.js deleted file mode 100644 index 41e3ab7b0..000000000 --- a/node_modules/eslint/lib/cli-engine/formatters/codeframe.js +++ /dev/null @@ -1,138 +0,0 @@ -/** - * @fileoverview Codeframe reporter - * @author Vitor Balocco - */ -"use strict"; - -const chalk = require("chalk"); -const { codeFrameColumns } = require("@babel/code-frame"); -const path = require("path"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Given a word and a count, append an s if count is not one. - * @param {string} word A word in its singular form. - * @param {number} count A number controlling whether word should be pluralized. - * @returns {string} The original word with an s on the end if count is not one. - */ -function pluralize(word, count) { - return (count === 1 ? word : `${word}s`); -} - -/** - * Gets a formatted relative file path from an absolute path and a line/column in the file. - * @param {string} filePath The absolute file path to format. - * @param {number} line The line from the file to use for formatting. - * @param {number} column The column from the file to use for formatting. - * @returns {string} The formatted file path. - */ -function formatFilePath(filePath, line, column) { - let relPath = path.relative(process.cwd(), filePath); - - if (line && column) { - relPath += `:${line}:${column}`; - } - - return chalk.green(relPath); -} - -/** - * Gets the formatted output for a given message. - * @param {Object} message The object that represents this message. - * @param {Object} parentResult The result object that this message belongs to. - * @returns {string} The formatted output. - */ -function formatMessage(message, parentResult) { - const type = (message.fatal || message.severity === 2) ? chalk.red("error") : chalk.yellow("warning"); - const msg = `${chalk.bold(message.message.replace(/([^ ])\.$/u, "$1"))}`; - const ruleId = message.fatal ? "" : chalk.dim(`(${message.ruleId})`); - const filePath = formatFilePath(parentResult.filePath, message.line, message.column); - const sourceCode = parentResult.output ? parentResult.output : parentResult.source; - - const firstLine = [ - `${type}:`, - `${msg}`, - ruleId ? `${ruleId}` : "", - sourceCode ? `at ${filePath}:` : `at ${filePath}` - ].filter(String).join(" "); - - const result = [firstLine]; - - if (sourceCode) { - result.push( - codeFrameColumns(sourceCode, { start: { line: message.line, column: message.column } }, { highlightCode: false }) - ); - } - - return result.join("\n"); -} - -/** - * Gets the formatted output summary for a given number of errors and warnings. - * @param {number} errors The number of errors. - * @param {number} warnings The number of warnings. - * @param {number} fixableErrors The number of fixable errors. - * @param {number} fixableWarnings The number of fixable warnings. - * @returns {string} The formatted output summary. - */ -function formatSummary(errors, warnings, fixableErrors, fixableWarnings) { - const summaryColor = errors > 0 ? "red" : "yellow"; - const summary = []; - const fixablesSummary = []; - - if (errors > 0) { - summary.push(`${errors} ${pluralize("error", errors)}`); - } - - if (warnings > 0) { - summary.push(`${warnings} ${pluralize("warning", warnings)}`); - } - - if (fixableErrors > 0) { - fixablesSummary.push(`${fixableErrors} ${pluralize("error", fixableErrors)}`); - } - - if (fixableWarnings > 0) { - fixablesSummary.push(`${fixableWarnings} ${pluralize("warning", fixableWarnings)}`); - } - - let output = chalk[summaryColor].bold(`${summary.join(" and ")} found.`); - - if (fixableErrors || fixableWarnings) { - output += chalk[summaryColor].bold(`\n${fixablesSummary.join(" and ")} potentially fixable with the \`--fix\` option.`); - } - - return output; -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = function(results) { - let errors = 0; - let warnings = 0; - let fixableErrors = 0; - let fixableWarnings = 0; - - const resultsWithMessages = results.filter(result => result.messages.length > 0); - - let output = resultsWithMessages.reduce((resultsOutput, result) => { - const messages = result.messages.map(message => `${formatMessage(message, result)}\n\n`); - - errors += result.errorCount; - warnings += result.warningCount; - fixableErrors += result.fixableErrorCount; - fixableWarnings += result.fixableWarningCount; - - return resultsOutput.concat(messages); - }, []).join("\n"); - - output += "\n"; - output += formatSummary(errors, warnings, fixableErrors, fixableWarnings); - - return (errors + warnings) > 0 ? output : ""; -}; diff --git a/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json b/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json new file mode 100644 index 000000000..bcd35e504 --- /dev/null +++ b/node_modules/eslint/lib/cli-engine/formatters/formatters-meta.json @@ -0,0 +1,46 @@ +[ + { + "name": "checkstyle", + "description": "Outputs results to the [Checkstyle](https://checkstyle.sourceforge.io/) format." + }, + { + "name": "compact", + "description": "Human-readable output format. Mimics the default output of JSHint." + }, + { + "name": "html", + "description": "Outputs results to HTML. The `html` formatter is useful for visual presentation in the browser." + }, + { + "name": "jslint-xml", + "description": "Outputs results to format compatible with the [JSLint Jenkins plugin](https://plugins.jenkins.io/jslint/)." + }, + { + "name": "json-with-metadata", + "description": "Outputs JSON-serialized results. The `json-with-metadata` provides the same linting results as the [`json`](#json) formatter with additional metadata about the rules applied. The linting results are included in the `results` property and the rules metadata is included in the `metadata` property.\n\nAlternatively, you can use the [ESLint Node.js API](../../integrate/nodejs-api) to programmatically use ESLint." + }, + { + "name": "json", + "description": "Outputs JSON-serialized results. The `json` formatter is useful when you want to programmatically work with the CLI's linting results.\n\nAlternatively, you can use the [ESLint Node.js API](../../integrate/nodejs-api) to programmatically use ESLint." + }, + { + "name": "junit", + "description": "Outputs results to format compatible with the [JUnit Jenkins plugin](https://plugins.jenkins.io/junit/)." + }, + { + "name": "stylish", + "description": "Human-readable output format. This is the default formatter." + }, + { + "name": "tap", + "description": "Outputs results to the [Test Anything Protocol (TAP)](https://testanything.org/) specification format." + }, + { + "name": "unix", + "description": "Outputs results to a format similar to many commands in UNIX-like systems. Parsable with tools such as [grep](https://www.gnu.org/software/grep/manual/grep.html), [sed](https://www.gnu.org/software/sed/manual/sed.html), and [awk](https://www.gnu.org/software/gawk/manual/gawk.html)." + }, + { + "name": "visualstudio", + "description": "Outputs results to format compatible with the integrated terminal of the [Visual Studio](https://visualstudio.microsoft.com/) IDE. When using Visual Studio, you can click on the linting results in the integrated terminal to go to the issue in the source code." + } +] \ No newline at end of file diff --git a/node_modules/eslint/lib/cli-engine/formatters/html-template-message.html b/node_modules/eslint/lib/cli-engine/formatters/html-template-message.html deleted file mode 100644 index 93795a1bd..000000000 --- a/node_modules/eslint/lib/cli-engine/formatters/html-template-message.html +++ /dev/null @@ -1,8 +0,0 @@ - - <%= lineNumber %>:<%= columnNumber %> - <%= severityName %> - <%- message %> - - <%= ruleId %> - - diff --git a/node_modules/eslint/lib/cli-engine/formatters/html-template-page.html b/node_modules/eslint/lib/cli-engine/formatters/html-template-page.html deleted file mode 100644 index 4016576fa..000000000 --- a/node_modules/eslint/lib/cli-engine/formatters/html-template-page.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - ESLint Report - - - -
-

ESLint Report

-
- <%= reportSummary %> - Generated on <%= date %> -
-
- - - <%= results %> - -
- - - diff --git a/node_modules/eslint/lib/cli-engine/formatters/html-template-result.html b/node_modules/eslint/lib/cli-engine/formatters/html-template-result.html deleted file mode 100644 index f4a55933c..000000000 --- a/node_modules/eslint/lib/cli-engine/formatters/html-template-result.html +++ /dev/null @@ -1,6 +0,0 @@ - - - [+] <%- filePath %> - <%- summary %> - - diff --git a/node_modules/eslint/lib/cli-engine/formatters/html.js b/node_modules/eslint/lib/cli-engine/formatters/html.js index 5d4b7e560..1aa66fcef 100644 --- a/node_modules/eslint/lib/cli-engine/formatters/html.js +++ b/node_modules/eslint/lib/cli-engine/formatters/html.js @@ -4,17 +4,180 @@ */ "use strict"; -const lodash = require("lodash"); -const fs = require("fs"); -const path = require("path"); - //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ -const pageTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-page.html"), "utf-8")); -const messageTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-message.html"), "utf-8")); -const resultTemplate = lodash.template(fs.readFileSync(path.join(__dirname, "html-template-result.html"), "utf-8")); +const encodeHTML = (function() { + const encodeHTMLRules = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }; + const matchHTML = /[&<>"']/ug; + + return function(code) { + return code + ? code.toString().replace(matchHTML, m => encodeHTMLRules[m] || m) + : ""; + }; +}()); + +/** + * Get the final HTML document. + * @param {Object} it data for the document. + * @returns {string} HTML document. + */ +function pageTemplate(it) { + const { reportColor, reportSummary, date, results } = it; + + return ` + + + + + ESLint Report + + + + + +
+

ESLint Report

+
+ ${reportSummary} - Generated on ${date} +
+
+ + + ${results} + +
+ + + +`.trimStart(); +} /** * Given a word and a count, append an s if count is not one. @@ -58,6 +221,35 @@ function renderColor(totalErrors, totalWarnings) { return 0; } +/** + * Get HTML (table row) describing a single message. + * @param {Object} it data for the message. + * @returns {string} HTML (table row) describing the message. + */ +function messageTemplate(it) { + const { + parentIndex, + lineNumber, + columnNumber, + severityNumber, + severityName, + message, + ruleUrl, + ruleId + } = it; + + return ` + + ${lineNumber}:${columnNumber} + ${severityName} + ${encodeHTML(message)} + + ${ruleId ? ruleId : ""} + + +`.trimStart(); +} + /** * Get HTML (table rows) describing the messages. * @param {Array} messages Messages. @@ -80,7 +272,9 @@ function renderMessages(messages, parentIndex, rulesMeta) { if (rulesMeta) { const meta = rulesMeta[message.ruleId]; - ruleUrl = lodash.get(meta, "docs.url", null); + if (meta && meta.docs && meta.docs.url) { + ruleUrl = meta.docs.url; + } } return messageTemplate({ @@ -96,8 +290,26 @@ function renderMessages(messages, parentIndex, rulesMeta) { }).join("\n"); } -// eslint-disable-next-line jsdoc/require-description /** + * Get HTML (table row) describing the result for a single file. + * @param {Object} it data for the file. + * @returns {string} HTML (table row) describing the result for the file. + */ +function resultTemplate(it) { + const { color, index, filePath, summary } = it; + + return ` + + + [+] ${encodeHTML(filePath)} + ${encodeHTML(summary)} + + +`.trimStart(); +} + +/** + * Render the results. * @param {Array} results Test results. * @param {Object} rulesMeta Dictionary containing metadata for each rule executed by the analysis. * @returns {string} HTML string describing the results. @@ -108,7 +320,6 @@ function renderResults(results, rulesMeta) { color: renderColor(result.errorCount, result.warningCount), filePath: result.filePath, summary: renderSummary(result.errorCount, result.warningCount) - }) + renderMessages(result.messages, index, rulesMeta)).join("\n"); } diff --git a/node_modules/eslint/lib/cli-engine/formatters/table.js b/node_modules/eslint/lib/cli-engine/formatters/table.js deleted file mode 100644 index a74cce0d5..000000000 --- a/node_modules/eslint/lib/cli-engine/formatters/table.js +++ /dev/null @@ -1,159 +0,0 @@ -/** - * @fileoverview "table reporter. - * @author Gajus Kuizinas - */ -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const chalk = require("chalk"), - table = require("table").table; - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Given a word and a count, append an "s" if count is not one. - * @param {string} word A word. - * @param {number} count Quantity. - * @returns {string} The original word with an s on the end if count is not one. - */ -function pluralize(word, count) { - return (count === 1 ? word : `${word}s`); -} - -/** - * Draws text table. - * @param {Array} messages Error messages relating to a specific file. - * @returns {string} A text table. - */ -function drawTable(messages) { - const rows = []; - - if (messages.length === 0) { - return ""; - } - - rows.push([ - chalk.bold("Line"), - chalk.bold("Column"), - chalk.bold("Type"), - chalk.bold("Message"), - chalk.bold("Rule ID") - ]); - - messages.forEach(message => { - let messageType; - - if (message.fatal || message.severity === 2) { - messageType = chalk.red("error"); - } else { - messageType = chalk.yellow("warning"); - } - - rows.push([ - message.line || 0, - message.column || 0, - messageType, - message.message, - message.ruleId || "" - ]); - }); - - return table(rows, { - columns: { - 0: { - width: 8, - wrapWord: true - }, - 1: { - width: 8, - wrapWord: true - }, - 2: { - width: 8, - wrapWord: true - }, - 3: { - paddingRight: 5, - width: 50, - wrapWord: true - }, - 4: { - width: 20, - wrapWord: true - } - }, - drawHorizontalLine(index) { - return index === 1; - } - }); -} - -/** - * Draws a report (multiple tables). - * @param {Array} results Report results for every file. - * @returns {string} A column of text tables. - */ -function drawReport(results) { - let files; - - files = results.map(result => { - if (!result.messages.length) { - return ""; - } - - return `\n${result.filePath}\n\n${drawTable(result.messages)}`; - }); - - files = files.filter(content => content.trim()); - - return files.join(""); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = function(report) { - let result, - errorCount, - warningCount; - - result = ""; - errorCount = 0; - warningCount = 0; - - report.forEach(fileReport => { - errorCount += fileReport.errorCount; - warningCount += fileReport.warningCount; - }); - - if (errorCount || warningCount) { - result = drawReport(report); - } - - result += `\n${table([ - [ - chalk.red(pluralize(`${errorCount} Error`, errorCount)) - ], - [ - chalk.yellow(pluralize(`${warningCount} Warning`, warningCount)) - ] - ], { - columns: { - 0: { - width: 110, - wrapWord: true - } - }, - drawHorizontalLine() { - return true; - } - })}`; - - return result; -}; diff --git a/node_modules/eslint/lib/cli-engine/formatters/tap.js b/node_modules/eslint/lib/cli-engine/formatters/tap.js index 354872a0c..e4148a3b3 100644 --- a/node_modules/eslint/lib/cli-engine/formatters/tap.js +++ b/node_modules/eslint/lib/cli-engine/formatters/tap.js @@ -31,7 +31,7 @@ function outputDiagnostics(diagnostic) { const prefix = " "; let output = `${prefix}---\n`; - output += prefix + yaml.safeDump(diagnostic).split("\n").join(`\n${prefix}`); + output += prefix + yaml.dump(diagnostic).split("\n").join(`\n${prefix}`); output += "...\n"; return output; } diff --git a/node_modules/eslint/lib/cli-engine/hash.js b/node_modules/eslint/lib/cli-engine/hash.js index 6d7ef8bf1..8e467734a 100644 --- a/node_modules/eslint/lib/cli-engine/hash.js +++ b/node_modules/eslint/lib/cli-engine/hash.js @@ -21,8 +21,8 @@ const murmur = require("imurmurhash"); /** * hash the given string - * @param {string} str the string to hash - * @returns {string} the hash + * @param {string} str the string to hash + * @returns {string} the hash */ function hash(str) { return murmur(str).result().toString(36); diff --git a/node_modules/eslint/lib/cli-engine/lint-result-cache.js b/node_modules/eslint/lib/cli-engine/lint-result-cache.js index 3304d429d..97d2ee40b 100644 --- a/node_modules/eslint/lib/cli-engine/lint-result-cache.js +++ b/node_modules/eslint/lib/cli-engine/lint-result-cache.js @@ -36,7 +36,7 @@ const invalidCacheStrategyErrorMessage = `Cache strategy must be one of: ${valid */ function isValidCacheStrategy(cacheStrategy) { return ( - validCacheStrategies.indexOf(cacheStrategy) !== -1 + validCacheStrategies.includes(cacheStrategy) ); } @@ -128,16 +128,28 @@ class LintResultCache { return null; } + const cachedResults = fileDescriptor.meta.results; + + // Just in case, not sure if this can ever happen. + if (!cachedResults) { + return cachedResults; + } + + /* + * Shallow clone the object to ensure that any properties added or modified afterwards + * will not be accidentally stored in the cache file when `reconcile()` is called. + * https://github.com/eslint/eslint/issues/13507 + * All intentional changes to the cache file must be done through `setCachedLintResults()`. + */ + const results = { ...cachedResults }; + // If source is present but null, need to reread the file from the filesystem. - if ( - fileDescriptor.meta.results && - fileDescriptor.meta.results.source === null - ) { + if (results.source === null) { debug(`Rereading cached result source from filesystem: ${filePath}`); - fileDescriptor.meta.results.source = fs.readFileSync(filePath, "utf-8"); + results.source = fs.readFileSync(filePath, "utf-8"); } - return fileDescriptor.meta.results; + return results; } /** diff --git a/node_modules/eslint/lib/cli-engine/xml-escape.js b/node_modules/eslint/lib/cli-engine/xml-escape.js index 175c2c0c2..2e52dbaac 100644 --- a/node_modules/eslint/lib/cli-engine/xml-escape.js +++ b/node_modules/eslint/lib/cli-engine/xml-escape.js @@ -15,7 +15,7 @@ * @private */ module.exports = function(s) { - return (`${s}`).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/gu, c => { // eslint-disable-line no-control-regex + return (`${s}`).replace(/[<>&"'\x00-\x1F\x7F\u0080-\uFFFF]/gu, c => { // eslint-disable-line no-control-regex -- Converting controls to entities switch (c) { case "<": return "<"; diff --git a/node_modules/eslint/lib/cli.js b/node_modules/eslint/lib/cli.js index f76676454..1d909ec1c 100644 --- a/node_modules/eslint/lib/cli.js +++ b/node_modules/eslint/lib/cli.js @@ -6,7 +6,7 @@ "use strict"; /* - * The CLI object should *not* call process.exit() directly. It should only return + * NOTE: The CLI object should *not* call process.exit() directly. It should only return * exit codes. This allows other programs to use the CLI object and still control * when the program exits. */ @@ -19,9 +19,13 @@ const fs = require("fs"), path = require("path"), { promisify } = require("util"), { ESLint } = require("./eslint"), - CLIOptions = require("./options"), + { FlatESLint, shouldUseFlatConfig } = require("./eslint/flat-eslint"), + createCLIOptions = require("./options"), log = require("./shared/logging"), - RuntimeInfo = require("./shared/runtime-info"); + RuntimeInfo = require("./shared/runtime-info"), + { normalizeSeverityToString } = require("./shared/severity"); +const { Legacy: { naming } } = require("@eslint/eslintrc"); +const { ModuleImporter } = require("@humanwhocodes/module-importer"); const debug = require("debug")("eslint:cli"); @@ -33,6 +37,7 @@ const debug = require("debug")("eslint:cli"); /** @typedef {import("./eslint/eslint").LintMessage} LintMessage */ /** @typedef {import("./eslint/eslint").LintResult} LintResult */ /** @typedef {import("./options").ParsedCLIOptions} ParsedCLIOptions */ +/** @typedef {import("./shared/types").ResultsMeta} ResultsMeta */ //------------------------------------------------------------------------------ // Helpers @@ -54,17 +59,20 @@ function quietFixPredicate(message) { } /** - * Translates the CLI options into the options expected by the CLIEngine. + * Translates the CLI options into the options expected by the ESLint constructor. * @param {ParsedCLIOptions} cliOptions The CLI options to translate. - * @returns {ESLintOptions} The options object for the CLIEngine. + * @param {"flat"|"eslintrc"} [configType="eslintrc"] The format of the + * config to generate. + * @returns {Promise} The options object for the ESLint constructor. * @private */ -function translateOptions({ +async function translateOptions({ cache, cacheFile, cacheLocation, cacheStrategy, config, + configLookup, env, errorOnUnmatchedPattern, eslintrc, @@ -82,22 +90,73 @@ function translateOptions({ plugin, quiet, reportUnusedDisableDirectives, + reportUnusedDisableDirectivesSeverity, resolvePluginsRelativeTo, rule, - rulesdir -}) { - return { - allowInlineConfig: inlineConfig, - cache, - cacheLocation: cacheLocation || cacheFile, - cacheStrategy, - errorOnUnmatchedPattern, - extensions: ext, - fix: (fix || fixDryRun) && (quiet ? quietFixPredicate : true), - fixTypes: fixType, - ignore, - ignorePath, - overrideConfig: { + rulesdir, + warnIgnored +}, configType) { + + let overrideConfig, overrideConfigFile; + const importer = new ModuleImporter(); + + if (configType === "flat") { + overrideConfigFile = (typeof config === "string") ? config : !configLookup; + if (overrideConfigFile === false) { + overrideConfigFile = void 0; + } + + let globals = {}; + + if (global) { + globals = global.reduce((obj, name) => { + if (name.endsWith(":true")) { + obj[name.slice(0, -5)] = "writable"; + } else { + obj[name] = "readonly"; + } + return obj; + }, globals); + } + + overrideConfig = [{ + languageOptions: { + globals, + parserOptions: parserOptions || {} + }, + rules: rule ? rule : {} + }]; + + if (reportUnusedDisableDirectives || reportUnusedDisableDirectivesSeverity !== void 0) { + overrideConfig[0].linterOptions = { + reportUnusedDisableDirectives: reportUnusedDisableDirectives + ? "error" + : normalizeSeverityToString(reportUnusedDisableDirectivesSeverity) + }; + } + + if (parser) { + overrideConfig[0].languageOptions.parser = await importer.import(parser); + } + + if (plugin) { + const plugins = {}; + + for (const pluginName of plugin) { + + const shortName = naming.getShorthandName(pluginName, "eslint-plugin"); + const longName = naming.normalizePackageName(pluginName, "eslint-plugin"); + + plugins[shortName] = await importer.import(longName); + } + + overrideConfig[0].plugins = plugins; + } + + } else { + overrideConfigFile = config; + + overrideConfig = { env: env && env.reduce((obj, name) => { obj[name] = true; return obj; @@ -115,30 +174,58 @@ function translateOptions({ parserOptions, plugins: plugin, rules: rule - }, - overrideConfigFile: config, - reportUnusedDisableDirectives: reportUnusedDisableDirectives ? "error" : void 0, - resolvePluginsRelativeTo, - rulePaths: rulesdir, - useEslintrc: eslintrc + }; + } + + const options = { + allowInlineConfig: inlineConfig, + cache, + cacheLocation: cacheLocation || cacheFile, + cacheStrategy, + errorOnUnmatchedPattern, + fix: (fix || fixDryRun) && (quiet ? quietFixPredicate : true), + fixTypes: fixType, + ignore, + overrideConfig, + overrideConfigFile }; + + if (configType === "flat") { + options.ignorePatterns = ignorePattern; + options.warnIgnored = warnIgnored; + } else { + options.resolvePluginsRelativeTo = resolvePluginsRelativeTo; + options.rulePaths = rulesdir; + options.useEslintrc = eslintrc; + options.extensions = ext; + options.ignorePath = ignorePath; + if (reportUnusedDisableDirectives || reportUnusedDisableDirectivesSeverity !== void 0) { + options.reportUnusedDisableDirectives = reportUnusedDisableDirectives + ? "error" + : normalizeSeverityToString(reportUnusedDisableDirectivesSeverity); + } + } + + return options; } /** * Count error messages. * @param {LintResult[]} results The lint results. - * @returns {{errorCount:number;warningCount:number}} The number of error messages. + * @returns {{errorCount:number;fatalErrorCount:number,warningCount:number}} The number of error messages. */ function countErrors(results) { let errorCount = 0; + let fatalErrorCount = 0; let warningCount = 0; for (const result of results) { errorCount += result.errorCount; + fatalErrorCount += result.fatalErrorCount; warningCount += result.warningCount; } - return { errorCount, warningCount }; + return { errorCount, fatalErrorCount, warningCount }; } /** @@ -163,10 +250,11 @@ async function isDirectory(filePath) { * @param {LintResult[]} results The results to print. * @param {string} format The name of the formatter to use or the path to the formatter. * @param {string} outputFile The path for the output file. + * @param {ResultsMeta} resultsMeta Warning count and max threshold. * @returns {Promise} True if the printing succeeds, false if not. * @private */ -async function printResults(engine, results, format, outputFile) { +async function printResults(engine, results, format, outputFile, resultsMeta) { let formatter; try { @@ -176,7 +264,7 @@ async function printResults(engine, results, format, outputFile) { return false; } - const output = formatter.format(results); + const output = await formatter.format(results, resultsMeta); if (output) { if (outputFile) { @@ -216,20 +304,42 @@ const cli = { * Executes the CLI based on an array of arguments that is passed in. * @param {string|Array|Object} args The arguments to process. * @param {string} [text] The text to lint (used for TTY). + * @param {boolean} [allowFlatConfig] Whether or not to allow flat config. * @returns {Promise} The exit code for the operation. */ - async execute(args, text) { + async execute(args, text, allowFlatConfig) { if (Array.isArray(args)) { debug("CLI args: %o", args.slice(2)); } + /* + * Before doing anything, we need to see if we are using a + * flat config file. If so, then we need to change the way command + * line args are parsed. This is temporary, and when we fully + * switch to flat config we can remove this logic. + */ + + const usingFlatConfig = allowFlatConfig && await shouldUseFlatConfig(); + + debug("Using flat config?", usingFlatConfig); + + const CLIOptions = createCLIOptions(usingFlatConfig); + /** @type {ParsedCLIOptions} */ let options; try { options = CLIOptions.parse(args); } catch (error) { - log.error(error.message); + debug("Error parsing CLI options:", error.message); + + let errorMessage = error.message; + + if (usingFlatConfig) { + errorMessage += "\nYou're using eslint.config.js, some command line flags are no longer available. Please see https://eslint.org/docs/latest/use/command-line-interface for details."; + } + + log.error(errorMessage); return 2; } @@ -249,6 +359,7 @@ const cli = { log.info(RuntimeInfo.environment()); return 0; } catch (err) { + debug("Error retrieving environment info"); log.error(err.message); return 2; } @@ -264,7 +375,9 @@ const cli = { return 2; } - const engine = new ESLint(translateOptions(options)); + const engine = usingFlatConfig + ? new FlatESLint(await translateOptions(options, "flat")) + : new ESLint(await translateOptions(options)); const fileConfig = await engine.calculateConfigForFile(options.printConfig); @@ -287,13 +400,22 @@ const cli = { return 2; } - const engine = new ESLint(translateOptions(options)); + if (options.reportUnusedDisableDirectives && options.reportUnusedDisableDirectivesSeverity !== void 0) { + log.error("The --report-unused-disable-directives option and the --report-unused-disable-directives-severity option cannot be used together."); + return 2; + } + + const ActiveESLint = usingFlatConfig ? FlatESLint : ESLint; + + const engine = new ActiveESLint(await translateOptions(options, usingFlatConfig ? "flat" : "eslintrc")); let results; if (useStdin) { results = await engine.lintText(text, { filePath: options.stdinFilename, - warnIgnored: true + + // flatConfig respects CLI flag and constructor warnIgnored, eslintrc forces true for backwards compatibility + warnIgnored: usingFlatConfig ? void 0 : true }); } else { results = await engine.lintFiles(files); @@ -301,31 +423,45 @@ const cli = { if (options.fix) { debug("Fix mode enabled - applying fixes"); - await ESLint.outputFixes(results); + await ActiveESLint.outputFixes(results); } let resultsToPrint = results; if (options.quiet) { debug("Quiet mode enabled - filtering out warnings"); - resultsToPrint = ESLint.getErrorResults(resultsToPrint); + resultsToPrint = ActiveESLint.getErrorResults(resultsToPrint); } - if (await printResults(engine, resultsToPrint, options.format, options.outputFile)) { + const resultCounts = countErrors(results); + const tooManyWarnings = options.maxWarnings >= 0 && resultCounts.warningCount > options.maxWarnings; + const resultsMeta = tooManyWarnings + ? { + maxWarningsExceeded: { + maxWarnings: options.maxWarnings, + foundWarnings: resultCounts.warningCount + } + } + : {}; + + if (await printResults(engine, resultsToPrint, options.format, options.outputFile, resultsMeta)) { // Errors and warnings from the original unfiltered results should determine the exit code - const { errorCount, warningCount } = countErrors(results); - const tooManyWarnings = - options.maxWarnings >= 0 && warningCount > options.maxWarnings; + const shouldExitForFatalErrors = + options.exitOnFatalError && resultCounts.fatalErrorCount > 0; - if (!errorCount && tooManyWarnings) { + if (!resultCounts.errorCount && tooManyWarnings) { log.error( "ESLint found too many warnings (maximum: %s).", options.maxWarnings ); } - return (errorCount || tooManyWarnings) ? 1 : 0; + if (shouldExitForFatalErrors) { + return 2; + } + + return (resultCounts.errorCount || tooManyWarnings) ? 1 : 0; } return 2; diff --git a/node_modules/eslint/lib/config/default-config.js b/node_modules/eslint/lib/config/default-config.js new file mode 100644 index 000000000..8a6ff8200 --- /dev/null +++ b/node_modules/eslint/lib/config/default-config.js @@ -0,0 +1,67 @@ +/** + * @fileoverview Default configuration + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const Rules = require("../rules"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +exports.defaultConfig = [ + { + plugins: { + "@": { + + /* + * Because we try to delay loading rules until absolutely + * necessary, a proxy allows us to hook into the lazy-loading + * aspect of the rules map while still keeping all of the + * relevant configuration inside of the config array. + */ + rules: new Proxy({}, { + get(target, property) { + return Rules.get(property); + }, + + has(target, property) { + return Rules.has(property); + } + }) + } + }, + languageOptions: { + sourceType: "module", + ecmaVersion: "latest", + parser: require("espree"), + parserOptions: {} + } + }, + + // default ignores are listed here + { + ignores: [ + "**/node_modules/", + ".git/" + ] + }, + + // intentionally empty config to ensure these files are globbed by default + { + files: ["**/*.js", "**/*.mjs"] + }, + { + files: ["**/*.cjs"], + languageOptions: { + sourceType: "commonjs", + ecmaVersion: "latest" + } + } +]; diff --git a/node_modules/eslint/lib/config/flat-config-array.js b/node_modules/eslint/lib/config/flat-config-array.js new file mode 100644 index 000000000..689dc429f --- /dev/null +++ b/node_modules/eslint/lib/config/flat-config-array.js @@ -0,0 +1,274 @@ +/** + * @fileoverview Flat Config Array + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const { ConfigArray, ConfigArraySymbol } = require("@humanwhocodes/config-array"); +const { flatConfigSchema } = require("./flat-config-schema"); +const { RuleValidator } = require("./rule-validator"); +const { defaultConfig } = require("./default-config"); +const jsPlugin = require("@eslint/js"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const ruleValidator = new RuleValidator(); + +/** + * Splits a plugin identifier in the form a/b/c into two parts: a/b and c. + * @param {string} identifier The identifier to parse. + * @returns {{objectName: string, pluginName: string}} The parts of the plugin + * name. + */ +function splitPluginIdentifier(identifier) { + const parts = identifier.split("/"); + + return { + objectName: parts.pop(), + pluginName: parts.join("/") + }; +} + +/** + * Returns the name of an object in the config by reading its `meta` key. + * @param {Object} object The object to check. + * @returns {string?} The name of the object if found or `null` if there + * is no name. + */ +function getObjectId(object) { + + // first check old-style name + let name = object.name; + + if (!name) { + + if (!object.meta) { + return null; + } + + name = object.meta.name; + + if (!name) { + return null; + } + } + + // now check for old-style version + let version = object.version; + + if (!version) { + version = object.meta && object.meta.version; + } + + // if there's a version then append that + if (version) { + return `${name}@${version}`; + } + + return name; +} + +const originalBaseConfig = Symbol("originalBaseConfig"); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Represents an array containing configuration information for ESLint. + */ +class FlatConfigArray extends ConfigArray { + + /** + * Creates a new instance. + * @param {*[]} configs An array of configuration information. + * @param {{basePath: string, shouldIgnore: boolean, baseConfig: FlatConfig}} options The options + * to use for the config array instance. + */ + constructor(configs, { + basePath, + shouldIgnore = true, + baseConfig = defaultConfig + } = {}) { + super(configs, { + basePath, + schema: flatConfigSchema + }); + + if (baseConfig[Symbol.iterator]) { + this.unshift(...baseConfig); + } else { + this.unshift(baseConfig); + } + + /** + * The base config used to build the config array. + * @type {Array} + */ + this[originalBaseConfig] = baseConfig; + Object.defineProperty(this, originalBaseConfig, { writable: false }); + + /** + * Determines if `ignores` fields should be honored. + * If true, then all `ignores` fields are honored. + * if false, then only `ignores` fields in the baseConfig are honored. + * @type {boolean} + */ + this.shouldIgnore = shouldIgnore; + Object.defineProperty(this, "shouldIgnore", { writable: false }); + } + + /* eslint-disable class-methods-use-this -- Desired as instance method */ + /** + * Replaces a config with another config to allow us to put strings + * in the config array that will be replaced by objects before + * normalization. + * @param {Object} config The config to preprocess. + * @returns {Object} The preprocessed config. + */ + [ConfigArraySymbol.preprocessConfig](config) { + if (config === "eslint:recommended") { + + // if we are in a Node.js environment warn the user + if (typeof process !== "undefined" && process.emitWarning) { + process.emitWarning("The 'eslint:recommended' string configuration is deprecated and will be replaced by the @eslint/js package's 'recommended' config."); + } + + return jsPlugin.configs.recommended; + } + + if (config === "eslint:all") { + + // if we are in a Node.js environment warn the user + if (typeof process !== "undefined" && process.emitWarning) { + process.emitWarning("The 'eslint:all' string configuration is deprecated and will be replaced by the @eslint/js package's 'all' config."); + } + + return jsPlugin.configs.all; + } + + /* + * If `shouldIgnore` is false, we remove any ignore patterns specified + * in the config so long as it's not a default config and it doesn't + * have a `files` entry. + */ + if ( + !this.shouldIgnore && + !this[originalBaseConfig].includes(config) && + config.ignores && + !config.files + ) { + /* eslint-disable-next-line no-unused-vars -- need to strip off other keys */ + const { ignores, ...otherKeys } = config; + + return otherKeys; + } + + return config; + } + + /** + * Finalizes the config by replacing plugin references with their objects + * and validating rule option schemas. + * @param {Object} config The config to finalize. + * @returns {Object} The finalized config. + * @throws {TypeError} If the config is invalid. + */ + [ConfigArraySymbol.finalizeConfig](config) { + + const { plugins, languageOptions, processor } = config; + let parserName, processorName; + let invalidParser = false, + invalidProcessor = false; + + // Check parser value + if (languageOptions && languageOptions.parser) { + const { parser } = languageOptions; + + if (typeof parser === "object") { + parserName = getObjectId(parser); + + if (!parserName) { + invalidParser = true; + } + + } else { + invalidParser = true; + } + } + + // Check processor value + if (processor) { + if (typeof processor === "string") { + const { pluginName, objectName: localProcessorName } = splitPluginIdentifier(processor); + + processorName = processor; + + if (!plugins || !plugins[pluginName] || !plugins[pluginName].processors || !plugins[pluginName].processors[localProcessorName]) { + throw new TypeError(`Key "processor": Could not find "${localProcessorName}" in plugin "${pluginName}".`); + } + + config.processor = plugins[pluginName].processors[localProcessorName]; + } else if (typeof processor === "object") { + processorName = getObjectId(processor); + + if (!processorName) { + invalidProcessor = true; + } + + } else { + invalidProcessor = true; + } + } + + ruleValidator.validate(config); + + // apply special logic for serialization into JSON + /* eslint-disable object-shorthand -- shorthand would change "this" value */ + Object.defineProperty(config, "toJSON", { + value: function() { + + if (invalidParser) { + throw new Error("Could not serialize parser object (missing 'meta' object)."); + } + + if (invalidProcessor) { + throw new Error("Could not serialize processor object (missing 'meta' object)."); + } + + return { + ...this, + plugins: Object.entries(plugins).map(([namespace, plugin]) => { + + const pluginId = getObjectId(plugin); + + if (!pluginId) { + return namespace; + } + + return `${namespace}:${pluginId}`; + }), + languageOptions: { + ...languageOptions, + parser: parserName + }, + processor: processorName + }; + } + }); + /* eslint-enable object-shorthand -- ok to enable now */ + + return config; + } + /* eslint-enable class-methods-use-this -- Desired as instance method */ + +} + +exports.FlatConfigArray = FlatConfigArray; diff --git a/node_modules/eslint/lib/config/flat-config-helpers.js b/node_modules/eslint/lib/config/flat-config-helpers.js new file mode 100644 index 000000000..e00c56434 --- /dev/null +++ b/node_modules/eslint/lib/config/flat-config-helpers.js @@ -0,0 +1,111 @@ +/** + * @fileoverview Shared functions to work with configs. + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Functions +//----------------------------------------------------------------------------- + +/** + * Parses a ruleId into its plugin and rule parts. + * @param {string} ruleId The rule ID to parse. + * @returns {{pluginName:string,ruleName:string}} The plugin and rule + * parts of the ruleId; + */ +function parseRuleId(ruleId) { + let pluginName, ruleName; + + // distinguish between core rules and plugin rules + if (ruleId.includes("/")) { + + // mimic scoped npm packages + if (ruleId.startsWith("@")) { + pluginName = ruleId.slice(0, ruleId.lastIndexOf("/")); + } else { + pluginName = ruleId.slice(0, ruleId.indexOf("/")); + } + + ruleName = ruleId.slice(pluginName.length + 1); + } else { + pluginName = "@"; + ruleName = ruleId; + } + + return { + pluginName, + ruleName + }; +} + +/** + * Retrieves a rule instance from a given config based on the ruleId. + * @param {string} ruleId The rule ID to look for. + * @param {FlatConfig} config The config to search. + * @returns {import("../shared/types").Rule|undefined} The rule if found + * or undefined if not. + */ +function getRuleFromConfig(ruleId, config) { + + const { pluginName, ruleName } = parseRuleId(ruleId); + + const plugin = config.plugins && config.plugins[pluginName]; + let rule = plugin && plugin.rules && plugin.rules[ruleName]; + + + // normalize function rules into objects + if (rule && typeof rule === "function") { + rule = { + create: rule + }; + } + + return rule; +} + +/** + * Gets a complete options schema for a rule. + * @param {{create: Function, schema: (Array|null)}} rule A new-style rule object + * @returns {Object} JSON Schema for the rule's options. + */ +function getRuleOptionsSchema(rule) { + + if (!rule) { + return null; + } + + const schema = rule.schema || rule.meta && rule.meta.schema; + + if (Array.isArray(schema)) { + if (schema.length) { + return { + type: "array", + items: schema, + minItems: 0, + maxItems: schema.length + }; + } + return { + type: "array", + minItems: 0, + maxItems: 0 + }; + + } + + // Given a full schema, leave it alone + return schema || null; +} + + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +module.exports = { + parseRuleId, + getRuleFromConfig, + getRuleOptionsSchema +}; diff --git a/node_modules/eslint/lib/config/flat-config-schema.js b/node_modules/eslint/lib/config/flat-config-schema.js new file mode 100644 index 000000000..6b64319c8 --- /dev/null +++ b/node_modules/eslint/lib/config/flat-config-schema.js @@ -0,0 +1,598 @@ +/** + * @fileoverview Flat config schema + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +/* + * Note: This can be removed in ESLint v9 because structuredClone is available globally + * starting in Node.js v17. + */ +const structuredClone = require("@ungap/structured-clone").default; +const { normalizeSeverityToNumber } = require("../shared/severity"); + +//----------------------------------------------------------------------------- +// Type Definitions +//----------------------------------------------------------------------------- + +/** + * @typedef ObjectPropertySchema + * @property {Function|string} merge The function or name of the function to call + * to merge multiple objects with this property. + * @property {Function|string} validate The function or name of the function to call + * to validate the value of this property. + */ + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +const ruleSeverities = new Map([ + [0, 0], ["off", 0], + [1, 1], ["warn", 1], + [2, 2], ["error", 2] +]); + +const globalVariablesValues = new Set([ + true, "true", "writable", "writeable", + false, "false", "readonly", "readable", null, + "off" +]); + +/** + * Check if a value is a non-null object. + * @param {any} value The value to check. + * @returns {boolean} `true` if the value is a non-null object. + */ +function isNonNullObject(value) { + return typeof value === "object" && value !== null; +} + +/** + * Check if a value is a non-null non-array object. + * @param {any} value The value to check. + * @returns {boolean} `true` if the value is a non-null non-array object. + */ +function isNonArrayObject(value) { + return isNonNullObject(value) && !Array.isArray(value); +} + +/** + * Check if a value is undefined. + * @param {any} value The value to check. + * @returns {boolean} `true` if the value is undefined. + */ +function isUndefined(value) { + return typeof value === "undefined"; +} + +/** + * Deeply merges two non-array objects. + * @param {Object} first The base object. + * @param {Object} second The overrides object. + * @param {Map>} [mergeMap] Maps the combination of first and second arguments to a merged result. + * @returns {Object} An object with properties from both first and second. + */ +function deepMerge(first, second, mergeMap = new Map()) { + + let secondMergeMap = mergeMap.get(first); + + if (secondMergeMap) { + const result = secondMergeMap.get(second); + + if (result) { + + // If this combination of first and second arguments has been already visited, return the previously created result. + return result; + } + } else { + secondMergeMap = new Map(); + mergeMap.set(first, secondMergeMap); + } + + /* + * First create a result object where properties from the second object + * overwrite properties from the first. This sets up a baseline to use + * later rather than needing to inspect and change every property + * individually. + */ + const result = { + ...first, + ...second + }; + + delete result.__proto__; // eslint-disable-line no-proto -- don't merge own property "__proto__" + + // Store the pending result for this combination of first and second arguments. + secondMergeMap.set(second, result); + + for (const key of Object.keys(second)) { + + // avoid hairy edge case + if (key === "__proto__" || !Object.prototype.propertyIsEnumerable.call(first, key)) { + continue; + } + + const firstValue = first[key]; + const secondValue = second[key]; + + if (isNonArrayObject(firstValue) && isNonArrayObject(secondValue)) { + result[key] = deepMerge(firstValue, secondValue, mergeMap); + } else if (isUndefined(secondValue)) { + result[key] = firstValue; + } + } + + return result; + +} + +/** + * Normalizes the rule options config for a given rule by ensuring that + * it is an array and that the first item is 0, 1, or 2. + * @param {Array|string|number} ruleOptions The rule options config. + * @returns {Array} An array of rule options. + */ +function normalizeRuleOptions(ruleOptions) { + + const finalOptions = Array.isArray(ruleOptions) + ? ruleOptions.slice(0) + : [ruleOptions]; + + finalOptions[0] = ruleSeverities.get(finalOptions[0]); + return structuredClone(finalOptions); +} + +//----------------------------------------------------------------------------- +// Assertions +//----------------------------------------------------------------------------- + +/** + * The error type when a rule's options are configured with an invalid type. + */ +class InvalidRuleOptionsError extends Error { + + /** + * @param {string} ruleId Rule name being configured. + * @param {any} value The invalid value. + */ + constructor(ruleId, value) { + super(`Key "${ruleId}": Expected severity of "off", 0, "warn", 1, "error", or 2.`); + this.messageTemplate = "invalid-rule-options"; + this.messageData = { ruleId, value }; + } +} + +/** + * Validates that a value is a valid rule options entry. + * @param {string} ruleId Rule name being configured. + * @param {any} value The value to check. + * @returns {void} + * @throws {InvalidRuleOptionsError} If the value isn't a valid rule options. + */ +function assertIsRuleOptions(ruleId, value) { + if (typeof value !== "string" && typeof value !== "number" && !Array.isArray(value)) { + throw new InvalidRuleOptionsError(ruleId, value); + } +} + +/** + * The error type when a rule's severity is invalid. + */ +class InvalidRuleSeverityError extends Error { + + /** + * @param {string} ruleId Rule name being configured. + * @param {any} value The invalid value. + */ + constructor(ruleId, value) { + super(`Key "${ruleId}": Expected severity of "off", 0, "warn", 1, "error", or 2.`); + this.messageTemplate = "invalid-rule-severity"; + this.messageData = { ruleId, value }; + } +} + +/** + * Validates that a value is valid rule severity. + * @param {string} ruleId Rule name being configured. + * @param {any} value The value to check. + * @returns {void} + * @throws {InvalidRuleSeverityError} If the value isn't a valid rule severity. + */ +function assertIsRuleSeverity(ruleId, value) { + const severity = ruleSeverities.get(value); + + if (typeof severity === "undefined") { + throw new InvalidRuleSeverityError(ruleId, value); + } +} + +/** + * Validates that a given string is the form pluginName/objectName. + * @param {string} value The string to check. + * @returns {void} + * @throws {TypeError} If the string isn't in the correct format. + */ +function assertIsPluginMemberName(value) { + if (!/[@a-z0-9-_$]+(?:\/(?:[a-z0-9-_$]+))+$/iu.test(value)) { + throw new TypeError(`Expected string in the form "pluginName/objectName" but found "${value}".`); + } +} + +/** + * Validates that a value is an object. + * @param {any} value The value to check. + * @returns {void} + * @throws {TypeError} If the value isn't an object. + */ +function assertIsObject(value) { + if (!isNonNullObject(value)) { + throw new TypeError("Expected an object."); + } +} + +/** + * The error type when there's an eslintrc-style options in a flat config. + */ +class IncompatibleKeyError extends Error { + + /** + * @param {string} key The invalid key. + */ + constructor(key) { + super("This appears to be in eslintrc format rather than flat config format."); + this.messageTemplate = "eslintrc-incompat"; + this.messageData = { key }; + } +} + +/** + * The error type when there's an eslintrc-style plugins array found. + */ +class IncompatiblePluginsError extends Error { + + /** + * Creates a new instance. + * @param {Array} plugins The plugins array. + */ + constructor(plugins) { + super("This appears to be in eslintrc format (array of strings) rather than flat config format (object)."); + this.messageTemplate = "eslintrc-plugins"; + this.messageData = { plugins }; + } +} + + +//----------------------------------------------------------------------------- +// Low-Level Schemas +//----------------------------------------------------------------------------- + +/** @type {ObjectPropertySchema} */ +const booleanSchema = { + merge: "replace", + validate: "boolean" +}; + +const ALLOWED_SEVERITIES = new Set(["error", "warn", "off", 2, 1, 0]); + +/** @type {ObjectPropertySchema} */ +const disableDirectiveSeveritySchema = { + merge(first, second) { + const value = second === void 0 ? first : second; + + if (typeof value === "boolean") { + return value ? "warn" : "off"; + } + + return normalizeSeverityToNumber(value); + }, + validate(value) { + if (!(ALLOWED_SEVERITIES.has(value) || typeof value === "boolean")) { + throw new TypeError("Expected one of: \"error\", \"warn\", \"off\", 0, 1, 2, or a boolean."); + } + } +}; + +/** @type {ObjectPropertySchema} */ +const deepObjectAssignSchema = { + merge(first = {}, second = {}) { + return deepMerge(first, second); + }, + validate: "object" +}; + +//----------------------------------------------------------------------------- +// High-Level Schemas +//----------------------------------------------------------------------------- + +/** @type {ObjectPropertySchema} */ +const globalsSchema = { + merge: "assign", + validate(value) { + + assertIsObject(value); + + for (const key of Object.keys(value)) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + if (key !== key.trim()) { + throw new TypeError(`Global "${key}" has leading or trailing whitespace.`); + } + + if (!globalVariablesValues.has(value[key])) { + throw new TypeError(`Key "${key}": Expected "readonly", "writable", or "off".`); + } + } + } +}; + +/** @type {ObjectPropertySchema} */ +const parserSchema = { + merge: "replace", + validate(value) { + + if (!value || typeof value !== "object" || + (typeof value.parse !== "function" && typeof value.parseForESLint !== "function") + ) { + throw new TypeError("Expected object with parse() or parseForESLint() method."); + } + + } +}; + +/** @type {ObjectPropertySchema} */ +const pluginsSchema = { + merge(first = {}, second = {}) { + const keys = new Set([...Object.keys(first), ...Object.keys(second)]); + const result = {}; + + // manually validate that plugins are not redefined + for (const key of keys) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + if (key in first && key in second && first[key] !== second[key]) { + throw new TypeError(`Cannot redefine plugin "${key}".`); + } + + result[key] = second[key] || first[key]; + } + + return result; + }, + validate(value) { + + // first check the value to be sure it's an object + if (value === null || typeof value !== "object") { + throw new TypeError("Expected an object."); + } + + // make sure it's not an array, which would mean eslintrc-style is used + if (Array.isArray(value)) { + throw new IncompatiblePluginsError(value); + } + + // second check the keys to make sure they are objects + for (const key of Object.keys(value)) { + + // avoid hairy edge case + if (key === "__proto__") { + continue; + } + + if (value[key] === null || typeof value[key] !== "object") { + throw new TypeError(`Key "${key}": Expected an object.`); + } + } + } +}; + +/** @type {ObjectPropertySchema} */ +const processorSchema = { + merge: "replace", + validate(value) { + if (typeof value === "string") { + assertIsPluginMemberName(value); + } else if (value && typeof value === "object") { + if (typeof value.preprocess !== "function" || typeof value.postprocess !== "function") { + throw new TypeError("Object must have a preprocess() and a postprocess() method."); + } + } else { + throw new TypeError("Expected an object or a string."); + } + } +}; + +/** @type {ObjectPropertySchema} */ +const rulesSchema = { + merge(first = {}, second = {}) { + + const result = { + ...first, + ...second + }; + + + for (const ruleId of Object.keys(result)) { + + try { + + // avoid hairy edge case + if (ruleId === "__proto__") { + + /* eslint-disable-next-line no-proto -- Though deprecated, may still be present */ + delete result.__proto__; + continue; + } + + result[ruleId] = normalizeRuleOptions(result[ruleId]); + + /* + * If either rule config is missing, then the correct + * config is already present and we just need to normalize + * the severity. + */ + if (!(ruleId in first) || !(ruleId in second)) { + continue; + } + + const firstRuleOptions = normalizeRuleOptions(first[ruleId]); + const secondRuleOptions = normalizeRuleOptions(second[ruleId]); + + /* + * If the second rule config only has a severity (length of 1), + * then use that severity and keep the rest of the options from + * the first rule config. + */ + if (secondRuleOptions.length === 1) { + result[ruleId] = [secondRuleOptions[0], ...firstRuleOptions.slice(1)]; + continue; + } + + /* + * In any other situation, then the second rule config takes + * precedence. That means the value at `result[ruleId]` is + * already correct and no further work is necessary. + */ + } catch (ex) { + throw new Error(`Key "${ruleId}": ${ex.message}`, { cause: ex }); + } + + } + + return result; + + + }, + + validate(value) { + assertIsObject(value); + + /* + * We are not checking the rule schema here because there is no + * guarantee that the rule definition is present at this point. Instead + * we wait and check the rule schema during the finalization step + * of calculating a config. + */ + for (const ruleId of Object.keys(value)) { + + // avoid hairy edge case + if (ruleId === "__proto__") { + continue; + } + + const ruleOptions = value[ruleId]; + + assertIsRuleOptions(ruleId, ruleOptions); + + if (Array.isArray(ruleOptions)) { + assertIsRuleSeverity(ruleId, ruleOptions[0]); + } else { + assertIsRuleSeverity(ruleId, ruleOptions); + } + } + } +}; + +/** @type {ObjectPropertySchema} */ +const ecmaVersionSchema = { + merge: "replace", + validate(value) { + if (typeof value === "number" || value === "latest") { + return; + } + + throw new TypeError("Expected a number or \"latest\"."); + } +}; + +/** @type {ObjectPropertySchema} */ +const sourceTypeSchema = { + merge: "replace", + validate(value) { + if (typeof value !== "string" || !/^(?:script|module|commonjs)$/u.test(value)) { + throw new TypeError("Expected \"script\", \"module\", or \"commonjs\"."); + } + } +}; + +/** + * Creates a schema that always throws an error. Useful for warning + * about eslintrc-style keys. + * @param {string} key The eslintrc key to create a schema for. + * @returns {ObjectPropertySchema} The schema. + */ +function createEslintrcErrorSchema(key) { + return { + merge: "replace", + validate() { + throw new IncompatibleKeyError(key); + } + }; +} + +const eslintrcKeys = [ + "env", + "extends", + "globals", + "ignorePatterns", + "noInlineConfig", + "overrides", + "parser", + "parserOptions", + "reportUnusedDisableDirectives", + "root" +]; + +//----------------------------------------------------------------------------- +// Full schema +//----------------------------------------------------------------------------- + +const flatConfigSchema = { + + // eslintrc-style keys that should always error + ...Object.fromEntries(eslintrcKeys.map(key => [key, createEslintrcErrorSchema(key)])), + + // flat config keys + settings: deepObjectAssignSchema, + linterOptions: { + schema: { + noInlineConfig: booleanSchema, + reportUnusedDisableDirectives: disableDirectiveSeveritySchema + } + }, + languageOptions: { + schema: { + ecmaVersion: ecmaVersionSchema, + sourceType: sourceTypeSchema, + globals: globalsSchema, + parser: parserSchema, + parserOptions: deepObjectAssignSchema + } + }, + processor: processorSchema, + plugins: pluginsSchema, + rules: rulesSchema +}; + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +module.exports = { + flatConfigSchema, + assertIsRuleSeverity, + assertIsRuleOptions +}; diff --git a/node_modules/eslint/lib/config/rule-validator.js b/node_modules/eslint/lib/config/rule-validator.js new file mode 100644 index 000000000..eee5b40bd --- /dev/null +++ b/node_modules/eslint/lib/config/rule-validator.js @@ -0,0 +1,158 @@ +/** + * @fileoverview Rule Validator + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const ajvImport = require("../shared/ajv"); +const ajv = ajvImport(); +const { + parseRuleId, + getRuleFromConfig, + getRuleOptionsSchema +} = require("./flat-config-helpers"); +const ruleReplacements = require("../../conf/replacements.json"); + +//----------------------------------------------------------------------------- +// Helpers +//----------------------------------------------------------------------------- + +/** + * Throws a helpful error when a rule cannot be found. + * @param {Object} ruleId The rule identifier. + * @param {string} ruleId.pluginName The ID of the rule to find. + * @param {string} ruleId.ruleName The ID of the rule to find. + * @param {Object} config The config to search in. + * @throws {TypeError} For missing plugin or rule. + * @returns {void} + */ +function throwRuleNotFoundError({ pluginName, ruleName }, config) { + + const ruleId = pluginName === "@" ? ruleName : `${pluginName}/${ruleName}`; + + const errorMessageHeader = `Key "rules": Key "${ruleId}"`; + let errorMessage = `${errorMessageHeader}: Could not find plugin "${pluginName}".`; + + // if the plugin exists then we need to check if the rule exists + if (config.plugins && config.plugins[pluginName]) { + const replacementRuleName = ruleReplacements.rules[ruleName]; + + if (pluginName === "@" && replacementRuleName) { + + errorMessage = `${errorMessageHeader}: Rule "${ruleName}" was removed and replaced by "${replacementRuleName}".`; + + } else { + + errorMessage = `${errorMessageHeader}: Could not find "${ruleName}" in plugin "${pluginName}".`; + + // otherwise, let's see if we can find the rule name elsewhere + for (const [otherPluginName, otherPlugin] of Object.entries(config.plugins)) { + if (otherPlugin.rules && otherPlugin.rules[ruleName]) { + errorMessage += ` Did you mean "${otherPluginName}/${ruleName}"?`; + break; + } + } + + } + + // falls through to throw error + } + + throw new TypeError(errorMessage); +} + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +/** + * Implements validation functionality for the rules portion of a config. + */ +class RuleValidator { + + /** + * Creates a new instance. + */ + constructor() { + + /** + * A collection of compiled validators for rules that have already + * been validated. + * @type {WeakMap} + */ + this.validators = new WeakMap(); + } + + /** + * Validates all of the rule configurations in a config against each + * rule's schema. + * @param {Object} config The full config to validate. This object must + * contain both the rules section and the plugins section. + * @returns {void} + * @throws {Error} If a rule's configuration does not match its schema. + */ + validate(config) { + + if (!config.rules) { + return; + } + + for (const [ruleId, ruleOptions] of Object.entries(config.rules)) { + + // check for edge case + if (ruleId === "__proto__") { + continue; + } + + /* + * If a rule is disabled, we don't do any validation. This allows + * users to safely set any value to 0 or "off" without worrying + * that it will cause a validation error. + * + * Note: ruleOptions is always an array at this point because + * this validation occurs after FlatConfigArray has merged and + * normalized values. + */ + if (ruleOptions[0] === 0) { + continue; + } + + const rule = getRuleFromConfig(ruleId, config); + + if (!rule) { + throwRuleNotFoundError(parseRuleId(ruleId), config); + } + + // Precompile and cache validator the first time + if (!this.validators.has(rule)) { + const schema = getRuleOptionsSchema(rule); + + if (schema) { + this.validators.set(rule, ajv.compile(schema)); + } + } + + const validateRule = this.validators.get(rule); + + if (validateRule) { + + validateRule(ruleOptions.slice(1)); + + if (validateRule.errors) { + throw new Error(`Key "rules": Key "${ruleId}": ${ + validateRule.errors.map( + error => `\tValue ${JSON.stringify(error.data)} ${error.message}.\n` + ).join("") + }`); + } + } + } + } +} + +exports.RuleValidator = RuleValidator; diff --git a/node_modules/eslint/lib/eslint/eslint-helpers.js b/node_modules/eslint/lib/eslint/eslint-helpers.js new file mode 100644 index 000000000..685826ac6 --- /dev/null +++ b/node_modules/eslint/lib/eslint/eslint-helpers.js @@ -0,0 +1,902 @@ +/** + * @fileoverview Helper functions for ESLint class + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const path = require("path"); +const fs = require("fs"); +const fsp = fs.promises; +const isGlob = require("is-glob"); +const hash = require("../cli-engine/hash"); +const minimatch = require("minimatch"); +const util = require("util"); +const fswalk = require("@nodelib/fs.walk"); +const globParent = require("glob-parent"); +const isPathInside = require("is-path-inside"); + +//----------------------------------------------------------------------------- +// Fixup references +//----------------------------------------------------------------------------- + +const doFsWalk = util.promisify(fswalk.walk); +const Minimatch = minimatch.Minimatch; +const MINIMATCH_OPTIONS = { dot: true }; + +//----------------------------------------------------------------------------- +// Types +//----------------------------------------------------------------------------- + +/** + * @typedef {Object} GlobSearch + * @property {Array} patterns The normalized patterns to use for a search. + * @property {Array} rawPatterns The patterns as entered by the user + * before doing any normalization. + */ + +//----------------------------------------------------------------------------- +// Errors +//----------------------------------------------------------------------------- + +/** + * The error type when no files match a glob. + */ +class NoFilesFoundError extends Error { + + /** + * @param {string} pattern The glob pattern which was not found. + * @param {boolean} globEnabled If `false` then the pattern was a glob pattern, but glob was disabled. + */ + constructor(pattern, globEnabled) { + super(`No files matching '${pattern}' were found${!globEnabled ? " (glob was disabled)" : ""}.`); + this.messageTemplate = "file-not-found"; + this.messageData = { pattern, globDisabled: !globEnabled }; + } +} + +/** + * The error type when a search fails to match multiple patterns. + */ +class UnmatchedSearchPatternsError extends Error { + + /** + * @param {Object} options The options for the error. + * @param {string} options.basePath The directory that was searched. + * @param {Array} options.unmatchedPatterns The glob patterns + * which were not found. + * @param {Array} options.patterns The glob patterns that were + * searched. + * @param {Array} options.rawPatterns The raw glob patterns that + * were searched. + */ + constructor({ basePath, unmatchedPatterns, patterns, rawPatterns }) { + super(`No files matching '${rawPatterns}' in '${basePath}' were found.`); + this.basePath = basePath; + this.unmatchedPatterns = unmatchedPatterns; + this.patterns = patterns; + this.rawPatterns = rawPatterns; + } +} + +/** + * The error type when there are files matched by a glob, but all of them have been ignored. + */ +class AllFilesIgnoredError extends Error { + + /** + * @param {string} pattern The glob pattern which was not found. + */ + constructor(pattern) { + super(`All files matched by '${pattern}' are ignored.`); + this.messageTemplate = "all-files-ignored"; + this.messageData = { pattern }; + } +} + + +//----------------------------------------------------------------------------- +// General Helpers +//----------------------------------------------------------------------------- + +/** + * Check if a given value is a non-empty string or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if `x` is a non-empty string. + */ +function isNonEmptyString(x) { + return typeof x === "string" && x.trim() !== ""; +} + +/** + * Check if a given value is an array of non-empty strings or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if `x` is an array of non-empty strings. + */ +function isArrayOfNonEmptyString(x) { + return Array.isArray(x) && x.every(isNonEmptyString); +} + +//----------------------------------------------------------------------------- +// File-related Helpers +//----------------------------------------------------------------------------- + +/** + * Normalizes slashes in a file pattern to posix-style. + * @param {string} pattern The pattern to replace slashes in. + * @returns {string} The pattern with slashes normalized. + */ +function normalizeToPosix(pattern) { + return pattern.replace(/\\/gu, "/"); +} + +/** + * Check if a string is a glob pattern or not. + * @param {string} pattern A glob pattern. + * @returns {boolean} `true` if the string is a glob pattern. + */ +function isGlobPattern(pattern) { + return isGlob(path.sep === "\\" ? normalizeToPosix(pattern) : pattern); +} + + +/** + * Determines if a given glob pattern will return any results. + * Used primarily to help with useful error messages. + * @param {Object} options The options for the function. + * @param {string} options.basePath The directory to search. + * @param {string} options.pattern A glob pattern to match. + * @returns {Promise} True if there is a glob match, false if not. + */ +function globMatch({ basePath, pattern }) { + + let found = false; + const patternToUse = path.isAbsolute(pattern) + ? normalizeToPosix(path.relative(basePath, pattern)) + : pattern; + + const matcher = new Minimatch(patternToUse, MINIMATCH_OPTIONS); + + const fsWalkSettings = { + + deepFilter(entry) { + const relativePath = normalizeToPosix(path.relative(basePath, entry.path)); + + return !found && matcher.match(relativePath, true); + }, + + entryFilter(entry) { + if (found || entry.dirent.isDirectory()) { + return false; + } + + const relativePath = normalizeToPosix(path.relative(basePath, entry.path)); + + if (matcher.match(relativePath)) { + found = true; + return true; + } + + return false; + } + }; + + return new Promise(resolve => { + + // using a stream so we can exit early because we just need one match + const globStream = fswalk.walkStream(basePath, fsWalkSettings); + + globStream.on("data", () => { + globStream.destroy(); + resolve(true); + }); + + // swallow errors as they're not important here + globStream.on("error", () => { }); + + globStream.on("end", () => { + resolve(false); + }); + globStream.read(); + }); + +} + +/** + * Searches a directory looking for matching glob patterns. This uses + * the config array's logic to determine if a directory or file should + * be ignored, so it is consistent with how ignoring works throughout + * ESLint. + * @param {Object} options The options for this function. + * @param {string} options.basePath The directory to search. + * @param {Array} options.patterns An array of glob patterns + * to match. + * @param {Array} options.rawPatterns An array of glob patterns + * as the user inputted them. Used for errors. + * @param {FlatConfigArray} options.configs The config array to use for + * determining what to ignore. + * @param {boolean} options.errorOnUnmatchedPattern Determines if an error + * should be thrown when a pattern is unmatched. + * @returns {Promise>} An array of matching file paths + * or an empty array if there are no matches. + * @throws {UnmatchedSearchPatternsError} If there is a pattern that doesn't + * match any files. + */ +async function globSearch({ + basePath, + patterns, + rawPatterns, + configs, + errorOnUnmatchedPattern +}) { + + if (patterns.length === 0) { + return []; + } + + /* + * In this section we are converting the patterns into Minimatch + * instances for performance reasons. Because we are doing the same + * matches repeatedly, it's best to compile those patterns once and + * reuse them multiple times. + * + * To do that, we convert any patterns with an absolute path into a + * relative path and normalize it to Posix-style slashes. We also keep + * track of the relative patterns to map them back to the original + * patterns, which we need in order to throw an error if there are any + * unmatched patterns. + */ + const relativeToPatterns = new Map(); + const matchers = patterns.map((pattern, i) => { + const patternToUse = path.isAbsolute(pattern) + ? normalizeToPosix(path.relative(basePath, pattern)) + : pattern; + + relativeToPatterns.set(patternToUse, patterns[i]); + + return new Minimatch(patternToUse, MINIMATCH_OPTIONS); + }); + + /* + * We track unmatched patterns because we may want to throw an error when + * they occur. To start, this set is initialized with all of the patterns. + * Every time a match occurs, the pattern is removed from the set, making + * it easy to tell if we have any unmatched patterns left at the end of + * search. + */ + const unmatchedPatterns = new Set([...relativeToPatterns.keys()]); + + const filePaths = (await doFsWalk(basePath, { + + deepFilter(entry) { + const relativePath = normalizeToPosix(path.relative(basePath, entry.path)); + const matchesPattern = matchers.some(matcher => matcher.match(relativePath, true)); + + return matchesPattern && !configs.isDirectoryIgnored(entry.path); + }, + entryFilter(entry) { + const relativePath = normalizeToPosix(path.relative(basePath, entry.path)); + + // entries may be directories or files so filter out directories + if (entry.dirent.isDirectory()) { + return false; + } + + /* + * Optimization: We need to track when patterns are left unmatched + * and so we use `unmatchedPatterns` to do that. There is a bit of + * complexity here because the same file can be matched by more than + * one pattern. So, when we start, we actually need to test every + * pattern against every file. Once we know there are no remaining + * unmatched patterns, then we can switch to just looking for the + * first matching pattern for improved speed. + */ + const matchesPattern = unmatchedPatterns.size > 0 + ? matchers.reduce((previousValue, matcher) => { + const pathMatches = matcher.match(relativePath); + + /* + * We updated the unmatched patterns set only if the path + * matches and the file isn't ignored. If the file is + * ignored, that means there wasn't a match for the + * pattern so it should not be removed. + * + * Performance note: isFileIgnored() aggressively caches + * results so there is no performance penalty for calling + * it twice with the same argument. + */ + if (pathMatches && !configs.isFileIgnored(entry.path)) { + unmatchedPatterns.delete(matcher.pattern); + } + + return pathMatches || previousValue; + }, false) + : matchers.some(matcher => matcher.match(relativePath)); + + return matchesPattern && !configs.isFileIgnored(entry.path); + } + + })).map(entry => entry.path); + + // now check to see if we have any unmatched patterns + if (errorOnUnmatchedPattern && unmatchedPatterns.size > 0) { + throw new UnmatchedSearchPatternsError({ + basePath, + unmatchedPatterns: [...unmatchedPatterns].map( + pattern => relativeToPatterns.get(pattern) + ), + patterns, + rawPatterns + }); + } + + return filePaths; +} + +/** + * Throws an error for unmatched patterns. The error will only contain information about the first one. + * Checks to see if there are any ignored results for a given search. + * @param {Object} options The options for this function. + * @param {string} options.basePath The directory to search. + * @param {Array} options.patterns An array of glob patterns + * that were used in the original search. + * @param {Array} options.rawPatterns An array of glob patterns + * as the user inputted them. Used for errors. + * @param {Array} options.unmatchedPatterns A non-empty array of glob patterns + * that were unmatched in the original search. + * @returns {void} Always throws an error. + * @throws {NoFilesFoundError} If the first unmatched pattern + * doesn't match any files even when there are no ignores. + * @throws {AllFilesIgnoredError} If the first unmatched pattern + * matches some files when there are no ignores. + */ +async function throwErrorForUnmatchedPatterns({ + basePath, + patterns, + rawPatterns, + unmatchedPatterns +}) { + + const pattern = unmatchedPatterns[0]; + const rawPattern = rawPatterns[patterns.indexOf(pattern)]; + + const patternHasMatch = await globMatch({ + basePath, + pattern + }); + + if (patternHasMatch) { + throw new AllFilesIgnoredError(rawPattern); + } + + // if we get here there are truly no matches + throw new NoFilesFoundError(rawPattern, true); +} + +/** + * Performs multiple glob searches in parallel. + * @param {Object} options The options for this function. + * @param {Map} options.searches + * An array of glob patterns to match. + * @param {FlatConfigArray} options.configs The config array to use for + * determining what to ignore. + * @param {boolean} options.errorOnUnmatchedPattern Determines if an + * unmatched glob pattern should throw an error. + * @returns {Promise>} An array of matching file paths + * or an empty array if there are no matches. + */ +async function globMultiSearch({ searches, configs, errorOnUnmatchedPattern }) { + + /* + * For convenience, we normalized the search map into an array of objects. + * Next, we filter out all searches that have no patterns. This happens + * primarily for the cwd, which is prepopulated in the searches map as an + * optimization. However, if it has no patterns, it means all patterns + * occur outside of the cwd and we can safely filter out that search. + */ + const normalizedSearches = [...searches].map( + ([basePath, { patterns, rawPatterns }]) => ({ basePath, patterns, rawPatterns }) + ).filter(({ patterns }) => patterns.length > 0); + + const results = await Promise.allSettled( + normalizedSearches.map( + ({ basePath, patterns, rawPatterns }) => globSearch({ + basePath, + patterns, + rawPatterns, + configs, + errorOnUnmatchedPattern + }) + ) + ); + + const filePaths = []; + + for (let i = 0; i < results.length; i++) { + + const result = results[i]; + const currentSearch = normalizedSearches[i]; + + if (result.status === "fulfilled") { + + // if the search was successful just add the results + if (result.value.length > 0) { + filePaths.push(...result.value); + } + + continue; + } + + // if we make it here then there was an error + const error = result.reason; + + // unexpected errors should be re-thrown + if (!error.basePath) { + throw error; + } + + if (errorOnUnmatchedPattern) { + + await throwErrorForUnmatchedPatterns({ + ...currentSearch, + unmatchedPatterns: error.unmatchedPatterns + }); + + } + + } + + return [...new Set(filePaths)]; + +} + +/** + * Finds all files matching the options specified. + * @param {Object} args The arguments objects. + * @param {Array} args.patterns An array of glob patterns. + * @param {boolean} args.globInputPaths true to interpret glob patterns, + * false to not interpret glob patterns. + * @param {string} args.cwd The current working directory to find from. + * @param {FlatConfigArray} args.configs The configs for the current run. + * @param {boolean} args.errorOnUnmatchedPattern Determines if an unmatched pattern + * should throw an error. + * @returns {Promise>} The fully resolved file paths. + * @throws {AllFilesIgnoredError} If there are no results due to an ignore pattern. + * @throws {NoFilesFoundError} If no files matched the given patterns. + */ +async function findFiles({ + patterns, + globInputPaths, + cwd, + configs, + errorOnUnmatchedPattern +}) { + + const results = []; + const missingPatterns = []; + let globbyPatterns = []; + let rawPatterns = []; + const searches = new Map([[cwd, { patterns: globbyPatterns, rawPatterns: [] }]]); + + // check to see if we have explicit files and directories + const filePaths = patterns.map(filePath => path.resolve(cwd, filePath)); + const stats = await Promise.all( + filePaths.map( + filePath => fsp.stat(filePath).catch(() => { }) + ) + ); + + stats.forEach((stat, index) => { + + const filePath = filePaths[index]; + const pattern = normalizeToPosix(patterns[index]); + + if (stat) { + + // files are added directly to the list + if (stat.isFile()) { + results.push({ + filePath, + ignored: configs.isFileIgnored(filePath) + }); + } + + // directories need extensions attached + if (stat.isDirectory()) { + + // group everything in cwd together and split out others + if (isPathInside(filePath, cwd)) { + ({ patterns: globbyPatterns, rawPatterns } = searches.get(cwd)); + } else { + if (!searches.has(filePath)) { + searches.set(filePath, { patterns: [], rawPatterns: [] }); + } + ({ patterns: globbyPatterns, rawPatterns } = searches.get(filePath)); + } + + globbyPatterns.push(`${normalizeToPosix(filePath)}/**`); + rawPatterns.push(pattern); + } + + return; + } + + // save patterns for later use based on whether globs are enabled + if (globInputPaths && isGlobPattern(pattern)) { + + const basePath = path.resolve(cwd, globParent(pattern)); + + // group in cwd if possible and split out others + if (isPathInside(basePath, cwd)) { + ({ patterns: globbyPatterns, rawPatterns } = searches.get(cwd)); + } else { + if (!searches.has(basePath)) { + searches.set(basePath, { patterns: [], rawPatterns: [] }); + } + ({ patterns: globbyPatterns, rawPatterns } = searches.get(basePath)); + } + + globbyPatterns.push(filePath); + rawPatterns.push(pattern); + } else { + missingPatterns.push(pattern); + } + }); + + // there were patterns that didn't match anything, tell the user + if (errorOnUnmatchedPattern && missingPatterns.length) { + throw new NoFilesFoundError(missingPatterns[0], globInputPaths); + } + + // now we are safe to do the search + const globbyResults = await globMultiSearch({ + searches, + configs, + errorOnUnmatchedPattern + }); + + return [ + ...results, + ...globbyResults.map(filePath => ({ + filePath: path.resolve(filePath), + ignored: false + })) + ]; +} + +//----------------------------------------------------------------------------- +// Results-related Helpers +//----------------------------------------------------------------------------- + +/** + * Checks if the given message is an error message. + * @param {LintMessage} message The message to check. + * @returns {boolean} Whether or not the message is an error message. + * @private + */ +function isErrorMessage(message) { + return message.severity === 2; +} + +/** + * Returns result with warning by ignore settings + * @param {string} filePath File path of checked code + * @param {string} baseDir Absolute path of base directory + * @returns {LintResult} Result with single warning + * @private + */ +function createIgnoreResult(filePath, baseDir) { + let message; + const isInNodeModules = baseDir && path.dirname(path.relative(baseDir, filePath)).split(path.sep).includes("node_modules"); + + if (isInNodeModules) { + message = "File ignored by default because it is located under the node_modules directory. Use ignore pattern \"!**/node_modules/\" to disable file ignore settings or use \"--no-warn-ignored\" to suppress this warning."; + } else { + message = "File ignored because of a matching ignore pattern. Use \"--no-ignore\" to disable file ignore settings or use \"--no-warn-ignored\" to suppress this warning."; + } + + return { + filePath: path.resolve(filePath), + messages: [ + { + ruleId: null, + fatal: false, + severity: 1, + message, + nodeType: null + } + ], + suppressedMessages: [], + errorCount: 0, + warningCount: 1, + fatalErrorCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0 + }; +} + +//----------------------------------------------------------------------------- +// Options-related Helpers +//----------------------------------------------------------------------------- + + +/** + * Check if a given value is a valid fix type or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if `x` is valid fix type. + */ +function isFixType(x) { + return x === "directive" || x === "problem" || x === "suggestion" || x === "layout"; +} + +/** + * Check if a given value is an array of fix types or not. + * @param {any} x The value to check. + * @returns {boolean} `true` if `x` is an array of fix types. + */ +function isFixTypeArray(x) { + return Array.isArray(x) && x.every(isFixType); +} + +/** + * The error for invalid options. + */ +class ESLintInvalidOptionsError extends Error { + constructor(messages) { + super(`Invalid Options:\n- ${messages.join("\n- ")}`); + this.code = "ESLINT_INVALID_OPTIONS"; + Error.captureStackTrace(this, ESLintInvalidOptionsError); + } +} + +/** + * Validates and normalizes options for the wrapped CLIEngine instance. + * @param {FlatESLintOptions} options The options to process. + * @throws {ESLintInvalidOptionsError} If of any of a variety of type errors. + * @returns {FlatESLintOptions} The normalized options. + */ +function processOptions({ + allowInlineConfig = true, // ← we cannot use `overrideConfig.noInlineConfig` instead because `allowInlineConfig` has side-effect that suppress warnings that show inline configs are ignored. + baseConfig = null, + cache = false, + cacheLocation = ".eslintcache", + cacheStrategy = "metadata", + cwd = process.cwd(), + errorOnUnmatchedPattern = true, + fix = false, + fixTypes = null, // ← should be null by default because if it's an array then it suppresses rules that don't have the `meta.type` property. + globInputPaths = true, + ignore = true, + ignorePatterns = null, + overrideConfig = null, + overrideConfigFile = null, + plugins = {}, + warnIgnored = true, + ...unknownOptions +}) { + const errors = []; + const unknownOptionKeys = Object.keys(unknownOptions); + + if (unknownOptionKeys.length >= 1) { + errors.push(`Unknown options: ${unknownOptionKeys.join(", ")}`); + if (unknownOptionKeys.includes("cacheFile")) { + errors.push("'cacheFile' has been removed. Please use the 'cacheLocation' option instead."); + } + if (unknownOptionKeys.includes("configFile")) { + errors.push("'configFile' has been removed. Please use the 'overrideConfigFile' option instead."); + } + if (unknownOptionKeys.includes("envs")) { + errors.push("'envs' has been removed."); + } + if (unknownOptionKeys.includes("extensions")) { + errors.push("'extensions' has been removed."); + } + if (unknownOptionKeys.includes("resolvePluginsRelativeTo")) { + errors.push("'resolvePluginsRelativeTo' has been removed."); + } + if (unknownOptionKeys.includes("globals")) { + errors.push("'globals' has been removed. Please use the 'overrideConfig.languageOptions.globals' option instead."); + } + if (unknownOptionKeys.includes("ignorePath")) { + errors.push("'ignorePath' has been removed."); + } + if (unknownOptionKeys.includes("ignorePattern")) { + errors.push("'ignorePattern' has been removed. Please use the 'overrideConfig.ignorePatterns' option instead."); + } + if (unknownOptionKeys.includes("parser")) { + errors.push("'parser' has been removed. Please use the 'overrideConfig.languageOptions.parser' option instead."); + } + if (unknownOptionKeys.includes("parserOptions")) { + errors.push("'parserOptions' has been removed. Please use the 'overrideConfig.languageOptions.parserOptions' option instead."); + } + if (unknownOptionKeys.includes("rules")) { + errors.push("'rules' has been removed. Please use the 'overrideConfig.rules' option instead."); + } + if (unknownOptionKeys.includes("rulePaths")) { + errors.push("'rulePaths' has been removed. Please define your rules using plugins."); + } + if (unknownOptionKeys.includes("reportUnusedDisableDirectives")) { + errors.push("'reportUnusedDisableDirectives' has been removed. Please use the 'overrideConfig.linterOptions.reportUnusedDisableDirectives' option instead."); + } + } + if (typeof allowInlineConfig !== "boolean") { + errors.push("'allowInlineConfig' must be a boolean."); + } + if (typeof baseConfig !== "object") { + errors.push("'baseConfig' must be an object or null."); + } + if (typeof cache !== "boolean") { + errors.push("'cache' must be a boolean."); + } + if (!isNonEmptyString(cacheLocation)) { + errors.push("'cacheLocation' must be a non-empty string."); + } + if ( + cacheStrategy !== "metadata" && + cacheStrategy !== "content" + ) { + errors.push("'cacheStrategy' must be any of \"metadata\", \"content\"."); + } + if (!isNonEmptyString(cwd) || !path.isAbsolute(cwd)) { + errors.push("'cwd' must be an absolute path."); + } + if (typeof errorOnUnmatchedPattern !== "boolean") { + errors.push("'errorOnUnmatchedPattern' must be a boolean."); + } + if (typeof fix !== "boolean" && typeof fix !== "function") { + errors.push("'fix' must be a boolean or a function."); + } + if (fixTypes !== null && !isFixTypeArray(fixTypes)) { + errors.push("'fixTypes' must be an array of any of \"directive\", \"problem\", \"suggestion\", and \"layout\"."); + } + if (typeof globInputPaths !== "boolean") { + errors.push("'globInputPaths' must be a boolean."); + } + if (typeof ignore !== "boolean") { + errors.push("'ignore' must be a boolean."); + } + if (!isArrayOfNonEmptyString(ignorePatterns) && ignorePatterns !== null) { + errors.push("'ignorePatterns' must be an array of non-empty strings or null."); + } + if (typeof overrideConfig !== "object") { + errors.push("'overrideConfig' must be an object or null."); + } + if (!isNonEmptyString(overrideConfigFile) && overrideConfigFile !== null && overrideConfigFile !== true) { + errors.push("'overrideConfigFile' must be a non-empty string, null, or true."); + } + if (typeof plugins !== "object") { + errors.push("'plugins' must be an object or null."); + } else if (plugins !== null && Object.keys(plugins).includes("")) { + errors.push("'plugins' must not include an empty string."); + } + if (Array.isArray(plugins)) { + errors.push("'plugins' doesn't add plugins to configuration to load. Please use the 'overrideConfig.plugins' option instead."); + } + if (typeof warnIgnored !== "boolean") { + errors.push("'warnIgnored' must be a boolean."); + } + if (errors.length > 0) { + throw new ESLintInvalidOptionsError(errors); + } + + return { + allowInlineConfig, + baseConfig, + cache, + cacheLocation, + cacheStrategy, + + // when overrideConfigFile is true that means don't do config file lookup + configFile: overrideConfigFile === true ? false : overrideConfigFile, + overrideConfig, + cwd: path.normalize(cwd), + errorOnUnmatchedPattern, + fix, + fixTypes, + globInputPaths, + ignore, + ignorePatterns, + warnIgnored + }; +} + + +//----------------------------------------------------------------------------- +// Cache-related helpers +//----------------------------------------------------------------------------- + +/** + * return the cacheFile to be used by eslint, based on whether the provided parameter is + * a directory or looks like a directory (ends in `path.sep`), in which case the file + * name will be the `cacheFile/.cache_hashOfCWD` + * + * if cacheFile points to a file or looks like a file then in will just use that file + * @param {string} cacheFile The name of file to be used to store the cache + * @param {string} cwd Current working directory + * @returns {string} the resolved path to the cache file + */ +function getCacheFile(cacheFile, cwd) { + + /* + * make sure the path separators are normalized for the environment/os + * keeping the trailing path separator if present + */ + const normalizedCacheFile = path.normalize(cacheFile); + + const resolvedCacheFile = path.resolve(cwd, normalizedCacheFile); + const looksLikeADirectory = normalizedCacheFile.slice(-1) === path.sep; + + /** + * return the name for the cache file in case the provided parameter is a directory + * @returns {string} the resolved path to the cacheFile + */ + function getCacheFileForDirectory() { + return path.join(resolvedCacheFile, `.cache_${hash(cwd)}`); + } + + let fileStats; + + try { + fileStats = fs.lstatSync(resolvedCacheFile); + } catch { + fileStats = null; + } + + + /* + * in case the file exists we need to verify if the provided path + * is a directory or a file. If it is a directory we want to create a file + * inside that directory + */ + if (fileStats) { + + /* + * is a directory or is a file, but the original file the user provided + * looks like a directory but `path.resolve` removed the `last path.sep` + * so we need to still treat this like a directory + */ + if (fileStats.isDirectory() || looksLikeADirectory) { + return getCacheFileForDirectory(); + } + + // is file so just use that file + return resolvedCacheFile; + } + + /* + * here we known the file or directory doesn't exist, + * so we will try to infer if its a directory if it looks like a directory + * for the current operating system. + */ + + // if the last character passed is a path separator we assume is a directory + if (looksLikeADirectory) { + return getCacheFileForDirectory(); + } + + return resolvedCacheFile; +} + + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +module.exports = { + isGlobPattern, + findFiles, + + isNonEmptyString, + isArrayOfNonEmptyString, + + createIgnoreResult, + isErrorMessage, + + processOptions, + + getCacheFile +}; diff --git a/node_modules/eslint/lib/eslint/eslint.js b/node_modules/eslint/lib/eslint/eslint.js index ae2d21008..7085d5a4d 100644 --- a/node_modules/eslint/lib/eslint/eslint.js +++ b/node_modules/eslint/lib/eslint/eslint.js @@ -32,9 +32,17 @@ const { version } = require("../../package.json"); /** @typedef {import("../shared/types").DeprecatedRuleInfo} DeprecatedRuleInfo */ /** @typedef {import("../shared/types").ConfigData} ConfigData */ /** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */ /** @typedef {import("../shared/types").Plugin} Plugin */ /** @typedef {import("../shared/types").Rule} Rule */ -/** @typedef {import("./load-formatter").Formatter} Formatter */ +/** @typedef {import("../shared/types").LintResult} LintResult */ +/** @typedef {import("../shared/types").ResultsMeta} ResultsMeta */ + +/** + * The main formatter object. + * @typedef LoadedFormatter + * @property {(results: LintResult[], resultsMeta: ResultsMeta) => string | Promise} format format function. + */ /** * The options with which to configure the ESLint instance. @@ -54,7 +62,7 @@ const { version } = require("../../package.json"); * @property {string} [ignorePath] The ignore file to use instead of .eslintignore. * @property {ConfigData} [overrideConfig] Override config object, overrides all configs used with this instance * @property {string} [overrideConfigFile] The configuration file to use. - * @property {Record} [plugins] An array of plugin implementations. + * @property {Record|null} [plugins] Preloaded plugins. This is a map-like object, keys are plugin IDs and each value is implementation. * @property {"error" | "warn" | "off"} [reportUnusedDisableDirectives] the severity to report unused eslint-disable directives. * @property {string} [resolvePluginsRelativeTo] The folder where plugins should be resolved from, defaulting to the CWD. * @property {string[]} [rulePaths] An array of directories to load custom rules from. @@ -68,20 +76,6 @@ const { version } = require("../../package.json"); * @property {Object} definition The plugin definition. */ -/** - * A linting result. - * @typedef {Object} LintResult - * @property {string} filePath The path to the file that was linted. - * @property {LintMessage[]} messages All of the messages for the result. - * @property {number} errorCount Number of errors for the result. - * @property {number} warningCount Number of warnings for the result. - * @property {number} fixableErrorCount Number of fixable errors for the result. - * @property {number} fixableWarningCount Number of fixable warnings for the result. - * @property {string} [source] The source code of the file that was linted. - * @property {string} [output] The source code of the file that was linted, with as many fixes applied as possible. - * @property {DeprecatedRuleInfo[]} usedDeprecatedRules The list of used deprecated rules. - */ - /** * Private members for the `ESLint` instance. * @typedef {Object} ESLintPrivateMembers @@ -111,9 +105,9 @@ function isNonEmptyString(x) { } /** - * Check if a given value is an array of non-empty stringss or not. + * Check if a given value is an array of non-empty strings or not. * @param {any} x The value to check. - * @returns {boolean} `true` if `x` is an array of non-empty stringss. + * @returns {boolean} `true` if `x` is an array of non-empty strings. */ function isArrayOfNonEmptyString(x) { return Array.isArray(x) && x.every(isNonEmptyString); @@ -125,7 +119,7 @@ function isArrayOfNonEmptyString(x) { * @returns {boolean} `true` if `x` is valid fix type. */ function isFixType(x) { - return x === "problem" || x === "suggestion" || x === "layout"; + return x === "directive" || x === "problem" || x === "suggestion" || x === "layout"; } /** @@ -151,6 +145,7 @@ class ESLintInvalidOptionsError extends Error { /** * Validates and normalizes options for the wrapped CLIEngine instance. * @param {ESLintOptions} options The options to process. + * @throws {ESLintInvalidOptionsError} If of any of a variety of type errors. * @returns {ESLintOptions} The normalized options. */ function processOptions({ @@ -237,7 +232,7 @@ function processOptions({ errors.push("'fix' must be a boolean or a function."); } if (fixTypes !== null && !isFixTypeArray(fixTypes)) { - errors.push("'fixTypes' must be an array of any of \"problem\", \"suggestion\", and \"layout\"."); + errors.push("'fixTypes' must be an array of any of \"directive\", \"problem\", \"suggestion\", and \"layout\"."); } if (typeof globInputPaths !== "boolean") { errors.push("'globInputPaths' must be a boolean."); @@ -294,7 +289,7 @@ function processOptions({ cacheLocation, cacheStrategy, configFile: overrideConfigFile, - cwd, + cwd: path.normalize(cwd), errorOnUnmatchedPattern, extensions, fix, @@ -421,6 +416,9 @@ function compareResultsByFilePath(a, b) { return 0; } +/** + * Main API. + */ class ESLint { /** @@ -429,26 +427,13 @@ class ESLint { */ constructor(options = {}) { const processedOptions = processOptions(options); - const cliEngine = new CLIEngine(processedOptions); + const cliEngine = new CLIEngine(processedOptions, { preloadedPlugins: options.plugins }); const { - additionalPluginPool, configArrayFactory, lastConfigArrays } = getCLIEngineInternalSlots(cliEngine); let updated = false; - /* - * Address `plugins` to add plugin implementations. - * Operate the `additionalPluginPool` internal slot directly to avoid - * using `addPlugin(id, plugin)` method that resets cache everytime. - */ - if (options.plugins) { - for (const [id, plugin] of Object.entries(options.plugins)) { - additionalPluginPool.set(id, plugin); - updated = true; - } - } - /* * Address `overrideConfig` to set override config. * Operate the `configArrayFactory` internal slot directly because this @@ -514,6 +499,42 @@ class ESLint { return CLIEngine.getErrorResults(results); } + /** + * Returns meta objects for each rule represented in the lint results. + * @param {LintResult[]} results The results to fetch rules meta for. + * @returns {Object} A mapping of ruleIds to rule meta objects. + */ + getRulesMetaForResults(results) { + + const resultRuleIds = new Set(); + + // first gather all ruleIds from all results + + for (const result of results) { + for (const { ruleId } of result.messages) { + resultRuleIds.add(ruleId); + } + for (const { ruleId } of result.suppressedMessages) { + resultRuleIds.add(ruleId); + } + } + + // create a map of all rules in the results + + const { cliEngine } = privateMembersMap.get(this); + const rules = cliEngine.getRules(); + const resultRules = new Map(); + + for (const [ruleId, rule] of rules) { + if (resultRuleIds.has(ruleId)) { + resultRules.set(ruleId, rule); + } + } + + return createRulesMeta(resultRules); + + } + /** * Executes the current configuration on an array of file and directory names. * @param {string[]} patterns An array of file and directory names. @@ -552,9 +573,12 @@ class ESLint { ...unknownOptions } = options || {}; - for (const key of Object.keys(unknownOptions)) { - throw new Error(`'options' must not include the unknown option '${key}'`); + const unknownOptionKeys = Object.keys(unknownOptions); + + if (unknownOptionKeys.length > 0) { + throw new Error(`'options' must not include the unknown option(s): ${unknownOptionKeys.join(", ")}`); } + if (filePath !== void 0 && !isNonEmptyString(filePath)) { throw new Error("'options.filePath' must be a non-empty string or undefined"); } @@ -576,12 +600,12 @@ class ESLint { * The following values are allowed: * - `undefined` ... Load `stylish` builtin formatter. * - A builtin formatter name ... Load the builtin formatter. - * - A thirdparty formatter name: + * - A third-party formatter name: * - `foo` → `eslint-formatter-foo` * - `@foo` → `@foo/eslint-formatter` * - `@foo/bar` → `@foo/eslint-formatter-bar` * - A file path ... Load the file. - * @returns {Promise} A promise resolving to the formatter object. + * @returns {Promise} A promise resolving to the formatter object. * This promise will be rejected if the given formatter was not found or not * a function. */ @@ -590,7 +614,7 @@ class ESLint { throw new Error("'name' must be a string"); } - const { cliEngine } = privateMembersMap.get(this); + const { cliEngine, options } = privateMembersMap.get(this); const formatter = cliEngine.getFormatter(name); if (typeof formatter !== "function") { @@ -601,15 +625,20 @@ class ESLint { /** * The main formatter method. - * @param {LintResults[]} results The lint results to format. - * @returns {string} The formatted lint results. + * @param {LintResult[]} results The lint results to format. + * @param {ResultsMeta} resultsMeta Warning count and max threshold. + * @returns {string | Promise} The formatted lint results. */ - format(results) { + format(results, resultsMeta) { let rulesMeta = null; results.sort(compareResultsByFilePath); return formatter(results, { + ...resultsMeta, + get cwd() { + return options.cwd; + }, get rulesMeta() { if (!rulesMeta) { rulesMeta = createRulesMeta(cliEngine.getRules()); @@ -653,6 +682,13 @@ class ESLint { } } +/** + * The type of configuration used by this class. + * @type {string} + * @static + */ +ESLint.configType = "eslintrc"; + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ diff --git a/node_modules/eslint/lib/eslint/flat-eslint.js b/node_modules/eslint/lib/eslint/flat-eslint.js new file mode 100644 index 000000000..ca961aafb --- /dev/null +++ b/node_modules/eslint/lib/eslint/flat-eslint.js @@ -0,0 +1,1155 @@ +/** + * @fileoverview Main class using flat config + * @author Nicholas C. Zakas + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +// Note: Node.js 12 does not support fs/promises. +const fs = require("fs").promises; +const { existsSync } = require("fs"); +const path = require("path"); +const findUp = require("find-up"); +const { version } = require("../../package.json"); +const { Linter } = require("../linter"); +const { getRuleFromConfig } = require("../config/flat-config-helpers"); +const { + Legacy: { + ConfigOps: { + getRuleSeverity + }, + ModuleResolver, + naming + } +} = require("@eslint/eslintrc"); + +const { + findFiles, + getCacheFile, + + isNonEmptyString, + isArrayOfNonEmptyString, + + createIgnoreResult, + isErrorMessage, + + processOptions +} = require("./eslint-helpers"); +const { pathToFileURL } = require("url"); +const { FlatConfigArray } = require("../config/flat-config-array"); +const LintResultCache = require("../cli-engine/lint-result-cache"); + +/* + * This is necessary to allow overwriting writeFile for testing purposes. + * We can just use fs/promises once we drop Node.js 12 support. + */ + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +// For VSCode IntelliSense +/** @typedef {import("../shared/types").ConfigData} ConfigData */ +/** @typedef {import("../shared/types").DeprecatedRuleInfo} DeprecatedRuleInfo */ +/** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").LintResult} LintResult */ +/** @typedef {import("../shared/types").ParserOptions} ParserOptions */ +/** @typedef {import("../shared/types").Plugin} Plugin */ +/** @typedef {import("../shared/types").ResultsMeta} ResultsMeta */ +/** @typedef {import("../shared/types").RuleConf} RuleConf */ +/** @typedef {import("../shared/types").Rule} Rule */ +/** @typedef {ReturnType} ExtractedConfig */ + +/** + * The options with which to configure the ESLint instance. + * @typedef {Object} FlatESLintOptions + * @property {boolean} [allowInlineConfig] Enable or disable inline configuration comments. + * @property {ConfigData} [baseConfig] Base config object, extended by all configs used with this instance + * @property {boolean} [cache] Enable result caching. + * @property {string} [cacheLocation] The cache file to use instead of .eslintcache. + * @property {"metadata" | "content"} [cacheStrategy] The strategy used to detect changed files. + * @property {string} [cwd] The value to use for the current working directory. + * @property {boolean} [errorOnUnmatchedPattern] If `false` then `ESLint#lintFiles()` doesn't throw even if no target files found. Defaults to `true`. + * @property {boolean|Function} [fix] Execute in autofix mode. If a function, should return a boolean. + * @property {string[]} [fixTypes] Array of rule types to apply fixes for. + * @property {boolean} [globInputPaths] Set to false to skip glob resolution of input file paths to lint (default: true). If false, each input file paths is assumed to be a non-glob path to an existing file. + * @property {boolean} [ignore] False disables all ignore patterns except for the default ones. + * @property {string[]} [ignorePatterns] Ignore file patterns to use in addition to config ignores. These patterns are relative to `cwd`. + * @property {ConfigData} [overrideConfig] Override config object, overrides all configs used with this instance + * @property {boolean|string} [overrideConfigFile] Searches for default config file when falsy; + * doesn't do any config file lookup when `true`; considered to be a config filename + * when a string. + * @property {Record} [plugins] An array of plugin implementations. + * @property {boolean} warnIgnored Show warnings when the file list includes ignored files + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const FLAT_CONFIG_FILENAMES = [ + "eslint.config.js", + "eslint.config.mjs", + "eslint.config.cjs" +]; +const debug = require("debug")("eslint:flat-eslint"); +const removedFormatters = new Set(["table", "codeframe"]); +const privateMembers = new WeakMap(); +const importedConfigFileModificationTime = new Map(); + +/** + * It will calculate the error and warning count for collection of messages per file + * @param {LintMessage[]} messages Collection of messages + * @returns {Object} Contains the stats + * @private + */ +function calculateStatsPerFile(messages) { + const stat = { + errorCount: 0, + fatalErrorCount: 0, + warningCount: 0, + fixableErrorCount: 0, + fixableWarningCount: 0 + }; + + for (let i = 0; i < messages.length; i++) { + const message = messages[i]; + + if (message.fatal || message.severity === 2) { + stat.errorCount++; + if (message.fatal) { + stat.fatalErrorCount++; + } + if (message.fix) { + stat.fixableErrorCount++; + } + } else { + stat.warningCount++; + if (message.fix) { + stat.fixableWarningCount++; + } + } + } + return stat; +} + +/** + * Create rulesMeta object. + * @param {Map} rules a map of rules from which to generate the object. + * @returns {Object} metadata for all enabled rules. + */ +function createRulesMeta(rules) { + return Array.from(rules).reduce((retVal, [id, rule]) => { + retVal[id] = rule.meta; + return retVal; + }, {}); +} + +/** + * Return the absolute path of a file named `"__placeholder__.js"` in a given directory. + * This is used as a replacement for a missing file path. + * @param {string} cwd An absolute directory path. + * @returns {string} The absolute path of a file named `"__placeholder__.js"` in the given directory. + */ +function getPlaceholderPath(cwd) { + return path.join(cwd, "__placeholder__.js"); +} + +/** @type {WeakMap} */ +const usedDeprecatedRulesCache = new WeakMap(); + +/** + * Create used deprecated rule list. + * @param {CLIEngine} eslint The CLIEngine instance. + * @param {string} maybeFilePath The absolute path to a lint target file or `""`. + * @returns {DeprecatedRuleInfo[]} The used deprecated rule list. + */ +function getOrFindUsedDeprecatedRules(eslint, maybeFilePath) { + const { + configs, + options: { cwd } + } = privateMembers.get(eslint); + const filePath = path.isAbsolute(maybeFilePath) + ? maybeFilePath + : getPlaceholderPath(cwd); + const config = configs.getConfig(filePath); + + // Most files use the same config, so cache it. + if (config && !usedDeprecatedRulesCache.has(config)) { + const retv = []; + + if (config.rules) { + for (const [ruleId, ruleConf] of Object.entries(config.rules)) { + if (getRuleSeverity(ruleConf) === 0) { + continue; + } + const rule = getRuleFromConfig(ruleId, config); + const meta = rule && rule.meta; + + if (meta && meta.deprecated) { + retv.push({ ruleId, replacedBy: meta.replacedBy || [] }); + } + } + } + + + usedDeprecatedRulesCache.set(config, Object.freeze(retv)); + } + + return config ? usedDeprecatedRulesCache.get(config) : Object.freeze([]); +} + +/** + * Processes the linting results generated by a CLIEngine linting report to + * match the ESLint class's API. + * @param {CLIEngine} eslint The CLIEngine instance. + * @param {CLIEngineLintReport} report The CLIEngine linting report to process. + * @returns {LintResult[]} The processed linting results. + */ +function processLintReport(eslint, { results }) { + const descriptor = { + configurable: true, + enumerable: true, + get() { + return getOrFindUsedDeprecatedRules(eslint, this.filePath); + } + }; + + for (const result of results) { + Object.defineProperty(result, "usedDeprecatedRules", descriptor); + } + + return results; +} + +/** + * An Array.prototype.sort() compatible compare function to order results by their file path. + * @param {LintResult} a The first lint result. + * @param {LintResult} b The second lint result. + * @returns {number} An integer representing the order in which the two results should occur. + */ +function compareResultsByFilePath(a, b) { + if (a.filePath < b.filePath) { + return -1; + } + + if (a.filePath > b.filePath) { + return 1; + } + + return 0; +} + +/** + * Searches from the current working directory up until finding the + * given flat config filename. + * @param {string} cwd The current working directory to search from. + * @returns {Promise} The filename if found or `undefined` if not. + */ +function findFlatConfigFile(cwd) { + return findUp( + FLAT_CONFIG_FILENAMES, + { cwd } + ); +} + +/** + * Load the config array from the given filename. + * @param {string} filePath The filename to load from. + * @returns {Promise} The config loaded from the config file. + */ +async function loadFlatConfigFile(filePath) { + debug(`Loading config from ${filePath}`); + + const fileURL = pathToFileURL(filePath); + + debug(`Config file URL is ${fileURL}`); + + const mtime = (await fs.stat(filePath)).mtime.getTime(); + + /* + * Append a query with the config file's modification time (`mtime`) in order + * to import the current version of the config file. Without the query, `import()` would + * cache the config file module by the pathname only, and then always return + * the same version (the one that was actual when the module was imported for the first time). + * + * This ensures that the config file module is loaded and executed again + * if it has been changed since the last time it was imported. + * If it hasn't been changed, `import()` will just return the cached version. + * + * Note that we should not overuse queries (e.g., by appending the current time + * to always reload the config file module) as that could cause memory leaks + * because entries are never removed from the import cache. + */ + fileURL.searchParams.append("mtime", mtime); + + /* + * With queries, we can bypass the import cache. However, when import-ing a CJS module, + * Node.js uses the require infrastructure under the hood. That includes the require cache, + * which caches the config file module by its file path (queries have no effect). + * Therefore, we also need to clear the require cache before importing the config file module. + * In order to get the same behavior with ESM and CJS config files, in particular - to reload + * the config file only if it has been changed, we track file modification times and clear + * the require cache only if the file has been changed. + */ + if (importedConfigFileModificationTime.get(filePath) !== mtime) { + delete require.cache[filePath]; + } + + const config = (await import(fileURL)).default; + + importedConfigFileModificationTime.set(filePath, mtime); + + return config; +} + +/** + * Determines which config file to use. This is determined by seeing if an + * override config file was passed, and if so, using it; otherwise, as long + * as override config file is not explicitly set to `false`, it will search + * upwards from the cwd for a file named `eslint.config.js`. + * @param {import("./eslint").ESLintOptions} options The ESLint instance options. + * @returns {{configFilePath:string|undefined,basePath:string,error:Error|null}} Location information for + * the config file. + */ +async function locateConfigFileToUse({ configFile, cwd }) { + + // determine where to load config file from + let configFilePath; + let basePath = cwd; + let error = null; + + if (typeof configFile === "string") { + debug(`Override config file path is ${configFile}`); + configFilePath = path.resolve(cwd, configFile); + } else if (configFile !== false) { + debug("Searching for eslint.config.js"); + configFilePath = await findFlatConfigFile(cwd); + + if (configFilePath) { + basePath = path.resolve(path.dirname(configFilePath)); + } else { + error = new Error("Could not find config file."); + } + + } + + return { + configFilePath, + basePath, + error + }; + +} + +/** + * Calculates the config array for this run based on inputs. + * @param {FlatESLint} eslint The instance to create the config array for. + * @param {import("./eslint").ESLintOptions} options The ESLint instance options. + * @returns {FlatConfigArray} The config array for `eslint``. + */ +async function calculateConfigArray(eslint, { + cwd, + baseConfig, + overrideConfig, + configFile, + ignore: shouldIgnore, + ignorePatterns +}) { + + // check for cached instance + const slots = privateMembers.get(eslint); + + if (slots.configs) { + return slots.configs; + } + + const { configFilePath, basePath, error } = await locateConfigFileToUse({ configFile, cwd }); + + // config file is required to calculate config + if (error) { + throw error; + } + + const configs = new FlatConfigArray(baseConfig || [], { basePath, shouldIgnore }); + + // load config file + if (configFilePath) { + const fileConfig = await loadFlatConfigFile(configFilePath); + + if (Array.isArray(fileConfig)) { + configs.push(...fileConfig); + } else { + configs.push(fileConfig); + } + } + + // add in any configured defaults + configs.push(...slots.defaultConfigs); + + // append command line ignore patterns + if (ignorePatterns && ignorePatterns.length > 0) { + + let relativeIgnorePatterns; + + /* + * If the config file basePath is different than the cwd, then + * the ignore patterns won't work correctly. Here, we adjust the + * ignore pattern to include the correct relative path. Patterns + * passed as `ignorePatterns` are relative to the cwd, whereas + * the config file basePath can be an ancestor of the cwd. + */ + if (basePath === cwd) { + relativeIgnorePatterns = ignorePatterns; + } else { + + const relativeIgnorePath = path.relative(basePath, cwd); + + relativeIgnorePatterns = ignorePatterns.map(pattern => { + const negated = pattern.startsWith("!"); + const basePattern = negated ? pattern.slice(1) : pattern; + + return (negated ? "!" : "") + + path.posix.join(relativeIgnorePath, basePattern); + }); + } + + /* + * Ignore patterns are added to the end of the config array + * so they can override default ignores. + */ + configs.push({ + ignores: relativeIgnorePatterns + }); + } + + if (overrideConfig) { + if (Array.isArray(overrideConfig)) { + configs.push(...overrideConfig); + } else { + configs.push(overrideConfig); + } + } + + await configs.normalize(); + + // cache the config array for this instance + slots.configs = configs; + + return configs; +} + +/** + * Processes an source code using ESLint. + * @param {Object} config The config object. + * @param {string} config.text The source code to verify. + * @param {string} config.cwd The path to the current working directory. + * @param {string|undefined} config.filePath The path to the file of `text`. If this is undefined, it uses ``. + * @param {FlatConfigArray} config.configs The config. + * @param {boolean} config.fix If `true` then it does fix. + * @param {boolean} config.allowInlineConfig If `true` then it uses directive comments. + * @param {Linter} config.linter The linter instance to verify. + * @returns {LintResult} The result of linting. + * @private + */ +function verifyText({ + text, + cwd, + filePath: providedFilePath, + configs, + fix, + allowInlineConfig, + linter +}) { + const filePath = providedFilePath || ""; + + debug(`Lint ${filePath}`); + + /* + * Verify. + * `config.extractConfig(filePath)` requires an absolute path, but `linter` + * doesn't know CWD, so it gives `linter` an absolute path always. + */ + const filePathToVerify = filePath === "" ? getPlaceholderPath(cwd) : filePath; + const { fixed, messages, output } = linter.verifyAndFix( + text, + configs, + { + allowInlineConfig, + filename: filePathToVerify, + fix, + + /** + * Check if the linter should adopt a given code block or not. + * @param {string} blockFilename The virtual filename of a code block. + * @returns {boolean} `true` if the linter should adopt the code block. + */ + filterCodeBlock(blockFilename) { + return configs.isExplicitMatch(blockFilename); + } + } + ); + + // Tweak and return. + const result = { + filePath: filePath === "" ? filePath : path.resolve(filePath), + messages, + suppressedMessages: linter.getSuppressedMessages(), + ...calculateStatsPerFile(messages) + }; + + if (fixed) { + result.output = output; + } + + if ( + result.errorCount + result.warningCount > 0 && + typeof result.output === "undefined" + ) { + result.source = text; + } + + return result; +} + +/** + * Checks whether a message's rule type should be fixed. + * @param {LintMessage} message The message to check. + * @param {FlatConfig} config The config for the file that generated the message. + * @param {string[]} fixTypes An array of fix types to check. + * @returns {boolean} Whether the message should be fixed. + */ +function shouldMessageBeFixed(message, config, fixTypes) { + if (!message.ruleId) { + return fixTypes.has("directive"); + } + + const rule = message.ruleId && getRuleFromConfig(message.ruleId, config); + + return Boolean(rule && rule.meta && fixTypes.has(rule.meta.type)); +} + +/** + * Creates an error to be thrown when an array of results passed to `getRulesMetaForResults` was not created by the current engine. + * @returns {TypeError} An error object. + */ +function createExtraneousResultsError() { + return new TypeError("Results object was not created from this ESLint instance."); +} + +//----------------------------------------------------------------------------- +// Main API +//----------------------------------------------------------------------------- + +/** + * Primary Node.js API for ESLint. + */ +class FlatESLint { + + /** + * Creates a new instance of the main ESLint API. + * @param {FlatESLintOptions} options The options for this instance. + */ + constructor(options = {}) { + + const defaultConfigs = []; + const processedOptions = processOptions(options); + const linter = new Linter({ + cwd: processedOptions.cwd, + configType: "flat" + }); + + const cacheFilePath = getCacheFile( + processedOptions.cacheLocation, + processedOptions.cwd + ); + + const lintResultCache = processedOptions.cache + ? new LintResultCache(cacheFilePath, processedOptions.cacheStrategy) + : null; + + privateMembers.set(this, { + options: processedOptions, + linter, + cacheFilePath, + lintResultCache, + defaultConfigs, + configs: null + }); + + /** + * If additional plugins are passed in, add that to the default + * configs for this instance. + */ + if (options.plugins) { + + const plugins = {}; + + for (const [pluginName, plugin] of Object.entries(options.plugins)) { + plugins[naming.getShorthandName(pluginName, "eslint-plugin")] = plugin; + } + + defaultConfigs.push({ + plugins + }); + } + + } + + /** + * The version text. + * @type {string} + */ + static get version() { + return version; + } + + /** + * Outputs fixes from the given results to files. + * @param {LintResult[]} results The lint results. + * @returns {Promise} Returns a promise that is used to track side effects. + */ + static async outputFixes(results) { + if (!Array.isArray(results)) { + throw new Error("'results' must be an array"); + } + + await Promise.all( + results + .filter(result => { + if (typeof result !== "object" || result === null) { + throw new Error("'results' must include only objects"); + } + return ( + typeof result.output === "string" && + path.isAbsolute(result.filePath) + ); + }) + .map(r => fs.writeFile(r.filePath, r.output)) + ); + } + + /** + * Returns results that only contains errors. + * @param {LintResult[]} results The results to filter. + * @returns {LintResult[]} The filtered results. + */ + static getErrorResults(results) { + const filtered = []; + + results.forEach(result => { + const filteredMessages = result.messages.filter(isErrorMessage); + const filteredSuppressedMessages = result.suppressedMessages.filter(isErrorMessage); + + if (filteredMessages.length > 0) { + filtered.push({ + ...result, + messages: filteredMessages, + suppressedMessages: filteredSuppressedMessages, + errorCount: filteredMessages.length, + warningCount: 0, + fixableErrorCount: result.fixableErrorCount, + fixableWarningCount: 0 + }); + } + }); + + return filtered; + } + + /** + * Returns meta objects for each rule represented in the lint results. + * @param {LintResult[]} results The results to fetch rules meta for. + * @returns {Object} A mapping of ruleIds to rule meta objects. + * @throws {TypeError} When the results object wasn't created from this ESLint instance. + * @throws {TypeError} When a plugin or rule is missing. + */ + getRulesMetaForResults(results) { + + // short-circuit simple case + if (results.length === 0) { + return {}; + } + + const resultRules = new Map(); + const { + configs, + options: { cwd } + } = privateMembers.get(this); + + /* + * We can only accurately return rules meta information for linting results if the + * results were created by this instance. Otherwise, the necessary rules data is + * not available. So if the config array doesn't already exist, just throw an error + * to let the user know we can't do anything here. + */ + if (!configs) { + throw createExtraneousResultsError(); + } + + for (const result of results) { + + /* + * Normalize filename for . + */ + const filePath = result.filePath === "" + ? getPlaceholderPath(cwd) : result.filePath; + const allMessages = result.messages.concat(result.suppressedMessages); + + for (const { ruleId } of allMessages) { + if (!ruleId) { + continue; + } + + /* + * All of the plugin and rule information is contained within the + * calculated config for the given file. + */ + const config = configs.getConfig(filePath); + + if (!config) { + throw createExtraneousResultsError(); + } + const rule = getRuleFromConfig(ruleId, config); + + // ignore unknown rules + if (rule) { + resultRules.set(ruleId, rule); + } + } + } + + return createRulesMeta(resultRules); + } + + /** + * Executes the current configuration on an array of file and directory names. + * @param {string|string[]} patterns An array of file and directory names. + * @returns {Promise} The results of linting the file patterns given. + */ + async lintFiles(patterns) { + if (!isNonEmptyString(patterns) && !isArrayOfNonEmptyString(patterns)) { + throw new Error("'patterns' must be a non-empty string or an array of non-empty strings"); + } + + const { + cacheFilePath, + lintResultCache, + linter, + options: eslintOptions + } = privateMembers.get(this); + const configs = await calculateConfigArray(this, eslintOptions); + const { + allowInlineConfig, + cache, + cwd, + fix, + fixTypes, + globInputPaths, + errorOnUnmatchedPattern, + warnIgnored + } = eslintOptions; + const startTime = Date.now(); + const fixTypesSet = fixTypes ? new Set(fixTypes) : null; + + // Delete cache file; should this be done here? + if (!cache && cacheFilePath) { + debug(`Deleting cache file at ${cacheFilePath}`); + + try { + await fs.unlink(cacheFilePath); + } catch (error) { + const errorCode = error && error.code; + + // Ignore errors when no such file exists or file system is read only (and cache file does not exist) + if (errorCode !== "ENOENT" && !(errorCode === "EROFS" && !existsSync(cacheFilePath))) { + throw error; + } + } + } + + const filePaths = await findFiles({ + patterns: typeof patterns === "string" ? [patterns] : patterns, + cwd, + globInputPaths, + configs, + errorOnUnmatchedPattern + }); + + debug(`${filePaths.length} files found in: ${Date.now() - startTime}ms`); + + /* + * Because we need to process multiple files, including reading from disk, + * it is most efficient to start by reading each file via promises so that + * they can be done in parallel. Then, we can lint the returned text. This + * ensures we are waiting the minimum amount of time in between lints. + */ + const results = await Promise.all( + + filePaths.map(({ filePath, ignored }) => { + + /* + * If a filename was entered that matches an ignore + * pattern, then notify the user. + */ + if (ignored) { + if (warnIgnored) { + return createIgnoreResult(filePath, cwd); + } + + return void 0; + } + + const config = configs.getConfig(filePath); + + /* + * Sometimes a file found through a glob pattern will + * be ignored. In this case, `config` will be undefined + * and we just silently ignore the file. + */ + if (!config) { + return void 0; + } + + // Skip if there is cached result. + if (lintResultCache) { + const cachedResult = + lintResultCache.getCachedLintResults(filePath, config); + + if (cachedResult) { + const hadMessages = + cachedResult.messages && + cachedResult.messages.length > 0; + + if (hadMessages && fix) { + debug(`Reprocessing cached file to allow autofix: ${filePath}`); + } else { + debug(`Skipping file since it hasn't changed: ${filePath}`); + return cachedResult; + } + } + } + + + // set up fixer for fixTypes if necessary + let fixer = fix; + + if (fix && fixTypesSet) { + + // save original value of options.fix in case it's a function + const originalFix = (typeof fix === "function") + ? fix : () => true; + + fixer = message => shouldMessageBeFixed(message, config, fixTypesSet) && originalFix(message); + } + + return fs.readFile(filePath, "utf8") + .then(text => { + + // do the linting + const result = verifyText({ + text, + filePath, + configs, + cwd, + fix: fixer, + allowInlineConfig, + linter + }); + + /* + * Store the lint result in the LintResultCache. + * NOTE: The LintResultCache will remove the file source and any + * other properties that are difficult to serialize, and will + * hydrate those properties back in on future lint runs. + */ + if (lintResultCache) { + lintResultCache.setCachedLintResults(filePath, config, result); + } + + return result; + }); + + }) + ); + + // Persist the cache to disk. + if (lintResultCache) { + lintResultCache.reconcile(); + } + + const finalResults = results.filter(result => !!result); + + return processLintReport(this, { + results: finalResults + }); + } + + /** + * Executes the current configuration on text. + * @param {string} code A string of JavaScript code to lint. + * @param {Object} [options] The options. + * @param {string} [options.filePath] The path to the file of the source code. + * @param {boolean} [options.warnIgnored] When set to true, warn if given filePath is an ignored path. + * @returns {Promise} The results of linting the string of code given. + */ + async lintText(code, options = {}) { + + // Parameter validation + + if (typeof code !== "string") { + throw new Error("'code' must be a string"); + } + + if (typeof options !== "object") { + throw new Error("'options' must be an object, null, or undefined"); + } + + // Options validation + + const { + filePath, + warnIgnored, + ...unknownOptions + } = options || {}; + + const unknownOptionKeys = Object.keys(unknownOptions); + + if (unknownOptionKeys.length > 0) { + throw new Error(`'options' must not include the unknown option(s): ${unknownOptionKeys.join(", ")}`); + } + + if (filePath !== void 0 && !isNonEmptyString(filePath)) { + throw new Error("'options.filePath' must be a non-empty string or undefined"); + } + + if (typeof warnIgnored !== "boolean" && typeof warnIgnored !== "undefined") { + throw new Error("'options.warnIgnored' must be a boolean or undefined"); + } + + // Now we can get down to linting + + const { + linter, + options: eslintOptions + } = privateMembers.get(this); + const configs = await calculateConfigArray(this, eslintOptions); + const { + allowInlineConfig, + cwd, + fix, + warnIgnored: constructorWarnIgnored + } = eslintOptions; + const results = []; + const startTime = Date.now(); + const resolvedFilename = path.resolve(cwd, filePath || "__placeholder__.js"); + + // Clear the last used config arrays. + if (resolvedFilename && await this.isPathIgnored(resolvedFilename)) { + const shouldWarnIgnored = typeof warnIgnored === "boolean" ? warnIgnored : constructorWarnIgnored; + + if (shouldWarnIgnored) { + results.push(createIgnoreResult(resolvedFilename, cwd)); + } + } else { + + // Do lint. + results.push(verifyText({ + text: code, + filePath: resolvedFilename.endsWith("__placeholder__.js") ? "" : resolvedFilename, + configs, + cwd, + fix, + allowInlineConfig, + linter + })); + } + + debug(`Linting complete in: ${Date.now() - startTime}ms`); + + return processLintReport(this, { + results + }); + + } + + /** + * Returns the formatter representing the given formatter name. + * @param {string} [name] The name of the formatter to load. + * The following values are allowed: + * - `undefined` ... Load `stylish` builtin formatter. + * - A builtin formatter name ... Load the builtin formatter. + * - A third-party formatter name: + * - `foo` → `eslint-formatter-foo` + * - `@foo` → `@foo/eslint-formatter` + * - `@foo/bar` → `@foo/eslint-formatter-bar` + * - A file path ... Load the file. + * @returns {Promise} A promise resolving to the formatter object. + * This promise will be rejected if the given formatter was not found or not + * a function. + */ + async loadFormatter(name = "stylish") { + if (typeof name !== "string") { + throw new Error("'name' must be a string"); + } + + // replace \ with / for Windows compatibility + const normalizedFormatName = name.replace(/\\/gu, "/"); + const namespace = naming.getNamespaceFromTerm(normalizedFormatName); + + // grab our options + const { cwd } = privateMembers.get(this).options; + + + let formatterPath; + + // if there's a slash, then it's a file (TODO: this check seems dubious for scoped npm packages) + if (!namespace && normalizedFormatName.includes("/")) { + formatterPath = path.resolve(cwd, normalizedFormatName); + } else { + try { + const npmFormat = naming.normalizePackageName(normalizedFormatName, "eslint-formatter"); + + // TODO: This is pretty dirty...would be nice to clean up at some point. + formatterPath = ModuleResolver.resolve(npmFormat, getPlaceholderPath(cwd)); + } catch { + formatterPath = path.resolve(__dirname, "../", "cli-engine", "formatters", `${normalizedFormatName}.js`); + } + } + + let formatter; + + try { + formatter = (await import(pathToFileURL(formatterPath))).default; + } catch (ex) { + + // check for formatters that have been removed + if (removedFormatters.has(name)) { + ex.message = `The ${name} formatter is no longer part of core ESLint. Install it manually with \`npm install -D eslint-formatter-${name}\``; + } else { + ex.message = `There was a problem loading formatter: ${formatterPath}\nError: ${ex.message}`; + } + + throw ex; + } + + + if (typeof formatter !== "function") { + throw new TypeError(`Formatter must be a function, but got a ${typeof formatter}.`); + } + + const eslint = this; + + return { + + /** + * The main formatter method. + * @param {LintResults[]} results The lint results to format. + * @param {ResultsMeta} resultsMeta Warning count and max threshold. + * @returns {string} The formatted lint results. + */ + format(results, resultsMeta) { + let rulesMeta = null; + + results.sort(compareResultsByFilePath); + + return formatter(results, { + ...resultsMeta, + cwd, + get rulesMeta() { + if (!rulesMeta) { + rulesMeta = eslint.getRulesMetaForResults(results); + } + + return rulesMeta; + } + }); + } + }; + } + + /** + * Returns a configuration object for the given file based on the CLI options. + * This is the same logic used by the ESLint CLI executable to determine + * configuration for each file it processes. + * @param {string} filePath The path of the file to retrieve a config object for. + * @returns {Promise} A configuration object for the file + * or `undefined` if there is no configuration data for the object. + */ + async calculateConfigForFile(filePath) { + if (!isNonEmptyString(filePath)) { + throw new Error("'filePath' must be a non-empty string"); + } + const options = privateMembers.get(this).options; + const absolutePath = path.resolve(options.cwd, filePath); + const configs = await calculateConfigArray(this, options); + + return configs.getConfig(absolutePath); + } + + /** + * Finds the config file being used by this instance based on the options + * passed to the constructor. + * @returns {string|undefined} The path to the config file being used or + * `undefined` if no config file is being used. + */ + async findConfigFile() { + const options = privateMembers.get(this).options; + const { configFilePath } = await locateConfigFileToUse(options); + + return configFilePath; + } + + /** + * Checks if a given path is ignored by ESLint. + * @param {string} filePath The path of the file to check. + * @returns {Promise} Whether or not the given path is ignored. + */ + async isPathIgnored(filePath) { + const config = await this.calculateConfigForFile(filePath); + + return config === void 0; + } +} + +/** + * The type of configuration used by this class. + * @type {string} + * @static + */ +FlatESLint.configType = "flat"; + +/** + * Returns whether flat config should be used. + * @param {Object} [options] The options for this function. + * @param {string} [options.cwd] The current working directory. + * @returns {Promise} Whether flat config should be used. + */ +async function shouldUseFlatConfig({ cwd = process.cwd() } = {}) { + switch (process.env.ESLINT_USE_FLAT_CONFIG) { + case "true": + return true; + case "false": + return false; + default: + + /* + * If neither explicitly enabled nor disabled, then use the presence + * of a flat config file to determine enablement. + */ + return !!(await findFlatConfigFile(cwd)); + } +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +module.exports = { + FlatESLint, + shouldUseFlatConfig +}; diff --git a/node_modules/eslint/lib/eslint/index.js b/node_modules/eslint/lib/eslint/index.js index c9185ee0e..017b768ec 100644 --- a/node_modules/eslint/lib/eslint/index.js +++ b/node_modules/eslint/lib/eslint/index.js @@ -1,7 +1,9 @@ "use strict"; const { ESLint } = require("./eslint"); +const { FlatESLint } = require("./flat-eslint"); module.exports = { - ESLint + ESLint, + FlatESLint }; diff --git a/node_modules/eslint/lib/init/autoconfig.js b/node_modules/eslint/lib/init/autoconfig.js deleted file mode 100644 index 19d016a54..000000000 --- a/node_modules/eslint/lib/init/autoconfig.js +++ /dev/null @@ -1,348 +0,0 @@ -/** - * @fileoverview Used for creating a suggested configuration based on project code. - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const lodash = require("lodash"), - recConfig = require("../../conf/eslint-recommended"), - ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"), - { Linter } = require("../linter"), - configRule = require("./config-rule"); - -const debug = require("debug")("eslint:autoconfig"); -const linter = new Linter(); - -//------------------------------------------------------------------------------ -// Data -//------------------------------------------------------------------------------ - -const MAX_CONFIG_COMBINATIONS = 17, // 16 combinations + 1 for severity only - RECOMMENDED_CONFIG_NAME = "eslint:recommended"; - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Information about a rule configuration, in the context of a Registry. - * @typedef {Object} registryItem - * @param {ruleConfig} config A valid configuration for the rule - * @param {number} specificity The number of elements in the ruleConfig array - * @param {number} errorCount The number of errors encountered when linting with the config - */ - -/** - * This callback is used to measure execution status in a progress bar - * @callback progressCallback - * @param {number} The total number of times the callback will be called. - */ - -/** - * Create registryItems for rules - * @param {rulesConfig} rulesConfig Hash of rule names and arrays of ruleConfig items - * @returns {Object} registryItems for each rule in provided rulesConfig - */ -function makeRegistryItems(rulesConfig) { - return Object.keys(rulesConfig).reduce((accumulator, ruleId) => { - accumulator[ruleId] = rulesConfig[ruleId].map(config => ({ - config, - specificity: config.length || 1, - errorCount: void 0 - })); - return accumulator; - }, {}); -} - -/** - * Creates an object in which to store rule configs and error counts - * - * Unless a rulesConfig is provided at construction, the registry will not contain - * any rules, only methods. This will be useful for building up registries manually. - * - * Registry class - */ -class Registry { - - // eslint-disable-next-line jsdoc/require-description - /** - * @param {rulesConfig} [rulesConfig] Hash of rule names and arrays of possible configurations - */ - constructor(rulesConfig) { - this.rules = (rulesConfig) ? makeRegistryItems(rulesConfig) : {}; - } - - /** - * Populate the registry with core rule configs. - * - * It will set the registry's `rule` property to an object having rule names - * as keys and an array of registryItems as values. - * @returns {void} - */ - populateFromCoreRules() { - const rulesConfig = configRule.createCoreRuleConfigs(/* noDeprecated = */ true); - - this.rules = makeRegistryItems(rulesConfig); - } - - /** - * Creates sets of rule configurations which can be used for linting - * and initializes registry errors to zero for those configurations (side effect). - * - * This combines as many rules together as possible, such that the first sets - * in the array will have the highest number of rules configured, and later sets - * will have fewer and fewer, as not all rules have the same number of possible - * configurations. - * - * The length of the returned array will be <= MAX_CONFIG_COMBINATIONS. - * @returns {Object[]} "rules" configurations to use for linting - */ - buildRuleSets() { - let idx = 0; - const ruleIds = Object.keys(this.rules), - ruleSets = []; - - /** - * Add a rule configuration from the registry to the ruleSets - * - * This is broken out into its own function so that it doesn't need to be - * created inside of the while loop. - * @param {string} rule The ruleId to add. - * @returns {void} - */ - const addRuleToRuleSet = function(rule) { - - /* - * This check ensures that there is a rule configuration and that - * it has fewer than the max combinations allowed. - * If it has too many configs, we will only use the most basic of - * the possible configurations. - */ - const hasFewCombos = (this.rules[rule].length <= MAX_CONFIG_COMBINATIONS); - - if (this.rules[rule][idx] && (hasFewCombos || this.rules[rule][idx].specificity <= 2)) { - - /* - * If the rule has too many possible combinations, only take - * simple ones, avoiding objects. - */ - if (!hasFewCombos && typeof this.rules[rule][idx].config[1] === "object") { - return; - } - - ruleSets[idx] = ruleSets[idx] || {}; - ruleSets[idx][rule] = this.rules[rule][idx].config; - - /* - * Initialize errorCount to zero, since this is a config which - * will be linted. - */ - this.rules[rule][idx].errorCount = 0; - } - }.bind(this); - - while (ruleSets.length === idx) { - ruleIds.forEach(addRuleToRuleSet); - idx += 1; - } - - return ruleSets; - } - - /** - * Remove all items from the registry with a non-zero number of errors - * - * Note: this also removes rule configurations which were not linted - * (meaning, they have an undefined errorCount). - * @returns {void} - */ - stripFailingConfigs() { - const ruleIds = Object.keys(this.rules), - newRegistry = new Registry(); - - newRegistry.rules = Object.assign({}, this.rules); - ruleIds.forEach(ruleId => { - const errorFreeItems = newRegistry.rules[ruleId].filter(registryItem => (registryItem.errorCount === 0)); - - if (errorFreeItems.length > 0) { - newRegistry.rules[ruleId] = errorFreeItems; - } else { - delete newRegistry.rules[ruleId]; - } - }); - - return newRegistry; - } - - /** - * Removes rule configurations which were not included in a ruleSet - * @returns {void} - */ - stripExtraConfigs() { - const ruleIds = Object.keys(this.rules), - newRegistry = new Registry(); - - newRegistry.rules = Object.assign({}, this.rules); - ruleIds.forEach(ruleId => { - newRegistry.rules[ruleId] = newRegistry.rules[ruleId].filter(registryItem => (typeof registryItem.errorCount !== "undefined")); - }); - - return newRegistry; - } - - /** - * Creates a registry of rules which had no error-free configs. - * The new registry is intended to be analyzed to determine whether its rules - * should be disabled or set to warning. - * @returns {Registry} A registry of failing rules. - */ - getFailingRulesRegistry() { - const ruleIds = Object.keys(this.rules), - failingRegistry = new Registry(); - - ruleIds.forEach(ruleId => { - const failingConfigs = this.rules[ruleId].filter(registryItem => (registryItem.errorCount > 0)); - - if (failingConfigs && failingConfigs.length === this.rules[ruleId].length) { - failingRegistry.rules[ruleId] = failingConfigs; - } - }); - - return failingRegistry; - } - - /** - * Create an eslint config for any rules which only have one configuration - * in the registry. - * @returns {Object} An eslint config with rules section populated - */ - createConfig() { - const ruleIds = Object.keys(this.rules), - config = { rules: {} }; - - ruleIds.forEach(ruleId => { - if (this.rules[ruleId].length === 1) { - config.rules[ruleId] = this.rules[ruleId][0].config; - } - }); - - return config; - } - - /** - * Return a cloned registry containing only configs with a desired specificity - * @param {number} specificity Only keep configs with this specificity - * @returns {Registry} A registry of rules - */ - filterBySpecificity(specificity) { - const ruleIds = Object.keys(this.rules), - newRegistry = new Registry(); - - newRegistry.rules = Object.assign({}, this.rules); - ruleIds.forEach(ruleId => { - newRegistry.rules[ruleId] = this.rules[ruleId].filter(registryItem => (registryItem.specificity === specificity)); - }); - - return newRegistry; - } - - /** - * Lint SourceCodes against all configurations in the registry, and record results - * @param {Object[]} sourceCodes SourceCode objects for each filename - * @param {Object} config ESLint config object - * @param {progressCallback} [cb] Optional callback for reporting execution status - * @returns {Registry} New registry with errorCount populated - */ - lintSourceCode(sourceCodes, config, cb) { - let lintedRegistry = new Registry(); - - lintedRegistry.rules = Object.assign({}, this.rules); - - const ruleSets = lintedRegistry.buildRuleSets(); - - lintedRegistry = lintedRegistry.stripExtraConfigs(); - - debug("Linting with all possible rule combinations"); - - const filenames = Object.keys(sourceCodes); - const totalFilesLinting = filenames.length * ruleSets.length; - - filenames.forEach(filename => { - debug(`Linting file: ${filename}`); - - let ruleSetIdx = 0; - - ruleSets.forEach(ruleSet => { - const lintConfig = Object.assign({}, config, { rules: ruleSet }); - const lintResults = linter.verify(sourceCodes[filename], lintConfig); - - lintResults.forEach(result => { - - /* - * It is possible that the error is from a configuration comment - * in a linted file, in which case there may not be a config - * set in this ruleSetIdx. - * (https://github.com/eslint/eslint/issues/5992) - * (https://github.com/eslint/eslint/issues/7860) - */ - if ( - lintedRegistry.rules[result.ruleId] && - lintedRegistry.rules[result.ruleId][ruleSetIdx] - ) { - lintedRegistry.rules[result.ruleId][ruleSetIdx].errorCount += 1; - } - }); - - ruleSetIdx += 1; - - if (cb) { - cb(totalFilesLinting); // eslint-disable-line node/callback-return - } - }); - - // Deallocate for GC - sourceCodes[filename] = null; - }); - - return lintedRegistry; - } -} - -/** - * Extract rule configuration into eslint:recommended where possible. - * - * This will return a new config with `["extends": [ ..., "eslint:recommended"]` and - * only the rules which have configurations different from the recommended config. - * @param {Object} config config object - * @returns {Object} config object using `"extends": ["eslint:recommended"]` - */ -function extendFromRecommended(config) { - const newConfig = Object.assign({}, config); - - ConfigOps.normalizeToStrings(newConfig); - - const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId])); - - recRules.forEach(ruleId => { - if (lodash.isEqual(recConfig.rules[ruleId], newConfig.rules[ruleId])) { - delete newConfig.rules[ruleId]; - } - }); - newConfig.extends.unshift(RECOMMENDED_CONFIG_NAME); - return newConfig; -} - - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - Registry, - extendFromRecommended -}; diff --git a/node_modules/eslint/lib/init/config-file.js b/node_modules/eslint/lib/init/config-file.js deleted file mode 100644 index fc62b8152..000000000 --- a/node_modules/eslint/lib/init/config-file.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * @fileoverview Helper to locate and load configuration files. - * @author Nicholas C. Zakas - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const fs = require("fs"), - path = require("path"), - stringify = require("json-stable-stringify-without-jsonify"); - -const debug = require("debug")("eslint:config-file"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Determines sort order for object keys for json-stable-stringify - * - * see: https://github.com/samn/json-stable-stringify#cmp - * @param {Object} a The first comparison object ({key: akey, value: avalue}) - * @param {Object} b The second comparison object ({key: bkey, value: bvalue}) - * @returns {number} 1 or -1, used in stringify cmp method - */ -function sortByKey(a, b) { - return a.key > b.key ? 1 : -1; -} - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Writes a configuration file in JSON format. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @returns {void} - * @private - */ -function writeJSONConfigFile(config, filePath) { - debug(`Writing JSON config file: ${filePath}`); - - const content = `${stringify(config, { cmp: sortByKey, space: 4 })}\n`; - - fs.writeFileSync(filePath, content, "utf8"); -} - -/** - * Writes a configuration file in YAML format. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @returns {void} - * @private - */ -function writeYAMLConfigFile(config, filePath) { - debug(`Writing YAML config file: ${filePath}`); - - // lazy load YAML to improve performance when not used - const yaml = require("js-yaml"); - - const content = yaml.safeDump(config, { sortKeys: true }); - - fs.writeFileSync(filePath, content, "utf8"); -} - -/** - * Writes a configuration file in JavaScript format. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @throws {Error} If an error occurs linting the config file contents. - * @returns {void} - * @private - */ -function writeJSConfigFile(config, filePath) { - debug(`Writing JS config file: ${filePath}`); - - let contentToWrite; - const stringifiedContent = `module.exports = ${stringify(config, { cmp: sortByKey, space: 4 })};\n`; - - try { - const { CLIEngine } = require("../cli-engine"); - const linter = new CLIEngine({ - baseConfig: config, - fix: true, - useEslintrc: false - }); - const report = linter.executeOnText(stringifiedContent); - - contentToWrite = report.results[0].output || stringifiedContent; - } catch (e) { - debug("Error linting JavaScript config file, writing unlinted version"); - const errorMessage = e.message; - - contentToWrite = stringifiedContent; - e.message = "An error occurred while generating your JavaScript config file. "; - e.message += "A config file was still generated, but the config file itself may not follow your linting rules."; - e.message += `\nError: ${errorMessage}`; - throw e; - } finally { - fs.writeFileSync(filePath, contentToWrite, "utf8"); - } -} - -/** - * Writes a configuration file. - * @param {Object} config The configuration object to write. - * @param {string} filePath The filename to write to. - * @returns {void} - * @throws {Error} When an unknown file type is specified. - * @private - */ -function write(config, filePath) { - switch (path.extname(filePath)) { - case ".js": - writeJSConfigFile(config, filePath); - break; - - case ".json": - writeJSONConfigFile(config, filePath); - break; - - case ".yaml": - case ".yml": - writeYAMLConfigFile(config, filePath); - break; - - default: - throw new Error("Can't write to unknown file type."); - } -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - write -}; diff --git a/node_modules/eslint/lib/init/config-initializer.js b/node_modules/eslint/lib/init/config-initializer.js deleted file mode 100644 index 6f62e7db8..000000000 --- a/node_modules/eslint/lib/init/config-initializer.js +++ /dev/null @@ -1,691 +0,0 @@ -/** - * @fileoverview Config initialization wizard. - * @author Ilya Volodin - */ - - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const util = require("util"), - path = require("path"), - enquirer = require("enquirer"), - ProgressBar = require("progress"), - semver = require("semver"), - espree = require("espree"), - recConfig = require("../../conf/eslint-recommended"), - ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"), - log = require("../shared/logging"), - naming = require("@eslint/eslintrc/lib/shared/naming"), - ModuleResolver = require("../shared/relative-module-resolver"), - autoconfig = require("./autoconfig.js"), - ConfigFile = require("./config-file"), - npmUtils = require("./npm-utils"), - { getSourceCodeOfFiles } = require("./source-code-utils"); - -const debug = require("debug")("eslint:config-initializer"); - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/* istanbul ignore next: hard to test fs function */ -/** - * Create .eslintrc file in the current working directory - * @param {Object} config object that contains user's answers - * @param {string} format The file format to write to. - * @returns {void} - */ -function writeFile(config, format) { - - // default is .js - let extname = ".js"; - - if (format === "YAML") { - extname = ".yml"; - } else if (format === "JSON") { - extname = ".json"; - } - - const installedESLint = config.installedESLint; - - delete config.installedESLint; - - ConfigFile.write(config, `./.eslintrc${extname}`); - log.info(`Successfully created .eslintrc${extname} file in ${process.cwd()}`); - - if (installedESLint) { - log.info("ESLint was installed locally. We recommend using this local copy instead of your globally-installed copy."); - } -} - -/** - * Get the peer dependencies of the given module. - * This adds the gotten value to cache at the first time, then reuses it. - * In a process, this function is called twice, but `npmUtils.fetchPeerDependencies` needs to access network which is relatively slow. - * @param {string} moduleName The module name to get. - * @returns {Object} The peer dependencies of the given module. - * This object is the object of `peerDependencies` field of `package.json`. - * Returns null if npm was not found. - */ -function getPeerDependencies(moduleName) { - let result = getPeerDependencies.cache.get(moduleName); - - if (!result) { - log.info(`Checking peerDependencies of ${moduleName}`); - - result = npmUtils.fetchPeerDependencies(moduleName); - getPeerDependencies.cache.set(moduleName, result); - } - - return result; -} -getPeerDependencies.cache = new Map(); - -/** - * Return necessary plugins, configs, parsers, etc. based on the config - * @param {Object} config config object - * @param {boolean} [installESLint=true] If `false` is given, it does not install eslint. - * @returns {string[]} An array of modules to be installed. - */ -function getModulesList(config, installESLint) { - const modules = {}; - - // Create a list of modules which should be installed based on config - if (config.plugins) { - for (const plugin of config.plugins) { - const moduleName = naming.normalizePackageName(plugin, "eslint-plugin"); - - modules[moduleName] = "latest"; - } - } - if (config.extends) { - const extendList = Array.isArray(config.extends) ? config.extends : [config.extends]; - - for (const extend of extendList) { - if (extend.startsWith("eslint:") || extend.startsWith("plugin:")) { - continue; - } - const moduleName = naming.normalizePackageName(extend, "eslint-config"); - - modules[moduleName] = "latest"; - Object.assign( - modules, - getPeerDependencies(`${moduleName}@latest`) - ); - } - } - - const parser = config.parser || (config.parserOptions && config.parserOptions.parser); - - if (parser) { - modules[parser] = "latest"; - } - - if (installESLint === false) { - delete modules.eslint; - } else { - const installStatus = npmUtils.checkDevDeps(["eslint"]); - - // Mark to show messages if it's new installation of eslint. - if (installStatus.eslint === false) { - log.info("Local ESLint installation not found."); - modules.eslint = modules.eslint || "latest"; - config.installedESLint = true; - } - } - - return Object.keys(modules).map(name => `${name}@${modules[name]}`); -} - -/** - * Set the `rules` of a config by examining a user's source code - * - * Note: This clones the config object and returns a new config to avoid mutating - * the original config parameter. - * @param {Object} answers answers received from enquirer - * @param {Object} config config object - * @returns {Object} config object with configured rules - */ -function configureRules(answers, config) { - const BAR_TOTAL = 20, - BAR_SOURCE_CODE_TOTAL = 4, - newConfig = Object.assign({}, config), - disabledConfigs = {}; - let sourceCodes, - registry; - - // Set up a progress bar, as this process can take a long time - const bar = new ProgressBar("Determining Config: :percent [:bar] :elapseds elapsed, eta :etas ", { - width: 30, - total: BAR_TOTAL - }); - - bar.tick(0); // Shows the progress bar - - // Get the SourceCode of all chosen files - const patterns = answers.patterns.split(/[\s]+/u); - - try { - sourceCodes = getSourceCodeOfFiles(patterns, { baseConfig: newConfig, useEslintrc: false }, total => { - bar.tick((BAR_SOURCE_CODE_TOTAL / total)); - }); - } catch (e) { - log.info("\n"); - throw e; - } - const fileQty = Object.keys(sourceCodes).length; - - if (fileQty === 0) { - log.info("\n"); - throw new Error("Automatic Configuration failed. No files were able to be parsed."); - } - - // Create a registry of rule configs - registry = new autoconfig.Registry(); - registry.populateFromCoreRules(); - - // Lint all files with each rule config in the registry - registry = registry.lintSourceCode(sourceCodes, newConfig, total => { - bar.tick((BAR_TOTAL - BAR_SOURCE_CODE_TOTAL) / total); // Subtract out ticks used at beginning - }); - debug(`\nRegistry: ${util.inspect(registry.rules, { depth: null })}`); - - // Create a list of recommended rules, because we don't want to disable them - const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId])); - - // Find and disable rules which had no error-free configuration - const failingRegistry = registry.getFailingRulesRegistry(); - - Object.keys(failingRegistry.rules).forEach(ruleId => { - - // If the rule is recommended, set it to error, otherwise disable it - disabledConfigs[ruleId] = (recRules.indexOf(ruleId) !== -1) ? 2 : 0; - }); - - // Now that we know which rules to disable, strip out configs with errors - registry = registry.stripFailingConfigs(); - - /* - * If there is only one config that results in no errors for a rule, we should use it. - * createConfig will only add rules that have one configuration in the registry. - */ - const singleConfigs = registry.createConfig().rules; - - /* - * The "sweet spot" for number of options in a config seems to be two (severity plus one option). - * Very often, a third option (usually an object) is available to address - * edge cases, exceptions, or unique situations. We will prefer to use a config with - * specificity of two. - */ - const specTwoConfigs = registry.filterBySpecificity(2).createConfig().rules; - - // Maybe a specific combination using all three options works - const specThreeConfigs = registry.filterBySpecificity(3).createConfig().rules; - - // If all else fails, try to use the default (severity only) - const defaultConfigs = registry.filterBySpecificity(1).createConfig().rules; - - // Combine configs in reverse priority order (later take precedence) - newConfig.rules = Object.assign({}, disabledConfigs, defaultConfigs, specThreeConfigs, specTwoConfigs, singleConfigs); - - // Make sure progress bar has finished (floating point rounding) - bar.update(BAR_TOTAL); - - // Log out some stats to let the user know what happened - const finalRuleIds = Object.keys(newConfig.rules); - const totalRules = finalRuleIds.length; - const enabledRules = finalRuleIds.filter(ruleId => (newConfig.rules[ruleId] !== 0)).length; - const resultMessage = [ - `\nEnabled ${enabledRules} out of ${totalRules}`, - `rules based on ${fileQty}`, - `file${(fileQty === 1) ? "." : "s."}` - ].join(" "); - - log.info(resultMessage); - - ConfigOps.normalizeToStrings(newConfig); - return newConfig; -} - -/** - * process user's answers and create config object - * @param {Object} answers answers received from enquirer - * @returns {Object} config object - */ -function processAnswers(answers) { - let config = { - rules: {}, - env: {}, - parserOptions: {}, - extends: [] - }; - - config.parserOptions.ecmaVersion = espree.latestEcmaVersion; - config.env.es2021 = true; - - // set the module type - if (answers.moduleType === "esm") { - config.parserOptions.sourceType = "module"; - } else if (answers.moduleType === "commonjs") { - config.env.commonjs = true; - } - - // add in browser and node environments if necessary - answers.env.forEach(env => { - config.env[env] = true; - }); - - // add in library information - if (answers.framework === "react") { - config.parserOptions.ecmaFeatures = { - jsx: true - }; - config.plugins = ["react"]; - config.extends.push("plugin:react/recommended"); - } else if (answers.framework === "vue") { - config.plugins = ["vue"]; - config.extends.push("plugin:vue/essential"); - } - - if (answers.typescript) { - if (answers.framework === "vue") { - config.parserOptions.parser = "@typescript-eslint/parser"; - } else { - config.parser = "@typescript-eslint/parser"; - } - - if (Array.isArray(config.plugins)) { - config.plugins.push("@typescript-eslint"); - } else { - config.plugins = ["@typescript-eslint"]; - } - } - - // setup rules based on problems/style enforcement preferences - if (answers.purpose === "problems") { - config.extends.unshift("eslint:recommended"); - } else if (answers.purpose === "style") { - if (answers.source === "prompt") { - config.extends.unshift("eslint:recommended"); - config.rules.indent = ["error", answers.indent]; - config.rules.quotes = ["error", answers.quotes]; - config.rules["linebreak-style"] = ["error", answers.linebreak]; - config.rules.semi = ["error", answers.semi ? "always" : "never"]; - } else if (answers.source === "auto") { - config = configureRules(answers, config); - config = autoconfig.extendFromRecommended(config); - } - } - if (answers.typescript && config.extends.includes("eslint:recommended")) { - config.extends.push("plugin:@typescript-eslint/recommended"); - } - - // normalize extends - if (config.extends.length === 0) { - delete config.extends; - } else if (config.extends.length === 1) { - config.extends = config.extends[0]; - } - - ConfigOps.normalizeToStrings(config); - return config; -} - -/** - * Get the version of the local ESLint. - * @returns {string|null} The version. If the local ESLint was not found, returns null. - */ -function getLocalESLintVersion() { - try { - const eslintPath = ModuleResolver.resolve("eslint", path.join(process.cwd(), "__placeholder__.js")); - const eslint = require(eslintPath); - - return eslint.linter.version || null; - } catch { - return null; - } -} - -/** - * Get the shareable config name of the chosen style guide. - * @param {Object} answers The answers object. - * @returns {string} The shareable config name. - */ -function getStyleGuideName(answers) { - if (answers.styleguide === "airbnb" && answers.framework !== "react") { - return "airbnb-base"; - } - return answers.styleguide; -} - -/** - * Check whether the local ESLint version conflicts with the required version of the chosen shareable config. - * @param {Object} answers The answers object. - * @returns {boolean} `true` if the local ESLint is found then it conflicts with the required version of the chosen shareable config. - */ -function hasESLintVersionConflict(answers) { - - // Get the local ESLint version. - const localESLintVersion = getLocalESLintVersion(); - - if (!localESLintVersion) { - return false; - } - - // Get the required range of ESLint version. - const configName = getStyleGuideName(answers); - const moduleName = `eslint-config-${configName}@latest`; - const peerDependencies = getPeerDependencies(moduleName) || {}; - const requiredESLintVersionRange = peerDependencies.eslint; - - if (!requiredESLintVersionRange) { - return false; - } - - answers.localESLintVersion = localESLintVersion; - answers.requiredESLintVersionRange = requiredESLintVersionRange; - - // Check the version. - if (semver.satisfies(localESLintVersion, requiredESLintVersionRange)) { - answers.installESLint = false; - return false; - } - - return true; -} - -/** - * Install modules. - * @param {string[]} modules Modules to be installed. - * @returns {void} - */ -function installModules(modules) { - log.info(`Installing ${modules.join(", ")}`); - npmUtils.installSyncSaveDev(modules); -} - -/* istanbul ignore next: no need to test enquirer */ -/** - * Ask user to install modules. - * @param {string[]} modules Array of modules to be installed. - * @param {boolean} packageJsonExists Indicates if package.json is existed. - * @returns {Promise} Answer that indicates if user wants to install. - */ -function askInstallModules(modules, packageJsonExists) { - - // If no modules, do nothing. - if (modules.length === 0) { - return Promise.resolve(); - } - - log.info("The config that you've selected requires the following dependencies:\n"); - log.info(modules.join(" ")); - return enquirer.prompt([ - { - type: "toggle", - name: "executeInstallation", - message: "Would you like to install them now with npm?", - enabled: "Yes", - disabled: "No", - initial: 1, - skip() { - return !(modules.length && packageJsonExists); - }, - result(input) { - return this.skipped ? null : input; - } - } - ]).then(({ executeInstallation }) => { - if (executeInstallation) { - installModules(modules); - } - }); -} - -/* istanbul ignore next: no need to test enquirer */ -/** - * Ask use a few questions on command prompt - * @returns {Promise} The promise with the result of the prompt - */ -function promptUser() { - - return enquirer.prompt([ - { - type: "select", - name: "purpose", - message: "How would you like to use ESLint?", - - // The returned number matches the name value of nth in the choices array. - initial: 1, - choices: [ - { message: "To check syntax only", name: "syntax" }, - { message: "To check syntax and find problems", name: "problems" }, - { message: "To check syntax, find problems, and enforce code style", name: "style" } - ] - }, - { - type: "select", - name: "moduleType", - message: "What type of modules does your project use?", - initial: 0, - choices: [ - { message: "JavaScript modules (import/export)", name: "esm" }, - { message: "CommonJS (require/exports)", name: "commonjs" }, - { message: "None of these", name: "none" } - ] - }, - { - type: "select", - name: "framework", - message: "Which framework does your project use?", - initial: 0, - choices: [ - { message: "React", name: "react" }, - { message: "Vue.js", name: "vue" }, - { message: "None of these", name: "none" } - ] - }, - { - type: "toggle", - name: "typescript", - message: "Does your project use TypeScript?", - enabled: "Yes", - disabled: "No", - initial: 0 - }, - { - type: "multiselect", - name: "env", - message: "Where does your code run?", - hint: "(Press to select, to toggle all, to invert selection)", - initial: 0, - choices: [ - { message: "Browser", name: "browser" }, - { message: "Node", name: "node" } - ] - }, - { - type: "select", - name: "source", - message: "How would you like to define a style for your project?", - choices: [ - { message: "Use a popular style guide", name: "guide" }, - { message: "Answer questions about your style", name: "prompt" }, - { message: "Inspect your JavaScript file(s)", name: "auto" } - ], - skip() { - return this.state.answers.purpose !== "style"; - }, - result(input) { - return this.skipped ? null : input; - } - }, - { - type: "select", - name: "styleguide", - message: "Which style guide do you want to follow?", - choices: [ - { message: "Airbnb: https://github.com/airbnb/javascript", name: "airbnb" }, - { message: "Standard: https://github.com/standard/standard", name: "standard" }, - { message: "Google: https://github.com/google/eslint-config-google", name: "google" } - ], - skip() { - this.state.answers.packageJsonExists = npmUtils.checkPackageJson(); - return !(this.state.answers.source === "guide" && this.state.answers.packageJsonExists); - }, - result(input) { - return this.skipped ? null : input; - } - }, - { - type: "input", - name: "patterns", - message: "Which file(s), path(s), or glob(s) should be examined?", - skip() { - return this.state.answers.source !== "auto"; - }, - validate(input) { - if (!this.skipped && input.trim().length === 0 && input.trim() !== ",") { - return "You must tell us what code to examine. Try again."; - } - return true; - } - }, - { - type: "select", - name: "format", - message: "What format do you want your config file to be in?", - initial: 0, - choices: ["JavaScript", "YAML", "JSON"] - }, - { - type: "toggle", - name: "installESLint", - message() { - const { answers } = this.state; - const verb = semver.ltr(answers.localESLintVersion, answers.requiredESLintVersionRange) - ? "upgrade" - : "downgrade"; - - return `The style guide "${answers.styleguide}" requires eslint@${answers.requiredESLintVersionRange}. You are currently using eslint@${answers.localESLintVersion}.\n Do you want to ${verb}?`; - }, - enabled: "Yes", - disabled: "No", - initial: 1, - skip() { - return !(this.state.answers.source === "guide" && this.state.answers.packageJsonExists && hasESLintVersionConflict(this.state.answers)); - }, - result(input) { - return this.skipped ? null : input; - } - } - ]).then(earlyAnswers => { - - // early exit if no style guide is necessary - if (earlyAnswers.purpose !== "style") { - const config = processAnswers(earlyAnswers); - const modules = getModulesList(config); - - return askInstallModules(modules, earlyAnswers.packageJsonExists) - .then(() => writeFile(config, earlyAnswers.format)); - } - - // early exit if you are using a style guide - if (earlyAnswers.source === "guide") { - if (!earlyAnswers.packageJsonExists) { - log.info("A package.json is necessary to install plugins such as style guides. Run `npm init` to create a package.json file and try again."); - return void 0; - } - if (earlyAnswers.installESLint === false && !semver.satisfies(earlyAnswers.localESLintVersion, earlyAnswers.requiredESLintVersionRange)) { - log.info(`Note: it might not work since ESLint's version is mismatched with the ${earlyAnswers.styleguide} config.`); - } - if (earlyAnswers.styleguide === "airbnb" && earlyAnswers.framework !== "react") { - earlyAnswers.styleguide = "airbnb-base"; - } - - const config = processAnswers(earlyAnswers); - - if (Array.isArray(config.extends)) { - config.extends.push(earlyAnswers.styleguide); - } else if (config.extends) { - config.extends = [config.extends, earlyAnswers.styleguide]; - } else { - config.extends = [earlyAnswers.styleguide]; - } - - const modules = getModulesList(config); - - return askInstallModules(modules, earlyAnswers.packageJsonExists) - .then(() => writeFile(config, earlyAnswers.format)); - - } - - if (earlyAnswers.source === "auto") { - const combinedAnswers = Object.assign({}, earlyAnswers); - const config = processAnswers(combinedAnswers); - const modules = getModulesList(config); - - return askInstallModules(modules).then(() => writeFile(config, earlyAnswers.format)); - } - - // continue with the style questions otherwise... - return enquirer.prompt([ - { - type: "select", - name: "indent", - message: "What style of indentation do you use?", - initial: 0, - choices: [{ message: "Tabs", name: "tab" }, { message: "Spaces", name: 4 }] - }, - { - type: "select", - name: "quotes", - message: "What quotes do you use for strings?", - initial: 0, - choices: [{ message: "Double", name: "double" }, { message: "Single", name: "single" }] - }, - { - type: "select", - name: "linebreak", - message: "What line endings do you use?", - initial: 0, - choices: [{ message: "Unix", name: "unix" }, { message: "Windows", name: "windows" }] - }, - { - type: "toggle", - name: "semi", - message: "Do you require semicolons?", - enabled: "Yes", - disabled: "No", - initial: 1 - } - ]).then(answers => { - const totalAnswers = Object.assign({}, earlyAnswers, answers); - - const config = processAnswers(totalAnswers); - const modules = getModulesList(config); - - return askInstallModules(modules).then(() => writeFile(config, earlyAnswers.format)); - }); - }); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -const init = { - getModulesList, - hasESLintVersionConflict, - installModules, - processAnswers, - /* istanbul ignore next */initializeConfig() { - return promptUser(); - } -}; - -module.exports = init; diff --git a/node_modules/eslint/lib/init/config-rule.js b/node_modules/eslint/lib/init/config-rule.js deleted file mode 100644 index 7aec89c3d..000000000 --- a/node_modules/eslint/lib/init/config-rule.js +++ /dev/null @@ -1,317 +0,0 @@ -/** - * @fileoverview Create configurations for a rule - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const builtInRules = require("../rules"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Wrap all of the elements of an array into arrays. - * @param {*[]} xs Any array. - * @returns {Array[]} An array of arrays. - */ -function explodeArray(xs) { - return xs.reduce((accumulator, x) => { - accumulator.push([x]); - return accumulator; - }, []); -} - -/** - * Mix two arrays such that each element of the second array is concatenated - * onto each element of the first array. - * - * For example: - * combineArrays([a, [b, c]], [x, y]); // -> [[a, x], [a, y], [b, c, x], [b, c, y]] - * @param {Array} arr1 The first array to combine. - * @param {Array} arr2 The second array to combine. - * @returns {Array} A mixture of the elements of the first and second arrays. - */ -function combineArrays(arr1, arr2) { - const res = []; - - if (arr1.length === 0) { - return explodeArray(arr2); - } - if (arr2.length === 0) { - return explodeArray(arr1); - } - arr1.forEach(x1 => { - arr2.forEach(x2 => { - res.push([].concat(x1, x2)); - }); - }); - return res; -} - -/** - * Group together valid rule configurations based on object properties - * - * e.g.: - * groupByProperty([ - * {before: true}, - * {before: false}, - * {after: true}, - * {after: false} - * ]); - * - * will return: - * [ - * [{before: true}, {before: false}], - * [{after: true}, {after: false}] - * ] - * @param {Object[]} objects Array of objects, each with one property/value pair - * @returns {Array[]} Array of arrays of objects grouped by property - */ -function groupByProperty(objects) { - const groupedObj = objects.reduce((accumulator, obj) => { - const prop = Object.keys(obj)[0]; - - accumulator[prop] = accumulator[prop] ? accumulator[prop].concat(obj) : [obj]; - return accumulator; - }, {}); - - return Object.keys(groupedObj).map(prop => groupedObj[prop]); -} - - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Configuration settings for a rule. - * - * A configuration can be a single number (severity), or an array where the first - * element in the array is the severity, and is the only required element. - * Configs may also have one or more additional elements to specify rule - * configuration or options. - * @typedef {Array|number} ruleConfig - * @param {number} 0 The rule's severity (0, 1, 2). - */ - -/** - * Object whose keys are rule names and values are arrays of valid ruleConfig items - * which should be linted against the target source code to determine error counts. - * (a ruleConfigSet.ruleConfigs). - * - * e.g. rulesConfig = { - * "comma-dangle": [2, [2, "always"], [2, "always-multiline"], [2, "never"]], - * "no-console": [2] - * } - * @typedef rulesConfig - */ - - -/** - * Create valid rule configurations by combining two arrays, - * with each array containing multiple objects each with a - * single property/value pair and matching properties. - * - * e.g.: - * combinePropertyObjects( - * [{before: true}, {before: false}], - * [{after: true}, {after: false}] - * ); - * - * will return: - * [ - * {before: true, after: true}, - * {before: true, after: false}, - * {before: false, after: true}, - * {before: false, after: false} - * ] - * @param {Object[]} objArr1 Single key/value objects, all with the same key - * @param {Object[]} objArr2 Single key/value objects, all with another key - * @returns {Object[]} Combined objects for each combination of input properties and values - */ -function combinePropertyObjects(objArr1, objArr2) { - const res = []; - - if (objArr1.length === 0) { - return objArr2; - } - if (objArr2.length === 0) { - return objArr1; - } - objArr1.forEach(obj1 => { - objArr2.forEach(obj2 => { - const combinedObj = {}; - const obj1Props = Object.keys(obj1); - const obj2Props = Object.keys(obj2); - - obj1Props.forEach(prop1 => { - combinedObj[prop1] = obj1[prop1]; - }); - obj2Props.forEach(prop2 => { - combinedObj[prop2] = obj2[prop2]; - }); - res.push(combinedObj); - }); - }); - return res; -} - -/** - * Creates a new instance of a rule configuration set - * - * A rule configuration set is an array of configurations that are valid for a - * given rule. For example, the configuration set for the "semi" rule could be: - * - * ruleConfigSet.ruleConfigs // -> [[2], [2, "always"], [2, "never"]] - * - * Rule configuration set class - */ -class RuleConfigSet { - - // eslint-disable-next-line jsdoc/require-description - /** - * @param {ruleConfig[]} configs Valid rule configurations - */ - constructor(configs) { - - /** - * Stored valid rule configurations for this instance - * @type {Array} - */ - this.ruleConfigs = configs || []; - } - - /** - * Add a severity level to the front of all configs in the instance. - * This should only be called after all configs have been added to the instance. - * @returns {void} - */ - addErrorSeverity() { - const severity = 2; - - this.ruleConfigs = this.ruleConfigs.map(config => { - config.unshift(severity); - return config; - }); - - // Add a single config at the beginning consisting of only the severity - this.ruleConfigs.unshift(severity); - } - - /** - * Add rule configs from an array of strings (schema enums) - * @param {string[]} enums Array of valid rule options (e.g. ["always", "never"]) - * @returns {void} - */ - addEnums(enums) { - this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, enums)); - } - - /** - * Add rule configurations from a schema object - * @param {Object} obj Schema item with type === "object" - * @returns {boolean} true if at least one schema for the object could be generated, false otherwise - */ - addObject(obj) { - const objectConfigSet = { - objectConfigs: [], - add(property, values) { - for (let idx = 0; idx < values.length; idx++) { - const optionObj = {}; - - optionObj[property] = values[idx]; - this.objectConfigs.push(optionObj); - } - }, - - combine() { - this.objectConfigs = groupByProperty(this.objectConfigs).reduce((accumulator, objArr) => combinePropertyObjects(accumulator, objArr), []); - } - }; - - /* - * The object schema could have multiple independent properties. - * If any contain enums or booleans, they can be added and then combined - */ - Object.keys(obj.properties).forEach(prop => { - if (obj.properties[prop].enum) { - objectConfigSet.add(prop, obj.properties[prop].enum); - } - if (obj.properties[prop].type && obj.properties[prop].type === "boolean") { - objectConfigSet.add(prop, [true, false]); - } - }); - objectConfigSet.combine(); - - if (objectConfigSet.objectConfigs.length > 0) { - this.ruleConfigs = this.ruleConfigs.concat(combineArrays(this.ruleConfigs, objectConfigSet.objectConfigs)); - return true; - } - - return false; - } -} - -/** - * Generate valid rule configurations based on a schema object - * @param {Object} schema A rule's schema object - * @returns {Array[]} Valid rule configurations - */ -function generateConfigsFromSchema(schema) { - const configSet = new RuleConfigSet(); - - if (Array.isArray(schema)) { - for (const opt of schema) { - if (opt.enum) { - configSet.addEnums(opt.enum); - } else if (opt.type && opt.type === "object") { - if (!configSet.addObject(opt)) { - break; - } - - // TODO (IanVS): support oneOf - } else { - - // If we don't know how to fill in this option, don't fill in any of the following options. - break; - } - } - } - configSet.addErrorSeverity(); - return configSet.ruleConfigs; -} - -/** - * Generate possible rule configurations for all of the core rules - * @param {boolean} noDeprecated Indicates whether ignores deprecated rules or not. - * @returns {rulesConfig} Hash of rule names and arrays of possible configurations - */ -function createCoreRuleConfigs(noDeprecated = false) { - return Array.from(builtInRules).reduce((accumulator, [id, rule]) => { - const schema = (typeof rule === "function") ? rule.schema : rule.meta.schema; - const isDeprecated = (typeof rule === "function") ? rule.deprecated : rule.meta.deprecated; - - if (noDeprecated && isDeprecated) { - return accumulator; - } - - accumulator[id] = generateConfigsFromSchema(schema); - return accumulator; - }, {}); -} - - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - generateConfigsFromSchema, - createCoreRuleConfigs -}; diff --git a/node_modules/eslint/lib/init/npm-utils.js b/node_modules/eslint/lib/init/npm-utils.js deleted file mode 100644 index 555ea2b2b..000000000 --- a/node_modules/eslint/lib/init/npm-utils.js +++ /dev/null @@ -1,178 +0,0 @@ -/** - * @fileoverview Utility for executing npm commands. - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const fs = require("fs"), - spawn = require("cross-spawn"), - path = require("path"), - log = require("../shared/logging"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Find the closest package.json file, starting at process.cwd (by default), - * and working up to root. - * @param {string} [startDir=process.cwd()] Starting directory - * @returns {string} Absolute path to closest package.json file - */ -function findPackageJson(startDir) { - let dir = path.resolve(startDir || process.cwd()); - - do { - const pkgFile = path.join(dir, "package.json"); - - if (!fs.existsSync(pkgFile) || !fs.statSync(pkgFile).isFile()) { - dir = path.join(dir, ".."); - continue; - } - return pkgFile; - } while (dir !== path.resolve(dir, "..")); - return null; -} - -//------------------------------------------------------------------------------ -// Private -//------------------------------------------------------------------------------ - -/** - * Install node modules synchronously and save to devDependencies in package.json - * @param {string|string[]} packages Node module or modules to install - * @returns {void} - */ -function installSyncSaveDev(packages) { - const packageList = Array.isArray(packages) ? packages : [packages]; - const npmProcess = spawn.sync("npm", ["i", "--save-dev"].concat(packageList), - { stdio: "inherit" }); - const error = npmProcess.error; - - if (error && error.code === "ENOENT") { - const pluralS = packageList.length > 1 ? "s" : ""; - - log.error(`Could not execute npm. Please install the following package${pluralS} with a package manager of your choice: ${packageList.join(", ")}`); - } -} - -/** - * Fetch `peerDependencies` of the given package by `npm show` command. - * @param {string} packageName The package name to fetch peerDependencies. - * @returns {Object} Gotten peerDependencies. Returns null if npm was not found. - */ -function fetchPeerDependencies(packageName) { - const npmProcess = spawn.sync( - "npm", - ["show", "--json", packageName, "peerDependencies"], - { encoding: "utf8" } - ); - - const error = npmProcess.error; - - if (error && error.code === "ENOENT") { - return null; - } - const fetchedText = npmProcess.stdout.trim(); - - return JSON.parse(fetchedText || "{}"); - - -} - -/** - * Check whether node modules are include in a project's package.json. - * @param {string[]} packages Array of node module names - * @param {Object} opt Options Object - * @param {boolean} opt.dependencies Set to true to check for direct dependencies - * @param {boolean} opt.devDependencies Set to true to check for development dependencies - * @param {boolean} opt.startdir Directory to begin searching from - * @returns {Object} An object whose keys are the module names - * and values are booleans indicating installation. - */ -function check(packages, opt) { - const deps = new Set(); - const pkgJson = (opt) ? findPackageJson(opt.startDir) : findPackageJson(); - let fileJson; - - if (!pkgJson) { - throw new Error("Could not find a package.json file. Run 'npm init' to create one."); - } - - try { - fileJson = JSON.parse(fs.readFileSync(pkgJson, "utf8")); - } catch (e) { - const error = new Error(e); - - error.messageTemplate = "failed-to-read-json"; - error.messageData = { - path: pkgJson, - message: e.message - }; - throw error; - } - - ["dependencies", "devDependencies"].forEach(key => { - if (opt[key] && typeof fileJson[key] === "object") { - Object.keys(fileJson[key]).forEach(dep => deps.add(dep)); - } - }); - - return packages.reduce((status, pkg) => { - status[pkg] = deps.has(pkg); - return status; - }, {}); -} - -/** - * Check whether node modules are included in the dependencies of a project's - * package.json. - * - * Convenience wrapper around check(). - * @param {string[]} packages Array of node modules to check. - * @param {string} rootDir The directory containing a package.json - * @returns {Object} An object whose keys are the module names - * and values are booleans indicating installation. - */ -function checkDeps(packages, rootDir) { - return check(packages, { dependencies: true, startDir: rootDir }); -} - -/** - * Check whether node modules are included in the devDependencies of a project's - * package.json. - * - * Convenience wrapper around check(). - * @param {string[]} packages Array of node modules to check. - * @returns {Object} An object whose keys are the module names - * and values are booleans indicating installation. - */ -function checkDevDeps(packages) { - return check(packages, { devDependencies: true }); -} - -/** - * Check whether package.json is found in current path. - * @param {string} [startDir] Starting directory - * @returns {boolean} Whether a package.json is found in current path. - */ -function checkPackageJson(startDir) { - return !!findPackageJson(startDir); -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - -module.exports = { - installSyncSaveDev, - fetchPeerDependencies, - checkDeps, - checkDevDeps, - checkPackageJson -}; diff --git a/node_modules/eslint/lib/init/source-code-utils.js b/node_modules/eslint/lib/init/source-code-utils.js deleted file mode 100644 index dca6541d1..000000000 --- a/node_modules/eslint/lib/init/source-code-utils.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @fileoverview Tools for obtaining SourceCode objects. - * @author Ian VanSchooten - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const { CLIEngine } = require("../cli-engine"); - -/* - * This is used for: - * - * 1. Enumerate target file because we have not expose such a API on `CLIEngine` - * (https://github.com/eslint/eslint/issues/11222). - * 2. Create `SourceCode` instances. Because we don't have any function which - * instantiate `SourceCode` so it needs to take the created `SourceCode` - * instance out after linting. - * - * TODO1: Expose the API that enumerates target files. - * TODO2: Extract the creation logic of `SourceCode` from `Linter` class. - */ -const { getCLIEngineInternalSlots } = require("../cli-engine/cli-engine"); // eslint-disable-line node/no-restricted-require - -const debug = require("debug")("eslint:source-code-utils"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Get the SourceCode object for a single file - * @param {string} filename The fully resolved filename to get SourceCode from. - * @param {Object} engine A CLIEngine. - * @returns {Array} Array of the SourceCode object representing the file - * and fatal error message. - */ -function getSourceCodeOfFile(filename, engine) { - debug("getting sourceCode of", filename); - const results = engine.executeOnFiles([filename]); - - if (results && results.results[0] && results.results[0].messages[0] && results.results[0].messages[0].fatal) { - const msg = results.results[0].messages[0]; - - throw new Error(`(${filename}:${msg.line}:${msg.column}) ${msg.message}`); - } - - // TODO: extract the logic that creates source code objects to `SourceCode#parse(text, options)` or something like. - const { linter } = getCLIEngineInternalSlots(engine); - const sourceCode = linter.getSourceCode(); - - return sourceCode; -} - -//------------------------------------------------------------------------------ -// Public Interface -//------------------------------------------------------------------------------ - - -/** - * This callback is used to measure execution status in a progress bar - * @callback progressCallback - * @param {number} The total number of times the callback will be called. - */ - -/** - * Gets the SourceCode of a single file, or set of files. - * @param {string[]|string} patterns A filename, directory name, or glob, or an array of them - * @param {Object} options A CLIEngine options object. If not provided, the default cli options will be used. - * @param {progressCallback} callback Callback for reporting execution status - * @returns {Object} The SourceCode of all processed files. - */ -function getSourceCodeOfFiles(patterns, options, callback) { - const sourceCodes = {}; - const globPatternsList = typeof patterns === "string" ? [patterns] : patterns; - const engine = new CLIEngine({ ...options, rules: {} }); - - // TODO: make file iteration as a public API and use it. - const { fileEnumerator } = getCLIEngineInternalSlots(engine); - const filenames = - Array.from(fileEnumerator.iterateFiles(globPatternsList)) - .filter(entry => !entry.ignored) - .map(entry => entry.filePath); - - if (filenames.length === 0) { - debug(`Did not find any files matching pattern(s): ${globPatternsList}`); - } - - filenames.forEach(filename => { - const sourceCode = getSourceCodeOfFile(filename, engine); - - if (sourceCode) { - debug("got sourceCode of", filename); - sourceCodes[filename] = sourceCode; - } - if (callback) { - callback(filenames.length); // eslint-disable-line node/callback-return - } - }); - - return sourceCodes; -} - -module.exports = { - getSourceCodeOfFiles -}; diff --git a/node_modules/eslint/lib/linter/apply-disable-directives.js b/node_modules/eslint/lib/linter/apply-disable-directives.js index 41d6934ab..c5e3c9ddc 100644 --- a/node_modules/eslint/lib/linter/apply-disable-directives.js +++ b/node_modules/eslint/lib/linter/apply-disable-directives.js @@ -5,7 +5,17 @@ "use strict"; -const lodash = require("lodash"); +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** @typedef {import("../shared/types").LintMessage} LintMessage */ + +//------------------------------------------------------------------------------ +// Module Definition +//------------------------------------------------------------------------------ + +const escapeRegExp = require("escape-string-regexp"); /** * Compares the locations of two objects in a source file @@ -18,6 +28,266 @@ function compareLocations(itemA, itemB) { return itemA.line - itemB.line || itemA.column - itemB.column; } +/** + * Groups a set of directives into sub-arrays by their parent comment. + * @param {Iterable} directives Unused directives to be removed. + * @returns {Directive[][]} Directives grouped by their parent comment. + */ +function groupByParentComment(directives) { + const groups = new Map(); + + for (const directive of directives) { + const { unprocessedDirective: { parentComment } } = directive; + + if (groups.has(parentComment)) { + groups.get(parentComment).push(directive); + } else { + groups.set(parentComment, [directive]); + } + } + + return [...groups.values()]; +} + +/** + * Creates removal details for a set of directives within the same comment. + * @param {Directive[]} directives Unused directives to be removed. + * @param {Token} commentToken The backing Comment token. + * @returns {{ description, fix, unprocessedDirective }[]} Details for later creation of output Problems. + */ +function createIndividualDirectivesRemoval(directives, commentToken) { + + /* + * `commentToken.value` starts right after `//` or `/*`. + * All calculated offsets will be relative to this index. + */ + const commentValueStart = commentToken.range[0] + "//".length; + + // Find where the list of rules starts. `\S+` matches with the directive name (e.g. `eslint-disable-line`) + const listStartOffset = /^\s*\S+\s+/u.exec(commentToken.value)[0].length; + + /* + * Get the list text without any surrounding whitespace. In order to preserve the original + * formatting, we don't want to change that whitespace. + * + * // eslint-disable-line rule-one , rule-two , rule-three -- comment + * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + */ + const listText = commentToken.value + .slice(listStartOffset) // remove directive name and all whitespace before the list + .split(/\s-{2,}\s/u)[0] // remove `-- comment`, if it exists + .trimEnd(); // remove all whitespace after the list + + /* + * We can assume that `listText` contains multiple elements. + * Otherwise, this function wouldn't be called - if there is + * only one rule in the list, then the whole comment must be removed. + */ + + return directives.map(directive => { + const { ruleId } = directive; + + const regex = new RegExp(String.raw`(?:^|\s*,\s*)(?['"]?)${escapeRegExp(ruleId)}\k(?:\s*,\s*|$)`, "u"); + const match = regex.exec(listText); + const matchedText = match[0]; + const matchStartOffset = listStartOffset + match.index; + const matchEndOffset = matchStartOffset + matchedText.length; + + const firstIndexOfComma = matchedText.indexOf(","); + const lastIndexOfComma = matchedText.lastIndexOf(","); + + let removalStartOffset, removalEndOffset; + + if (firstIndexOfComma !== lastIndexOfComma) { + + /* + * Since there are two commas, this must one of the elements in the middle of the list. + * Matched range starts where the previous rule name ends, and ends where the next rule name starts. + * + * // eslint-disable-line rule-one , rule-two , rule-three -- comment + * ^^^^^^^^^^^^^^ + * + * We want to remove only the content between the two commas, and also one of the commas. + * + * // eslint-disable-line rule-one , rule-two , rule-three -- comment + * ^^^^^^^^^^^ + */ + removalStartOffset = matchStartOffset + firstIndexOfComma; + removalEndOffset = matchStartOffset + lastIndexOfComma; + + } else { + + /* + * This is either the first element or the last element. + * + * If this is the first element, matched range starts where the first rule name starts + * and ends where the second rule name starts. This is exactly the range we want + * to remove so that the second rule name will start where the first one was starting + * and thus preserve the original formatting. + * + * // eslint-disable-line rule-one , rule-two , rule-three -- comment + * ^^^^^^^^^^^ + * + * Similarly, if this is the last element, we've already matched the range we want to + * remove. The previous rule name will end where the last one was ending, relative + * to the content on the right side. + * + * // eslint-disable-line rule-one , rule-two , rule-three -- comment + * ^^^^^^^^^^^^^ + */ + removalStartOffset = matchStartOffset; + removalEndOffset = matchEndOffset; + } + + return { + description: `'${ruleId}'`, + fix: { + range: [ + commentValueStart + removalStartOffset, + commentValueStart + removalEndOffset + ], + text: "" + }, + unprocessedDirective: directive.unprocessedDirective + }; + }); +} + +/** + * Creates a description of deleting an entire unused disable comment. + * @param {Directive[]} directives Unused directives to be removed. + * @param {Token} commentToken The backing Comment token. + * @returns {{ description, fix, unprocessedDirective }} Details for later creation of an output Problem. + */ +function createCommentRemoval(directives, commentToken) { + const { range } = commentToken; + const ruleIds = directives.filter(directive => directive.ruleId).map(directive => `'${directive.ruleId}'`); + + return { + description: ruleIds.length <= 2 + ? ruleIds.join(" or ") + : `${ruleIds.slice(0, ruleIds.length - 1).join(", ")}, or ${ruleIds[ruleIds.length - 1]}`, + fix: { + range, + text: " " + }, + unprocessedDirective: directives[0].unprocessedDirective + }; +} + +/** + * Parses details from directives to create output Problems. + * @param {Iterable} allDirectives Unused directives to be removed. + * @returns {{ description, fix, unprocessedDirective }[]} Details for later creation of output Problems. + */ +function processUnusedDirectives(allDirectives) { + const directiveGroups = groupByParentComment(allDirectives); + + return directiveGroups.flatMap( + directives => { + const { parentComment } = directives[0].unprocessedDirective; + const remainingRuleIds = new Set(parentComment.ruleIds); + + for (const directive of directives) { + remainingRuleIds.delete(directive.ruleId); + } + + return remainingRuleIds.size + ? createIndividualDirectivesRemoval(directives, parentComment.commentToken) + : [createCommentRemoval(directives, parentComment.commentToken)]; + } + ); +} + +/** + * Collect eslint-enable comments that are removing suppressions by eslint-disable comments. + * @param {Directive[]} directives The directives to check. + * @returns {Set} The used eslint-enable comments + */ +function collectUsedEnableDirectives(directives) { + + /** + * A Map of `eslint-enable` keyed by ruleIds that may be marked as used. + * If `eslint-enable` does not have a ruleId, the key will be `null`. + * @type {Map} + */ + const enabledRules = new Map(); + + /** + * A Set of `eslint-enable` marked as used. + * It is also the return value of `collectUsedEnableDirectives` function. + * @type {Set} + */ + const usedEnableDirectives = new Set(); + + /* + * Checks the directives backwards to see if the encountered `eslint-enable` is used by the previous `eslint-disable`, + * and if so, stores the `eslint-enable` in `usedEnableDirectives`. + */ + for (let index = directives.length - 1; index >= 0; index--) { + const directive = directives[index]; + + if (directive.type === "disable") { + if (enabledRules.size === 0) { + continue; + } + if (directive.ruleId === null) { + + // If encounter `eslint-disable` without ruleId, + // mark all `eslint-enable` currently held in enabledRules as used. + // e.g. + // /* eslint-disable */ <- current directive + // /* eslint-enable rule-id1 */ <- used + // /* eslint-enable rule-id2 */ <- used + // /* eslint-enable */ <- used + for (const enableDirective of enabledRules.values()) { + usedEnableDirectives.add(enableDirective); + } + enabledRules.clear(); + } else { + const enableDirective = enabledRules.get(directive.ruleId); + + if (enableDirective) { + + // If encounter `eslint-disable` with ruleId, and there is an `eslint-enable` with the same ruleId in enabledRules, + // mark `eslint-enable` with ruleId as used. + // e.g. + // /* eslint-disable rule-id */ <- current directive + // /* eslint-enable rule-id */ <- used + usedEnableDirectives.add(enableDirective); + } else { + const enabledDirectiveWithoutRuleId = enabledRules.get(null); + + if (enabledDirectiveWithoutRuleId) { + + // If encounter `eslint-disable` with ruleId, and there is no `eslint-enable` with the same ruleId in enabledRules, + // mark `eslint-enable` without ruleId as used. + // e.g. + // /* eslint-disable rule-id */ <- current directive + // /* eslint-enable */ <- used + usedEnableDirectives.add(enabledDirectiveWithoutRuleId); + } + } + } + } else if (directive.type === "enable") { + if (directive.ruleId === null) { + + // If encounter `eslint-enable` without ruleId, the `eslint-enable` that follows it are unused. + // So clear enabledRules. + // e.g. + // /* eslint-enable */ <- current directive + // /* eslint-enable rule-id *// <- unused + // /* eslint-enable */ <- unused + enabledRules.clear(); + enabledRules.set(null, directive); + } else { + enabledRules.set(directive.ruleId, directive); + } + } + } + return usedEnableDirectives; +} + /** * This is the same as the exported function, except that it * doesn't handle disable-line and disable-next-line directives, and it always reports unused @@ -25,106 +295,132 @@ function compareLocations(itemA, itemB) { * @param {Object} options options for applying directives. This is the same as the options * for the exported function, except that `reportUnusedDisableDirectives` is not supported * (this function always reports unused disable directives). - * @returns {{problems: Problem[], unusedDisableDirectives: Problem[]}} An object with a list - * of filtered problems and unused eslint-disable directives + * @returns {{problems: LintMessage[], unusedDirectives: LintMessage[]}} An object with a list + * of problems (including suppressed ones) and unused eslint-disable directives */ function applyDirectives(options) { const problems = []; - let nextDirectiveIndex = 0; - let currentGlobalDisableDirective = null; - const disabledRuleMap = new Map(); - - // enabledRules is only used when there is a current global disable directive. - const enabledRules = new Set(); const usedDisableDirectives = new Set(); for (const problem of options.problems) { + let disableDirectivesForProblem = []; + let nextDirectiveIndex = 0; + while ( nextDirectiveIndex < options.directives.length && compareLocations(options.directives[nextDirectiveIndex], problem) <= 0 ) { const directive = options.directives[nextDirectiveIndex++]; - switch (directive.type) { - case "disable": - if (directive.ruleId === null) { - currentGlobalDisableDirective = directive; - disabledRuleMap.clear(); - enabledRules.clear(); - } else if (currentGlobalDisableDirective) { - enabledRules.delete(directive.ruleId); - disabledRuleMap.set(directive.ruleId, directive); - } else { - disabledRuleMap.set(directive.ruleId, directive); - } - break; - - case "enable": - if (directive.ruleId === null) { - currentGlobalDisableDirective = null; - disabledRuleMap.clear(); - } else if (currentGlobalDisableDirective) { - enabledRules.add(directive.ruleId); - disabledRuleMap.delete(directive.ruleId); - } else { - disabledRuleMap.delete(directive.ruleId); - } - break; + if (directive.ruleId === null || directive.ruleId === problem.ruleId) { + switch (directive.type) { + case "disable": + disableDirectivesForProblem.push(directive); + break; + + case "enable": + disableDirectivesForProblem = []; + break; - // no default + // no default + } } } - if (disabledRuleMap.has(problem.ruleId)) { - usedDisableDirectives.add(disabledRuleMap.get(problem.ruleId)); - } else if (currentGlobalDisableDirective && !enabledRules.has(problem.ruleId)) { - usedDisableDirectives.add(currentGlobalDisableDirective); - } else { - problems.push(problem); + if (disableDirectivesForProblem.length > 0) { + const suppressions = disableDirectivesForProblem.map(directive => ({ + kind: "directive", + justification: directive.unprocessedDirective.justification + })); + + if (problem.suppressions) { + problem.suppressions = problem.suppressions.concat(suppressions); + } else { + problem.suppressions = suppressions; + usedDisableDirectives.add(disableDirectivesForProblem[disableDirectivesForProblem.length - 1]); + } } + + problems.push(problem); } - const unusedDisableDirectives = options.directives - .filter(directive => directive.type === "disable" && !usedDisableDirectives.has(directive)) - .map(directive => ({ - ruleId: null, - message: directive.ruleId - ? `Unused eslint-disable directive (no problems were reported from '${directive.ruleId}').` - : "Unused eslint-disable directive (no problems were reported).", - line: directive.unprocessedDirective.line, - column: directive.unprocessedDirective.column, - severity: options.reportUnusedDisableDirectives === "warn" ? 1 : 2, - nodeType: null - })); - - return { problems, unusedDisableDirectives }; + const unusedDisableDirectivesToReport = options.directives + .filter(directive => directive.type === "disable" && !usedDisableDirectives.has(directive)); + + + const unusedEnableDirectivesToReport = new Set( + options.directives.filter(directive => directive.unprocessedDirective.type === "enable") + ); + + /* + * If directives has the eslint-enable directive, + * check whether the eslint-enable comment is used. + */ + if (unusedEnableDirectivesToReport.size > 0) { + for (const directive of collectUsedEnableDirectives(options.directives)) { + unusedEnableDirectivesToReport.delete(directive); + } + } + + const processed = processUnusedDirectives(unusedDisableDirectivesToReport) + .concat(processUnusedDirectives(unusedEnableDirectivesToReport)); + + const unusedDirectives = processed + .map(({ description, fix, unprocessedDirective }) => { + const { parentComment, type, line, column } = unprocessedDirective; + + let message; + + if (type === "enable") { + message = description + ? `Unused eslint-enable directive (no matching eslint-disable directives were found for ${description}).` + : "Unused eslint-enable directive (no matching eslint-disable directives were found)."; + } else { + message = description + ? `Unused eslint-disable directive (no problems were reported from ${description}).` + : "Unused eslint-disable directive (no problems were reported)."; + } + return { + ruleId: null, + message, + line: type === "disable-next-line" ? parentComment.commentToken.loc.start.line : line, + column: type === "disable-next-line" ? parentComment.commentToken.loc.start.column + 1 : column, + severity: options.reportUnusedDisableDirectives === "warn" ? 1 : 2, + nodeType: null, + ...options.disableFixes ? {} : { fix } + }; + }); + + return { problems, unusedDirectives }; } /** * Given a list of directive comments (i.e. metadata about eslint-disable and eslint-enable comments) and a list - * of reported problems, determines which problems should be reported. + * of reported problems, adds the suppression information to the problems. * @param {Object} options Information about directives and problems * @param {{ * type: ("disable"|"enable"|"disable-line"|"disable-next-line"), * ruleId: (string|null), * line: number, - * column: number + * column: number, + * justification: string * }} options.directives Directive comments found in the file, with one-based columns. * Two directive comments can only have the same location if they also have the same type (e.g. a single eslint-disable * comment for two different rules is represented as two directives). * @param {{ruleId: (string|null), line: number, column: number}[]} options.problems * A list of problems reported by rules, sorted by increasing location in the file, with one-based columns. * @param {"off" | "warn" | "error"} options.reportUnusedDisableDirectives If `"warn"` or `"error"`, adds additional problems for unused directives - * @returns {{ruleId: (string|null), line: number, column: number}[]} - * A list of reported problems that were not disabled by the directive comments. + * @param {boolean} options.disableFixes If true, it doesn't make `fix` properties. + * @returns {{ruleId: (string|null), line: number, column: number, suppressions?: {kind: string, justification: string}}[]} + * An object with a list of reported problems, the suppressed of which contain the suppression information. */ -module.exports = ({ directives, problems, reportUnusedDisableDirectives = "off" }) => { +module.exports = ({ directives, disableFixes, problems, reportUnusedDisableDirectives = "off" }) => { const blockDirectives = directives .filter(directive => directive.type === "disable" || directive.type === "enable") .map(directive => Object.assign({}, directive, { unprocessedDirective: directive })) .sort(compareLocations); - const lineDirectives = lodash.flatMap(directives, directive => { + const lineDirectives = directives.flatMap(directive => { switch (directive.type) { case "disable": case "enable": @@ -150,18 +446,20 @@ module.exports = ({ directives, problems, reportUnusedDisableDirectives = "off" const blockDirectivesResult = applyDirectives({ problems, directives: blockDirectives, + disableFixes, reportUnusedDisableDirectives }); const lineDirectivesResult = applyDirectives({ problems: blockDirectivesResult.problems, directives: lineDirectives, + disableFixes, reportUnusedDisableDirectives }); return reportUnusedDisableDirectives !== "off" ? lineDirectivesResult.problems - .concat(blockDirectivesResult.unusedDisableDirectives) - .concat(lineDirectivesResult.unusedDisableDirectives) + .concat(blockDirectivesResult.unusedDirectives) + .concat(lineDirectivesResult.unusedDirectives) .sort(compareLocations) : lineDirectivesResult.problems; }; diff --git a/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js b/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js index 47427c11a..b60e55c16 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js @@ -29,6 +29,18 @@ function isCaseNode(node) { return Boolean(node.test); } +/** + * Checks if a given node appears as the value of a PropertyDefinition node. + * @param {ASTNode} node THe node to check. + * @returns {boolean} `true` if the node is a PropertyDefinition value, + * false if not. + */ +function isPropertyDefinitionValue(node) { + const parent = node.parent; + + return parent && parent.type === "PropertyDefinition" && parent.value === node; +} + /** * Checks whether the given logical operator is taken into account for the code * path analysis. @@ -138,6 +150,7 @@ function isIdentifierReference(node) { return parent.id !== node; case "Property": + case "PropertyDefinition": case "MethodDefinition": return ( parent.key !== node || @@ -179,15 +192,18 @@ function forwardCurrentToHead(analyzer, node) { headSegment = headSegments[i]; if (currentSegment !== headSegment && currentSegment) { - debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`); - if (currentSegment.reachable) { - analyzer.emitter.emit( - "onCodePathSegmentEnd", - currentSegment, - node - ); - } + const eventName = currentSegment.reachable + ? "onCodePathSegmentEnd" + : "onUnreachableCodePathSegmentEnd"; + + debug.dump(`${eventName} ${currentSegment.id}`); + + analyzer.emitter.emit( + eventName, + currentSegment, + node + ); } } @@ -200,16 +216,19 @@ function forwardCurrentToHead(analyzer, node) { headSegment = headSegments[i]; if (currentSegment !== headSegment && headSegment) { - debug.dump(`onCodePathSegmentStart ${headSegment.id}`); + + const eventName = headSegment.reachable + ? "onCodePathSegmentStart" + : "onUnreachableCodePathSegmentStart"; + + debug.dump(`${eventName} ${headSegment.id}`); CodePathSegment.markUsed(headSegment); - if (headSegment.reachable) { - analyzer.emitter.emit( - "onCodePathSegmentStart", - headSegment, - node - ); - } + analyzer.emitter.emit( + eventName, + headSegment, + node + ); } } @@ -228,15 +247,17 @@ function leaveFromCurrentSegment(analyzer, node) { for (let i = 0; i < currentSegments.length; ++i) { const currentSegment = currentSegments[i]; + const eventName = currentSegment.reachable + ? "onCodePathSegmentEnd" + : "onUnreachableCodePathSegmentEnd"; - debug.dump(`onCodePathSegmentEnd ${currentSegment.id}`); - if (currentSegment.reachable) { - analyzer.emitter.emit( - "onCodePathSegmentEnd", - currentSegment, - node - ); - } + debug.dump(`${eventName} ${currentSegment.id}`); + + analyzer.emitter.emit( + eventName, + currentSegment, + node + ); } state.currentSegments = []; @@ -388,29 +409,68 @@ function processCodePathToEnter(analyzer, node) { let state = codePath && CodePath.getState(codePath); const parent = node.parent; + /** + * Creates a new code path and trigger the onCodePathStart event + * based on the currently selected node. + * @param {string} origin The reason the code path was started. + * @returns {void} + */ + function startCodePath(origin) { + if (codePath) { + + // Emits onCodePathSegmentStart events if updated. + forwardCurrentToHead(analyzer, node); + debug.dumpState(node, state, false); + } + + // Create the code path of this scope. + codePath = analyzer.codePath = new CodePath({ + id: analyzer.idGenerator.next(), + origin, + upper: codePath, + onLooped: analyzer.onLooped + }); + state = CodePath.getState(codePath); + + // Emits onCodePathStart events. + debug.dump(`onCodePathStart ${codePath.id}`); + analyzer.emitter.emit("onCodePathStart", codePath, node); + } + + /* + * Special case: The right side of class field initializer is considered + * to be its own function, so we need to start a new code path in this + * case. + */ + if (isPropertyDefinitionValue(node)) { + startCodePath("class-field-initializer"); + + /* + * Intentional fall through because `node` needs to also be + * processed by the code below. For example, if we have: + * + * class Foo { + * a = () => {} + * } + * + * In this case, we also need start a second code path. + */ + + } + switch (node.type) { case "Program": + startCodePath("program"); + break; + case "FunctionDeclaration": case "FunctionExpression": case "ArrowFunctionExpression": - if (codePath) { - - // Emits onCodePathSegmentStart events if updated. - forwardCurrentToHead(analyzer, node); - debug.dumpState(node, state, false); - } - - // Create the code path of this scope. - codePath = analyzer.codePath = new CodePath( - analyzer.idGenerator.next(), - codePath, - analyzer.onLooped - ); - state = CodePath.getState(codePath); + startCodePath("function"); + break; - // Emits onCodePathStart events. - debug.dump(`onCodePathStart ${codePath.id}`); - analyzer.emitter.emit("onCodePathStart", codePath, node); + case "StaticBlock": + startCodePath("class-static-block"); break; case "ChainExpression": @@ -503,6 +563,7 @@ function processCodePathToEnter(analyzer, node) { * @returns {void} */ function processCodePathToExit(analyzer, node) { + const codePath = analyzer.codePath; const state = CodePath.getState(codePath); let dontForward = false; @@ -627,28 +688,39 @@ function processCodePathToExit(analyzer, node) { * @returns {void} */ function postprocess(analyzer, node) { - switch (node.type) { - case "Program": - case "FunctionDeclaration": - case "FunctionExpression": - case "ArrowFunctionExpression": { - let codePath = analyzer.codePath; - // Mark the current path as the final node. - CodePath.getState(codePath).makeFinal(); + /** + * Ends the code path for the current node. + * @returns {void} + */ + function endCodePath() { + let codePath = analyzer.codePath; - // Emits onCodePathSegmentEnd event of the current segments. - leaveFromCurrentSegment(analyzer, node); + // Mark the current path as the final node. + CodePath.getState(codePath).makeFinal(); - // Emits onCodePathEnd event of this code path. - debug.dump(`onCodePathEnd ${codePath.id}`); - analyzer.emitter.emit("onCodePathEnd", codePath, node); - debug.dumpDot(codePath); + // Emits onCodePathSegmentEnd event of the current segments. + leaveFromCurrentSegment(analyzer, node); - codePath = analyzer.codePath = analyzer.codePath.upper; - if (codePath) { - debug.dumpState(node, CodePath.getState(codePath), true); - } + // Emits onCodePathEnd event of this code path. + debug.dump(`onCodePathEnd ${codePath.id}`); + analyzer.emitter.emit("onCodePathEnd", codePath, node); + debug.dumpDot(codePath); + + codePath = analyzer.codePath = analyzer.codePath.upper; + if (codePath) { + debug.dumpState(node, CodePath.getState(codePath), true); + } + + } + + switch (node.type) { + case "Program": + case "FunctionDeclaration": + case "FunctionExpression": + case "ArrowFunctionExpression": + case "StaticBlock": { + endCodePath(); break; } @@ -662,6 +734,27 @@ function postprocess(analyzer, node) { default: break; } + + /* + * Special case: The right side of class field initializer is considered + * to be its own function, so we need to end a code path in this + * case. + * + * We need to check after the other checks in order to close the + * code paths in the correct order for code like this: + * + * + * class Foo { + * a = () => {} + * } + * + * In this case, The ArrowFunctionExpression code path is closed first + * and then we need to close the code path for the PropertyDefinition + * value. + */ + if (isPropertyDefinitionValue(node)) { + endCodePath(); + } } //------------------------------------------------------------------------------ @@ -674,7 +767,6 @@ function postprocess(analyzer, node) { */ class CodePathAnalyzer { - // eslint-disable-next-line jsdoc/require-description /** * @param {EventGenerator} eventGenerator An event generator to wrap. */ diff --git a/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js b/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js index ca96ad341..3b8dbb41b 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/code-path-segment.js @@ -1,5 +1,5 @@ /** - * @fileoverview A class of the code path segment. + * @fileoverview The CodePathSegment class. * @author Toru Nagashima */ @@ -30,11 +30,22 @@ function isReachable(segment) { /** * A code path segment. + * + * Each segment is arranged in a series of linked lists (implemented by arrays) + * that keep track of the previous and next segments in a code path. In this way, + * you can navigate between all segments in any code path so long as you have a + * reference to any segment in that code path. + * + * When first created, the segment is in a detached state, meaning that it knows the + * segments that came before it but those segments don't know that this new segment + * follows it. Only when `CodePathSegment#markUsed()` is called on a segment does it + * officially become part of the code path by updating the previous segments to know + * that this new segment follows. */ class CodePathSegment { - // eslint-disable-next-line jsdoc/require-description /** + * Creates a new instance. * @param {string} id An identifier. * @param {CodePathSegment[]} allPrevSegments An array of the previous segments. * This array includes unreachable segments. @@ -50,27 +61,25 @@ class CodePathSegment { this.id = id; /** - * An array of the next segments. + * An array of the next reachable segments. * @type {CodePathSegment[]} */ this.nextSegments = []; /** - * An array of the previous segments. + * An array of the previous reachable segments. * @type {CodePathSegment[]} */ this.prevSegments = allPrevSegments.filter(isReachable); /** - * An array of the next segments. - * This array includes unreachable segments. + * An array of all next segments including reachable and unreachable. * @type {CodePathSegment[]} */ this.allNextSegments = []; /** - * An array of the previous segments. - * This array includes unreachable segments. + * An array of all previous segments including reachable and unreachable. * @type {CodePathSegment[]} */ this.allPrevSegments = allPrevSegments; @@ -84,15 +93,19 @@ class CodePathSegment { // Internal data. Object.defineProperty(this, "internal", { value: { + + // determines if the segment has been attached to the code path used: false, + + // array of previous segments coming from the end of a loop loopedPrevSegments: [] } }); - /* istanbul ignore if */ + /* c8 ignore start */ if (debug.enabled) { this.internal.nodes = []; - } + }/* c8 ignore stop */ } /** @@ -101,7 +114,7 @@ class CodePathSegment { * @returns {boolean} `true` if the segment is coming from the end of a loop. */ isLoopedPrevSegment(segment) { - return this.internal.loopedPrevSegments.indexOf(segment) !== -1; + return this.internal.loopedPrevSegments.includes(segment); } /** @@ -114,9 +127,10 @@ class CodePathSegment { } /** - * Creates a segment that follows given segments. + * Creates a new segment and appends it after the given segments. * @param {string} id An identifier. - * @param {CodePathSegment[]} allPrevSegments An array of the previous segments. + * @param {CodePathSegment[]} allPrevSegments An array of the previous segments + * to append to. * @returns {CodePathSegment} The created segment. */ static newNext(id, allPrevSegments) { @@ -128,7 +142,7 @@ class CodePathSegment { } /** - * Creates an unreachable segment that follows given segments. + * Creates an unreachable segment and appends it after the given segments. * @param {string} id An identifier. * @param {CodePathSegment[]} allPrevSegments An array of the previous segments. * @returns {CodePathSegment} The created segment. @@ -138,7 +152,7 @@ class CodePathSegment { /* * In `if (a) return a; foo();` case, the unreachable segment preceded by - * the return statement is not used but must not be remove. + * the return statement is not used but must not be removed. */ CodePathSegment.markUsed(segment); @@ -158,7 +172,7 @@ class CodePathSegment { } /** - * Makes a given segment being used. + * Marks a given segment as used. * * And this function registers the segment into the previous segments as a next. * @param {CodePathSegment} segment A segment to mark. @@ -173,6 +187,13 @@ class CodePathSegment { let i; if (segment.reachable) { + + /* + * If the segment is reachable, then it's officially part of the + * code path. This loops through all previous segments to update + * their list of next segments. Because the segment is reachable, + * it's added to both `nextSegments` and `allNextSegments`. + */ for (i = 0; i < segment.allPrevSegments.length; ++i) { const prevSegment = segment.allPrevSegments[i]; @@ -180,6 +201,13 @@ class CodePathSegment { prevSegment.nextSegments.push(segment); } } else { + + /* + * If the segment is not reachable, then it's not officially part of the + * code path. This loops through all previous segments to update + * their list of next segments. Because the segment is not reachable, + * it's added only to `allNextSegments`. + */ for (i = 0; i < segment.allPrevSegments.length; ++i) { segment.allPrevSegments[i].allNextSegments.push(segment); } @@ -197,19 +225,20 @@ class CodePathSegment { } /** - * Replaces unused segments with the previous segments of each unused segment. - * @param {CodePathSegment[]} segments An array of segments to replace. - * @returns {CodePathSegment[]} The replaced array. + * Creates a new array based on an array of segments. If any segment in the + * array is unused, then it is replaced by all of its previous segments. + * All used segments are returned as-is without replacement. + * @param {CodePathSegment[]} segments The array of segments to flatten. + * @returns {CodePathSegment[]} The flattened array. */ static flattenUnusedSegments(segments) { - const done = Object.create(null); - const retv = []; + const done = new Set(); for (let i = 0; i < segments.length; ++i) { const segment = segments[i]; // Ignores duplicated. - if (done[segment.id]) { + if (done.has(segment)) { continue; } @@ -218,18 +247,16 @@ class CodePathSegment { for (let j = 0; j < segment.allPrevSegments.length; ++j) { const prevSegment = segment.allPrevSegments[j]; - if (!done[prevSegment.id]) { - done[prevSegment.id] = true; - retv.push(prevSegment); + if (!done.has(prevSegment)) { + done.add(prevSegment); } } } else { - done[segment.id] = true; - retv.push(segment); + done.add(segment); } } - return retv; + return [...done]; } } diff --git a/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js b/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js index f75e60e28..2b0dc2bfc 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/code-path-state.js @@ -12,13 +12,622 @@ const CodePathSegment = require("./code-path-segment"), ForkContext = require("./fork-context"); +//----------------------------------------------------------------------------- +// Contexts +//----------------------------------------------------------------------------- + +/** + * Represents the context in which a `break` statement can be used. + * + * A `break` statement without a label is only valid in a few places in + * JavaScript: any type of loop or a `switch` statement. Otherwise, `break` + * without a label causes a syntax error. For these contexts, `breakable` is + * set to `true` to indicate that a `break` without a label is valid. + * + * However, a `break` statement with a label is also valid inside of a labeled + * statement. For example, this is valid: + * + * a : { + * break a; + * } + * + * The `breakable` property is set false for labeled statements to indicate + * that `break` without a label is invalid. + */ +class BreakContext { + + /** + * Creates a new instance. + * @param {BreakContext} upperContext The previous `BreakContext`. + * @param {boolean} breakable Indicates if we are inside a statement where + * `break` without a label will exit the statement. + * @param {string|null} label The label for the statement. + * @param {ForkContext} forkContext The current fork context. + */ + constructor(upperContext, breakable, label, forkContext) { + + /** + * The previous `BreakContext` + * @type {BreakContext} + */ + this.upper = upperContext; + + /** + * Indicates if we are inside a statement where `break` without a label + * will exit the statement. + * @type {boolean} + */ + this.breakable = breakable; + + /** + * The label associated with the statement. + * @type {string|null} + */ + this.label = label; + + /** + * The fork context for the `break`. + * @type {ForkContext} + */ + this.brokenForkContext = ForkContext.newEmpty(forkContext); + } +} + +/** + * Represents the context for `ChainExpression` nodes. + */ +class ChainContext { + + /** + * Creates a new instance. + * @param {ChainContext} upperContext The previous `ChainContext`. + */ + constructor(upperContext) { + + /** + * The previous `ChainContext` + * @type {ChainContext} + */ + this.upper = upperContext; + + /** + * The number of choice contexts inside of the `ChainContext`. + * @type {number} + */ + this.choiceContextCount = 0; + + } +} + +/** + * Represents a choice in the code path. + * + * Choices are created by logical operators such as `&&`, loops, conditionals, + * and `if` statements. This is the point at which the code path has a choice of + * which direction to go. + * + * The result of a choice might be in the left (test) expression of another choice, + * and in that case, may create a new fork. For example, `a || b` is a choice + * but does not create a new fork because the result of the expression is + * not used as the test expression in another expression. In this case, + * `isForkingAsResult` is false. In the expression `a || b || c`, the `a || b` + * expression appears as the test expression for `|| c`, so the + * result of `a || b` creates a fork because execution may or may not + * continue to `|| c`. `isForkingAsResult` for `a || b` in this case is true + * while `isForkingAsResult` for `|| c` is false. (`isForkingAsResult` is always + * false for `if` statements, conditional expressions, and loops.) + * + * All of the choices except one (`??`) operate on a true/false fork, meaning if + * true go one way and if false go the other (tracked by `trueForkContext` and + * `falseForkContext`). The `??` operator doesn't operate on true/false because + * the left expression is evaluated to be nullish or not, so only if nullish do + * we fork to the right expression (tracked by `nullishForkContext`). + */ +class ChoiceContext { + + /** + * Creates a new instance. + * @param {ChoiceContext} upperContext The previous `ChoiceContext`. + * @param {string} kind The kind of choice. If it's a logical or assignment expression, this + * is `"&&"` or `"||"` or `"??"`; if it's an `if` statement or + * conditional expression, this is `"test"`; otherwise, this is `"loop"`. + * @param {boolean} isForkingAsResult Indicates if the result of the choice + * creates a fork. + * @param {ForkContext} forkContext The containing `ForkContext`. + */ + constructor(upperContext, kind, isForkingAsResult, forkContext) { + + /** + * The previous `ChoiceContext` + * @type {ChoiceContext} + */ + this.upper = upperContext; + + /** + * The kind of choice. If it's a logical or assignment expression, this + * is `"&&"` or `"||"` or `"??"`; if it's an `if` statement or + * conditional expression, this is `"test"`; otherwise, this is `"loop"`. + * @type {string} + */ + this.kind = kind; + + /** + * Indicates if the result of the choice forks the code path. + * @type {boolean} + */ + this.isForkingAsResult = isForkingAsResult; + + /** + * The fork context for the `true` path of the choice. + * @type {ForkContext} + */ + this.trueForkContext = ForkContext.newEmpty(forkContext); + + /** + * The fork context for the `false` path of the choice. + * @type {ForkContext} + */ + this.falseForkContext = ForkContext.newEmpty(forkContext); + + /** + * The fork context for when the choice result is `null` or `undefined`. + * @type {ForkContext} + */ + this.nullishForkContext = ForkContext.newEmpty(forkContext); + + /** + * Indicates if any of `trueForkContext`, `falseForkContext`, or + * `nullishForkContext` have been updated with segments from a child context. + * @type {boolean} + */ + this.processed = false; + } + +} + +/** + * Base class for all loop contexts. + */ +class LoopContextBase { + + /** + * Creates a new instance. + * @param {LoopContext|null} upperContext The previous `LoopContext`. + * @param {string} type The AST node's `type` for the loop. + * @param {string|null} label The label for the loop from an enclosing `LabeledStatement`. + * @param {BreakContext} breakContext The context for breaking the loop. + */ + constructor(upperContext, type, label, breakContext) { + + /** + * The previous `LoopContext`. + * @type {LoopContext} + */ + this.upper = upperContext; + + /** + * The AST node's `type` for the loop. + * @type {string} + */ + this.type = type; + + /** + * The label for the loop from an enclosing `LabeledStatement`. + * @type {string|null} + */ + this.label = label; + + /** + * The fork context for when `break` is encountered. + * @type {ForkContext} + */ + this.brokenForkContext = breakContext.brokenForkContext; + } +} + +/** + * Represents the context for a `while` loop. + */ +class WhileLoopContext extends LoopContextBase { + + /** + * Creates a new instance. + * @param {LoopContext|null} upperContext The previous `LoopContext`. + * @param {string|null} label The label for the loop from an enclosing `LabeledStatement`. + * @param {BreakContext} breakContext The context for breaking the loop. + */ + constructor(upperContext, label, breakContext) { + super(upperContext, "WhileStatement", label, breakContext); + + /** + * The hardcoded literal boolean test condition for + * the loop. Used to catch infinite or skipped loops. + * @type {boolean|undefined} + */ + this.test = void 0; + + /** + * The segments representing the test condition where `continue` will + * jump to. The test condition will typically have just one segment but + * it's possible for there to be more than one. + * @type {Array|null} + */ + this.continueDestSegments = null; + } +} + +/** + * Represents the context for a `do-while` loop. + */ +class DoWhileLoopContext extends LoopContextBase { + + /** + * Creates a new instance. + * @param {LoopContext|null} upperContext The previous `LoopContext`. + * @param {string|null} label The label for the loop from an enclosing `LabeledStatement`. + * @param {BreakContext} breakContext The context for breaking the loop. + * @param {ForkContext} forkContext The enclosing fork context. + */ + constructor(upperContext, label, breakContext, forkContext) { + super(upperContext, "DoWhileStatement", label, breakContext); + + /** + * The hardcoded literal boolean test condition for + * the loop. Used to catch infinite or skipped loops. + * @type {boolean|undefined} + */ + this.test = void 0; + + /** + * The segments at the start of the loop body. This is the only loop + * where the test comes at the end, so the first iteration always + * happens and we need a reference to the first statements. + * @type {Array|null} + */ + this.entrySegments = null; + + /** + * The fork context to follow when a `continue` is found. + * @type {ForkContext} + */ + this.continueForkContext = ForkContext.newEmpty(forkContext); + } +} + +/** + * Represents the context for a `for` loop. + */ +class ForLoopContext extends LoopContextBase { + + /** + * Creates a new instance. + * @param {LoopContext|null} upperContext The previous `LoopContext`. + * @param {string|null} label The label for the loop from an enclosing `LabeledStatement`. + * @param {BreakContext} breakContext The context for breaking the loop. + */ + constructor(upperContext, label, breakContext) { + super(upperContext, "ForStatement", label, breakContext); + + /** + * The hardcoded literal boolean test condition for + * the loop. Used to catch infinite or skipped loops. + * @type {boolean|undefined} + */ + this.test = void 0; + + /** + * The end of the init expression. This may change during the lifetime + * of the instance as we traverse the loop because some loops don't have + * an init expression. + * @type {Array|null} + */ + this.endOfInitSegments = null; + + /** + * The start of the test expression. This may change during the lifetime + * of the instance as we traverse the loop because some loops don't have + * a test expression. + * @type {Array|null} + */ + this.testSegments = null; + + /** + * The end of the test expression. This may change during the lifetime + * of the instance as we traverse the loop because some loops don't have + * a test expression. + * @type {Array|null} + */ + this.endOfTestSegments = null; + + /** + * The start of the update expression. This may change during the lifetime + * of the instance as we traverse the loop because some loops don't have + * an update expression. + * @type {Array|null} + */ + this.updateSegments = null; + + /** + * The end of the update expresion. This may change during the lifetime + * of the instance as we traverse the loop because some loops don't have + * an update expression. + * @type {Array|null} + */ + this.endOfUpdateSegments = null; + + /** + * The segments representing the test condition where `continue` will + * jump to. The test condition will typically have just one segment but + * it's possible for there to be more than one. This may change during the + * lifetime of the instance as we traverse the loop because some loops + * don't have an update expression. When there is an update expression, this + * will end up pointing to that expression; otherwise it will end up pointing + * to the test expression. + * @type {Array|null} + */ + this.continueDestSegments = null; + } +} + +/** + * Represents the context for a `for-in` loop. + * + * Terminology: + * - "left" means the part of the loop to the left of the `in` keyword. For + * example, in `for (var x in y)`, the left is `var x`. + * - "right" means the part of the loop to the right of the `in` keyword. For + * example, in `for (var x in y)`, the right is `y`. + */ +class ForInLoopContext extends LoopContextBase { + + /** + * Creates a new instance. + * @param {LoopContext|null} upperContext The previous `LoopContext`. + * @param {string|null} label The label for the loop from an enclosing `LabeledStatement`. + * @param {BreakContext} breakContext The context for breaking the loop. + */ + constructor(upperContext, label, breakContext) { + super(upperContext, "ForInStatement", label, breakContext); + + /** + * The segments that came immediately before the start of the loop. + * This allows you to traverse backwards out of the loop into the + * surrounding code. This is necessary to evaluate the right expression + * correctly, as it must be evaluated in the same way as the left + * expression, but the pointer to these segments would otherwise be + * lost if not stored on the instance. Once the right expression has + * been evaluated, this property is no longer used. + * @type {Array|null} + */ + this.prevSegments = null; + + /** + * Segments representing the start of everything to the left of the + * `in` keyword. This can be used to move forward towards + * `endOfLeftSegments`. `leftSegments` and `endOfLeftSegments` are + * effectively the head and tail of a doubly-linked list. + * @type {Array|null} + */ + this.leftSegments = null; + + /** + * Segments representing the end of everything to the left of the + * `in` keyword. This can be used to move backward towards `leftSegments`. + * `leftSegments` and `endOfLeftSegments` are effectively the head + * and tail of a doubly-linked list. + * @type {Array|null} + */ + this.endOfLeftSegments = null; + + /** + * The segments representing the left expression where `continue` will + * jump to. In `for-in` loops, `continue` must always re-execute the + * left expression each time through the loop. This contains the same + * segments as `leftSegments`, but is duplicated here so each loop + * context has the same property pointing to where `continue` should + * end up. + * @type {Array|null} + */ + this.continueDestSegments = null; + } +} + +/** + * Represents the context for a `for-of` loop. + */ +class ForOfLoopContext extends LoopContextBase { + + /** + * Creates a new instance. + * @param {LoopContext|null} upperContext The previous `LoopContext`. + * @param {string|null} label The label for the loop from an enclosing `LabeledStatement`. + * @param {BreakContext} breakContext The context for breaking the loop. + */ + constructor(upperContext, label, breakContext) { + super(upperContext, "ForOfStatement", label, breakContext); + + /** + * The segments that came immediately before the start of the loop. + * This allows you to traverse backwards out of the loop into the + * surrounding code. This is necessary to evaluate the right expression + * correctly, as it must be evaluated in the same way as the left + * expression, but the pointer to these segments would otherwise be + * lost if not stored on the instance. Once the right expression has + * been evaluated, this property is no longer used. + * @type {Array|null} + */ + this.prevSegments = null; + + /** + * Segments representing the start of everything to the left of the + * `of` keyword. This can be used to move forward towards + * `endOfLeftSegments`. `leftSegments` and `endOfLeftSegments` are + * effectively the head and tail of a doubly-linked list. + * @type {Array|null} + */ + this.leftSegments = null; + + /** + * Segments representing the end of everything to the left of the + * `of` keyword. This can be used to move backward towards `leftSegments`. + * `leftSegments` and `endOfLeftSegments` are effectively the head + * and tail of a doubly-linked list. + * @type {Array|null} + */ + this.endOfLeftSegments = null; + + /** + * The segments representing the left expression where `continue` will + * jump to. In `for-in` loops, `continue` must always re-execute the + * left expression each time through the loop. This contains the same + * segments as `leftSegments`, but is duplicated here so each loop + * context has the same property pointing to where `continue` should + * end up. + * @type {Array|null} + */ + this.continueDestSegments = null; + } +} + +/** + * Represents the context for any loop. + * @typedef {WhileLoopContext|DoWhileLoopContext|ForLoopContext|ForInLoopContext|ForOfLoopContext} LoopContext + */ + +/** + * Represents the context for a `switch` statement. + */ +class SwitchContext { + + /** + * Creates a new instance. + * @param {SwitchContext} upperContext The previous context. + * @param {boolean} hasCase Indicates if there is at least one `case` statement. + * `default` doesn't count. + */ + constructor(upperContext, hasCase) { + + /** + * The previous context. + * @type {SwitchContext} + */ + this.upper = upperContext; + + /** + * Indicates if there is at least one `case` statement. `default` doesn't count. + * @type {boolean} + */ + this.hasCase = hasCase; + + /** + * The `default` keyword. + * @type {Array|null} + */ + this.defaultSegments = null; + + /** + * The default case body starting segments. + * @type {Array|null} + */ + this.defaultBodySegments = null; + + /** + * Indicates if a `default` case and is empty exists. + * @type {boolean} + */ + this.foundEmptyDefault = false; + + /** + * Indicates that a `default` exists and is the last case. + * @type {boolean} + */ + this.lastIsDefault = false; + + /** + * The number of fork contexts created. This is equivalent to the + * number of `case` statements plus a `default` statement (if present). + * @type {number} + */ + this.forkCount = 0; + } +} + +/** + * Represents the context for a `try` statement. + */ +class TryContext { + + /** + * Creates a new instance. + * @param {TryContext} upperContext The previous context. + * @param {boolean} hasFinalizer Indicates if the `try` statement has a + * `finally` block. + * @param {ForkContext} forkContext The enclosing fork context. + */ + constructor(upperContext, hasFinalizer, forkContext) { + + /** + * The previous context. + * @type {TryContext} + */ + this.upper = upperContext; + + /** + * Indicates if the `try` statement has a `finally` block. + * @type {boolean} + */ + this.hasFinalizer = hasFinalizer; + + /** + * Tracks the traversal position inside of the `try` statement. This is + * used to help determine the context necessary to create paths because + * a `try` statement may or may not have `catch` or `finally` blocks, + * and code paths behave differently in those blocks. + * @type {"try"|"catch"|"finally"} + */ + this.position = "try"; + + /** + * If the `try` statement has a `finally` block, this affects how a + * `return` statement behaves in the `try` block. Without `finally`, + * `return` behaves as usual and doesn't require a fork; with `finally`, + * `return` forks into the `finally` block, so we need a fork context + * to track it. + * @type {ForkContext|null} + */ + this.returnedForkContext = hasFinalizer + ? ForkContext.newEmpty(forkContext) + : null; + + /** + * When a `throw` occurs inside of a `try` block, the code path forks + * into the `catch` or `finally` blocks, and this fork context tracks + * that path. + * @type {ForkContext} + */ + this.thrownForkContext = ForkContext.newEmpty(forkContext); + + /** + * Indicates if the last segment in the `try` block is reachable. + * @type {boolean} + */ + this.lastOfTryIsReachable = false; + + /** + * Indicates if the last segment in the `catch` block is reachable. + * @type {boolean} + */ + this.lastOfCatchIsReachable = false; + } +} + //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ /** * Adds given segments into the `dest` array. - * If the `others` array does not includes the given segments, adds to the `all` + * If the `others` array does not include the given segments, adds to the `all` * array as well. * * This adds only reachable and used segments. @@ -33,16 +642,16 @@ function addToReturnedOrThrown(dest, others, all, segments) { const segment = segments[i]; dest.push(segment); - if (others.indexOf(segment) === -1) { + if (!others.includes(segment)) { all.push(segment); } } } /** - * Gets a loop-context for a `continue` statement. - * @param {CodePathState} state A state to get. - * @param {string} label The label of a `continue` statement. + * Gets a loop context for a `continue` statement based on a given label. + * @param {CodePathState} state The state to search within. + * @param {string|null} label The label of a `continue` statement. * @returns {LoopContext} A loop-context for a `continue` statement. */ function getContinueContext(state, label) { @@ -59,15 +668,15 @@ function getContinueContext(state, label) { context = context.upper; } - /* istanbul ignore next: foolproof (syntax error) */ + /* c8 ignore next */ return null; } /** * Gets a context for a `break` statement. - * @param {CodePathState} state A state to get. - * @param {string} label The label of a `break` statement. - * @returns {LoopContext|SwitchContext} A context for a `break` statement. + * @param {CodePathState} state The state to search within. + * @param {string|null} label The label of a `break` statement. + * @returns {BreakContext} A context for a `break` statement. */ function getBreakContext(state, label) { let context = state.breakContext; @@ -79,13 +688,15 @@ function getBreakContext(state, label) { context = context.upper; } - /* istanbul ignore next: foolproof (syntax error) */ + /* c8 ignore next */ return null; } /** - * Gets a context for a `return` statement. - * @param {CodePathState} state A state to get. + * Gets a context for a `return` statement. There is just one special case: + * if there is a `try` statement with a `finally` block, because that alters + * how `return` behaves; otherwise, this just passes through the given state. + * @param {CodePathState} state The state to search within * @returns {TryContext|CodePathState} A context for a `return` statement. */ function getReturnContext(state) { @@ -102,8 +713,11 @@ function getReturnContext(state) { } /** - * Gets a context for a `throw` statement. - * @param {CodePathState} state A state to get. + * Gets a context for a `throw` statement. There is just one special case: + * if there is a `try` statement with a `finally` block and we are inside of + * a `catch` because that changes how `throw` behaves; otherwise, this just + * passes through the given state. + * @param {CodePathState} state The state to search within. * @returns {TryContext|CodePathState} A context for a `throw` statement. */ function getThrowContext(state) { @@ -122,13 +736,13 @@ function getThrowContext(state) { } /** - * Removes a given element from a given array. - * @param {any[]} xs An array to remove the specific element. - * @param {any} x An element to be removed. + * Removes a given value from a given array. + * @param {any[]} elements An array to remove the specific element. + * @param {any} value The value to be removed. * @returns {void} */ -function remove(xs, x) { - xs.splice(xs.indexOf(x), 1); +function removeFromArray(elements, value) { + elements.splice(elements.indexOf(value), 1); } /** @@ -141,48 +755,77 @@ function remove(xs, x) { * @param {CodePathSegment[]} nextSegments Backward segments to disconnect. * @returns {void} */ -function removeConnection(prevSegments, nextSegments) { +function disconnectSegments(prevSegments, nextSegments) { for (let i = 0; i < prevSegments.length; ++i) { const prevSegment = prevSegments[i]; const nextSegment = nextSegments[i]; - remove(prevSegment.nextSegments, nextSegment); - remove(prevSegment.allNextSegments, nextSegment); - remove(nextSegment.prevSegments, prevSegment); - remove(nextSegment.allPrevSegments, prevSegment); + removeFromArray(prevSegment.nextSegments, nextSegment); + removeFromArray(prevSegment.allNextSegments, nextSegment); + removeFromArray(nextSegment.prevSegments, prevSegment); + removeFromArray(nextSegment.allPrevSegments, prevSegment); } } /** - * Creates looping path. - * @param {CodePathState} state The instance. + * Creates looping path between two arrays of segments, ensuring that there are + * paths going between matching segments in the arrays. + * @param {CodePathState} state The state to operate on. * @param {CodePathSegment[]} unflattenedFromSegments Segments which are source. * @param {CodePathSegment[]} unflattenedToSegments Segments which are destination. * @returns {void} */ function makeLooped(state, unflattenedFromSegments, unflattenedToSegments) { + const fromSegments = CodePathSegment.flattenUnusedSegments(unflattenedFromSegments); const toSegments = CodePathSegment.flattenUnusedSegments(unflattenedToSegments); - const end = Math.min(fromSegments.length, toSegments.length); + /* + * This loop effectively updates a doubly-linked list between two collections + * of segments making sure that segments in the same array indices are + * combined to create a path. + */ for (let i = 0; i < end; ++i) { + + // get the segments in matching array indices const fromSegment = fromSegments[i]; const toSegment = toSegments[i]; + /* + * If the destination segment is reachable, then create a path from the + * source segment to the destination segment. + */ if (toSegment.reachable) { fromSegment.nextSegments.push(toSegment); } + + /* + * If the source segment is reachable, then create a path from the + * destination segment back to the source segment. + */ if (fromSegment.reachable) { toSegment.prevSegments.push(fromSegment); } + + /* + * Also update the arrays that don't care if the segments are reachable + * or not. This should always happen regardless of anything else. + */ fromSegment.allNextSegments.push(toSegment); toSegment.allPrevSegments.push(fromSegment); + /* + * If the destination segment has at least two previous segments in its + * path then that means there was one previous segment before this iteration + * of the loop was executed. So, we need to mark the source segment as + * looped. + */ if (toSegment.allPrevSegments.length >= 2) { CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment); } + // let the code path analyzer know that there's been a loop created state.notifyLooped(fromSegment, toSegment); } } @@ -198,15 +841,27 @@ function makeLooped(state, unflattenedFromSegments, unflattenedToSegments) { * @returns {void} */ function finalizeTestSegmentsOfFor(context, choiceContext, head) { + + /* + * If this choice context doesn't already contain paths from a + * child context, then add the current head to each potential path. + */ if (!choiceContext.processed) { choiceContext.trueForkContext.add(head); choiceContext.falseForkContext.add(head); - choiceContext.qqForkContext.add(head); + choiceContext.nullishForkContext.add(head); } + /* + * If the test condition isn't a hardcoded truthy value, then `break` + * must follow the same path as if the test condition is false. To represent + * that, we append the path for when the loop test is false (represented by + * `falseForkContext`) to the `brokenForkContext`. + */ if (context.test !== true) { context.brokenForkContext.addAll(choiceContext.falseForkContext); } + context.endOfTestSegments = choiceContext.trueForkContext.makeNext(0, -1); } @@ -219,37 +874,125 @@ function finalizeTestSegmentsOfFor(context, choiceContext, head) { */ class CodePathState { - // eslint-disable-next-line jsdoc/require-description /** + * Creates a new instance. * @param {IdGenerator} idGenerator An id generator to generate id for code * path segments. * @param {Function} onLooped A callback function to notify looping. */ constructor(idGenerator, onLooped) { + + /** + * The ID generator to use when creating new segments. + * @type {IdGenerator} + */ this.idGenerator = idGenerator; + + /** + * A callback function to call when there is a loop. + * @type {Function} + */ this.notifyLooped = onLooped; + + /** + * The root fork context for this state. + * @type {ForkContext} + */ this.forkContext = ForkContext.newRoot(idGenerator); + + /** + * Context for logical expressions, conditional expressions, `if` statements, + * and loops. + * @type {ChoiceContext} + */ this.choiceContext = null; + + /** + * Context for `switch` statements. + * @type {SwitchContext} + */ this.switchContext = null; + + /** + * Context for `try` statements. + * @type {TryContext} + */ this.tryContext = null; + + /** + * Context for loop statements. + * @type {LoopContext} + */ this.loopContext = null; + + /** + * Context for `break` statements. + * @type {BreakContext} + */ this.breakContext = null; + + /** + * Context for `ChainExpression` nodes. + * @type {ChainContext} + */ this.chainContext = null; + /** + * An array that tracks the current segments in the state. The array + * starts empty and segments are added with each `onCodePathSegmentStart` + * event and removed with each `onCodePathSegmentEnd` event. Effectively, + * this is tracking the code path segment traversal as the state is + * modified. + * @type {Array} + */ this.currentSegments = []; + + /** + * Tracks the starting segment for this path. This value never changes. + * @type {CodePathSegment} + */ this.initialSegment = this.forkContext.head[0]; - // returnedSegments and thrownSegments push elements into finalSegments also. - const final = this.finalSegments = []; - const returned = this.returnedForkContext = []; - const thrown = this.thrownForkContext = []; + /** + * The final segments of the code path which are either `return` or `throw`. + * This is a union of the segments in `returnedForkContext` and `thrownForkContext`. + * @type {Array} + */ + this.finalSegments = []; + + /** + * The final segments of the code path which are `return`. These + * segments are also contained in `finalSegments`. + * @type {Array} + */ + this.returnedForkContext = []; + + /** + * The final segments of the code path which are `throw`. These + * segments are also contained in `finalSegments`. + * @type {Array} + */ + this.thrownForkContext = []; + + /* + * We add an `add` method so that these look more like fork contexts and + * can be used interchangeably when a fork context is needed to add more + * segments to a path. + * + * Ultimately, we want anything added to `returned` or `thrown` to also + * be added to `final`. We only add reachable and used segments to these + * arrays. + */ + const final = this.finalSegments; + const returned = this.returnedForkContext; + const thrown = this.thrownForkContext; returned.add = addToReturnedOrThrown.bind(null, returned, thrown, final); thrown.add = addToReturnedOrThrown.bind(null, thrown, returned, final); } /** - * The head segments. + * A passthrough property exposing the current pointer as part of the API. * @type {CodePathSegment[]} */ get headSegments() { @@ -342,76 +1085,72 @@ class CodePathState { * If the new context is LogicalExpression's or AssignmentExpression's, this is `"&&"` or `"||"` or `"??"`. * If it's IfStatement's or ConditionalExpression's, this is `"test"`. * Otherwise, this is `"loop"`. - * @param {boolean} isForkingAsResult A flag that shows that goes different - * paths between `true` and `false`. + * @param {boolean} isForkingAsResult Indicates if the result of the choice + * creates a fork. * @returns {void} */ pushChoiceContext(kind, isForkingAsResult) { - this.choiceContext = { - upper: this.choiceContext, - kind, - isForkingAsResult, - trueForkContext: ForkContext.newEmpty(this.forkContext), - falseForkContext: ForkContext.newEmpty(this.forkContext), - qqForkContext: ForkContext.newEmpty(this.forkContext), - processed: false - }; + this.choiceContext = new ChoiceContext(this.choiceContext, kind, isForkingAsResult, this.forkContext); } /** * Pops the last choice context and finalizes it. + * This is called upon leaving a node that represents a choice. + * @throws {Error} (Unreachable.) * @returns {ChoiceContext} The popped context. */ popChoiceContext() { - const context = this.choiceContext; - - this.choiceContext = context.upper; - + const poppedChoiceContext = this.choiceContext; const forkContext = this.forkContext; - const headSegments = forkContext.head; + const head = forkContext.head; - switch (context.kind) { + this.choiceContext = poppedChoiceContext.upper; + + switch (poppedChoiceContext.kind) { case "&&": case "||": case "??": /* - * If any result were not transferred from child contexts, - * this sets the head segments to both cases. - * The head segments are the path of the right-hand operand. + * The `head` are the path of the right-hand operand. + * If we haven't previously added segments from child contexts, + * then we add these segments to all possible forks. */ - if (!context.processed) { - context.trueForkContext.add(headSegments); - context.falseForkContext.add(headSegments); - context.qqForkContext.add(headSegments); + if (!poppedChoiceContext.processed) { + poppedChoiceContext.trueForkContext.add(head); + poppedChoiceContext.falseForkContext.add(head); + poppedChoiceContext.nullishForkContext.add(head); } /* - * Transfers results to upper context if this context is in - * test chunk. + * If this context is the left (test) expression for another choice + * context, such as `a || b` in the expression `a || b || c`, + * then we take the segments for this context and move them up + * to the parent context. */ - if (context.isForkingAsResult) { + if (poppedChoiceContext.isForkingAsResult) { const parentContext = this.choiceContext; - parentContext.trueForkContext.addAll(context.trueForkContext); - parentContext.falseForkContext.addAll(context.falseForkContext); - parentContext.qqForkContext.addAll(context.qqForkContext); + parentContext.trueForkContext.addAll(poppedChoiceContext.trueForkContext); + parentContext.falseForkContext.addAll(poppedChoiceContext.falseForkContext); + parentContext.nullishForkContext.addAll(poppedChoiceContext.nullishForkContext); parentContext.processed = true; - return context; + // Exit early so we don't collapse all paths into one. + return poppedChoiceContext; } break; case "test": - if (!context.processed) { + if (!poppedChoiceContext.processed) { /* * The head segments are the path of the `if` block here. * Updates the `true` path with the end of the `if` block. */ - context.trueForkContext.clear(); - context.trueForkContext.add(headSegments); + poppedChoiceContext.trueForkContext.clear(); + poppedChoiceContext.trueForkContext.add(head); } else { /* @@ -419,8 +1158,8 @@ class CodePathState { * Updates the `false` path with the end of the `else` * block. */ - context.falseForkContext.clear(); - context.falseForkContext.add(headSegments); + poppedChoiceContext.falseForkContext.clear(); + poppedChoiceContext.falseForkContext.add(head); } break; @@ -428,81 +1167,129 @@ class CodePathState { case "loop": /* - * Loops are addressed in popLoopContext(). - * This is called from popLoopContext(). + * Loops are addressed in `popLoopContext()` so just return + * the context without modification. */ - return context; + return poppedChoiceContext; - /* istanbul ignore next */ + /* c8 ignore next */ default: throw new Error("unreachable"); } - // Merges all paths. - const prevForkContext = context.trueForkContext; + /* + * Merge the true path with the false path to create a single path. + */ + const combinedForkContext = poppedChoiceContext.trueForkContext; - prevForkContext.addAll(context.falseForkContext); - forkContext.replaceHead(prevForkContext.makeNext(0, -1)); + combinedForkContext.addAll(poppedChoiceContext.falseForkContext); + forkContext.replaceHead(combinedForkContext.makeNext(0, -1)); - return context; + return poppedChoiceContext; } /** - * Makes a code path segment of the right-hand operand of a logical + * Creates a code path segment to represent right-hand operand of a logical * expression. + * This is called in the preprocessing phase when entering a node. + * @throws {Error} (Unreachable.) * @returns {void} */ makeLogicalRight() { - const context = this.choiceContext; + const currentChoiceContext = this.choiceContext; const forkContext = this.forkContext; - if (context.processed) { + if (currentChoiceContext.processed) { /* - * This got segments already from the child choice context. - * Creates the next path from own true/false fork context. + * This context was already assigned segments from a child + * choice context. In this case, we are concerned only about + * the path that does not short-circuit and so ends up on the + * right-hand operand of the logical expression. */ let prevForkContext; - switch (context.kind) { + switch (currentChoiceContext.kind) { case "&&": // if true then go to the right-hand side. - prevForkContext = context.trueForkContext; + prevForkContext = currentChoiceContext.trueForkContext; break; case "||": // if false then go to the right-hand side. - prevForkContext = context.falseForkContext; + prevForkContext = currentChoiceContext.falseForkContext; break; - case "??": // Both true/false can short-circuit, so needs the third path to go to the right-hand side. That's qqForkContext. - prevForkContext = context.qqForkContext; + case "??": // Both true/false can short-circuit, so needs the third path to go to the right-hand side. That's nullishForkContext. + prevForkContext = currentChoiceContext.nullishForkContext; break; default: throw new Error("unreachable"); } + /* + * Create the segment for the right-hand operand of the logical expression + * and adjust the fork context pointer to point there. The right-hand segment + * is added at the end of all segments in `prevForkContext`. + */ forkContext.replaceHead(prevForkContext.makeNext(0, -1)); + + /* + * We no longer need this list of segments. + * + * Reset `processed` because we've removed the segments from the child + * choice context. This allows `popChoiceContext()` to continue adding + * segments later. + */ prevForkContext.clear(); - context.processed = false; + currentChoiceContext.processed = false; + } else { /* - * This did not get segments from the child choice context. - * So addresses the head segments. - * The head segments are the path of the left-hand operand. + * This choice context was not assigned segments from a child + * choice context, which means that it's a terminal logical + * expression. + * + * `head` is the segments for the left-hand operand of the + * logical expression. + * + * Each of the fork contexts below are empty at this point. We choose + * the path(s) that will short-circuit and add the segment for the + * left-hand operand to it. Ultimately, this will be the only segment + * in that path due to the short-circuting, so we are just seeding + * these paths to start. */ - switch (context.kind) { - case "&&": // the false path can short-circuit. - context.falseForkContext.add(forkContext.head); + switch (currentChoiceContext.kind) { + case "&&": + + /* + * In most contexts, when a && expression evaluates to false, + * it short circuits, so we need to account for that by setting + * the `falseForkContext` to the left operand. + * + * When a && expression is the left-hand operand for a ?? + * expression, such as `(a && b) ?? c`, a nullish value will + * also short-circuit in a different way than a false value, + * so we also set the `nullishForkContext` to the left operand. + * This path is only used with a ?? expression and is thrown + * away for any other type of logical expression, so it's safe + * to always add. + */ + currentChoiceContext.falseForkContext.add(forkContext.head); + currentChoiceContext.nullishForkContext.add(forkContext.head); break; case "||": // the true path can short-circuit. - context.trueForkContext.add(forkContext.head); + currentChoiceContext.trueForkContext.add(forkContext.head); break; case "??": // both can short-circuit. - context.trueForkContext.add(forkContext.head); - context.falseForkContext.add(forkContext.head); + currentChoiceContext.trueForkContext.add(forkContext.head); + currentChoiceContext.falseForkContext.add(forkContext.head); break; default: throw new Error("unreachable"); } + /* + * Create the segment for the right-hand operand of the logical expression + * and adjust the fork context pointer to point there. + */ forkContext.replaceHead(forkContext.makeNext(-1, -1)); } } @@ -523,7 +1310,7 @@ class CodePathState { if (!context.processed) { context.trueForkContext.add(forkContext.head); context.falseForkContext.add(forkContext.head); - context.qqForkContext.add(forkContext.head); + context.nullishForkContext.add(forkContext.head); } context.processed = false; @@ -561,22 +1348,20 @@ class CodePathState { //-------------------------------------------------------------------------- /** - * Push a new `ChainExpression` context to the stack. - * This method is called on entering to each `ChainExpression` node. - * This context is used to count forking in the optional chain then merge them on the exiting from the `ChainExpression` node. + * Pushes a new `ChainExpression` context to the stack. This method is + * called when entering a `ChainExpression` node. A chain context is used to + * count forking in the optional chain then merge them on the exiting from the + * `ChainExpression` node. * @returns {void} */ pushChainContext() { - this.chainContext = { - upper: this.chainContext, - countChoiceContexts: 0 - }; + this.chainContext = new ChainContext(this.chainContext); } /** - * Pop a `ChainExpression` context from the stack. - * This method is called on exiting from each `ChainExpression` node. - * This merges all forks of the last optional chaining. + * Pop a `ChainExpression` context from the stack. This method is called on + * exiting from each `ChainExpression` node. This merges all forks of the + * last optional chaining. * @returns {void} */ popChainContext() { @@ -585,7 +1370,7 @@ class CodePathState { this.chainContext = context.upper; // pop all choice contexts of this. - for (let i = context.countChoiceContexts; i > 0; --i) { + for (let i = context.choiceContextCount; i > 0; --i) { this.popChoiceContext(); } } @@ -598,7 +1383,7 @@ class CodePathState { */ makeOptionalNode() { if (this.chainContext) { - this.chainContext.countChoiceContexts += 1; + this.chainContext.choiceContextCount += 1; this.pushChoiceContext("??", false); } } @@ -626,16 +1411,7 @@ class CodePathState { * @returns {void} */ pushSwitchContext(hasCase, label) { - this.switchContext = { - upper: this.switchContext, - hasCase, - defaultSegments: null, - defaultBodySegments: null, - foundDefault: false, - lastIsDefault: false, - countForks: 0 - }; - + this.switchContext = new SwitchContext(this.switchContext, hasCase); this.pushBreakContext(true, label); } @@ -656,7 +1432,7 @@ class CodePathState { const forkContext = this.forkContext; const brokenForkContext = this.popBreakContext().brokenForkContext; - if (context.countForks === 0) { + if (context.forkCount === 0) { /* * When there is only one `default` chunk and there is one or more @@ -683,47 +1459,54 @@ class CodePathState { brokenForkContext.add(lastSegments); /* - * A path which is failed in all case test should be connected to path - * of `default` chunk. + * Any value that doesn't match a `case` test should flow to the default + * case. That happens normally when the default case is last in the `switch`, + * but if it's not, we need to rewire some of the paths to be correct. */ if (!context.lastIsDefault) { if (context.defaultBodySegments) { /* - * Remove a link from `default` label to its chunk. - * It's false route. + * There is a non-empty default case, so remove the path from the `default` + * label to its body for an accurate representation. + */ + disconnectSegments(context.defaultSegments, context.defaultBodySegments); + + /* + * Connect the path from the last non-default case to the body of the + * default case. */ - removeConnection(context.defaultSegments, context.defaultBodySegments); makeLooped(this, lastCaseSegments, context.defaultBodySegments); + } else { /* - * It handles the last case body as broken if `default` chunk - * does not exist. + * There is no default case, so we treat this as if the last case + * had a `break` in it. */ brokenForkContext.add(lastCaseSegments); } } - // Pops the segment context stack until the entry segment. - for (let i = 0; i < context.countForks; ++i) { + // Traverse up to the original fork context for the `switch` statement + for (let i = 0; i < context.forkCount; ++i) { this.forkContext = this.forkContext.upper; } /* - * Creates a path from all brokenForkContext paths. - * This is a path after switch statement. + * Creates a path from all `brokenForkContext` paths. + * This is a path after `switch` statement. */ this.forkContext.replaceHead(brokenForkContext.makeNext(0, -1)); } /** * Makes a code path segment for a `SwitchCase` node. - * @param {boolean} isEmpty `true` if the body is empty. - * @param {boolean} isDefault `true` if the body is the default case. + * @param {boolean} isCaseBodyEmpty `true` if the body is empty. + * @param {boolean} isDefaultCase `true` if the body is the default case. * @returns {void} */ - makeSwitchCaseBody(isEmpty, isDefault) { + makeSwitchCaseBody(isCaseBodyEmpty, isDefaultCase) { const context = this.switchContext; if (!context.hasCase) { @@ -733,7 +1516,7 @@ class CodePathState { /* * Merge forks. * The parent fork context has two segments. - * Those are from the current case and the body of the previous case. + * Those are from the current `case` and the body of the previous case. */ const parentForkContext = this.forkContext; const forkContext = this.pushForkContext(); @@ -741,26 +1524,53 @@ class CodePathState { forkContext.add(parentForkContext.makeNext(0, -1)); /* - * Save `default` chunk info. - * If the `default` label is not at the last, we must make a path from - * the last `case` to the `default` chunk. + * Add information about the default case. + * + * The purpose of this is to identify the starting segments for the + * default case to make sure there is a path there. */ - if (isDefault) { + if (isDefaultCase) { + + /* + * This is the default case in the `switch`. + * + * We first save the current pointer as `defaultSegments` to point + * to the `default` keyword. + */ context.defaultSegments = parentForkContext.head; - if (isEmpty) { - context.foundDefault = true; + + /* + * If the body of the case is empty then we just set + * `foundEmptyDefault` to true; otherwise, we save a reference + * to the current pointer as `defaultBodySegments`. + */ + if (isCaseBodyEmpty) { + context.foundEmptyDefault = true; } else { context.defaultBodySegments = forkContext.head; } + } else { - if (!isEmpty && context.foundDefault) { - context.foundDefault = false; + + /* + * This is not the default case in the `switch`. + * + * If it's not empty and there is already an empty default case found, + * that means the default case actually comes before this case, + * and that it will fall through to this case. So, we can now + * ignore the previous default case (reset `foundEmptyDefault` to false) + * and set `defaultBodySegments` to the current segments because this is + * effectively the new default case. + */ + if (!isCaseBodyEmpty && context.foundEmptyDefault) { + context.foundEmptyDefault = false; context.defaultBodySegments = forkContext.head; } } - context.lastIsDefault = isDefault; - context.countForks += 1; + // keep track if the default case ends up last + context.lastIsDefault = isDefaultCase; + context.forkCount += 1; } //-------------------------------------------------------------------------- @@ -774,19 +1584,7 @@ class CodePathState { * @returns {void} */ pushTryContext(hasFinalizer) { - this.tryContext = { - upper: this.tryContext, - position: "try", - hasFinalizer, - - returnedForkContext: hasFinalizer - ? ForkContext.newEmpty(this.forkContext) - : null, - - thrownForkContext: ForkContext.newEmpty(this.forkContext), - lastOfTryIsReachable: false, - lastOfCatchIsReachable: false - }; + this.tryContext = new TryContext(this.tryContext, hasFinalizer, this.forkContext); } /** @@ -798,25 +1596,35 @@ class CodePathState { this.tryContext = context.upper; + /* + * If we're inside the `catch` block, that means there is no `finally`, + * so we can process the `try` and `catch` blocks the simple way and + * merge their two paths. + */ if (context.position === "catch") { - - // Merges two paths from the `try` block and `catch` block merely. this.popForkContext(); return; } /* - * The following process is executed only when there is the `finally` + * The following process is executed only when there is a `finally` * block. */ - const returned = context.returnedForkContext; - const thrown = context.thrownForkContext; + const originalReturnedForkContext = context.returnedForkContext; + const originalThrownForkContext = context.thrownForkContext; - if (returned.empty && thrown.empty) { + // no `return` or `throw` in `try` or `catch` so there's nothing left to do + if (originalReturnedForkContext.empty && originalThrownForkContext.empty) { return; } + /* + * The following process is executed only when there is a `finally` + * block and there was a `return` or `throw` in the `try` or `catch` + * blocks. + */ + // Separate head to normal paths and leaving paths. const headSegments = this.forkContext.head; @@ -825,10 +1633,10 @@ class CodePathState { const leavingSegments = headSegments.slice(headSegments.length / 2 | 0); // Forwards the leaving path to upper contexts. - if (!returned.empty) { + if (!originalReturnedForkContext.empty) { getReturnContext(this).returnedForkContext.add(leavingSegments); } - if (!thrown.empty) { + if (!originalThrownForkContext.empty) { getThrowContext(this).thrownForkContext.add(leavingSegments); } @@ -851,16 +1659,20 @@ class CodePathState { makeCatchBlock() { const context = this.tryContext; const forkContext = this.forkContext; - const thrown = context.thrownForkContext; + const originalThrownForkContext = context.thrownForkContext; - // Update state. + /* + * We are now in a catch block so we need to update the context + * with that information. This includes creating a new fork + * context in case we encounter any `throw` statements here. + */ context.position = "catch"; context.thrownForkContext = ForkContext.newEmpty(forkContext); context.lastOfTryIsReachable = forkContext.reachable; - // Merge thrown paths. - thrown.add(forkContext.head); - const thrownSegments = thrown.makeNext(0, -1); + // Merge the thrown paths from the `try` and `catch` blocks + originalThrownForkContext.add(forkContext.head); + const thrownSegments = originalThrownForkContext.makeNext(0, -1); // Fork to a bypass and the merged thrown path. this.pushForkContext(); @@ -879,8 +1691,8 @@ class CodePathState { makeFinallyBlock() { const context = this.tryContext; let forkContext = this.forkContext; - const returned = context.returnedForkContext; - const thrown = context.thrownForkContext; + const originalReturnedForkContext = context.returnedForkContext; + const originalThrownForContext = context.thrownForkContext; const headOfLeavingSegments = forkContext.head; // Update state. @@ -894,9 +1706,15 @@ class CodePathState { } else { context.lastOfTryIsReachable = forkContext.reachable; } + + context.position = "finally"; - if (returned.empty && thrown.empty) { + /* + * If there was no `return` or `throw` in either the `try` or `catch` + * blocks, then there's no further code paths to create for `finally`. + */ + if (originalReturnedForkContext.empty && originalThrownForContext.empty) { // This path does not leave. return; @@ -904,18 +1722,18 @@ class CodePathState { /* * Create a parallel segment from merging returned and thrown. - * This segment will leave at the end of this finally block. + * This segment will leave at the end of this `finally` block. */ const segments = forkContext.makeNext(-1, -1); for (let i = 0; i < forkContext.count; ++i) { const prevSegsOfLeavingSegment = [headOfLeavingSegments[i]]; - for (let j = 0; j < returned.segmentsList.length; ++j) { - prevSegsOfLeavingSegment.push(returned.segmentsList[j][i]); + for (let j = 0; j < originalReturnedForkContext.segmentsList.length; ++j) { + prevSegsOfLeavingSegment.push(originalReturnedForkContext.segmentsList[j][i]); } - for (let j = 0; j < thrown.segmentsList.length; ++j) { - prevSegsOfLeavingSegment.push(thrown.segmentsList[j][i]); + for (let j = 0; j < originalThrownForContext.segmentsList.length; ++j) { + prevSegsOfLeavingSegment.push(originalThrownForContext.segmentsList[j][i]); } segments.push( @@ -965,70 +1783,40 @@ class CodePathState { * `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`, * and `ForStatement`. * @param {string|null} label A label of the node which was triggered. + * @throws {Error} (Unreachable - unknown type.) * @returns {void} */ pushLoopContext(type, label) { const forkContext = this.forkContext; + + // All loops need a path to account for `break` statements const breakContext = this.pushBreakContext(true, label); switch (type) { case "WhileStatement": this.pushChoiceContext("loop", false); - this.loopContext = { - upper: this.loopContext, - type, - label, - test: void 0, - continueDestSegments: null, - brokenForkContext: breakContext.brokenForkContext - }; + this.loopContext = new WhileLoopContext(this.loopContext, label, breakContext); break; case "DoWhileStatement": this.pushChoiceContext("loop", false); - this.loopContext = { - upper: this.loopContext, - type, - label, - test: void 0, - entrySegments: null, - continueForkContext: ForkContext.newEmpty(forkContext), - brokenForkContext: breakContext.brokenForkContext - }; + this.loopContext = new DoWhileLoopContext(this.loopContext, label, breakContext, forkContext); break; case "ForStatement": this.pushChoiceContext("loop", false); - this.loopContext = { - upper: this.loopContext, - type, - label, - test: void 0, - endOfInitSegments: null, - testSegments: null, - endOfTestSegments: null, - updateSegments: null, - endOfUpdateSegments: null, - continueDestSegments: null, - brokenForkContext: breakContext.brokenForkContext - }; + this.loopContext = new ForLoopContext(this.loopContext, label, breakContext); break; case "ForInStatement": + this.loopContext = new ForInLoopContext(this.loopContext, label, breakContext); + break; + case "ForOfStatement": - this.loopContext = { - upper: this.loopContext, - type, - label, - prevSegments: null, - leftSegments: null, - endOfLeftSegments: null, - continueDestSegments: null, - brokenForkContext: breakContext.brokenForkContext - }; + this.loopContext = new ForOfLoopContext(this.loopContext, label, breakContext); break; - /* istanbul ignore next */ + /* c8 ignore next */ default: throw new Error(`unknown type: "${type}"`); } @@ -1036,6 +1824,7 @@ class CodePathState { /** * Pops the last context of a loop statement and finalizes it. + * @throws {Error} (Unreachable - unknown type.) * @returns {void} */ popLoopContext() { @@ -1051,6 +1840,11 @@ class CodePathState { case "WhileStatement": case "ForStatement": this.popChoiceContext(); + + /* + * Creates the path from the end of the loop body up to the + * location where `continue` would jump to. + */ makeLooped( this, forkContext.head, @@ -1065,11 +1859,21 @@ class CodePathState { choiceContext.trueForkContext.add(forkContext.head); choiceContext.falseForkContext.add(forkContext.head); } + + /* + * If this isn't a hardcoded `true` condition, then `break` + * should continue down the path as if the condition evaluated + * to false. + */ if (context.test !== true) { brokenForkContext.addAll(choiceContext.falseForkContext); } - // `true` paths go to looping. + /* + * When the condition is true, the loop continues back to the top, + * so create a path from each possible true condition back to the + * top of the loop. + */ const segmentsList = choiceContext.trueForkContext.segmentsList; for (let i = 0; i < segmentsList.length; ++i) { @@ -1085,6 +1889,11 @@ class CodePathState { case "ForInStatement": case "ForOfStatement": brokenForkContext.add(forkContext.head); + + /* + * Creates the path from the end of the loop body up to the + * left expression (left of `in` or `of`) of the loop. + */ makeLooped( this, forkContext.head, @@ -1092,12 +1901,19 @@ class CodePathState { ); break; - /* istanbul ignore next */ + /* c8 ignore next */ default: throw new Error("unreachable"); } - // Go next. + /* + * If there wasn't a `break` statement in the loop, then we're at + * the end of the loop's path, so we make an unreachable segment + * to mark that. + * + * If there was a `break` statement, then we continue on into the + * `brokenForkContext`. + */ if (brokenForkContext.empty) { forkContext.replaceHead(forkContext.makeUnreachable(-1, -1)); } else { @@ -1135,7 +1951,11 @@ class CodePathState { choiceContext.falseForkContext.add(forkContext.head); } - // Update state. + /* + * If this isn't a hardcoded `true` condition, then `break` + * should continue down the path as if the condition evaluated + * to false. + */ if (context.test !== true) { context.brokenForkContext.addAll(choiceContext.falseForkContext); } @@ -1167,7 +1987,11 @@ class CodePathState { context.test = test; - // Creates paths of `continue` statements. + /* + * If there is a `continue` statement in the loop then `continueForkContext` + * won't be empty. We wire up the path from `continue` to the loop + * test condition and then continue the traversal in the root fork context. + */ if (!context.continueForkContext.empty) { context.continueForkContext.add(forkContext.head); const testSegments = context.continueForkContext.makeNext(0, -1); @@ -1187,7 +2011,14 @@ class CodePathState { const endOfInitSegments = forkContext.head; const testSegments = forkContext.makeNext(-1, -1); - // Update state. + /* + * Update the state. + * + * The `continueDestSegments` are set to `testSegments` because we + * don't yet know if there is an update expression in this loop. So, + * from what we already know at this point, a `continue` statement + * will jump back to the test expression. + */ context.test = test; context.endOfInitSegments = endOfInitSegments; context.continueDestSegments = context.testSegments = testSegments; @@ -1214,7 +2045,14 @@ class CodePathState { context.endOfInitSegments = forkContext.head; } - // Update state. + /* + * Update the state. + * + * The `continueDestSegments` are now set to `updateSegments` because we + * know there is an update expression in this loop. So, a `continue` statement + * in the loop will jump to the update expression first, and then to any + * test expression the loop might have. + */ const updateSegments = forkContext.makeDisconnected(-1, -1); context.continueDestSegments = context.updateSegments = updateSegments; @@ -1230,11 +2068,30 @@ class CodePathState { const choiceContext = this.choiceContext; const forkContext = this.forkContext; - // Update state. + /* + * Determine what to do based on which part of the `for` loop are present. + * 1. If there is an update expression, then `updateSegments` is not null and + * we need to assign `endOfUpdateSegments`, and if there is a test + * expression, we then need to create the looped path to get back to + * the test condition. + * 2. If there is no update expression but there is a test expression, + * then we only need to update the test segment information. + * 3. If there is no update expression and no test expression, then we + * just save `endOfInitSegments`. + */ if (context.updateSegments) { context.endOfUpdateSegments = forkContext.head; - // `update` -> `test` + /* + * In a `for` loop that has both an update expression and a test + * condition, execution flows from the test expression into the + * loop body, to the update expression, and then back to the test + * expression to determine if the loop should continue. + * + * To account for that, we need to make a path from the end of the + * update expression to the start of the test expression. This is + * effectively what creates the loop in the code path. + */ if (context.testSegments) { makeLooped( this, @@ -1254,12 +2111,18 @@ class CodePathState { let bodySegments = context.endOfTestSegments; + /* + * If there is a test condition, then there `endOfTestSegments` is also + * the start of the loop body. If there isn't a test condition then + * `bodySegments` will be null and we need to look elsewhere to find + * the start of the body. + * + * The body starts at the end of the init expression and ends at the end + * of the update expression, so we use those locations to determine the + * body segments. + */ if (!bodySegments) { - /* - * If there is not the `test` part, the `body` path comes from the - * `init` part and the `update` part. - */ const prevForkContext = ForkContext.newEmpty(forkContext); prevForkContext.add(context.endOfInitSegments); @@ -1269,7 +2132,16 @@ class CodePathState { bodySegments = prevForkContext.makeNext(0, -1); } + + /* + * If there was no test condition and no update expression, then + * `continueDestSegments` will be null. In that case, a + * `continue` should skip directly to the body of the loop. + * Otherwise, we want to keep the current `continueDestSegments`. + */ context.continueDestSegments = context.continueDestSegments || bodySegments; + + // move pointer to the body forkContext.replaceHead(bodySegments); } @@ -1333,19 +2205,15 @@ class CodePathState { //-------------------------------------------------------------------------- /** - * Creates new context for BreakStatement. - * @param {boolean} breakable The flag to indicate it can break by - * an unlabeled BreakStatement. - * @param {string|null} label The label of this context. - * @returns {Object} The new context. + * Creates new context in which a `break` statement can be used. This occurs inside of a loop, + * labeled statement, or switch statement. + * @param {boolean} breakable Indicates if we are inside a statement where + * `break` without a label will exit the statement. + * @param {string|null} label The label associated with the statement. + * @returns {BreakContext} The new context. */ pushBreakContext(breakable, label) { - this.breakContext = { - upper: this.breakContext, - breakable, - label, - brokenForkContext: ForkContext.newEmpty(this.forkContext) - }; + this.breakContext = new BreakContext(this.breakContext, breakable, label, this.forkContext); return this.breakContext; } @@ -1377,7 +2245,7 @@ class CodePathState { * * It registers the head segment to a context of `break`. * It makes new unreachable segment, then it set the head with the segment. - * @param {string} label A label of the break statement. + * @param {string|null} label A label of the break statement. * @returns {void} */ makeBreak(label) { @@ -1389,11 +2257,12 @@ class CodePathState { const context = getBreakContext(this, label); - /* istanbul ignore else: foolproof (syntax error) */ + if (context) { context.brokenForkContext.add(forkContext.head); } + /* c8 ignore next */ forkContext.replaceHead(forkContext.makeUnreachable(-1, -1)); } @@ -1402,7 +2271,7 @@ class CodePathState { * * It makes a looping path. * It makes new unreachable segment, then it set the head with the segment. - * @param {string} label A label of the continue statement. + * @param {string|null} label A label of the continue statement. * @returns {void} */ makeContinue(label) { @@ -1414,12 +2283,11 @@ class CodePathState { const context = getContinueContext(this, label); - /* istanbul ignore else: foolproof (syntax error) */ if (context) { if (context.continueDestSegments) { makeLooped(this, forkContext.head, context.continueDestSegments); - // If the context is a for-in/of loop, this effects a break also. + // If the context is a for-in/of loop, this affects a break also. if (context.type === "ForInStatement" || context.type === "ForOfStatement" ) { diff --git a/node_modules/eslint/lib/linter/code-path-analysis/code-path.js b/node_modules/eslint/lib/linter/code-path-analysis/code-path.js index 49b37c6b2..3bf570d75 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/code-path.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/code-path.js @@ -21,13 +21,15 @@ const IdGenerator = require("./id-generator"); */ class CodePath { - // eslint-disable-next-line jsdoc/require-description /** - * @param {string} id An identifier. - * @param {CodePath|null} upper The code path of the upper function scope. - * @param {Function} onLooped A callback function to notify looping. + * Creates a new instance. + * @param {Object} options Options for the function (see below). + * @param {string} options.id An identifier. + * @param {string} options.origin The type of code path origin. + * @param {CodePath|null} options.upper The code path of the upper function scope. + * @param {Function} options.onLooped A callback function to notify looping. */ - constructor(id, upper, onLooped) { + constructor({ id, origin, upper, onLooped }) { /** * The identifier of this code path. @@ -36,6 +38,13 @@ class CodePath { */ this.id = id; + /** + * The reason that this code path was started. May be "program", + * "function", "class-field-initializer", or "class-static-block". + * @type {string} + */ + this.origin = origin; + /** * The code path of the upper function scope. * @type {CodePath|null} @@ -71,7 +80,9 @@ class CodePath { } /** - * The initial code path segment. + * The initial code path segment. This is the segment that is at the head + * of the code path. + * This is a passthrough to the underlying `CodePathState`. * @type {CodePathSegment} */ get initialSegment() { @@ -79,8 +90,10 @@ class CodePath { } /** - * Final code path segments. - * This array is a mix of `returnedSegments` and `thrownSegments`. + * Final code path segments. These are the terminal (tail) segments in the + * code path, which is the combination of `returnedSegments` and `thrownSegments`. + * All segments in this array are reachable. + * This is a passthrough to the underlying `CodePathState`. * @type {CodePathSegment[]} */ get finalSegments() { @@ -88,9 +101,14 @@ class CodePath { } /** - * Final code path segments which is with `return` statements. - * This array contains the last path segment if it's reachable. - * Since the reachable last path returns `undefined`. + * Final code path segments that represent normal completion of the code path. + * For functions, this means both explicit `return` statements and implicit returns, + * such as the last reachable segment in a function that does not have an + * explicit `return` as this implicitly returns `undefined`. For scripts, + * modules, class field initializers, and class static blocks, this means + * all lines of code have been executed. + * These segments are also present in `finalSegments`. + * This is a passthrough to the underlying `CodePathState`. * @type {CodePathSegment[]} */ get returnedSegments() { @@ -98,7 +116,9 @@ class CodePath { } /** - * Final code path segments which is with `throw` statements. + * Final code path segments that represent `throw` statements. + * This is a passthrough to the underlying `CodePathState`. + * These segments are also present in `finalSegments`. * @type {CodePathSegment[]} */ get thrownSegments() { @@ -106,8 +126,14 @@ class CodePath { } /** - * Current code path segments. + * Tracks the traversal of the code path through each segment. This array + * starts empty and segments are added or removed as the code path is + * traversed. This array always ends up empty at the end of a code path + * traversal. The `CodePathState` uses this to track its progress through + * the code path. + * This is a passthrough to the underlying `CodePathState`. * @type {CodePathSegment[]} + * @deprecated */ get currentSegments() { return this.internal.currentSegments; @@ -116,46 +142,70 @@ class CodePath { /** * Traverses all segments in this code path. * - * codePath.traverseSegments(function(segment, controller) { + * codePath.traverseSegments((segment, controller) => { * // do something. * }); * * This method enumerates segments in order from the head. * - * The `controller` object has two methods. + * The `controller` argument has two methods: + * + * - `skip()` - skips the following segments in this branch + * - `break()` - skips all following segments in the traversal * - * - `controller.skip()` - Skip the following segments in this branch. - * - `controller.break()` - Skip all following segments. - * @param {Object} [options] Omittable. - * @param {CodePathSegment} [options.first] The first segment to traverse. - * @param {CodePathSegment} [options.last] The last segment to traverse. + * A note on the parameters: the `options` argument is optional. This means + * the first argument might be an options object or the callback function. + * @param {Object} [optionsOrCallback] Optional first and last segments to traverse. + * @param {CodePathSegment} [optionsOrCallback.first] The first segment to traverse. + * @param {CodePathSegment} [optionsOrCallback.last] The last segment to traverse. * @param {Function} callback A callback function. * @returns {void} */ - traverseSegments(options, callback) { + traverseSegments(optionsOrCallback, callback) { + + // normalize the arguments into a callback and options let resolvedOptions; let resolvedCallback; - if (typeof options === "function") { - resolvedCallback = options; + if (typeof optionsOrCallback === "function") { + resolvedCallback = optionsOrCallback; resolvedOptions = {}; } else { - resolvedOptions = options || {}; + resolvedOptions = optionsOrCallback || {}; resolvedCallback = callback; } + // determine where to start traversing from based on the options const startSegment = resolvedOptions.first || this.internal.initialSegment; const lastSegment = resolvedOptions.last; - let item = null; + // set up initial location information + let record = null; let index = 0; let end = 0; let segment = null; - const visited = Object.create(null); + + // segments that have already been visited during traversal + const visited = new Set(); + + // tracks the traversal steps const stack = [[startSegment, 0]]; + + // tracks the last skipped segment during traversal let skippedSegment = null; + + // indicates if we exited early from the traversal let broken = false; + + /** + * Maintains traversal state. + */ const controller = { + + /** + * Skip the following segments in this branch. + * @returns {void} + */ skip() { if (stack.length <= 1) { broken = true; @@ -163,32 +213,52 @@ class CodePath { skippedSegment = stack[stack.length - 2][0]; } }, + + /** + * Stop traversal completely - do not traverse to any + * other segments. + * @returns {void} + */ break() { broken = true; } }; /** - * Checks a given previous segment has been visited. + * Checks if a given previous segment has been visited. * @param {CodePathSegment} prevSegment A previous segment to check. * @returns {boolean} `true` if the segment has been visited. */ function isVisited(prevSegment) { return ( - visited[prevSegment.id] || + visited.has(prevSegment) || segment.isLoopedPrevSegment(prevSegment) ); } + // the traversal while (stack.length > 0) { - item = stack[stack.length - 1]; - segment = item[0]; - index = item[1]; + + /* + * This isn't a pure stack. We use the top record all the time + * but don't always pop it off. The record is popped only if + * one of the following is true: + * + * 1) We have already visited the segment. + * 2) We have not visited *all* of the previous segments. + * 3) We have traversed past the available next segments. + * + * Otherwise, we just read the value and sometimes modify the + * record as we traverse. + */ + record = stack[stack.length - 1]; + segment = record[0]; + index = record[1]; if (index === 0) { // Skip if this segment has been visited already. - if (visited[segment.id]) { + if (visited.has(segment)) { stack.pop(); continue; } @@ -202,18 +272,29 @@ class CodePath { continue; } - // Reset the flag of skipping if all branches have been skipped. - if (skippedSegment && segment.prevSegments.indexOf(skippedSegment) !== -1) { + // Reset the skipping flag if all branches have been skipped. + if (skippedSegment && segment.prevSegments.includes(skippedSegment)) { skippedSegment = null; } - visited[segment.id] = true; + visited.add(segment); - // Call the callback when the first time. + /* + * If the most recent segment hasn't been skipped, then we call + * the callback, passing in the segment and the controller. + */ if (!skippedSegment) { resolvedCallback.call(this, segment, controller); + + // exit if we're at the last segment if (segment === lastSegment) { controller.skip(); } + + /* + * If the previous statement was executed, or if the callback + * called a method on the controller, we might need to exit the + * loop, so check for that and break accordingly. + */ if (broken) { break; } @@ -223,12 +304,35 @@ class CodePath { // Update the stack. end = segment.nextSegments.length - 1; if (index < end) { - item[1] += 1; + + /* + * If we haven't yet visited all of the next segments, update + * the current top record on the stack to the next index to visit + * and then push a record for the current segment on top. + * + * Setting the current top record's index lets us know how many + * times we've been here and ensures that the segment won't be + * reprocessed (because we only process segments with an index + * of 0). + */ + record[1] += 1; stack.push([segment.nextSegments[index], 0]); } else if (index === end) { - item[0] = segment.nextSegments[index]; - item[1] = 0; + + /* + * If we are at the last next segment, then reset the top record + * in the stack to next segment and set its index to 0 so it will + * be processed next. + */ + record[0] = segment.nextSegments[index]; + record[1] = 0; } else { + + /* + * If index > end, that means we have no more segments that need + * processing. So, we pop that record off of the stack in order to + * continue traversing at the next level up. + */ stack.pop(); } } diff --git a/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js b/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js index a4cb99a22..c0e01a824 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/debug-helpers.js @@ -20,8 +20,8 @@ const debug = require("debug")("eslint:code-path"); * @param {CodePathSegment} segment A segment to get. * @returns {string} Id of the segment. */ -/* istanbul ignore next */ -function getId(segment) { // eslint-disable-line jsdoc/require-jsdoc +/* c8 ignore next */ +function getId(segment) { // eslint-disable-line jsdoc/require-jsdoc -- Ignoring return segment.id + (segment.reachable ? "" : "!"); } @@ -67,7 +67,7 @@ module.exports = { * @param {boolean} leaving A flag whether or not it's leaving * @returns {void} */ - dumpState: !debug.enabled ? debug : /* istanbul ignore next */ function(node, state, leaving) { + dumpState: !debug.enabled ? debug : /* c8 ignore next */ function(node, state, leaving) { for (let i = 0; i < state.currentSegments.length; ++i) { const segInternal = state.currentSegments[i].internal; @@ -98,7 +98,7 @@ module.exports = { * @see http://www.graphviz.org * @see http://www.webgraphviz.com */ - dumpDot: !debug.enabled ? debug : /* istanbul ignore next */ function(codePath) { + dumpDot: !debug.enabled ? debug : /* c8 ignore next */ function(codePath) { let text = "\n" + "digraph {\n" + @@ -109,13 +109,13 @@ module.exports = { text += "final[label=\"\",shape=doublecircle,style=filled,fillcolor=black,width=0.25,height=0.25];\n"; } if (codePath.thrownSegments.length > 0) { - text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize];\n"; + text += "thrown[label=\"✘\",shape=circle,width=0.3,height=0.3,fixedsize=true];\n"; } const traceMap = Object.create(null); const arrows = this.makeDotArrows(codePath, traceMap); - for (const id in traceMap) { // eslint-disable-line guard-for-in + for (const id in traceMap) { // eslint-disable-line guard-for-in -- Want ability to traverse prototype const segment = traceMap[id]; text += `${id}[`; diff --git a/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js b/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js index 2e872b5c0..33140272f 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/fork-context.js @@ -21,8 +21,8 @@ const assert = require("assert"), //------------------------------------------------------------------------------ /** - * Gets whether or not a given segment is reachable. - * @param {CodePathSegment} segment A segment to get. + * Determines whether or not a given segment is reachable. + * @param {CodePathSegment} segment The segment to check. * @returns {boolean} `true` if the segment is reachable. */ function isReachable(segment) { @@ -30,32 +30,64 @@ function isReachable(segment) { } /** - * Creates new segments from the specific range of `context.segmentsList`. + * Creates a new segment for each fork in the given context and appends it + * to the end of the specified range of segments. Ultimately, this ends up calling + * `new CodePathSegment()` for each of the forks using the `create` argument + * as a wrapper around special behavior. + * + * The `startIndex` and `endIndex` arguments specify a range of segments in + * `context` that should become `allPrevSegments` for the newly created + * `CodePathSegment` objects. * * When `context.segmentsList` is `[[a, b], [c, d], [e, f]]`, `begin` is `0`, and - * `end` is `-1`, this creates `[g, h]`. This `g` is from `a`, `c`, and `e`. - * This `h` is from `b`, `d`, and `f`. - * @param {ForkContext} context An instance. - * @param {number} begin The first index of the previous segments. - * @param {number} end The last index of the previous segments. - * @param {Function} create A factory function of new segments. - * @returns {CodePathSegment[]} New segments. + * `end` is `-1`, this creates two new segments, `[g, h]`. This `g` is appended to + * the end of the path from `a`, `c`, and `e`. This `h` is appended to the end of + * `b`, `d`, and `f`. + * @param {ForkContext} context An instance from which the previous segments + * will be obtained. + * @param {number} startIndex The index of the first segment in the context + * that should be specified as previous segments for the newly created segments. + * @param {number} endIndex The index of the last segment in the context + * that should be specified as previous segments for the newly created segments. + * @param {Function} create A function that creates new `CodePathSegment` + * instances in a particular way. See the `CodePathSegment.new*` methods. + * @returns {Array} An array of the newly-created segments. */ -function makeSegments(context, begin, end, create) { +function createSegments(context, startIndex, endIndex, create) { + + /** @type {Array>} */ const list = context.segmentsList; - const normalizedBegin = begin >= 0 ? begin : list.length + begin; - const normalizedEnd = end >= 0 ? end : list.length + end; + /* + * Both `startIndex` and `endIndex` work the same way: if the number is zero + * or more, then the number is used as-is. If the number is negative, + * then that number is added to the length of the segments list to + * determine the index to use. That means -1 for either argument + * is the last element, -2 is the second to last, and so on. + * + * So if `startIndex` is 0, `endIndex` is -1, and `list.length` is 3, the + * effective `startIndex` is 0 and the effective `endIndex` is 2, so this function + * will include items at indices 0, 1, and 2. + * + * Therefore, if `startIndex` is -1 and `endIndex` is -1, that means we'll only + * be using the last segment in `list`. + */ + const normalizedBegin = startIndex >= 0 ? startIndex : list.length + startIndex; + const normalizedEnd = endIndex >= 0 ? endIndex : list.length + endIndex; + /** @type {Array} */ const segments = []; for (let i = 0; i < context.count; ++i) { + + // this is passed into `new CodePathSegment` to add to code path. const allPrevSegments = []; for (let j = normalizedBegin; j <= normalizedEnd; ++j) { allPrevSegments.push(list[j][i]); } + // note: `create` is just a wrapper that augments `new CodePathSegment`. segments.push(create(context.idGenerator.next(), allPrevSegments)); } @@ -63,28 +95,57 @@ function makeSegments(context, begin, end, create) { } /** - * `segments` becomes doubly in a `finally` block. Then if a code path exits by a - * control statement (such as `break`, `continue`) from the `finally` block, the - * destination's segments may be half of the source segments. In that case, this - * merges segments. - * @param {ForkContext} context An instance. - * @param {CodePathSegment[]} segments Segments to merge. - * @returns {CodePathSegment[]} The merged segments. + * Inside of a `finally` block we end up with two parallel paths. If the code path + * exits by a control statement (such as `break` or `continue`) from the `finally` + * block, then we need to merge the remaining parallel paths back into one. + * @param {ForkContext} context The fork context to work on. + * @param {Array} segments Segments to merge. + * @returns {Array} The merged segments. */ function mergeExtraSegments(context, segments) { let currentSegments = segments; + /* + * We need to ensure that the array returned from this function contains no more + * than the number of segments that the context allows. `context.count` indicates + * how many items should be in the returned array to ensure that the new segment + * entries will line up with the already existing segment entries. + */ while (currentSegments.length > context.count) { const merged = []; - for (let i = 0, length = currentSegments.length / 2 | 0; i < length; ++i) { + /* + * Because `context.count` is a factor of 2 inside of a `finally` block, + * we can divide the segment count by 2 to merge the paths together. + * This loops through each segment in the list and creates a new `CodePathSegment` + * that has the segment and the segment two slots away as previous segments. + * + * If `currentSegments` is [a,b,c,d], this will create new segments e and f, such + * that: + * + * When `i` is 0: + * a->e + * c->e + * + * When `i` is 1: + * b->f + * d->f + */ + for (let i = 0, length = Math.floor(currentSegments.length / 2); i < length; ++i) { merged.push(CodePathSegment.newNext( context.idGenerator.next(), [currentSegments[i], currentSegments[i + length]] )); } + + /* + * Go through the loop condition one more time to see if we have the + * number of segments for the context. If not, we'll keep merging paths + * of the merged segments until we get there. + */ currentSegments = merged; } + return currentSegments; } @@ -93,26 +154,55 @@ function mergeExtraSegments(context, segments) { //------------------------------------------------------------------------------ /** - * A class to manage forking. + * Manages the forking of code paths. */ class ForkContext { - // eslint-disable-next-line jsdoc/require-description /** + * Creates a new instance. * @param {IdGenerator} idGenerator An identifier generator for segments. - * @param {ForkContext|null} upper An upper fork context. - * @param {number} count A number of parallel segments. + * @param {ForkContext|null} upper The preceding fork context. + * @param {number} count The number of parallel segments in each element + * of `segmentsList`. */ constructor(idGenerator, upper, count) { + + /** + * The ID generator that will generate segment IDs for any new + * segments that are created. + * @type {IdGenerator} + */ this.idGenerator = idGenerator; + + /** + * The preceding fork context. + * @type {ForkContext|null} + */ this.upper = upper; + + /** + * The number of elements in each element of `segmentsList`. In most + * cases, this is 1 but can be 2 when there is a `finally` present, + * which forks the code path outside of normal flow. In the case of nested + * `finally` blocks, this can be a multiple of 2. + * @type {number} + */ this.count = count; + + /** + * The segments within this context. Each element in this array has + * `count` elements that represent one step in each fork. For example, + * when `segmentsList` is `[[a, b], [c, d], [e, f]]`, there is one path + * a->c->e and one path b->d->f, and `count` is 2 because each element + * is an array with two elements. + * @type {Array>} + */ this.segmentsList = []; } /** - * The head segments. - * @type {CodePathSegment[]} + * The segments that begin this fork context. + * @type {Array} */ get head() { const list = this.segmentsList; @@ -121,7 +211,7 @@ class ForkContext { } /** - * A flag which shows empty. + * Indicates if the context contains no segments. * @type {boolean} */ get empty() { @@ -129,7 +219,7 @@ class ForkContext { } /** - * A flag which shows reachable. + * Indicates if there are any segments that are reachable. * @type {boolean} */ get reachable() { @@ -139,75 +229,82 @@ class ForkContext { } /** - * Creates new segments from this context. - * @param {number} begin The first index of previous segments. - * @param {number} end The last index of previous segments. - * @returns {CodePathSegment[]} New segments. + * Creates new segments in this context and appends them to the end of the + * already existing `CodePathSegment`s specified by `startIndex` and + * `endIndex`. + * @param {number} startIndex The index of the first segment in the context + * that should be specified as previous segments for the newly created segments. + * @param {number} endIndex The index of the last segment in the context + * that should be specified as previous segments for the newly created segments. + * @returns {Array} An array of the newly created segments. */ - makeNext(begin, end) { - return makeSegments(this, begin, end, CodePathSegment.newNext); + makeNext(startIndex, endIndex) { + return createSegments(this, startIndex, endIndex, CodePathSegment.newNext); } /** - * Creates new segments from this context. - * The new segments is always unreachable. - * @param {number} begin The first index of previous segments. - * @param {number} end The last index of previous segments. - * @returns {CodePathSegment[]} New segments. + * Creates new unreachable segments in this context and appends them to the end of the + * already existing `CodePathSegment`s specified by `startIndex` and + * `endIndex`. + * @param {number} startIndex The index of the first segment in the context + * that should be specified as previous segments for the newly created segments. + * @param {number} endIndex The index of the last segment in the context + * that should be specified as previous segments for the newly created segments. + * @returns {Array} An array of the newly created segments. */ - makeUnreachable(begin, end) { - return makeSegments(this, begin, end, CodePathSegment.newUnreachable); + makeUnreachable(startIndex, endIndex) { + return createSegments(this, startIndex, endIndex, CodePathSegment.newUnreachable); } /** - * Creates new segments from this context. - * The new segments don't have connections for previous segments. - * But these inherit the reachable flag from this context. - * @param {number} begin The first index of previous segments. - * @param {number} end The last index of previous segments. - * @returns {CodePathSegment[]} New segments. + * Creates new segments in this context and does not append them to the end + * of the already existing `CodePathSegment`s specified by `startIndex` and + * `endIndex`. The `startIndex` and `endIndex` are only used to determine if + * the new segments should be reachable. If any of the segments in this range + * are reachable then the new segments are also reachable; otherwise, the new + * segments are unreachable. + * @param {number} startIndex The index of the first segment in the context + * that should be considered for reachability. + * @param {number} endIndex The index of the last segment in the context + * that should be considered for reachability. + * @returns {Array} An array of the newly created segments. */ - makeDisconnected(begin, end) { - return makeSegments(this, begin, end, CodePathSegment.newDisconnected); + makeDisconnected(startIndex, endIndex) { + return createSegments(this, startIndex, endIndex, CodePathSegment.newDisconnected); } /** - * Adds segments into this context. - * The added segments become the head. - * @param {CodePathSegment[]} segments Segments to add. + * Adds segments to the head of this context. + * @param {Array} segments The segments to add. * @returns {void} */ add(segments) { assert(segments.length >= this.count, `${segments.length} >= ${this.count}`); - this.segmentsList.push(mergeExtraSegments(this, segments)); } /** - * Replaces the head segments with given segments. + * Replaces the head segments with the given segments. * The current head segments are removed. - * @param {CodePathSegment[]} segments Segments to add. + * @param {Array} replacementHeadSegments The new head segments. * @returns {void} */ - replaceHead(segments) { - assert(segments.length >= this.count, `${segments.length} >= ${this.count}`); - - this.segmentsList.splice(-1, 1, mergeExtraSegments(this, segments)); + replaceHead(replacementHeadSegments) { + assert( + replacementHeadSegments.length >= this.count, + `${replacementHeadSegments.length} >= ${this.count}` + ); + this.segmentsList.splice(-1, 1, mergeExtraSegments(this, replacementHeadSegments)); } /** * Adds all segments of a given fork context into this context. - * @param {ForkContext} context A fork context to add. + * @param {ForkContext} otherForkContext The fork context to add from. * @returns {void} */ - addAll(context) { - assert(context.count === this.count); - - const source = context.segmentsList; - - for (let i = 0; i < source.length; ++i) { - this.segmentsList.push(source[i]); - } + addAll(otherForkContext) { + assert(otherForkContext.count === this.count); + this.segmentsList.push(...otherForkContext.segmentsList); } /** @@ -219,7 +316,8 @@ class ForkContext { } /** - * Creates the root fork context. + * Creates a new root context, meaning that there are no parent + * fork contexts. * @param {IdGenerator} idGenerator An identifier generator for segments. * @returns {ForkContext} New fork context. */ @@ -234,14 +332,16 @@ class ForkContext { /** * Creates an empty fork context preceded by a given context. * @param {ForkContext} parentContext The parent fork context. - * @param {boolean} forkLeavingPath A flag which shows inside of `finally` block. + * @param {boolean} shouldForkLeavingPath Indicates that we are inside of + * a `finally` block and should therefore fork the path that leaves + * `finally`. * @returns {ForkContext} New fork context. */ - static newEmpty(parentContext, forkLeavingPath) { + static newEmpty(parentContext, shouldForkLeavingPath) { return new ForkContext( parentContext.idGenerator, parentContext, - (forkLeavingPath ? 2 : 1) * parentContext.count + (shouldForkLeavingPath ? 2 : 1) * parentContext.count ); } } diff --git a/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js b/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js index 4cb2e0e3d..b580104e1 100644 --- a/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js +++ b/node_modules/eslint/lib/linter/code-path-analysis/id-generator.js @@ -18,7 +18,6 @@ */ class IdGenerator { - // eslint-disable-next-line jsdoc/require-description /** * @param {string} prefix Optional. A prefix of generated ids. */ @@ -34,10 +33,10 @@ class IdGenerator { next() { this.n = 1 + this.n | 0; - /* istanbul ignore if */ + /* c8 ignore start */ if (this.n < 0) { this.n = 1; - } + }/* c8 ignore stop */ return this.prefix + this.n; } diff --git a/node_modules/eslint/lib/linter/config-comment-parser.js b/node_modules/eslint/lib/linter/config-comment-parser.js index 07bbead28..9d33c5527 100644 --- a/node_modules/eslint/lib/linter/config-comment-parser.js +++ b/node_modules/eslint/lib/linter/config-comment-parser.js @@ -3,7 +3,7 @@ * @author Nicholas C. Zakas */ -/* eslint-disable class-methods-use-this*/ +/* eslint class-methods-use-this: off -- Methods desired on instance */ "use strict"; //------------------------------------------------------------------------------ @@ -11,10 +11,23 @@ //------------------------------------------------------------------------------ const levn = require("levn"), - ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"); + { + Legacy: { + ConfigOps + } + } = require("@eslint/eslintrc/universal"), + { + directivesPattern + } = require("../shared/directives"); const debug = require("debug")("eslint:config-comment-parser"); +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** @typedef {import("../shared/types").LintMessage} LintMessage */ + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -57,7 +70,7 @@ module.exports = class ConfigCommentParser { * Parses a JSON-like config. * @param {string} string The string to parse. * @param {Object} location Start line and column of comments for potential error message. - * @returns {({success: true, config: Object}|{success: false, error: Problem})} Result map object + * @returns {({success: true, config: Object}|{success: false, error: LintMessage})} Result map object */ parseJsonConfig(string, location) { debug("Parsing JSON config"); @@ -105,7 +118,8 @@ module.exports = class ConfigCommentParser { severity: 2, message: `Failed to parse JSON from '${normalizedString}': ${ex.message}`, line: location.start.line, - column: location.start.column + 1 + column: location.start.column + 1, + nodeType: null } }; @@ -127,9 +141,8 @@ module.exports = class ConfigCommentParser { const items = {}; - // Collapse whitespace around commas - string.replace(/\s*,\s*/gu, ",").split(/,+/u).forEach(name => { - const trimmedName = name.trim(); + string.split(",").forEach(name => { + const trimmedName = name.trim().replace(/^(?['"]?)(?.*)\k$/us, "$"); if (trimmedName) { items[trimmedName] = true; @@ -138,4 +151,35 @@ module.exports = class ConfigCommentParser { return items; } + /** + * Extract the directive and the justification from a given directive comment and trim them. + * @param {string} value The comment text to extract. + * @returns {{directivePart: string, justificationPart: string}} The extracted directive and justification. + */ + extractDirectiveComment(value) { + const match = /\s-{2,}\s/u.exec(value); + + if (!match) { + return { directivePart: value.trim(), justificationPart: "" }; + } + + const directive = value.slice(0, match.index).trim(); + const justification = value.slice(match.index + match[0].length).trim(); + + return { directivePart: directive, justificationPart: justification }; + } + + /** + * Parses a directive comment into directive text and value. + * @param {Comment} comment The comment node with the directive to be parsed. + * @returns {{directiveText: string, directiveValue: string}} The directive text and value. + */ + parseDirective(comment) { + const { directivePart } = this.extractDirectiveComment(comment.value); + const match = directivesPattern.exec(directivePart); + const directiveText = match[1]; + const directiveValue = directivePart.slice(match.index + directiveText.length); + + return { directiveText, directiveValue }; + } }; diff --git a/node_modules/eslint/lib/linter/linter.js b/node_modules/eslint/lib/linter/linter.js index adb5c2155..f74d0ecd1 100644 --- a/node_modules/eslint/lib/linter/linter.js +++ b/node_modules/eslint/lib/linter/linter.js @@ -15,12 +15,19 @@ const eslintScope = require("eslint-scope"), evk = require("eslint-visitor-keys"), espree = require("espree"), - lodash = require("lodash"), - BuiltInEnvironments = require("@eslint/eslintrc/conf/environments"), + merge = require("lodash.merge"), pkg = require("../../package.json"), astUtils = require("../shared/ast-utils"), - ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"), - ConfigValidator = require("@eslint/eslintrc/lib/shared/config-validator"), + { + directivesPattern + } = require("../shared/directives"), + { + Legacy: { + ConfigOps, + ConfigValidator, + environments: BuiltInEnvironments + } + } = require("@eslint/eslintrc/universal"), Traverser = require("../shared/traverser"), { SourceCode } = require("../source-code"), CodePathAnalyzer = require("./code-path-analysis/code-path-analyzer"), @@ -33,38 +40,49 @@ const SourceCodeFixer = require("./source-code-fixer"), timing = require("./timing"), ruleReplacements = require("../../conf/replacements.json"); - +const { getRuleFromConfig } = require("../config/flat-config-helpers"); +const { FlatConfigArray } = require("../config/flat-config-array"); +const { RuleValidator } = require("../config/rule-validator"); +const { assertIsRuleOptions, assertIsRuleSeverity } = require("../config/flat-config-schema"); +const { normalizeSeverityToString } = require("../shared/severity"); const debug = require("debug")("eslint:linter"); const MAX_AUTOFIX_PASSES = 10; const DEFAULT_PARSER_NAME = "espree"; +const DEFAULT_ECMA_VERSION = 5; const commentParser = new ConfigCommentParser(); const DEFAULT_ERROR_LOC = { start: { line: 1, column: 0 }, end: { line: 1, column: 1 } }; +const parserSymbol = Symbol.for("eslint.RuleTester.parser"); //------------------------------------------------------------------------------ // Typedefs //------------------------------------------------------------------------------ -/** @typedef {InstanceType} ConfigArray */ -/** @typedef {InstanceType} ExtractedConfig */ +/** @typedef {InstanceType} ConfigArray */ +/** @typedef {InstanceType} ExtractedConfig */ /** @typedef {import("../shared/types").ConfigData} ConfigData */ /** @typedef {import("../shared/types").Environment} Environment */ /** @typedef {import("../shared/types").GlobalConf} GlobalConf */ /** @typedef {import("../shared/types").LintMessage} LintMessage */ +/** @typedef {import("../shared/types").SuppressedLintMessage} SuppressedLintMessage */ /** @typedef {import("../shared/types").ParserOptions} ParserOptions */ +/** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */ /** @typedef {import("../shared/types").Processor} Processor */ /** @typedef {import("../shared/types").Rule} Rule */ +/* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */ /** * @template T * @typedef {{ [P in keyof T]-?: T[P] }} Required */ +/* eslint-enable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */ /** * @typedef {Object} DisableDirective - * @property {("disable"|"enable"|"disable-line"|"disable-next-line")} type - * @property {number} line - * @property {number} column - * @property {(string|null)} ruleId + * @property {("disable"|"enable"|"disable-line"|"disable-next-line")} type Type of directive + * @property {number} line The line number + * @property {number} column The column number + * @property {(string|null)} ruleId The rule ID + * @property {string} justification The justification of directive */ /** @@ -72,6 +90,7 @@ const DEFAULT_ERROR_LOC = { start: { line: 1, column: 0 }, end: { line: 1, colum * @typedef {Object} LinterInternalSlots * @property {ConfigArray|null} lastConfigArray The `ConfigArray` instance that the last `verify()` call used. * @property {SourceCode|null} lastSourceCode The `SourceCode` instance that the last `verify()` call used. + * @property {SuppressedLintMessage[]} lastSuppressedMessages The `SuppressedLintMessage[]` instance that the last `verify()` call produced. * @property {Map} parserMap The loaded parsers. * @property {Rules} ruleMap The loaded rules. */ @@ -92,12 +111,12 @@ const DEFAULT_ERROR_LOC = { start: { line: 1, column: 0 }, end: { line: 1, colum * @typedef {Object} ProcessorOptions * @property {(filename:string, text:string) => boolean} [filterCodeBlock] the * predicate function that selects adopt code blocks. - * @property {Processor["postprocess"]} [postprocess] postprocessor for report + * @property {Processor.postprocess} [postprocess] postprocessor for report * messages. If provided, this should accept an array of the message lists * for each code block returned from the preprocessor, apply a mapping to * the messages as appropriate, and return a one-dimensional array of * messages. - * @property {Processor["preprocess"]} [preprocess] preprocessor for source text. + * @property {Processor.preprocess} [preprocess] preprocessor for source text. * If provided, this should accept a string of source text, and return an * array of code blocks to lint. */ @@ -118,6 +137,15 @@ const DEFAULT_ERROR_LOC = { start: { line: 1, column: 0 }, end: { line: 1, colum // Helpers //------------------------------------------------------------------------------ +/** + * Determines if a given object is Espree. + * @param {Object} parser The parser to check. + * @returns {boolean} True if the parser is Espree or false if not. + */ +function isEspree(parser) { + return !!(parser === espree || parser[parserSymbol] === espree); +} + /** * Ensures that variables representing built-in properties of the Global Object, * and any globals declared by special block comments, are present in the global @@ -166,6 +194,7 @@ function addDeclaredGlobals(globalScope, configGlobals, { exportedVariables, ena if (variable) { variable.eslintUsed = true; + variable.eslintExported = true; } }); @@ -240,14 +269,15 @@ function createLintingProblem(options) { * Creates a collection of disable directives from a comment * @param {Object} options to create disable directives * @param {("disable"|"enable"|"disable-line"|"disable-next-line")} options.type The type of directive comment - * @param {{line: number, column: number}} options.loc The 0-based location of the comment token + * @param {token} options.commentToken The Comment token * @param {string} options.value The value after the directive in the comment * comment specified no specific rules, so it applies to all rules (e.g. `eslint-disable`) + * @param {string} options.justification The justification of the directive * @param {function(string): {create: Function}} options.ruleMapper A map from rule IDs to defined rules * @returns {Object} Directives and problems from the comment */ function createDisableDirectives(options) { - const { type, loc, value, ruleMapper } = options; + const { commentToken, type, value, justification, ruleMapper } = options; const ruleIds = Object.keys(commentParser.parseListConfig(value)); const directiveRules = ruleIds.length ? ruleIds : [null]; const result = { @@ -255,39 +285,49 @@ function createDisableDirectives(options) { directiveProblems: [] // problems in directives }; + const parentComment = { commentToken, ruleIds }; + for (const ruleId of directiveRules) { // push to directives, if the rule is defined(including null, e.g. /*eslint enable*/) - if (ruleId === null || ruleMapper(ruleId) !== null) { - result.directives.push({ type, line: loc.start.line, column: loc.start.column + 1, ruleId }); + if (ruleId === null || !!ruleMapper(ruleId)) { + if (type === "disable-next-line") { + result.directives.push({ + parentComment, + type, + line: commentToken.loc.end.line, + column: commentToken.loc.end.column + 1, + ruleId, + justification + }); + } else { + result.directives.push({ + parentComment, + type, + line: commentToken.loc.start.line, + column: commentToken.loc.start.column + 1, + ruleId, + justification + }); + } } else { - result.directiveProblems.push(createLintingProblem({ ruleId, loc })); + result.directiveProblems.push(createLintingProblem({ ruleId, loc: commentToken.loc })); } } return result; } -/** - * Remove the ignored part from a given directive comment and trim it. - * @param {string} value The comment text to strip. - * @returns {string} The stripped text. - */ -function stripDirectiveComment(value) { - return value.split(/\s-{2,}\s/u)[0].trim(); -} - /** * Parses comments in file to extract file-specific config of rules, globals * and environments and merges them with global config; also code blocks * where reporting is disabled or enabled and merges them with reporting config. - * @param {string} filename The file being checked. - * @param {ASTNode} ast The top node of the AST. + * @param {SourceCode} sourceCode The SourceCode object to get comments from. * @param {function(string): {create: Function}} ruleMapper A map from rule IDs to defined rules * @param {string|null} warnInlineConfig If a string then it should warn directive comments as disabled. The string value is the config name what the setting came from. - * @returns {{configuredRules: Object, enabledGlobals: {value:string,comment:Token}[], exportedVariables: Object, problems: Problem[], disableDirectives: DisableDirective[]}} + * @returns {{configuredRules: Object, enabledGlobals: {value:string,comment:Token}[], exportedVariables: Object, problems: LintMessage[], disableDirectives: DisableDirective[]}} * A collection of the directive comments that were found, along with any problems that occurred when parsing */ -function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { +function getDirectiveComments(sourceCode, ruleMapper, warnInlineConfig) { const configuredRules = {}; const enabledGlobals = Object.create(null); const exportedVariables = {}; @@ -297,9 +337,10 @@ function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { builtInRules: Rules }); - ast.comments.filter(token => token.type !== "Shebang").forEach(comment => { - const trimmedCommentText = stripDirectiveComment(comment.value); - const match = /^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u.exec(trimmedCommentText); + sourceCode.getInlineConfigNodes().filter(token => token.type !== "Shebang").forEach(comment => { + const { directivePart, justificationPart } = commentParser.extractDirectiveComment(comment.value); + + const match = directivesPattern.exec(directivePart); if (!match) { return; @@ -323,7 +364,7 @@ function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { return; } - if (lineCommentSupported && comment.loc.start.line !== comment.loc.end.line) { + if (directiveText === "eslint-disable-line" && comment.loc.start.line !== comment.loc.end.line) { const message = `${directiveText} comment should not span multiple lines.`; problems.push(createLintingProblem({ @@ -334,7 +375,7 @@ function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { return; } - const directiveValue = trimmedCommentText.slice(match.index + directiveText.length); + const directiveValue = directivePart.slice(match.index + directiveText.length); switch (directiveText) { case "eslint-disable": @@ -342,7 +383,7 @@ function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { case "eslint-disable-next-line": case "eslint-disable-line": { const directiveType = directiveText.slice("eslint-".length); - const options = { type: directiveType, loc: comment.loc, value: directiveValue, ruleMapper }; + const options = { commentToken: comment, type: directiveType, value: directiveValue, justification: justificationPart, ruleMapper }; const { directives, directiveProblems } = createDisableDirectives(options); disableDirectives.push(...directives); @@ -390,7 +431,7 @@ function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { const rule = ruleMapper(name); const ruleValue = parseResult.config[name]; - if (rule === null) { + if (!rule) { problems.push(createLintingProblem({ ruleId: name, loc: comment.loc })); return; } @@ -430,12 +471,82 @@ function getDirectiveComments(filename, ast, ruleMapper, warnInlineConfig) { }; } +/** + * Parses comments in file to extract disable directives. + * @param {SourceCode} sourceCode The SourceCode object to get comments from. + * @param {function(string): {create: Function}} ruleMapper A map from rule IDs to defined rules + * @returns {{problems: LintMessage[], disableDirectives: DisableDirective[]}} + * A collection of the directive comments that were found, along with any problems that occurred when parsing + */ +function getDirectiveCommentsForFlatConfig(sourceCode, ruleMapper) { + const problems = []; + const disableDirectives = []; + + sourceCode.getInlineConfigNodes().filter(token => token.type !== "Shebang").forEach(comment => { + const { directivePart, justificationPart } = commentParser.extractDirectiveComment(comment.value); + + const match = directivesPattern.exec(directivePart); + + if (!match) { + return; + } + const directiveText = match[1]; + const lineCommentSupported = /^eslint-disable-(next-)?line$/u.test(directiveText); + + if (comment.type === "Line" && !lineCommentSupported) { + return; + } + + if (directiveText === "eslint-disable-line" && comment.loc.start.line !== comment.loc.end.line) { + const message = `${directiveText} comment should not span multiple lines.`; + + problems.push(createLintingProblem({ + ruleId: null, + message, + loc: comment.loc + })); + return; + } + + const directiveValue = directivePart.slice(match.index + directiveText.length); + + switch (directiveText) { + case "eslint-disable": + case "eslint-enable": + case "eslint-disable-next-line": + case "eslint-disable-line": { + const directiveType = directiveText.slice("eslint-".length); + const options = { commentToken: comment, type: directiveType, value: directiveValue, justification: justificationPart, ruleMapper }; + const { directives, directiveProblems } = createDisableDirectives(options); + + disableDirectives.push(...directives); + problems.push(...directiveProblems); + break; + } + + // no default + } + }); + + return { + problems, + disableDirectives + }; +} + /** * Normalize ECMAScript version from the initial config - * @param {number} ecmaVersion ECMAScript version from the initial config + * @param {Parser} parser The parser which uses this options. + * @param {number} ecmaVersion ECMAScript version from the initial config * @returns {number} normalized ECMAScript version */ -function normalizeEcmaVersion(ecmaVersion) { +function normalizeEcmaVersion(parser, ecmaVersion) { + + if (isEspree(parser)) { + if (ecmaVersion === "latest") { + return espree.latestEcmaVersion; + } + } /* * Calculate ECMAScript edition number from official year version starting with @@ -444,7 +555,39 @@ function normalizeEcmaVersion(ecmaVersion) { return ecmaVersion >= 2015 ? ecmaVersion - 2009 : ecmaVersion; } -const eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)\*\//gu; +/** + * Normalize ECMAScript version from the initial config into languageOptions (year) + * format. + * @param {any} [ecmaVersion] ECMAScript version from the initial config + * @returns {number} normalized ECMAScript version + */ +function normalizeEcmaVersionForLanguageOptions(ecmaVersion) { + + switch (ecmaVersion) { + case 3: + return 3; + + // void 0 = no ecmaVersion specified so use the default + case 5: + case void 0: + return 5; + + default: + if (typeof ecmaVersion === "number") { + return ecmaVersion >= 2015 ? ecmaVersion : ecmaVersion + 2009; + } + } + + /* + * We default to the latest supported ecmaVersion for everything else. + * Remember, this is for languageOptions.ecmaVersion, which sets the version + * that is used for a number of processes inside of ESLint. It's normally + * safe to assume people want the latest unless otherwise specified. + */ + return espree.latestEcmaVersion + 2009; +} + +const eslintEnvPattern = /\/\*\s*eslint-env\s(.+?)(?:\*\/|$)/gsu; /** * Checks whether or not there is a comment which has "eslint-env *" in a given text. @@ -457,10 +600,12 @@ function findEslintEnv(text) { eslintEnvPattern.lastIndex = 0; while ((match = eslintEnvPattern.exec(text)) !== null) { - retv = Object.assign( - retv || {}, - commentParser.parseListConfig(stripDirectiveComment(match[1])) - ); + if (match[0].endsWith("*/")) { + retv = Object.assign( + retv || {}, + commentParser.parseListConfig(commentParser.extractDirectiveComment(match[1]).directivePart) + ); + } } return retv; @@ -470,7 +615,7 @@ function findEslintEnv(text) { * Convert "/path/to/" to "". * `CLIEngine#executeOnText()` method gives "/path/to/" if the filename * was omitted because `configArray.extractConfig()` requires an absolute path. - * But the linter should pass `` to `RuleContext#getFilename()` in that + * But the linter should pass `` to `RuleContext#filename` in that * case. * Also, code blocks can have their virtual filename. If the parent filename was * ``, the virtual filename is `/0_foo.js` or something like (i.e., @@ -493,7 +638,11 @@ function normalizeFilename(filename) { * @returns {Required & InternalOptions} Normalized options */ function normalizeVerifyOptions(providedOptions, config) { - const disableInlineConfig = config.noInlineConfig === true; + + const linterOptions = config.linterOptions || config; + + // .noInlineConfig for eslintrc, .linterOptions.noInlineConfig for flat + const disableInlineConfig = linterOptions.noInlineConfig === true; const ignoreInlineConfig = providedOptions.allowInlineConfig === false; const configNameOfNoInlineConfig = config.configNameOfNoInlineConfig ? ` (${config.configNameOfNoInlineConfig})` @@ -505,7 +654,11 @@ function normalizeVerifyOptions(providedOptions, config) { reportUnusedDisableDirectives = reportUnusedDisableDirectives ? "error" : "off"; } if (typeof reportUnusedDisableDirectives !== "string") { - reportUnusedDisableDirectives = config.reportUnusedDisableDirectives ? "warn" : "off"; + if (typeof linterOptions.reportUnusedDisableDirectives === "boolean") { + reportUnusedDisableDirectives = linterOptions.reportUnusedDisableDirectives ? "warn" : "off"; + } else { + reportUnusedDisableDirectives = linterOptions.reportUnusedDisableDirectives === void 0 ? "off" : normalizeSeverityToString(linterOptions.reportUnusedDisableDirectives); + } } return { @@ -521,16 +674,17 @@ function normalizeVerifyOptions(providedOptions, config) { /** * Combines the provided parserOptions with the options from environments - * @param {string} parserName The parser name which uses this options. + * @param {Parser} parser The parser which uses this options. * @param {ParserOptions} providedOptions The provided 'parserOptions' key in a config * @param {Environment[]} enabledEnvironments The environments enabled in configuration and with inline comments * @returns {ParserOptions} Resulting parser options after merge */ -function resolveParserOptions(parserName, providedOptions, enabledEnvironments) { +function resolveParserOptions(parser, providedOptions, enabledEnvironments) { + const parserOptionsFromEnv = enabledEnvironments .filter(env => env.parserOptions) - .reduce((parserOptions, env) => lodash.merge(parserOptions, env.parserOptions), {}); - const mergedParserOptions = lodash.merge(parserOptionsFromEnv, providedOptions || {}); + .reduce((parserOptions, env) => merge(parserOptions, env.parserOptions), {}); + const mergedParserOptions = merge(parserOptionsFromEnv, providedOptions || {}); const isModule = mergedParserOptions.sourceType === "module"; if (isModule) { @@ -542,16 +696,35 @@ function resolveParserOptions(parserName, providedOptions, enabledEnvironments) mergedParserOptions.ecmaFeatures = Object.assign({}, mergedParserOptions.ecmaFeatures, { globalReturn: false }); } - /* - * TODO: @aladdin-add - * 1. for a 3rd-party parser, do not normalize parserOptions - * 2. for espree, no need to do this (espree will do it) - */ - mergedParserOptions.ecmaVersion = normalizeEcmaVersion(mergedParserOptions.ecmaVersion); + mergedParserOptions.ecmaVersion = normalizeEcmaVersion(parser, mergedParserOptions.ecmaVersion); return mergedParserOptions; } +/** + * Converts parserOptions to languageOptions for backwards compatibility with eslintrc. + * @param {ConfigData} config Config object. + * @param {Object} config.globals Global variable definitions. + * @param {Parser} config.parser The parser to use. + * @param {ParserOptions} config.parserOptions The parserOptions to use. + * @returns {LanguageOptions} The languageOptions equivalent. + */ +function createLanguageOptions({ globals: configuredGlobals, parser, parserOptions }) { + + const { + ecmaVersion, + sourceType + } = parserOptions; + + return { + globals: configuredGlobals, + ecmaVersion: normalizeEcmaVersionForLanguageOptions(ecmaVersion), + sourceType, + parser, + parserOptions + }; +} + /** * Combines the provided globals object with the globals from environments * @param {Record} providedGlobals The 'globals' key in a config @@ -600,20 +773,21 @@ function getRuleOptions(ruleConfig) { /** * Analyze scope of the given AST. * @param {ASTNode} ast The `Program` node to analyze. - * @param {ParserOptions} parserOptions The parser options. + * @param {LanguageOptions} languageOptions The parser options. * @param {Record} visitorKeys The visitor keys. * @returns {ScopeManager} The analysis result. */ -function analyzeScope(ast, parserOptions, visitorKeys) { +function analyzeScope(ast, languageOptions, visitorKeys) { + const parserOptions = languageOptions.parserOptions; const ecmaFeatures = parserOptions.ecmaFeatures || {}; - const ecmaVersion = parserOptions.ecmaVersion || 5; + const ecmaVersion = languageOptions.ecmaVersion || DEFAULT_ECMA_VERSION; return eslintScope.analyze(ast, { ignoreEval: true, nodejsScope: ecmaFeatures.globalReturn, impliedStrict: ecmaFeatures.impliedStrict, - ecmaVersion, - sourceType: parserOptions.sourceType || "script", + ecmaVersion: typeof ecmaVersion === "number" ? ecmaVersion : 6, + sourceType: languageOptions.sourceType || "script", childVisitorKeys: visitorKeys || evk.KEYS, fallback: Traverser.getKeys }); @@ -624,25 +798,29 @@ function analyzeScope(ast, parserOptions, visitorKeys) { * optimization of functions, so it's best to keep the try-catch as isolated * as possible * @param {string} text The text to parse. - * @param {Parser} parser The parser to parse. - * @param {ParserOptions} providedParserOptions Options to pass to the parser + * @param {LanguageOptions} languageOptions Options to pass to the parser * @param {string} filePath The path to the file being parsed. - * @returns {{success: false, error: Problem}|{success: true, sourceCode: SourceCode}} + * @returns {{success: false, error: LintMessage}|{success: true, sourceCode: SourceCode}} * An object containing the AST and parser services if parsing was successful, or the error if parsing failed * @private */ -function parse(text, parser, providedParserOptions, filePath) { +function parse(text, languageOptions, filePath) { const textToParse = stripUnicodeBOM(text).replace(astUtils.shebangPattern, (match, captured) => `//${captured}`); - const parserOptions = Object.assign({}, providedParserOptions, { - loc: true, - range: true, - raw: true, - tokens: true, - comment: true, - eslintVisitorKeys: true, - eslintScopeManager: true, - filePath - }); + const { ecmaVersion, sourceType, parser } = languageOptions; + const parserOptions = Object.assign( + { ecmaVersion, sourceType }, + languageOptions.parserOptions, + { + loc: true, + range: true, + raw: true, + tokens: true, + comment: true, + eslintVisitorKeys: true, + eslintScopeManager: true, + filePath + } + ); /* * Check for parsing errors first. If there's a parsing error, nothing @@ -651,13 +829,20 @@ function parse(text, parser, providedParserOptions, filePath) { * problem that ESLint identified just like any other. */ try { + debug("Parsing:", filePath); const parseResult = (typeof parser.parseForESLint === "function") ? parser.parseForESLint(textToParse, parserOptions) : { ast: parser.parse(textToParse, parserOptions) }; + + debug("Parsing successful:", filePath); const ast = parseResult.ast; const parserServices = parseResult.services || {}; const visitorKeys = parseResult.visitorKeys || evk.KEYS; - const scopeManager = parseResult.scopeManager || analyzeScope(ast, parserOptions, visitorKeys); + + debug("Scope analysis:", filePath); + const scopeManager = parseResult.scopeManager || analyzeScope(ast, languageOptions, visitorKeys); + + debug("Scope analysis successful:", filePath); return { success: true, @@ -691,69 +876,18 @@ function parse(text, parser, providedParserOptions, filePath) { severity: 2, message, line: ex.lineNumber, - column: ex.column + column: ex.column, + nodeType: null } }; } } -/** - * Gets the scope for the current node - * @param {ScopeManager} scopeManager The scope manager for this AST - * @param {ASTNode} currentNode The node to get the scope of - * @returns {eslint-scope.Scope} The scope information for this node - */ -function getScope(scopeManager, currentNode) { - - // On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope. - const inner = currentNode.type !== "Program"; - - for (let node = currentNode; node; node = node.parent) { - const scope = scopeManager.acquire(node, inner); - - if (scope) { - if (scope.type === "function-expression-name") { - return scope.childScopes[0]; - } - return scope; - } - } - - return scopeManager.scopes[0]; -} - -/** - * Marks a variable as used in the current scope - * @param {ScopeManager} scopeManager The scope manager for this AST. The scope may be mutated by this function. - * @param {ASTNode} currentNode The node currently being traversed - * @param {Object} parserOptions The options used to parse this text - * @param {string} name The name of the variable that should be marked as used. - * @returns {boolean} True if the variable was found and marked as used, false if not. - */ -function markVariableAsUsed(scopeManager, currentNode, parserOptions, name) { - const hasGlobalReturn = parserOptions.ecmaFeatures && parserOptions.ecmaFeatures.globalReturn; - const specialScope = hasGlobalReturn || parserOptions.sourceType === "module"; - const currentScope = getScope(scopeManager, currentNode); - - // Special Node.js scope means we need to start one level deeper - const initialScope = currentScope.type === "global" && specialScope ? currentScope.childScopes[0] : currentScope; - - for (let scope = initialScope; scope; scope = scope.upper) { - const variable = scope.variables.find(scopeVar => scopeVar.name === name); - - if (variable) { - variable.eslintUsed = true; - return true; - } - } - - return false; -} - /** * Runs a rule, and gets its listeners * @param {Rule} rule A normalized rule with a `create` method * @param {Context} ruleContext The context that should be passed to the rule + * @throws {any} Any error during the rule's `create` * @returns {Object} A map of selector listeners provided by the rule */ function createRuleListeners(rule, ruleContext) { @@ -765,22 +899,6 @@ function createRuleListeners(rule, ruleContext) { } } -/** - * Gets all the ancestors of a given node - * @param {ASTNode} node The node - * @returns {ASTNode[]} All the ancestor nodes in the AST, not including the provided node, starting - * from the root node and going inwards to the parent node. - */ -function getAncestors(node) { - const ancestorsStartingAtParent = []; - - for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) { - ancestorsStartingAtParent.push(ancestor); - } - - return ancestorsStartingAtParent.reverse(); -} - // methods that exist on SourceCode object const DEPRECATED_SOURCECODE_PASSTHROUGHS = { getSource: "getText", @@ -805,12 +923,13 @@ const DEPRECATED_SOURCECODE_PASSTHROUGHS = { getTokensBetween: "getTokensBetween" }; + const BASE_TRAVERSAL_CONTEXT = Object.freeze( Object.keys(DEPRECATED_SOURCECODE_PASSTHROUGHS).reduce( (contextInfo, methodName) => Object.assign(contextInfo, { [methodName](...args) { - return this.getSourceCode()[DEPRECATED_SOURCECODE_PASSTHROUGHS[methodName]](...args); + return this.sourceCode[DEPRECATED_SOURCECODE_PASSTHROUGHS[methodName]](...args); } }), {} @@ -822,15 +941,16 @@ const BASE_TRAVERSAL_CONTEXT = Object.freeze( * @param {SourceCode} sourceCode A SourceCode object for the given text * @param {Object} configuredRules The rules configuration * @param {function(string): Rule} ruleMapper A mapper function from rule names to rules - * @param {Object} parserOptions The options that were passed to the parser - * @param {string} parserName The name of the parser in the config + * @param {string | undefined} parserName The name of the parser in the config + * @param {LanguageOptions} languageOptions The options for parsing the code. * @param {Object} settings The settings that were enabled in the config * @param {string} filename The reported filename of the code * @param {boolean} disableFixes If true, it doesn't make `fix` properties. * @param {string | undefined} cwd cwd of the cli - * @returns {Problem[]} An array of reported problems + * @param {string} physicalFilename The full path of the file on disk without any code block information + * @returns {LintMessage[]} An array of reported problems */ -function runRules(sourceCode, configuredRules, ruleMapper, parserOptions, parserName, settings, filename, disableFixes, cwd) { +function runRules(sourceCode, configuredRules, ruleMapper, parserName, languageOptions, settings, filename, disableFixes, cwd, physicalFilename) { const emitter = createEmitter(); const nodeQueue = []; let currentNode = sourceCode.ast; @@ -855,22 +975,29 @@ function runRules(sourceCode, configuredRules, ruleMapper, parserOptions, parser Object.assign( Object.create(BASE_TRAVERSAL_CONTEXT), { - getAncestors: () => getAncestors(currentNode), - getDeclaredVariables: sourceCode.scopeManager.getDeclaredVariables.bind(sourceCode.scopeManager), + getAncestors: () => sourceCode.getAncestors(currentNode), + getDeclaredVariables: node => sourceCode.getDeclaredVariables(node), getCwd: () => cwd, + cwd, getFilename: () => filename, - getScope: () => getScope(sourceCode.scopeManager, currentNode), + filename, + getPhysicalFilename: () => physicalFilename || filename, + physicalFilename: physicalFilename || filename, + getScope: () => sourceCode.getScope(currentNode), getSourceCode: () => sourceCode, - markVariableAsUsed: name => markVariableAsUsed(sourceCode.scopeManager, currentNode, parserOptions, name), - parserOptions, + sourceCode, + markVariableAsUsed: name => sourceCode.markVariableAsUsed(name, currentNode), + parserOptions: { + ...languageOptions.parserOptions + }, parserPath: parserName, + languageOptions, parserServices: sourceCode.parserServices, settings } ) ); - const lintingProblems = []; Object.keys(configuredRules).forEach(ruleId => { @@ -883,7 +1010,7 @@ function runRules(sourceCode, configuredRules, ruleMapper, parserOptions, parser const rule = ruleMapper(ruleId); - if (rule === null) { + if (!rule) { lintingProblems.push(createLintingProblem({ ruleId })); return; } @@ -919,8 +1046,16 @@ function runRules(sourceCode, configuredRules, ruleMapper, parserOptions, parser } const problem = reportTranslator(...args); - if (problem.fix && rule.meta && !rule.meta.fixable) { - throw new Error("Fixable rules should export a `meta.fixable` property."); + if (problem.fix && !(rule.meta && rule.meta.fixable)) { + throw new Error("Fixable rules must set the `meta.fixable` property to \"code\" or \"whitespace\"."); + } + if (problem.suggestions && !(rule.meta && rule.meta.hasSuggestions === true)) { + if (rule.meta && rule.meta.docs && typeof rule.meta.docs.suggestion !== "undefined") { + + // Encourage migration from the former property name. + throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`. `meta.docs.suggestion` is ignored by ESLint."); + } + throw new Error("Rules with suggestions must set the `meta.hasSuggestions` property to `true`."); } lintingProblems.push(problem); } @@ -928,15 +1063,37 @@ function runRules(sourceCode, configuredRules, ruleMapper, parserOptions, parser ) ); - const ruleListeners = createRuleListeners(rule, ruleContext); + const ruleListeners = timing.enabled ? timing.time(ruleId, createRuleListeners)(rule, ruleContext) : createRuleListeners(rule, ruleContext); + + /** + * Include `ruleId` in error logs + * @param {Function} ruleListener A rule method that listens for a node. + * @returns {Function} ruleListener wrapped in error handler + */ + function addRuleErrorHandler(ruleListener) { + return function ruleErrorHandler(...listenerArgs) { + try { + return ruleListener(...listenerArgs); + } catch (e) { + e.ruleId = ruleId; + throw e; + } + }; + } + + if (typeof ruleListeners === "undefined" || ruleListeners === null) { + throw new Error(`The create() function for rule '${ruleId}' did not return an object.`); + } // add all the selectors from the rule as listeners Object.keys(ruleListeners).forEach(selector => { + const ruleListener = timing.enabled + ? timing.time(ruleId, ruleListeners[selector]) + : ruleListeners[selector]; + emitter.on( selector, - timing.enabled - ? timing.time(ruleId, ruleListeners[selector]) - : ruleListeners[selector] + addRuleErrorHandler(ruleListener) ); }); }); @@ -1021,7 +1178,7 @@ function normalizeCwd(cwd) { } // It's more explicit to assign the undefined - // eslint-disable-next-line no-undefined + // eslint-disable-next-line no-undefined -- Consistently returning a value return undefined; } @@ -1031,26 +1188,44 @@ function normalizeCwd(cwd) { */ const internalSlotsMap = new WeakMap(); +/** + * Throws an error when the given linter is in flat config mode. + * @param {Linter} linter The linter to check. + * @returns {void} + * @throws {Error} If the linter is in flat config mode. + */ +function assertEslintrcConfig(linter) { + const { configType } = internalSlotsMap.get(linter); + + if (configType === "flat") { + throw new Error("This method cannot be used with flat config. Add your entries directly into the config array."); + } +} + + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ /** * Object that is responsible for verifying JavaScript text - * @name eslint + * @name Linter */ class Linter { /** * Initialize the Linter. * @param {Object} [config] the config object - * @param {string} [config.cwd] path to a directory that should be considered as the current working directory, can be undefined. + * @param {string} [config.cwd] path to a directory that should be considered as the current working directory, can be undefined. + * @param {"flat"|"eslintrc"} [config.configType="eslintrc"] the type of config used. */ - constructor({ cwd } = {}) { + constructor({ cwd, configType } = {}) { internalSlotsMap.set(this, { cwd: normalizeCwd(cwd), lastConfigArray: null, lastSourceCode: null, + lastSuppressedMessages: [], + configType, // TODO: Remove after flat config conversion parserMap: new Map([["espree", espree]]), ruleMap: new Rules() }); @@ -1072,7 +1247,8 @@ class Linter { * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object. * @param {ConfigData} providedConfig An ESLintConfig instance to configure everything. * @param {VerifyOptions} [providedOptions] The optional filename of the file being checked. - * @returns {LintMessage[]} The results as an array of messages or an empty array if no messages. + * @throws {Error} If during rule execution. + * @returns {(LintMessage|SuppressedLintMessage)[]} The results as an array of messages or an empty array if no messages. */ _verifyWithoutProcessors(textOrSourceCode, providedConfig, providedOptions) { const slots = internalSlotsMap.get(this); @@ -1104,7 +1280,8 @@ class Linter { severity: 2, message: `Configured parser '${config.parser}' was not found.`, line: 0, - column: 0 + column: 0, + nodeType: null }]; } parserName = config.parser; @@ -1121,15 +1298,19 @@ class Linter { .map(envName => getEnv(slots, envName)) .filter(env => env); - const parserOptions = resolveParserOptions(parserName, config.parserOptions || {}, enabledEnvs); + const parserOptions = resolveParserOptions(parser, config.parserOptions || {}, enabledEnvs); const configuredGlobals = resolveGlobals(config.globals || {}, enabledEnvs); const settings = config.settings || {}; + const languageOptions = createLanguageOptions({ + globals: config.globals, + parser, + parserOptions + }); if (!slots.lastSourceCode) { const parseResult = parse( text, - parser, - parserOptions, + languageOptions, options.filename ); @@ -1150,14 +1331,14 @@ class Linter { ast: slots.lastSourceCode.ast, parserServices: slots.lastSourceCode.parserServices, visitorKeys: slots.lastSourceCode.visitorKeys, - scopeManager: analyzeScope(slots.lastSourceCode.ast, parserOptions) + scopeManager: analyzeScope(slots.lastSourceCode.ast, languageOptions) }); } } const sourceCode = slots.lastSourceCode; const commentDirectives = options.allowInlineConfig - ? getDirectiveComments(options.filename, sourceCode.ast, ruleId => getRule(slots, ruleId), options.warnInlineConfig) + ? getDirectiveComments(sourceCode, ruleId => getRule(slots, ruleId), options.warnInlineConfig) : { configuredRules: {}, enabledGlobals: {}, exportedVariables: {}, problems: [], disableDirectives: [] }; // augment global scope with declared global variables @@ -1168,7 +1349,6 @@ class Linter { ); const configuredRules = Object.assign({}, config.rules, commentDirectives.configuredRules); - let lintingProblems; try { @@ -1176,12 +1356,13 @@ class Linter { sourceCode, configuredRules, ruleId => getRule(slots, ruleId), - parserOptions, parserName, + languageOptions, settings, options.filename, options.disableFixes, - slots.cwd + slots.cwd, + providedOptions.physicalFilename ); } catch (err) { err.message += `\nOccurred while linting ${options.filename}`; @@ -1196,11 +1377,17 @@ class Linter { debug("Parser Options:", parserOptions); debug("Parser Path:", parserName); debug("Settings:", settings); + + if (err.ruleId) { + err.message += `\nRule: "${err.ruleId}"`; + } + throw err; } return applyDisableDirectives({ directives: commentDirectives.disableDirectives, + disableFixes: options.disableFixes, problems: lintingProblems .concat(commentDirectives.problems) .sort((problemA, problemB) => problemA.line - problemB.line || problemA.column - problemB.column), @@ -1219,23 +1406,370 @@ class Linter { */ verify(textOrSourceCode, config, filenameOrOptions) { debug("Verify"); + + const { configType, cwd } = internalSlotsMap.get(this); + const options = typeof filenameOrOptions === "string" ? { filename: filenameOrOptions } : filenameOrOptions || {}; - // CLIEngine passes a `ConfigArray` object. - if (config && typeof config.extractConfig === "function") { - return this._verifyWithConfigArray(textOrSourceCode, config, options); + if (config) { + if (configType === "flat") { + + /* + * Because of how Webpack packages up the files, we can't + * compare directly to `FlatConfigArray` using `instanceof` + * because it's not the same `FlatConfigArray` as in the tests. + * So, we work around it by assuming an array is, in fact, a + * `FlatConfigArray` if it has a `getConfig()` method. + */ + let configArray = config; + + if (!Array.isArray(config) || typeof config.getConfig !== "function") { + configArray = new FlatConfigArray(config, { basePath: cwd }); + configArray.normalizeSync(); + } + + return this._distinguishSuppressedMessages(this._verifyWithFlatConfigArray(textOrSourceCode, configArray, options, true)); + } + + if (typeof config.extractConfig === "function") { + return this._distinguishSuppressedMessages(this._verifyWithConfigArray(textOrSourceCode, config, options)); + } } + /* + * If we get to here, it means `config` is just an object rather + * than a config array so we can go right into linting. + */ + /* * `Linter` doesn't support `overrides` property in configuration. * So we cannot apply multiple processors. */ if (options.preprocess || options.postprocess) { - return this._verifyWithProcessor(textOrSourceCode, config, options); + return this._distinguishSuppressedMessages(this._verifyWithProcessor(textOrSourceCode, config, options)); } - return this._verifyWithoutProcessors(textOrSourceCode, config, options); + return this._distinguishSuppressedMessages(this._verifyWithoutProcessors(textOrSourceCode, config, options)); + } + + /** + * Verify with a processor. + * @param {string|SourceCode} textOrSourceCode The source code. + * @param {FlatConfig} config The config array. + * @param {VerifyOptions&ProcessorOptions} options The options. + * @param {FlatConfigArray} [configForRecursive] The `ConfigArray` object to apply multiple processors recursively. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. + */ + _verifyWithFlatConfigArrayAndProcessor(textOrSourceCode, config, options, configForRecursive) { + const filename = options.filename || ""; + const filenameToExpose = normalizeFilename(filename); + const physicalFilename = options.physicalFilename || filenameToExpose; + const text = ensureText(textOrSourceCode); + const preprocess = options.preprocess || (rawText => [rawText]); + const postprocess = options.postprocess || (messagesList => messagesList.flat()); + const filterCodeBlock = + options.filterCodeBlock || + (blockFilename => blockFilename.endsWith(".js")); + const originalExtname = path.extname(filename); + + let blocks; + + try { + blocks = preprocess(text, filenameToExpose); + } catch (ex) { + + // If the message includes a leading line number, strip it: + const message = `Preprocessing error: ${ex.message.replace(/^line \d+:/iu, "").trim()}`; + + debug("%s\n%s", message, ex.stack); + + return [ + { + ruleId: null, + fatal: true, + severity: 2, + message, + line: ex.lineNumber, + column: ex.column, + nodeType: null + } + ]; + } + + const messageLists = blocks.map((block, i) => { + debug("A code block was found: %o", block.filename || "(unnamed)"); + + // Keep the legacy behavior. + if (typeof block === "string") { + return this._verifyWithFlatConfigArrayAndWithoutProcessors(block, config, options); + } + + const blockText = block.text; + const blockName = path.join(filename, `${i}_${block.filename}`); + + // Skip this block if filtered. + if (!filterCodeBlock(blockName, blockText)) { + debug("This code block was skipped."); + return []; + } + + // Resolve configuration again if the file content or extension was changed. + if (configForRecursive && (text !== blockText || path.extname(blockName) !== originalExtname)) { + debug("Resolving configuration again because the file content or extension was changed."); + return this._verifyWithFlatConfigArray( + blockText, + configForRecursive, + { ...options, filename: blockName, physicalFilename } + ); + } + + // Does lint. + return this._verifyWithFlatConfigArrayAndWithoutProcessors( + blockText, + config, + { ...options, filename: blockName, physicalFilename } + ); + }); + + return postprocess(messageLists, filenameToExpose); + } + + /** + * Same as linter.verify, except without support for processors. + * @param {string|SourceCode} textOrSourceCode The text to parse or a SourceCode object. + * @param {FlatConfig} providedConfig An ESLintConfig instance to configure everything. + * @param {VerifyOptions} [providedOptions] The optional filename of the file being checked. + * @throws {Error} If during rule execution. + * @returns {(LintMessage|SuppressedLintMessage)[]} The results as an array of messages or an empty array if no messages. + */ + _verifyWithFlatConfigArrayAndWithoutProcessors(textOrSourceCode, providedConfig, providedOptions) { + const slots = internalSlotsMap.get(this); + const config = providedConfig || {}; + const options = normalizeVerifyOptions(providedOptions, config); + let text; + + // evaluate arguments + if (typeof textOrSourceCode === "string") { + slots.lastSourceCode = null; + text = textOrSourceCode; + } else { + slots.lastSourceCode = textOrSourceCode; + text = textOrSourceCode.text; + } + + const languageOptions = config.languageOptions; + + languageOptions.ecmaVersion = normalizeEcmaVersionForLanguageOptions( + languageOptions.ecmaVersion + ); + + // double check that there is a parser to avoid mysterious error messages + if (!languageOptions.parser) { + throw new TypeError(`No parser specified for ${options.filename}`); + } + + // Espree expects this information to be passed in + if (isEspree(languageOptions.parser)) { + const parserOptions = languageOptions.parserOptions; + + if (languageOptions.sourceType) { + + parserOptions.sourceType = languageOptions.sourceType; + + if ( + parserOptions.sourceType === "module" && + parserOptions.ecmaFeatures && + parserOptions.ecmaFeatures.globalReturn + ) { + parserOptions.ecmaFeatures.globalReturn = false; + } + } + } + + const settings = config.settings || {}; + + if (!slots.lastSourceCode) { + const parseResult = parse( + text, + languageOptions, + options.filename + ); + + if (!parseResult.success) { + return [parseResult.error]; + } + + slots.lastSourceCode = parseResult.sourceCode; + } else { + + /* + * If the given source code object as the first argument does not have scopeManager, analyze the scope. + * This is for backward compatibility (SourceCode is frozen so it cannot rebind). + */ + if (!slots.lastSourceCode.scopeManager) { + slots.lastSourceCode = new SourceCode({ + text: slots.lastSourceCode.text, + ast: slots.lastSourceCode.ast, + parserServices: slots.lastSourceCode.parserServices, + visitorKeys: slots.lastSourceCode.visitorKeys, + scopeManager: analyzeScope(slots.lastSourceCode.ast, languageOptions) + }); + } + } + + const sourceCode = slots.lastSourceCode; + + /* + * Make adjustments based on the language options. For JavaScript, + * this is primarily about adding variables into the global scope + * to account for ecmaVersion and configured globals. + */ + sourceCode.applyLanguageOptions(languageOptions); + + const mergedInlineConfig = { + rules: {} + }; + const inlineConfigProblems = []; + + /* + * Inline config can be either enabled or disabled. If disabled, it's possible + * to detect the inline config and emit a warning (though this is not required). + * So we first check to see if inline config is allowed at all, and if so, we + * need to check if it's a warning or not. + */ + if (options.allowInlineConfig) { + + // if inline config should warn then add the warnings + if (options.warnInlineConfig) { + sourceCode.getInlineConfigNodes().forEach(node => { + inlineConfigProblems.push(createLintingProblem({ + ruleId: null, + message: `'${sourceCode.text.slice(node.range[0], node.range[1])}' has no effect because you have 'noInlineConfig' setting in ${options.warnInlineConfig}.`, + loc: node.loc, + severity: 1 + })); + + }); + } else { + const inlineConfigResult = sourceCode.applyInlineConfig(); + + inlineConfigProblems.push( + ...inlineConfigResult.problems + .map(createLintingProblem) + .map(problem => { + problem.fatal = true; + return problem; + }) + ); + + // next we need to verify information about the specified rules + const ruleValidator = new RuleValidator(); + + for (const { config: inlineConfig, node } of inlineConfigResult.configs) { + + Object.keys(inlineConfig.rules).forEach(ruleId => { + const rule = getRuleFromConfig(ruleId, config); + const ruleValue = inlineConfig.rules[ruleId]; + + if (!rule) { + inlineConfigProblems.push(createLintingProblem({ ruleId, loc: node.loc })); + return; + } + + try { + + const ruleOptions = Array.isArray(ruleValue) ? ruleValue : [ruleValue]; + + assertIsRuleOptions(ruleId, ruleValue); + assertIsRuleSeverity(ruleId, ruleOptions[0]); + + ruleValidator.validate({ + plugins: config.plugins, + rules: { + [ruleId]: ruleOptions + } + }); + mergedInlineConfig.rules[ruleId] = ruleValue; + } catch (err) { + + let baseMessage = err.message.slice( + err.message.startsWith("Key \"rules\":") + ? err.message.indexOf(":", 12) + 1 + : err.message.indexOf(":") + 1 + ).trim(); + + if (err.messageTemplate) { + baseMessage += ` You passed "${ruleValue}".`; + } + + inlineConfigProblems.push(createLintingProblem({ + ruleId, + message: `Inline configuration for rule "${ruleId}" is invalid:\n\t${baseMessage}\n`, + loc: node.loc + })); + } + }); + } + } + } + + const commentDirectives = options.allowInlineConfig && !options.warnInlineConfig + ? getDirectiveCommentsForFlatConfig( + sourceCode, + ruleId => getRuleFromConfig(ruleId, config) + ) + : { problems: [], disableDirectives: [] }; + + const configuredRules = Object.assign({}, config.rules, mergedInlineConfig.rules); + let lintingProblems; + + sourceCode.finalize(); + + try { + lintingProblems = runRules( + sourceCode, + configuredRules, + ruleId => getRuleFromConfig(ruleId, config), + void 0, + languageOptions, + settings, + options.filename, + options.disableFixes, + slots.cwd, + providedOptions.physicalFilename + ); + } catch (err) { + err.message += `\nOccurred while linting ${options.filename}`; + debug("An error occurred while traversing"); + debug("Filename:", options.filename); + if (err.currentNode) { + const { line } = err.currentNode.loc.start; + + debug("Line:", line); + err.message += `:${line}`; + } + debug("Parser Options:", languageOptions.parserOptions); + + // debug("Parser Path:", parserName); + debug("Settings:", settings); + + if (err.ruleId) { + err.message += `\nRule: "${err.ruleId}"`; + } + + throw err; + } + + return applyDisableDirectives({ + directives: commentDirectives.disableDirectives, + disableFixes: options.disableFixes, + problems: lintingProblems + .concat(commentDirectives.problems) + .concat(inlineConfigProblems) + .sort((problemA, problemB) => problemA.line - problemB.line || problemA.column - problemB.column), + reportUnusedDisableDirectives: options.reportUnusedDisableDirectives + }); } /** @@ -1243,7 +1777,7 @@ class Linter { * @param {string|SourceCode} textOrSourceCode The source code. * @param {ConfigArray} configArray The config array. * @param {VerifyOptions&ProcessorOptions} options The options. - * @returns {LintMessage[]} The found problems. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. */ _verifyWithConfigArray(textOrSourceCode, configArray, options) { debug("With ConfigArray: %s", options.filename); @@ -1273,25 +1807,105 @@ class Linter { return this._verifyWithoutProcessors(textOrSourceCode, config, options); } + /** + * Verify a given code with a flat config. + * @param {string|SourceCode} textOrSourceCode The source code. + * @param {FlatConfigArray} configArray The config array. + * @param {VerifyOptions&ProcessorOptions} options The options. + * @param {boolean} [firstCall=false] Indicates if this is being called directly + * from verify(). (TODO: Remove once eslintrc is removed.) + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. + */ + _verifyWithFlatConfigArray(textOrSourceCode, configArray, options, firstCall = false) { + debug("With flat config: %s", options.filename); + + // we need a filename to match configs against + const filename = options.filename || "__placeholder__.js"; + + // Store the config array in order to get plugin envs and rules later. + internalSlotsMap.get(this).lastConfigArray = configArray; + const config = configArray.getConfig(filename); + + if (!config) { + return [ + { + ruleId: null, + severity: 1, + message: `No matching configuration found for ${filename}.`, + line: 0, + column: 0, + nodeType: null + } + ]; + } + + // Verify. + if (config.processor) { + debug("Apply the processor: %o", config.processor); + const { preprocess, postprocess, supportsAutofix } = config.processor; + const disableFixes = options.disableFixes || !supportsAutofix; + + return this._verifyWithFlatConfigArrayAndProcessor( + textOrSourceCode, + config, + { ...options, filename, disableFixes, postprocess, preprocess }, + configArray + ); + } + + // check for options-based processing + if (firstCall && (options.preprocess || options.postprocess)) { + return this._verifyWithFlatConfigArrayAndProcessor(textOrSourceCode, config, options); + } + + return this._verifyWithFlatConfigArrayAndWithoutProcessors(textOrSourceCode, config, options); + } + /** * Verify with a processor. * @param {string|SourceCode} textOrSourceCode The source code. * @param {ConfigData|ExtractedConfig} config The config array. * @param {VerifyOptions&ProcessorOptions} options The options. * @param {ConfigArray} [configForRecursive] The `ConfigArray` object to apply multiple processors recursively. - * @returns {LintMessage[]} The found problems. + * @returns {(LintMessage|SuppressedLintMessage)[]} The found problems. */ _verifyWithProcessor(textOrSourceCode, config, options, configForRecursive) { const filename = options.filename || ""; const filenameToExpose = normalizeFilename(filename); + const physicalFilename = options.physicalFilename || filenameToExpose; const text = ensureText(textOrSourceCode); const preprocess = options.preprocess || (rawText => [rawText]); - const postprocess = options.postprocess || lodash.flatten; + const postprocess = options.postprocess || (messagesList => messagesList.flat()); const filterCodeBlock = options.filterCodeBlock || (blockFilename => blockFilename.endsWith(".js")); const originalExtname = path.extname(filename); - const messageLists = preprocess(text, filenameToExpose).map((block, i) => { + + let blocks; + + try { + blocks = preprocess(text, filenameToExpose); + } catch (ex) { + + // If the message includes a leading line number, strip it: + const message = `Preprocessing error: ${ex.message.replace(/^line \d+:/iu, "").trim()}`; + + debug("%s\n%s", message, ex.stack); + + return [ + { + ruleId: null, + fatal: true, + severity: 2, + message, + line: ex.lineNumber, + column: ex.column, + nodeType: null + } + ]; + } + + const messageLists = blocks.map((block, i) => { debug("A code block was found: %o", block.filename || "(unnamed)"); // Keep the legacy behavior. @@ -1308,13 +1922,13 @@ class Linter { return []; } - // Resolve configuration again if the file extension was changed. - if (configForRecursive && path.extname(blockName) !== originalExtname) { - debug("Resolving configuration again because the file extension was changed."); + // Resolve configuration again if the file content or extension was changed. + if (configForRecursive && (text !== blockText || path.extname(blockName) !== originalExtname)) { + debug("Resolving configuration again because the file content or extension was changed."); return this._verifyWithConfigArray( blockText, configForRecursive, - { ...options, filename: blockName } + { ...options, filename: blockName, physicalFilename } ); } @@ -1322,13 +1936,37 @@ class Linter { return this._verifyWithoutProcessors( blockText, config, - { ...options, filename: blockName } + { ...options, filename: blockName, physicalFilename } ); }); return postprocess(messageLists, filenameToExpose); } + /** + * Given a list of reported problems, distinguish problems between normal messages and suppressed messages. + * The normal messages will be returned and the suppressed messages will be stored as lastSuppressedMessages. + * @param {Array} problems A list of reported problems. + * @returns {LintMessage[]} A list of LintMessage. + */ + _distinguishSuppressedMessages(problems) { + const messages = []; + const suppressedMessages = []; + const slots = internalSlotsMap.get(this); + + for (const problem of problems) { + if (problem.suppressions) { + suppressedMessages.push(problem); + } else { + messages.push(problem); + } + } + + slots.lastSuppressedMessages = suppressedMessages; + + return messages; + } + /** * Gets the SourceCode object representing the parsed source. * @returns {SourceCode} The SourceCode object. @@ -1337,6 +1975,14 @@ class Linter { return internalSlotsMap.get(this).lastSourceCode; } + /** + * Gets the list of SuppressedLintMessage produced in the last running. + * @returns {SuppressedLintMessage[]} The list of SuppressedLintMessage + */ + getSuppressedMessages() { + return internalSlotsMap.get(this).lastSuppressedMessages; + } + /** * Defines a new linting rule. * @param {string} ruleId A unique rule identifier @@ -1344,6 +1990,7 @@ class Linter { * @returns {void} */ defineRule(ruleId, ruleModule) { + assertEslintrcConfig(this); internalSlotsMap.get(this).ruleMap.define(ruleId, ruleModule); } @@ -1353,6 +2000,7 @@ class Linter { * @returns {void} */ defineRules(rulesToDefine) { + assertEslintrcConfig(this); Object.getOwnPropertyNames(rulesToDefine).forEach(ruleId => { this.defineRule(ruleId, rulesToDefine[ruleId]); }); @@ -1363,6 +2011,7 @@ class Linter { * @returns {Map} All loaded rules */ getRules() { + assertEslintrcConfig(this); const { lastConfigArray, ruleMap } = internalSlotsMap.get(this); return new Map(function *() { @@ -1381,6 +2030,7 @@ class Linter { * @returns {void} */ defineParser(parserId, parserModule) { + assertEslintrcConfig(this); internalSlotsMap.get(this).parserMap.set(parserId, parserModule); } @@ -1388,7 +2038,7 @@ class Linter { * Performs multiple autofix passes over the text until as many fixes as possible * have been applied. * @param {string} text The source text to apply fixes to. - * @param {ConfigData|ConfigArray} config The ESLint config object to use. + * @param {ConfigData|ConfigArray|FlatConfigArray} config The ESLint config object to use. * @param {VerifyOptions&ProcessorOptions&FixOptions} options The ESLint options object to use. * @returns {{fixed:boolean,messages:LintMessage[],output:string}} The result of the fix operation as returned from the * SourceCodeFixer. diff --git a/node_modules/eslint/lib/linter/node-event-generator.js b/node_modules/eslint/lib/linter/node-event-generator.js index 0b4e50fc4..d56bef2fa 100644 --- a/node_modules/eslint/lib/linter/node-event-generator.js +++ b/node_modules/eslint/lib/linter/node-event-generator.js @@ -10,7 +10,6 @@ //------------------------------------------------------------------------------ const esquery = require("esquery"); -const lodash = require("lodash"); //------------------------------------------------------------------------------ // Typedefs @@ -32,6 +31,33 @@ const lodash = require("lodash"); // Helpers //------------------------------------------------------------------------------ +/** + * Computes the union of one or more arrays + * @param {...any[]} arrays One or more arrays to union + * @returns {any[]} The union of the input arrays + */ +function union(...arrays) { + return [...new Set(arrays.flat())]; +} + +/** + * Computes the intersection of one or more arrays + * @param {...any[]} arrays One or more arrays to intersect + * @returns {any[]} The intersection of the input arrays + */ +function intersection(...arrays) { + if (arrays.length === 0) { + return []; + } + + let result = [...new Set(arrays[0])]; + + for (const array of arrays.slice(1)) { + result = result.filter(x => array.includes(x)); + } + return result; +} + /** * Gets the possible types of a selector * @param {Object} parsedSelector An object (from esquery) describing the matching behavior of the selector @@ -46,7 +72,7 @@ function getPossibleTypes(parsedSelector) { const typesForComponents = parsedSelector.selectors.map(getPossibleTypes); if (typesForComponents.every(Boolean)) { - return lodash.union(...typesForComponents); + return union(...typesForComponents); } return null; } @@ -63,7 +89,7 @@ function getPossibleTypes(parsedSelector) { * If at least one of the components could only match a particular type, the compound could only match * the intersection of those types. */ - return lodash.intersection(...typesForComponents); + return intersection(...typesForComponents); } case "child": @@ -72,6 +98,13 @@ function getPossibleTypes(parsedSelector) { case "adjacent": return getPossibleTypes(parsedSelector.right); + case "class": + if (parsedSelector.name === "function") { + return ["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"]; + } + + return null; + default: return null; @@ -166,15 +199,21 @@ function tryParseSelector(rawSelector) { } } +const selectorCache = new Map(); + /** * Parses a raw selector string, and returns the parsed selector along with specificity and type information. * @param {string} rawSelector A raw AST selector * @returns {ASTSelector} A selector descriptor */ -const parseSelector = lodash.memoize(rawSelector => { +function parseSelector(rawSelector) { + if (selectorCache.has(rawSelector)) { + return selectorCache.get(rawSelector); + } + const parsedSelector = tryParseSelector(rawSelector); - return { + const result = { rawSelector, isExit: rawSelector.endsWith(":exit"), parsedSelector, @@ -182,7 +221,10 @@ const parseSelector = lodash.memoize(rawSelector => { attributeCount: countClassAttributes(parsedSelector), identifierCount: countIdentifiers(parsedSelector) }; -}); + + selectorCache.set(rawSelector, result); + return result; +} //------------------------------------------------------------------------------ // Public Interface @@ -202,7 +244,6 @@ const parseSelector = lodash.memoize(rawSelector => { */ class NodeEventGenerator { - // eslint-disable-next-line jsdoc/require-description /** * @param {SafeEmitter} emitter * An SafeEmitter which is the destination of events. This emitter must already diff --git a/node_modules/eslint/lib/linter/report-translator.js b/node_modules/eslint/lib/linter/report-translator.js index 75005c16e..41a43eadc 100644 --- a/node_modules/eslint/lib/linter/report-translator.js +++ b/node_modules/eslint/lib/linter/report-translator.js @@ -17,6 +17,8 @@ const interpolate = require("./interpolate"); // Typedefs //------------------------------------------------------------------------------ +/** @typedef {import("../shared/types").LintMessage} LintMessage */ + /** * An error message description * @typedef {Object} MessageDescriptor @@ -29,23 +31,6 @@ const interpolate = require("./interpolate"); * @property {Array<{desc?: string, messageId?: string, fix: Function}>} suggest Suggestion descriptions and functions to create a the associated fixes. */ -/** - * Information about the report - * @typedef {Object} ReportInfo - * @property {string} ruleId - * @property {(0|1|2)} severity - * @property {(string|undefined)} message - * @property {(string|undefined)} [messageId] - * @property {number} line - * @property {number} column - * @property {(number|undefined)} [endLine] - * @property {(number|undefined)} [endColumn] - * @property {(string|null)} nodeType - * @property {string} source - * @property {({text: string, range: (number[]|null)}|null)} [fix] - * @property {Array<{text: string, range: (number[]|null)}|null>} [suggestions] - */ - //------------------------------------------------------------------------------ // Module Definition //------------------------------------------------------------------------------ @@ -115,6 +100,22 @@ function normalizeReportLoc(descriptor) { return descriptor.node.loc; } +/** + * Clones the given fix object. + * @param {Fix|null} fix The fix to clone. + * @returns {Fix|null} Deep cloned fix object or `null` if `null` or `undefined` was passed in. + */ +function cloneFix(fix) { + if (!fix) { + return null; + } + + return { + range: [fix.range[0], fix.range[1]], + text: fix.text + }; +} + /** * Check that a fix has a valid range. * @param {Fix|null} fix The fix to validate. @@ -152,7 +153,7 @@ function mergeFixes(fixes, sourceCode) { return null; } if (fixes.length === 1) { - return fixes[0]; + return cloneFix(fixes[0]); } fixes.sort(compareFixesByRange); @@ -198,7 +199,7 @@ function normalizeFixes(descriptor, sourceCode) { } assertValidFix(fix); - return fix; + return cloneFix(fix); } /** @@ -239,7 +240,7 @@ function mapSuggestions(descriptor, sourceCode, messages) { * @param {{start: SourceLocation, end: (SourceLocation|null)}} options.loc Start and end location * @param {{text: string, range: (number[]|null)}} options.fix The fix object * @param {Array<{text: string, range: (number[]|null)}>} options.suggestions The array of suggestions objects - * @returns {function(...args): ReportInfo} Function that returns information about the report + * @returns {LintMessage} Information about the report */ function createProblem(options) { const problem = { @@ -314,7 +315,7 @@ function validateSuggestions(suggest, messages) { * problem for the Node.js API. * @param {{ruleId: string, severity: number, sourceCode: SourceCode, messageIds: Object, disableFixes: boolean}} metadata Metadata for the reported problem * @param {SourceCode} sourceCode The `SourceCode` instance for the text being linted - * @returns {function(...args): ReportInfo} Function that returns information about the report + * @returns {function(...args): LintMessage} Function that returns information about the report */ module.exports = function createReportTranslator(metadata) { diff --git a/node_modules/eslint/lib/linter/rules.js b/node_modules/eslint/lib/linter/rules.js index a153266ef..647bab687 100644 --- a/node_modules/eslint/lib/linter/rules.js +++ b/node_modules/eslint/lib/linter/rules.js @@ -30,6 +30,9 @@ function normalizeRule(rule) { // Public Interface //------------------------------------------------------------------------------ +/** + * A storage for rules. + */ class Rules { constructor() { this._rules = Object.create(null); diff --git a/node_modules/eslint/lib/linter/safe-emitter.js b/node_modules/eslint/lib/linter/safe-emitter.js index ab212230d..f4837c1dd 100644 --- a/node_modules/eslint/lib/linter/safe-emitter.js +++ b/node_modules/eslint/lib/linter/safe-emitter.js @@ -12,8 +12,8 @@ /** * An event emitter * @typedef {Object} SafeEmitter - * @property {function(eventName: string, listenerFunc: Function): void} on Adds a listener for a given event name - * @property {function(eventName: string, arg1?: any, arg2?: any, arg3?: any)} emit Emits an event with a given name. + * @property {(eventName: string, listenerFunc: Function) => void} on Adds a listener for a given event name + * @property {(eventName: string, arg1?: any, arg2?: any, arg3?: any) => void} emit Emits an event with a given name. * This calls all the listeners that were listening for that name, with `arg1`, `arg2`, and `arg3` as arguments. * @property {function(): string[]} eventNames Gets the list of event names that have registered listeners. */ diff --git a/node_modules/eslint/lib/linter/source-code-fixer.js b/node_modules/eslint/lib/linter/source-code-fixer.js index 53dc1dc6b..15386c926 100644 --- a/node_modules/eslint/lib/linter/source-code-fixer.js +++ b/node_modules/eslint/lib/linter/source-code-fixer.js @@ -80,8 +80,8 @@ SourceCodeFixer.applyFixes = function(sourceText, messages, shouldFix) { /** * Try to use the 'fix' from a problem. - * @param {Message} problem The message object to apply fixes from - * @returns {boolean} Whether fix was successfully applied + * @param {Message} problem The message object to apply fixes from + * @returns {boolean} Whether fix was successfully applied */ function attemptFix(problem) { const fix = problem.fix; diff --git a/node_modules/eslint/lib/linter/timing.js b/node_modules/eslint/lib/linter/timing.js index 582303068..1076ff258 100644 --- a/node_modules/eslint/lib/linter/timing.js +++ b/node_modules/eslint/lib/linter/timing.js @@ -9,7 +9,7 @@ // Helpers //------------------------------------------------------------------------------ -/* istanbul ignore next */ +/* c8 ignore next */ /** * Align the string to left * @param {string} str string to evaluate @@ -22,7 +22,7 @@ function alignLeft(str, len, ch) { return str + new Array(len - str.length + 1).join(ch || " "); } -/* istanbul ignore next */ +/* c8 ignore next */ /** * Align the string to right * @param {string} str string to evaluate @@ -64,7 +64,7 @@ function getListSize() { return TIMING_ENV_VAR_AS_INTEGER > 10 ? TIMING_ENV_VAR_AS_INTEGER : MINIMUM_SIZE; } -/* istanbul ignore next */ +/* c8 ignore next */ /** * display the data * @param {Object} data Data object to be displayed @@ -116,17 +116,17 @@ function display(data) { return ALIGN[index](":", width + extraAlignment, "-"); }).join("|")); - console.log(table.join("\n")); // eslint-disable-line no-console + console.log(table.join("\n")); // eslint-disable-line no-console -- Debugging function } -/* istanbul ignore next */ +/* c8 ignore next */ module.exports = (function() { const data = Object.create(null); /** * Time the run - * @param {*} key key from the data object + * @param {any} key key from the data object * @param {Function} fn function to be called * @returns {Function} function to be executed * @private @@ -138,10 +138,11 @@ module.exports = (function() { return function(...args) { let t = process.hrtime(); + const result = fn(...args); - fn(...args); t = process.hrtime(t); data[key] += t[0] * 1e3 + t[1] / 1e6; + return result; }; } diff --git a/node_modules/eslint/lib/options.js b/node_modules/eslint/lib/options.js index 92c140bd3..089f34743 100644 --- a/node_modules/eslint/lib/options.js +++ b/node_modules/eslint/lib/options.js @@ -32,7 +32,7 @@ const optionator = require("optionator"); * @property {string[]} [ext] Specify JavaScript file extensions * @property {boolean} fix Automatically fix problems * @property {boolean} fixDryRun Automatically fix problems without saving the changes to the file system - * @property {("problem" | "suggestion" | "layout")[]} [fixType] Specify the types of fixes to apply (problem, suggestion, layout) + * @property {("directive" | "problem" | "suggestion" | "layout")[]} [fixType] Specify the types of fixes to apply (directive, problem, suggestion, layout) * @property {string} format Use a specific output format * @property {string[]} [global] Define global variables * @property {boolean} [help] Show help @@ -47,14 +47,16 @@ const optionator = require("optionator"); * @property {Object} [parserOptions] Specify parser options * @property {string[]} [plugin] Specify plugins * @property {string} [printConfig] Print the configuration for the given file - * @property {boolean | undefined} reportUnusedDisableDirectives Adds reported errors for unused eslint-disable directives + * @property {boolean | undefined} reportUnusedDisableDirectives Adds reported errors for unused eslint-disable and eslint-enable directives + * @property {string | undefined} reportUnusedDisableDirectivesSeverity A severity string indicating if and how unused disable and enable directives should be tracked and reported. * @property {string} [resolvePluginsRelativeTo] A folder where plugins should be resolved from, CWD by default * @property {Object} [rule] Specify rules - * @property {string[]} [rulesdir] Use additional rules from this directory + * @property {string[]} [rulesdir] Load additional rules from this directory. Deprecated: Use rules from plugins * @property {boolean} stdin Lint code provided on * @property {string} [stdinFilename] Specify filename to process STDIN as * @property {boolean} quiet Report errors only * @property {boolean} [version] Output the version number + * @property {boolean} warnIgnored Show warnings when the file list includes ignored files * @property {string[]} _ Positional filenames or patterns */ @@ -63,255 +65,334 @@ const optionator = require("optionator"); //------------------------------------------------------------------------------ // exports "parse(args)", "generateHelp()", and "generateHelpForOption(optionName)" -module.exports = optionator({ - prepend: "eslint [options] file.js [file.js] [dir]", - defaults: { - concatRepeatedArrays: true, - mergeRepeatedObjects: true - }, - options: [ - { - heading: "Basic configuration" - }, - { + +/** + * Creates the CLI options for ESLint. + * @param {boolean} usingFlatConfig Indicates if flat config is being used. + * @returns {Object} The optionator instance. + */ +module.exports = function(usingFlatConfig) { + + let lookupFlag; + + if (usingFlatConfig) { + lookupFlag = { + option: "config-lookup", + type: "Boolean", + default: "true", + description: "Disable look up for eslint.config.js" + }; + } else { + lookupFlag = { option: "eslintrc", type: "Boolean", default: "true", description: "Disable use of configuration from .eslintrc.*" - }, - { - option: "config", - alias: "c", - type: "path::String", - description: "Use this configuration, overriding .eslintrc.* config options if present" - }, - { + }; + } + + let envFlag; + + if (!usingFlatConfig) { + envFlag = { option: "env", type: "[String]", description: "Specify environments" - }, - { + }; + } + + let extFlag; + + if (!usingFlatConfig) { + extFlag = { option: "ext", type: "[String]", description: "Specify JavaScript file extensions" - }, - { - option: "global", - type: "[String]", - description: "Define global variables" - }, - { - option: "parser", - type: "String", - description: "Specify the parser to be used" - }, - { - option: "parser-options", - type: "Object", - description: "Specify parser options" - }, - { + }; + } + + let resolvePluginsFlag; + + if (!usingFlatConfig) { + resolvePluginsFlag = { option: "resolve-plugins-relative-to", type: "path::String", description: "A folder where plugins should be resolved from, CWD by default" - }, - { - heading: "Specifying rules and plugins" - }, - { + }; + } + + let rulesDirFlag; + + if (!usingFlatConfig) { + rulesDirFlag = { option: "rulesdir", type: "[path::String]", - description: "Use additional rules from this directory" - }, - { - option: "plugin", - type: "[String]", - description: "Specify plugins" - }, - { - option: "rule", - type: "Object", - description: "Specify rules" - }, - { - heading: "Fixing problems" - }, - { - option: "fix", - type: "Boolean", - default: false, - description: "Automatically fix problems" - }, - { - option: "fix-dry-run", - type: "Boolean", - default: false, - description: "Automatically fix problems without saving the changes to the file system" - }, - { - option: "fix-type", - type: "Array", - description: "Specify the types of fixes to apply (problem, suggestion, layout)" - }, - { - heading: "Ignoring files" - }, - { + description: "Load additional rules from this directory. Deprecated: Use rules from plugins" + }; + } + + let ignorePathFlag; + + if (!usingFlatConfig) { + ignorePathFlag = { option: "ignore-path", type: "path::String", description: "Specify path of ignore file" - }, - { - option: "ignore", - type: "Boolean", - default: "true", - description: "Disable use of ignore files and patterns" - }, - { - option: "ignore-pattern", - type: "[String]", - description: "Pattern of files to ignore (in addition to those in .eslintignore)", - concatRepeatedArrays: [true, { - oneValuePerFlag: true - }] - }, - { - heading: "Using stdin" - }, - { - option: "stdin", - type: "Boolean", - default: "false", - description: "Lint code provided on " - }, - { - option: "stdin-filename", - type: "String", - description: "Specify filename to process STDIN as" - }, - { - heading: "Handling warnings" - }, - { - option: "quiet", - type: "Boolean", - default: "false", - description: "Report errors only" - }, - { - option: "max-warnings", - type: "Int", - default: "-1", - description: "Number of warnings to trigger nonzero exit code" - }, - { - heading: "Output" - }, - { - option: "output-file", - alias: "o", - type: "path::String", - description: "Specify file to write report to" - }, - { - option: "format", - alias: "f", - type: "String", - default: "stylish", - description: "Use a specific output format" - }, - { - option: "color", - type: "Boolean", - alias: "no-color", - description: "Force enabling/disabling of color" - }, - { - heading: "Inline configuration comments" - }, - { - option: "inline-config", - type: "Boolean", - default: "true", - description: "Prevent comments from changing config or rules" - }, - { - option: "report-unused-disable-directives", - type: "Boolean", - default: void 0, - description: "Adds reported errors for unused eslint-disable directives" - }, - { - heading: "Caching" - }, - { - option: "cache", - type: "Boolean", - default: "false", - description: "Only check changed files" - }, - { - option: "cache-file", - type: "path::String", - default: ".eslintcache", - description: "Path to the cache file. Deprecated: use --cache-location" - }, - { - option: "cache-location", - type: "path::String", - description: "Path to the cache file or directory" - }, - { - option: "cache-strategy", - dependsOn: ["cache"], - type: "String", - default: "metadata", - enum: ["metadata", "content"], - description: "Strategy to use for detecting changed files in the cache" - }, - { - heading: "Miscellaneous" - }, - { - option: "init", - type: "Boolean", - default: "false", - description: "Run config initialization wizard" - }, - { - option: "env-info", - type: "Boolean", - default: "false", - description: "Output execution environment information" - }, - { - option: "error-on-unmatched-pattern", + }; + } + + let warnIgnoredFlag; + + if (usingFlatConfig) { + warnIgnoredFlag = { + option: "warn-ignored", type: "Boolean", default: "true", - description: "Prevent errors when pattern is unmatched" - }, - { - option: "debug", - type: "Boolean", - default: false, - description: "Output debugging information" - }, - { - option: "help", - alias: "h", - type: "Boolean", - description: "Show help" - }, - { - option: "version", - alias: "v", - type: "Boolean", - description: "Output the version number" - }, - { - option: "print-config", - type: "path::String", - description: "Print the configuration for the given file" - } - ] -}); + description: "Suppress warnings when the file list includes ignored files" + }; + } + + return optionator({ + prepend: "eslint [options] file.js [file.js] [dir]", + defaults: { + concatRepeatedArrays: true, + mergeRepeatedObjects: true + }, + options: [ + { + heading: "Basic configuration" + }, + lookupFlag, + { + option: "config", + alias: "c", + type: "path::String", + description: usingFlatConfig + ? "Use this configuration instead of eslint.config.js, eslint.config.mjs, or eslint.config.cjs" + : "Use this configuration, overriding .eslintrc.* config options if present" + }, + envFlag, + extFlag, + { + option: "global", + type: "[String]", + description: "Define global variables" + }, + { + option: "parser", + type: "String", + description: "Specify the parser to be used" + }, + { + option: "parser-options", + type: "Object", + description: "Specify parser options" + }, + resolvePluginsFlag, + { + heading: "Specify Rules and Plugins" + }, + { + option: "plugin", + type: "[String]", + description: "Specify plugins" + }, + { + option: "rule", + type: "Object", + description: "Specify rules" + }, + rulesDirFlag, + { + heading: "Fix Problems" + }, + { + option: "fix", + type: "Boolean", + default: false, + description: "Automatically fix problems" + }, + { + option: "fix-dry-run", + type: "Boolean", + default: false, + description: "Automatically fix problems without saving the changes to the file system" + }, + { + option: "fix-type", + type: "Array", + description: "Specify the types of fixes to apply (directive, problem, suggestion, layout)" + }, + { + heading: "Ignore Files" + }, + ignorePathFlag, + { + option: "ignore", + type: "Boolean", + default: "true", + description: "Disable use of ignore files and patterns" + }, + { + option: "ignore-pattern", + type: "[String]", + description: "Pattern of files to ignore (in addition to those in .eslintignore)", + concatRepeatedArrays: [true, { + oneValuePerFlag: true + }] + }, + { + heading: "Use stdin" + }, + { + option: "stdin", + type: "Boolean", + default: "false", + description: "Lint code provided on " + }, + { + option: "stdin-filename", + type: "String", + description: "Specify filename to process STDIN as" + }, + { + heading: "Handle Warnings" + }, + { + option: "quiet", + type: "Boolean", + default: "false", + description: "Report errors only" + }, + { + option: "max-warnings", + type: "Int", + default: "-1", + description: "Number of warnings to trigger nonzero exit code" + }, + { + heading: "Output" + }, + { + option: "output-file", + alias: "o", + type: "path::String", + description: "Specify file to write report to" + }, + { + option: "format", + alias: "f", + type: "String", + default: "stylish", + description: "Use a specific output format" + }, + { + option: "color", + type: "Boolean", + alias: "no-color", + description: "Force enabling/disabling of color" + }, + { + heading: "Inline configuration comments" + }, + { + option: "inline-config", + type: "Boolean", + default: "true", + description: "Prevent comments from changing config or rules" + }, + { + option: "report-unused-disable-directives", + type: "Boolean", + default: void 0, + description: "Adds reported errors for unused eslint-disable and eslint-enable directives" + }, + { + option: "report-unused-disable-directives-severity", + type: "String", + default: void 0, + description: "Chooses severity level for reporting unused eslint-disable and eslint-enable directives", + enum: ["off", "warn", "error", "0", "1", "2"] + }, + { + heading: "Caching" + }, + { + option: "cache", + type: "Boolean", + default: "false", + description: "Only check changed files" + }, + { + option: "cache-file", + type: "path::String", + default: ".eslintcache", + description: "Path to the cache file. Deprecated: use --cache-location" + }, + { + option: "cache-location", + type: "path::String", + description: "Path to the cache file or directory" + }, + { + option: "cache-strategy", + dependsOn: ["cache"], + type: "String", + default: "metadata", + enum: ["metadata", "content"], + description: "Strategy to use for detecting changed files in the cache" + }, + { + heading: "Miscellaneous" + }, + { + option: "init", + type: "Boolean", + default: "false", + description: "Run config initialization wizard" + }, + { + option: "env-info", + type: "Boolean", + default: "false", + description: "Output execution environment information" + }, + { + option: "error-on-unmatched-pattern", + type: "Boolean", + default: "true", + description: "Prevent errors when pattern is unmatched" + }, + { + option: "exit-on-fatal-error", + type: "Boolean", + default: "false", + description: "Exit with exit code 2 in case of fatal error" + }, + warnIgnoredFlag, + { + option: "debug", + type: "Boolean", + default: false, + description: "Output debugging information" + }, + { + option: "help", + alias: "h", + type: "Boolean", + description: "Show help" + }, + { + option: "version", + alias: "v", + type: "Boolean", + description: "Output the version number" + }, + { + option: "print-config", + type: "path::String", + description: "Print the configuration for the given file" + } + ].filter(value => !!value) + }); +}; diff --git a/node_modules/eslint/lib/rule-tester/flat-rule-tester.js b/node_modules/eslint/lib/rule-tester/flat-rule-tester.js new file mode 100644 index 000000000..03a97b072 --- /dev/null +++ b/node_modules/eslint/lib/rule-tester/flat-rule-tester.js @@ -0,0 +1,1131 @@ +/** + * @fileoverview Mocha/Jest test wrapper + * @author Ilya Volodin + */ +"use strict"; + +/* globals describe, it -- Mocha globals */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const + assert = require("assert"), + util = require("util"), + path = require("path"), + equal = require("fast-deep-equal"), + Traverser = require("../shared/traverser"), + { getRuleOptionsSchema } = require("../config/flat-config-helpers"), + { Linter, SourceCodeFixer, interpolate } = require("../linter"), + CodePath = require("../linter/code-path-analysis/code-path"); + +const { FlatConfigArray } = require("../config/flat-config-array"); +const { defaultConfig } = require("../config/default-config"); + +const ajv = require("../shared/ajv")({ strictDefaults: true }); + +const parserSymbol = Symbol.for("eslint.RuleTester.parser"); +const { SourceCode } = require("../source-code"); +const { ConfigArraySymbol } = require("@humanwhocodes/config-array"); + +//------------------------------------------------------------------------------ +// Typedefs +//------------------------------------------------------------------------------ + +/** @typedef {import("../shared/types").Parser} Parser */ +/** @typedef {import("../shared/types").LanguageOptions} LanguageOptions */ +/** @typedef {import("../shared/types").Rule} Rule */ + + +/** + * A test case that is expected to pass lint. + * @typedef {Object} ValidTestCase + * @property {string} [name] Name for the test case. + * @property {string} code Code for the test case. + * @property {any[]} [options] Options for the test case. + * @property {LanguageOptions} [languageOptions] The language options to use in the test case. + * @property {{ [name: string]: any }} [settings] Settings for the test case. + * @property {string} [filename] The fake filename for the test case. Useful for rules that make assertion about filenames. + * @property {boolean} [only] Run only this test case or the subset of test cases with this property. + */ + +/** + * A test case that is expected to fail lint. + * @typedef {Object} InvalidTestCase + * @property {string} [name] Name for the test case. + * @property {string} code Code for the test case. + * @property {number | Array} errors Expected errors. + * @property {string | null} [output] The expected code after autofixes are applied. If set to `null`, the test runner will assert that no autofix is suggested. + * @property {any[]} [options] Options for the test case. + * @property {{ [name: string]: any }} [settings] Settings for the test case. + * @property {string} [filename] The fake filename for the test case. Useful for rules that make assertion about filenames. + * @property {LanguageOptions} [languageOptions] The language options to use in the test case. + * @property {boolean} [only] Run only this test case or the subset of test cases with this property. + */ + +/** + * A description of a reported error used in a rule tester test. + * @typedef {Object} TestCaseError + * @property {string | RegExp} [message] Message. + * @property {string} [messageId] Message ID. + * @property {string} [type] The type of the reported AST node. + * @property {{ [name: string]: string }} [data] The data used to fill the message template. + * @property {number} [line] The 1-based line number of the reported start location. + * @property {number} [column] The 1-based column number of the reported start location. + * @property {number} [endLine] The 1-based line number of the reported end location. + * @property {number} [endColumn] The 1-based column number of the reported end location. + */ + +//------------------------------------------------------------------------------ +// Private Members +//------------------------------------------------------------------------------ + +/* + * testerDefaultConfig must not be modified as it allows to reset the tester to + * the initial default configuration + */ +const testerDefaultConfig = { rules: {} }; + +/* + * RuleTester uses this config as its default. This can be overwritten via + * setDefaultConfig(). + */ +let sharedDefaultConfig = { rules: {} }; + +/* + * List every parameters possible on a test case that are not related to eslint + * configuration + */ +const RuleTesterParameters = [ + "name", + "code", + "filename", + "options", + "errors", + "output", + "only" +]; + +/* + * All allowed property names in error objects. + */ +const errorObjectParameters = new Set([ + "message", + "messageId", + "data", + "type", + "line", + "column", + "endLine", + "endColumn", + "suggestions" +]); +const friendlyErrorObjectParameterList = `[${[...errorObjectParameters].map(key => `'${key}'`).join(", ")}]`; + +/* + * All allowed property names in suggestion objects. + */ +const suggestionObjectParameters = new Set([ + "desc", + "messageId", + "data", + "output" +]); +const friendlySuggestionObjectParameterList = `[${[...suggestionObjectParameters].map(key => `'${key}'`).join(", ")}]`; + +const forbiddenMethods = [ + "applyInlineConfig", + "applyLanguageOptions", + "finalize" +]; + +/** @type {Map} */ +const forbiddenMethodCalls = new Map(forbiddenMethods.map(methodName => ([methodName, new WeakSet()]))); + +const hasOwnProperty = Function.call.bind(Object.hasOwnProperty); + +/** + * Clones a given value deeply. + * Note: This ignores `parent` property. + * @param {any} x A value to clone. + * @returns {any} A cloned value. + */ +function cloneDeeplyExcludesParent(x) { + if (typeof x === "object" && x !== null) { + if (Array.isArray(x)) { + return x.map(cloneDeeplyExcludesParent); + } + + const retv = {}; + + for (const key in x) { + if (key !== "parent" && hasOwnProperty(x, key)) { + retv[key] = cloneDeeplyExcludesParent(x[key]); + } + } + + return retv; + } + + return x; +} + +/** + * Freezes a given value deeply. + * @param {any} x A value to freeze. + * @returns {void} + */ +function freezeDeeply(x) { + if (typeof x === "object" && x !== null) { + if (Array.isArray(x)) { + x.forEach(freezeDeeply); + } else { + for (const key in x) { + if (key !== "parent" && hasOwnProperty(x, key)) { + freezeDeeply(x[key]); + } + } + } + Object.freeze(x); + } +} + +/** + * Replace control characters by `\u00xx` form. + * @param {string} text The text to sanitize. + * @returns {string} The sanitized text. + */ +function sanitize(text) { + if (typeof text !== "string") { + return ""; + } + return text.replace( + /[\u0000-\u0009\u000b-\u001a]/gu, // eslint-disable-line no-control-regex -- Escaping controls + c => `\\u${c.codePointAt(0).toString(16).padStart(4, "0")}` + ); +} + +/** + * Define `start`/`end` properties as throwing error. + * @param {string} objName Object name used for error messages. + * @param {ASTNode} node The node to define. + * @returns {void} + */ +function defineStartEndAsError(objName, node) { + Object.defineProperties(node, { + start: { + get() { + throw new Error(`Use ${objName}.range[0] instead of ${objName}.start`); + }, + configurable: true, + enumerable: false + }, + end: { + get() { + throw new Error(`Use ${objName}.range[1] instead of ${objName}.end`); + }, + configurable: true, + enumerable: false + } + }); +} + + +/** + * Define `start`/`end` properties of all nodes of the given AST as throwing error. + * @param {ASTNode} ast The root node to errorize `start`/`end` properties. + * @param {Object} [visitorKeys] Visitor keys to be used for traversing the given ast. + * @returns {void} + */ +function defineStartEndAsErrorInTree(ast, visitorKeys) { + Traverser.traverse(ast, { visitorKeys, enter: defineStartEndAsError.bind(null, "node") }); + ast.tokens.forEach(defineStartEndAsError.bind(null, "token")); + ast.comments.forEach(defineStartEndAsError.bind(null, "token")); +} + +/** + * Wraps the given parser in order to intercept and modify return values from the `parse` and `parseForESLint` methods, for test purposes. + * In particular, to modify ast nodes, tokens and comments to throw on access to their `start` and `end` properties. + * @param {Parser} parser Parser object. + * @returns {Parser} Wrapped parser object. + */ +function wrapParser(parser) { + + if (typeof parser.parseForESLint === "function") { + return { + [parserSymbol]: parser, + parseForESLint(...args) { + const ret = parser.parseForESLint(...args); + + defineStartEndAsErrorInTree(ret.ast, ret.visitorKeys); + return ret; + } + }; + } + + return { + [parserSymbol]: parser, + parse(...args) { + const ast = parser.parse(...args); + + defineStartEndAsErrorInTree(ast); + return ast; + } + }; +} + +/** + * Function to replace `SourceCode.prototype.getComments`. + * @returns {void} + * @throws {Error} Deprecation message. + */ +function getCommentsDeprecation() { + throw new Error( + "`SourceCode#getComments()` is deprecated and will be removed in a future major version. Use `getCommentsBefore()`, `getCommentsAfter()`, and `getCommentsInside()` instead." + ); +} + +/** + * Emit a deprecation warning if rule uses CodePath#currentSegments. + * @param {string} ruleName Name of the rule. + * @returns {void} + */ +function emitCodePathCurrentSegmentsWarning(ruleName) { + if (!emitCodePathCurrentSegmentsWarning[`warned-${ruleName}`]) { + emitCodePathCurrentSegmentsWarning[`warned-${ruleName}`] = true; + process.emitWarning( + `"${ruleName}" rule uses CodePath#currentSegments and will stop working in ESLint v9. Please read the documentation for how to update your code: https://eslint.org/docs/latest/extend/code-path-analysis#usage-examples`, + "DeprecationWarning" + ); + } +} + +/** + * Function to replace forbidden `SourceCode` methods. Allows just one call per method. + * @param {string} methodName The name of the method to forbid. + * @param {Function} prototype The prototype with the original method to call. + * @returns {Function} The function that throws the error. + */ +function throwForbiddenMethodError(methodName, prototype) { + + const original = prototype[methodName]; + + return function(...args) { + + const called = forbiddenMethodCalls.get(methodName); + + /* eslint-disable no-invalid-this -- needed to operate as a method. */ + if (!called.has(this)) { + called.add(this); + + return original.apply(this, args); + } + /* eslint-enable no-invalid-this -- not needed past this point */ + + throw new Error( + `\`SourceCode#${methodName}()\` cannot be called inside a rule.` + ); + }; +} + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +// default separators for testing +const DESCRIBE = Symbol("describe"); +const IT = Symbol("it"); +const IT_ONLY = Symbol("itOnly"); + +/** + * This is `it` default handler if `it` don't exist. + * @this {Mocha} + * @param {string} text The description of the test case. + * @param {Function} method The logic of the test case. + * @throws {Error} Any error upon execution of `method`. + * @returns {any} Returned value of `method`. + */ +function itDefaultHandler(text, method) { + try { + return method.call(this); + } catch (err) { + if (err instanceof assert.AssertionError) { + err.message += ` (${util.inspect(err.actual)} ${err.operator} ${util.inspect(err.expected)})`; + } + throw err; + } +} + +/** + * This is `describe` default handler if `describe` don't exist. + * @this {Mocha} + * @param {string} text The description of the test case. + * @param {Function} method The logic of the test case. + * @returns {any} Returned value of `method`. + */ +function describeDefaultHandler(text, method) { + return method.call(this); +} + +/** + * Mocha test wrapper. + */ +class FlatRuleTester { + + /** + * Creates a new instance of RuleTester. + * @param {Object} [testerConfig] Optional, extra configuration for the tester + */ + constructor(testerConfig = {}) { + + /** + * The configuration to use for this tester. Combination of the tester + * configuration and the default configuration. + * @type {Object} + */ + this.testerConfig = [ + sharedDefaultConfig, + testerConfig, + { rules: { "rule-tester/validate-ast": "error" } } + ]; + + this.linter = new Linter({ configType: "flat" }); + } + + /** + * Set the configuration to use for all future tests + * @param {Object} config the configuration to use. + * @throws {TypeError} If non-object config. + * @returns {void} + */ + static setDefaultConfig(config) { + if (typeof config !== "object" || config === null) { + throw new TypeError("FlatRuleTester.setDefaultConfig: config must be an object"); + } + sharedDefaultConfig = config; + + // Make sure the rules object exists since it is assumed to exist later + sharedDefaultConfig.rules = sharedDefaultConfig.rules || {}; + } + + /** + * Get the current configuration used for all tests + * @returns {Object} the current configuration + */ + static getDefaultConfig() { + return sharedDefaultConfig; + } + + /** + * Reset the configuration to the initial configuration of the tester removing + * any changes made until now. + * @returns {void} + */ + static resetDefaultConfig() { + sharedDefaultConfig = { + rules: { + ...testerDefaultConfig.rules + } + }; + } + + + /* + * If people use `mocha test.js --watch` command, `describe` and `it` function + * instances are different for each execution. So `describe` and `it` should get fresh instance + * always. + */ + static get describe() { + return ( + this[DESCRIBE] || + (typeof describe === "function" ? describe : describeDefaultHandler) + ); + } + + static set describe(value) { + this[DESCRIBE] = value; + } + + static get it() { + return ( + this[IT] || + (typeof it === "function" ? it : itDefaultHandler) + ); + } + + static set it(value) { + this[IT] = value; + } + + /** + * Adds the `only` property to a test to run it in isolation. + * @param {string | ValidTestCase | InvalidTestCase} item A single test to run by itself. + * @returns {ValidTestCase | InvalidTestCase} The test with `only` set. + */ + static only(item) { + if (typeof item === "string") { + return { code: item, only: true }; + } + + return { ...item, only: true }; + } + + static get itOnly() { + if (typeof this[IT_ONLY] === "function") { + return this[IT_ONLY]; + } + if (typeof this[IT] === "function" && typeof this[IT].only === "function") { + return Function.bind.call(this[IT].only, this[IT]); + } + if (typeof it === "function" && typeof it.only === "function") { + return Function.bind.call(it.only, it); + } + + if (typeof this[DESCRIBE] === "function" || typeof this[IT] === "function") { + throw new Error( + "Set `RuleTester.itOnly` to use `only` with a custom test framework.\n" + + "See https://eslint.org/docs/latest/integrate/nodejs-api#customizing-ruletester for more." + ); + } + if (typeof it === "function") { + throw new Error("The current test framework does not support exclusive tests with `only`."); + } + throw new Error("To use `only`, use RuleTester with a test framework that provides `it.only()` like Mocha."); + } + + static set itOnly(value) { + this[IT_ONLY] = value; + } + + + /** + * Adds a new rule test to execute. + * @param {string} ruleName The name of the rule to run. + * @param {Function | Rule} rule The rule to test. + * @param {{ + * valid: (ValidTestCase | string)[], + * invalid: InvalidTestCase[] + * }} test The collection of tests to run. + * @throws {TypeError|Error} If non-object `test`, or if a required + * scenario of the given type is missing. + * @returns {void} + */ + run(ruleName, rule, test) { + + const testerConfig = this.testerConfig, + requiredScenarios = ["valid", "invalid"], + scenarioErrors = [], + linter = this.linter, + ruleId = `rule-to-test/${ruleName}`; + + if (!test || typeof test !== "object") { + throw new TypeError(`Test Scenarios for rule ${ruleName} : Could not find test scenario object`); + } + + requiredScenarios.forEach(scenarioType => { + if (!test[scenarioType]) { + scenarioErrors.push(`Could not find any ${scenarioType} test scenarios`); + } + }); + + if (scenarioErrors.length > 0) { + throw new Error([ + `Test Scenarios for rule ${ruleName} is invalid:` + ].concat(scenarioErrors).join("\n")); + } + + const baseConfig = [ + { files: ["**"] }, // Make sure the default config matches for all files + { + plugins: { + + // copy root plugin over + "@": { + + /* + * Parsers are wrapped to detect more errors, so this needs + * to be a new object for each call to run(), otherwise the + * parsers will be wrapped multiple times. + */ + parsers: { + ...defaultConfig[0].plugins["@"].parsers + }, + + /* + * The rules key on the default plugin is a proxy to lazy-load + * just the rules that are needed. So, don't create a new object + * here, just use the default one to keep that performance + * enhancement. + */ + rules: defaultConfig[0].plugins["@"].rules + }, + "rule-to-test": { + rules: { + [ruleName]: Object.assign({}, rule, { + + // Create a wrapper rule that freezes the `context` properties. + create(context) { + freezeDeeply(context.options); + freezeDeeply(context.settings); + freezeDeeply(context.parserOptions); + + // freezeDeeply(context.languageOptions); + + return (typeof rule === "function" ? rule : rule.create)(context); + } + }) + } + } + }, + languageOptions: { + ...defaultConfig[0].languageOptions + } + }, + ...defaultConfig.slice(1) + ]; + + /** + * Run the rule for the given item + * @param {string|Object} item Item to run the rule against + * @throws {Error} If an invalid schema. + * @returns {Object} Eslint run result + * @private + */ + function runRuleForItem(item) { + const flatConfigArrayOptions = { + baseConfig + }; + + if (item.filename) { + flatConfigArrayOptions.basePath = path.parse(item.filename).root; + } + + const configs = new FlatConfigArray(testerConfig, flatConfigArrayOptions); + + /* + * Modify the returned config so that the parser is wrapped to catch + * access of the start/end properties. This method is called just + * once per code snippet being tested, so each test case gets a clean + * parser. + */ + configs[ConfigArraySymbol.finalizeConfig] = function(...args) { + + // can't do super here :( + const proto = Object.getPrototypeOf(this); + const calculatedConfig = proto[ConfigArraySymbol.finalizeConfig].apply(this, args); + + // wrap the parser to catch start/end property access + calculatedConfig.languageOptions.parser = wrapParser(calculatedConfig.languageOptions.parser); + return calculatedConfig; + }; + + let code, filename, output, beforeAST, afterAST; + + if (typeof item === "string") { + code = item; + } else { + code = item.code; + + /* + * Assumes everything on the item is a config except for the + * parameters used by this tester + */ + const itemConfig = { ...item }; + + for (const parameter of RuleTesterParameters) { + delete itemConfig[parameter]; + } + + // wrap any parsers + if (itemConfig.languageOptions && itemConfig.languageOptions.parser) { + + const parser = itemConfig.languageOptions.parser; + + if (parser && typeof parser !== "object") { + throw new Error("Parser must be an object with a parse() or parseForESLint() method."); + } + + } + + /* + * Create the config object from the tester config and this item + * specific configurations. + */ + configs.push(itemConfig); + } + + if (item.filename) { + filename = item.filename; + } + + let ruleConfig = 1; + + if (hasOwnProperty(item, "options")) { + assert(Array.isArray(item.options), "options must be an array"); + ruleConfig = [1, ...item.options]; + } + + configs.push({ + rules: { + [ruleId]: ruleConfig + } + }); + + const schema = getRuleOptionsSchema(rule); + + /* + * Setup AST getters. + * The goal is to check whether or not AST was modified when + * running the rule under test. + */ + configs.push({ + plugins: { + "rule-tester": { + rules: { + "validate-ast": { + create() { + return { + Program(node) { + beforeAST = cloneDeeplyExcludesParent(node); + }, + "Program:exit"(node) { + afterAST = node; + } + }; + } + } + } + } + } + }); + + if (schema) { + ajv.validateSchema(schema); + + if (ajv.errors) { + const errors = ajv.errors.map(error => { + const field = error.dataPath[0] === "." ? error.dataPath.slice(1) : error.dataPath; + + return `\t${field}: ${error.message}`; + }).join("\n"); + + throw new Error([`Schema for rule ${ruleName} is invalid:`, errors]); + } + + /* + * `ajv.validateSchema` checks for errors in the structure of the schema (by comparing the schema against a "meta-schema"), + * and it reports those errors individually. However, there are other types of schema errors that only occur when compiling + * the schema (e.g. using invalid defaults in a schema), and only one of these errors can be reported at a time. As a result, + * the schema is compiled here separately from checking for `validateSchema` errors. + */ + try { + ajv.compile(schema); + } catch (err) { + throw new Error(`Schema for rule ${ruleName} is invalid: ${err.message}`); + } + } + + // check for validation errors + try { + configs.normalizeSync(); + configs.getConfig("test.js"); + } catch (error) { + error.message = `ESLint configuration in rule-tester is invalid: ${error.message}`; + throw error; + } + + // Verify the code. + const { getComments, applyLanguageOptions, applyInlineConfig, finalize } = SourceCode.prototype; + const originalCurrentSegments = Object.getOwnPropertyDescriptor(CodePath.prototype, "currentSegments"); + let messages; + + try { + SourceCode.prototype.getComments = getCommentsDeprecation; + Object.defineProperty(CodePath.prototype, "currentSegments", { + get() { + emitCodePathCurrentSegmentsWarning(ruleName); + return originalCurrentSegments.get.call(this); + } + }); + + forbiddenMethods.forEach(methodName => { + SourceCode.prototype[methodName] = throwForbiddenMethodError(methodName, SourceCode.prototype); + }); + + messages = linter.verify(code, configs, filename); + } finally { + SourceCode.prototype.getComments = getComments; + Object.defineProperty(CodePath.prototype, "currentSegments", originalCurrentSegments); + SourceCode.prototype.applyInlineConfig = applyInlineConfig; + SourceCode.prototype.applyLanguageOptions = applyLanguageOptions; + SourceCode.prototype.finalize = finalize; + } + + + const fatalErrorMessage = messages.find(m => m.fatal); + + assert(!fatalErrorMessage, `A fatal parsing error occurred: ${fatalErrorMessage && fatalErrorMessage.message}`); + + // Verify if autofix makes a syntax error or not. + if (messages.some(m => m.fix)) { + output = SourceCodeFixer.applyFixes(code, messages).output; + const errorMessageInFix = linter.verify(output, configs, filename).find(m => m.fatal); + + assert(!errorMessageInFix, [ + "A fatal parsing error occurred in autofix.", + `Error: ${errorMessageInFix && errorMessageInFix.message}`, + "Autofix output:", + output + ].join("\n")); + } else { + output = code; + } + + return { + messages, + output, + beforeAST, + afterAST: cloneDeeplyExcludesParent(afterAST) + }; + } + + /** + * Check if the AST was changed + * @param {ASTNode} beforeAST AST node before running + * @param {ASTNode} afterAST AST node after running + * @returns {void} + * @private + */ + function assertASTDidntChange(beforeAST, afterAST) { + if (!equal(beforeAST, afterAST)) { + assert.fail("Rule should not modify AST."); + } + } + + /** + * Check if the template is valid or not + * all valid cases go through this + * @param {string|Object} item Item to run the rule against + * @returns {void} + * @private + */ + function testValidTemplate(item) { + const code = typeof item === "object" ? item.code : item; + + assert.ok(typeof code === "string", "Test case must specify a string value for 'code'"); + if (item.name) { + assert.ok(typeof item.name === "string", "Optional test case property 'name' must be a string"); + } + + const result = runRuleForItem(item); + const messages = result.messages; + + assert.strictEqual(messages.length, 0, util.format("Should have no errors but had %d: %s", + messages.length, + util.inspect(messages))); + + assertASTDidntChange(result.beforeAST, result.afterAST); + } + + /** + * Asserts that the message matches its expected value. If the expected + * value is a regular expression, it is checked against the actual + * value. + * @param {string} actual Actual value + * @param {string|RegExp} expected Expected value + * @returns {void} + * @private + */ + function assertMessageMatches(actual, expected) { + if (expected instanceof RegExp) { + + // assert.js doesn't have a built-in RegExp match function + assert.ok( + expected.test(actual), + `Expected '${actual}' to match ${expected}` + ); + } else { + assert.strictEqual(actual, expected); + } + } + + /** + * Check if the template is invalid or not + * all invalid cases go through this. + * @param {string|Object} item Item to run the rule against + * @returns {void} + * @private + */ + function testInvalidTemplate(item) { + assert.ok(typeof item.code === "string", "Test case must specify a string value for 'code'"); + if (item.name) { + assert.ok(typeof item.name === "string", "Optional test case property 'name' must be a string"); + } + assert.ok(item.errors || item.errors === 0, + `Did not specify errors for an invalid test of ${ruleName}`); + + if (Array.isArray(item.errors) && item.errors.length === 0) { + assert.fail("Invalid cases must have at least one error"); + } + + const ruleHasMetaMessages = hasOwnProperty(rule, "meta") && hasOwnProperty(rule.meta, "messages"); + const friendlyIDList = ruleHasMetaMessages ? `[${Object.keys(rule.meta.messages).map(key => `'${key}'`).join(", ")}]` : null; + + const result = runRuleForItem(item); + const messages = result.messages; + + if (typeof item.errors === "number") { + + if (item.errors === 0) { + assert.fail("Invalid cases must have 'error' value greater than 0"); + } + + assert.strictEqual(messages.length, item.errors, util.format("Should have %d error%s but had %d: %s", + item.errors, + item.errors === 1 ? "" : "s", + messages.length, + util.inspect(messages))); + } else { + assert.strictEqual( + messages.length, item.errors.length, util.format( + "Should have %d error%s but had %d: %s", + item.errors.length, + item.errors.length === 1 ? "" : "s", + messages.length, + util.inspect(messages) + ) + ); + + const hasMessageOfThisRule = messages.some(m => m.ruleId === ruleId); + + for (let i = 0, l = item.errors.length; i < l; i++) { + const error = item.errors[i]; + const message = messages[i]; + + assert(hasMessageOfThisRule, "Error rule name should be the same as the name of the rule being tested"); + + if (typeof error === "string" || error instanceof RegExp) { + + // Just an error message. + assertMessageMatches(message.message, error); + } else if (typeof error === "object" && error !== null) { + + /* + * Error object. + * This may have a message, messageId, data, node type, line, and/or + * column. + */ + + Object.keys(error).forEach(propertyName => { + assert.ok( + errorObjectParameters.has(propertyName), + `Invalid error property name '${propertyName}'. Expected one of ${friendlyErrorObjectParameterList}.` + ); + }); + + if (hasOwnProperty(error, "message")) { + assert.ok(!hasOwnProperty(error, "messageId"), "Error should not specify both 'message' and a 'messageId'."); + assert.ok(!hasOwnProperty(error, "data"), "Error should not specify both 'data' and 'message'."); + assertMessageMatches(message.message, error.message); + } else if (hasOwnProperty(error, "messageId")) { + assert.ok( + ruleHasMetaMessages, + "Error can not use 'messageId' if rule under test doesn't define 'meta.messages'." + ); + if (!hasOwnProperty(rule.meta.messages, error.messageId)) { + assert(false, `Invalid messageId '${error.messageId}'. Expected one of ${friendlyIDList}.`); + } + assert.strictEqual( + message.messageId, + error.messageId, + `messageId '${message.messageId}' does not match expected messageId '${error.messageId}'.` + ); + if (hasOwnProperty(error, "data")) { + + /* + * if data was provided, then directly compare the returned message to a synthetic + * interpolated message using the same message ID and data provided in the test. + * See https://github.com/eslint/eslint/issues/9890 for context. + */ + const unformattedOriginalMessage = rule.meta.messages[error.messageId]; + const rehydratedMessage = interpolate(unformattedOriginalMessage, error.data); + + assert.strictEqual( + message.message, + rehydratedMessage, + `Hydrated message "${rehydratedMessage}" does not match "${message.message}"` + ); + } + } + + assert.ok( + hasOwnProperty(error, "data") ? hasOwnProperty(error, "messageId") : true, + "Error must specify 'messageId' if 'data' is used." + ); + + if (error.type) { + assert.strictEqual(message.nodeType, error.type, `Error type should be ${error.type}, found ${message.nodeType}`); + } + + if (hasOwnProperty(error, "line")) { + assert.strictEqual(message.line, error.line, `Error line should be ${error.line}`); + } + + if (hasOwnProperty(error, "column")) { + assert.strictEqual(message.column, error.column, `Error column should be ${error.column}`); + } + + if (hasOwnProperty(error, "endLine")) { + assert.strictEqual(message.endLine, error.endLine, `Error endLine should be ${error.endLine}`); + } + + if (hasOwnProperty(error, "endColumn")) { + assert.strictEqual(message.endColumn, error.endColumn, `Error endColumn should be ${error.endColumn}`); + } + + if (hasOwnProperty(error, "suggestions")) { + + // Support asserting there are no suggestions + if (!error.suggestions || (Array.isArray(error.suggestions) && error.suggestions.length === 0)) { + if (Array.isArray(message.suggestions) && message.suggestions.length > 0) { + assert.fail(`Error should have no suggestions on error with message: "${message.message}"`); + } + } else { + assert.strictEqual(Array.isArray(message.suggestions), true, `Error should have an array of suggestions. Instead received "${message.suggestions}" on error with message: "${message.message}"`); + assert.strictEqual(message.suggestions.length, error.suggestions.length, `Error should have ${error.suggestions.length} suggestions. Instead found ${message.suggestions.length} suggestions`); + + error.suggestions.forEach((expectedSuggestion, index) => { + assert.ok( + typeof expectedSuggestion === "object" && expectedSuggestion !== null, + "Test suggestion in 'suggestions' array must be an object." + ); + Object.keys(expectedSuggestion).forEach(propertyName => { + assert.ok( + suggestionObjectParameters.has(propertyName), + `Invalid suggestion property name '${propertyName}'. Expected one of ${friendlySuggestionObjectParameterList}.` + ); + }); + + const actualSuggestion = message.suggestions[index]; + const suggestionPrefix = `Error Suggestion at index ${index} :`; + + if (hasOwnProperty(expectedSuggestion, "desc")) { + assert.ok( + !hasOwnProperty(expectedSuggestion, "data"), + `${suggestionPrefix} Test should not specify both 'desc' and 'data'.` + ); + assert.strictEqual( + actualSuggestion.desc, + expectedSuggestion.desc, + `${suggestionPrefix} desc should be "${expectedSuggestion.desc}" but got "${actualSuggestion.desc}" instead.` + ); + } + + if (hasOwnProperty(expectedSuggestion, "messageId")) { + assert.ok( + ruleHasMetaMessages, + `${suggestionPrefix} Test can not use 'messageId' if rule under test doesn't define 'meta.messages'.` + ); + assert.ok( + hasOwnProperty(rule.meta.messages, expectedSuggestion.messageId), + `${suggestionPrefix} Test has invalid messageId '${expectedSuggestion.messageId}', the rule under test allows only one of ${friendlyIDList}.` + ); + assert.strictEqual( + actualSuggestion.messageId, + expectedSuggestion.messageId, + `${suggestionPrefix} messageId should be '${expectedSuggestion.messageId}' but got '${actualSuggestion.messageId}' instead.` + ); + if (hasOwnProperty(expectedSuggestion, "data")) { + const unformattedMetaMessage = rule.meta.messages[expectedSuggestion.messageId]; + const rehydratedDesc = interpolate(unformattedMetaMessage, expectedSuggestion.data); + + assert.strictEqual( + actualSuggestion.desc, + rehydratedDesc, + `${suggestionPrefix} Hydrated test desc "${rehydratedDesc}" does not match received desc "${actualSuggestion.desc}".` + ); + } + } else { + assert.ok( + !hasOwnProperty(expectedSuggestion, "data"), + `${suggestionPrefix} Test must specify 'messageId' if 'data' is used.` + ); + } + + if (hasOwnProperty(expectedSuggestion, "output")) { + const codeWithAppliedSuggestion = SourceCodeFixer.applyFixes(item.code, [actualSuggestion]).output; + + assert.strictEqual(codeWithAppliedSuggestion, expectedSuggestion.output, `Expected the applied suggestion fix to match the test suggestion output for suggestion at index: ${index} on error with message: "${message.message}"`); + } + }); + } + } + } else { + + // Message was an unexpected type + assert.fail(`Error should be a string, object, or RegExp, but found (${util.inspect(message)})`); + } + } + } + + if (hasOwnProperty(item, "output")) { + if (item.output === null) { + assert.strictEqual( + result.output, + item.code, + "Expected no autofixes to be suggested" + ); + } else { + assert.strictEqual(result.output, item.output, "Output is incorrect."); + } + } else { + assert.strictEqual( + result.output, + item.code, + "The rule fixed the code. Please add 'output' property." + ); + } + + assertASTDidntChange(result.beforeAST, result.afterAST); + } + + /* + * This creates a mocha test suite and pipes all supplied info through + * one of the templates above. + * The test suites for valid/invalid are created conditionally as + * test runners (eg. vitest) fail for empty test suites. + */ + this.constructor.describe(ruleName, () => { + if (test.valid.length > 0) { + this.constructor.describe("valid", () => { + test.valid.forEach(valid => { + this.constructor[valid.only ? "itOnly" : "it"]( + sanitize(typeof valid === "object" ? valid.name || valid.code : valid), + () => { + testValidTemplate(valid); + } + ); + }); + }); + } + + if (test.invalid.length > 0) { + this.constructor.describe("invalid", () => { + test.invalid.forEach(invalid => { + this.constructor[invalid.only ? "itOnly" : "it"]( + sanitize(invalid.name || invalid.code), + () => { + testInvalidTemplate(invalid); + } + ); + }); + }); + } + }); + } +} + +FlatRuleTester[DESCRIBE] = FlatRuleTester[IT] = FlatRuleTester[IT_ONLY] = null; + +module.exports = FlatRuleTester; diff --git a/node_modules/eslint/lib/rule-tester/rule-tester.js b/node_modules/eslint/lib/rule-tester/rule-tester.js index 23b78fba2..3bc80ab18 100644 --- a/node_modules/eslint/lib/rule-tester/rule-tester.js +++ b/node_modules/eslint/lib/rule-tester/rule-tester.js @@ -4,7 +4,7 @@ */ "use strict"; -/* global describe, it */ +/* globals describe, it -- Mocha globals */ /* * This is a wrapper around mocha to allow for DRY unittests for eslint @@ -44,24 +44,32 @@ const assert = require("assert"), path = require("path"), util = require("util"), - lodash = require("lodash"), + merge = require("lodash.merge"), + equal = require("fast-deep-equal"), Traverser = require("../../lib/shared/traverser"), { getRuleOptionsSchema, validate } = require("../shared/config-validator"), - { Linter, SourceCodeFixer, interpolate } = require("../linter"); + { Linter, SourceCodeFixer, interpolate } = require("../linter"), + CodePath = require("../linter/code-path-analysis/code-path"); const ajv = require("../shared/ajv")({ strictDefaults: true }); const espreePath = require.resolve("espree"); +const parserSymbol = Symbol.for("eslint.RuleTester.parser"); + +const { SourceCode } = require("../source-code"); //------------------------------------------------------------------------------ // Typedefs //------------------------------------------------------------------------------ /** @typedef {import("../shared/types").Parser} Parser */ +/** @typedef {import("../shared/types").Rule} Rule */ + /** * A test case that is expected to pass lint. * @typedef {Object} ValidTestCase + * @property {string} [name] Name for the test case. * @property {string} code Code for the test case. * @property {any[]} [options] Options for the test case. * @property {{ [name: string]: any }} [settings] Settings for the test case. @@ -70,11 +78,13 @@ const espreePath = require.resolve("espree"); * @property {{ [name: string]: any }} [parserOptions] Options for the parser. * @property {{ [name: string]: "readonly" | "writable" | "off" }} [globals] The additional global variables. * @property {{ [name: string]: boolean }} [env] Environments for the test case. + * @property {boolean} [only] Run only this test case or the subset of test cases with this property. */ /** * A test case that is expected to fail lint. * @typedef {Object} InvalidTestCase + * @property {string} [name] Name for the test case. * @property {string} code Code for the test case. * @property {number | Array} errors Expected errors. * @property {string | null} [output] The expected code after autofixes are applied. If set to `null`, the test runner will assert that no autofix is suggested. @@ -85,6 +95,7 @@ const espreePath = require.resolve("espree"); * @property {{ [name: string]: any }} [parserOptions] Options for the parser. * @property {{ [name: string]: "readonly" | "writable" | "off" }} [globals] The additional global variables. * @property {{ [name: string]: boolean }} [env] Environments for the test case. + * @property {boolean} [only] Run only this test case or the subset of test cases with this property. */ /** @@ -116,11 +127,13 @@ let defaultConfig = { rules: {} }; * configuration */ const RuleTesterParameters = [ + "name", "code", "filename", "options", "errors", - "output" + "output", + "only" ]; /* @@ -150,8 +163,43 @@ const suggestionObjectParameters = new Set([ ]); const friendlySuggestionObjectParameterList = `[${[...suggestionObjectParameters].map(key => `'${key}'`).join(", ")}]`; +const forbiddenMethods = [ + "applyInlineConfig", + "applyLanguageOptions", + "finalize" +]; + const hasOwnProperty = Function.call.bind(Object.hasOwnProperty); +const DEPRECATED_SOURCECODE_PASSTHROUGHS = { + getSource: "getText", + getSourceLines: "getLines", + getAllComments: "getAllComments", + getNodeByRangeIndex: "getNodeByRangeIndex", + + // getComments: "getComments", -- already handled by a separate error + getCommentsBefore: "getCommentsBefore", + getCommentsAfter: "getCommentsAfter", + getCommentsInside: "getCommentsInside", + getJSDocComment: "getJSDocComment", + getFirstToken: "getFirstToken", + getFirstTokens: "getFirstTokens", + getLastToken: "getLastToken", + getLastTokens: "getLastTokens", + getTokenAfter: "getTokenAfter", + getTokenBefore: "getTokenBefore", + getTokenByRangeStart: "getTokenByRangeStart", + getTokens: "getTokens", + getTokensAfter: "getTokensAfter", + getTokensBefore: "getTokensBefore", + getTokensBetween: "getTokensBetween", + + getScope: "getScope", + getAncestors: "getAncestors", + getDeclaredVariables: "getDeclaredVariables", + markVariableAsUsed: "markVariableAsUsed" +}; + /** * Clones a given value deeply. * Note: This ignores `parent` property. @@ -204,8 +252,11 @@ function freezeDeeply(x) { * @returns {string} The sanitized text. */ function sanitize(text) { + if (typeof text !== "string") { + return ""; + } return text.replace( - /[\u0000-\u0009\u000b-\u001a]/gu, // eslint-disable-line no-control-regex + /[\u0000-\u0009\u000b-\u001a]/gu, // eslint-disable-line no-control-regex -- Escaping controls c => `\\u${c.codePointAt(0).toString(16).padStart(4, "0")}` ); } @@ -235,6 +286,7 @@ function defineStartEndAsError(objName, node) { }); } + /** * Define `start`/`end` properties of all nodes of the given AST as throwing error. * @param {ASTNode} ast The root node to errorize `start`/`end` properties. @@ -254,8 +306,10 @@ function defineStartEndAsErrorInTree(ast, visitorKeys) { * @returns {Parser} Wrapped parser object. */ function wrapParser(parser) { + if (typeof parser.parseForESLint === "function") { return { + [parserSymbol]: parser, parseForESLint(...args) { const ret = parser.parseForESLint(...args); @@ -264,7 +318,9 @@ function wrapParser(parser) { } }; } + return { + [parserSymbol]: parser, parse(...args) { const ast = parser.parse(...args); @@ -274,6 +330,107 @@ function wrapParser(parser) { }; } +/** + * Function to replace `SourceCode.prototype.getComments`. + * @returns {void} + * @throws {Error} Deprecation message. + */ +function getCommentsDeprecation() { + throw new Error( + "`SourceCode#getComments()` is deprecated and will be removed in a future major version. Use `getCommentsBefore()`, `getCommentsAfter()`, and `getCommentsInside()` instead." + ); +} + +/** + * Function to replace forbidden `SourceCode` methods. + * @param {string} methodName The name of the method to forbid. + * @returns {Function} The function that throws the error. + */ +function throwForbiddenMethodError(methodName) { + return () => { + throw new Error( + `\`SourceCode#${methodName}()\` cannot be called inside a rule.` + ); + }; +} + +/** + * Emit a deprecation warning if function-style format is being used. + * @param {string} ruleName Name of the rule. + * @returns {void} + */ +function emitLegacyRuleAPIWarning(ruleName) { + if (!emitLegacyRuleAPIWarning[`warned-${ruleName}`]) { + emitLegacyRuleAPIWarning[`warned-${ruleName}`] = true; + process.emitWarning( + `"${ruleName}" rule is using the deprecated function-style format and will stop working in ESLint v9. Please use object-style format: https://eslint.org/docs/latest/extend/custom-rules`, + "DeprecationWarning" + ); + } +} + +/** + * Emit a deprecation warning if rule has options but is missing the "meta.schema" property + * @param {string} ruleName Name of the rule. + * @returns {void} + */ +function emitMissingSchemaWarning(ruleName) { + if (!emitMissingSchemaWarning[`warned-${ruleName}`]) { + emitMissingSchemaWarning[`warned-${ruleName}`] = true; + process.emitWarning( + `"${ruleName}" rule has options but is missing the "meta.schema" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/latest/extend/custom-rules#options-schemas`, + "DeprecationWarning" + ); + } +} + +/** + * Emit a deprecation warning if a rule uses a deprecated `context` method. + * @param {string} ruleName Name of the rule. + * @param {string} methodName The name of the method on `context` that was used. + * @returns {void} + */ +function emitDeprecatedContextMethodWarning(ruleName, methodName) { + if (!emitDeprecatedContextMethodWarning[`warned-${ruleName}-${methodName}`]) { + emitDeprecatedContextMethodWarning[`warned-${ruleName}-${methodName}`] = true; + process.emitWarning( + `"${ruleName}" rule is using \`context.${methodName}()\`, which is deprecated and will be removed in ESLint v9. Please use \`sourceCode.${DEPRECATED_SOURCECODE_PASSTHROUGHS[methodName]}()\` instead.`, + "DeprecationWarning" + ); + } +} + +/** + * Emit a deprecation warning if rule uses CodePath#currentSegments. + * @param {string} ruleName Name of the rule. + * @returns {void} + */ +function emitCodePathCurrentSegmentsWarning(ruleName) { + if (!emitCodePathCurrentSegmentsWarning[`warned-${ruleName}`]) { + emitCodePathCurrentSegmentsWarning[`warned-${ruleName}`] = true; + process.emitWarning( + `"${ruleName}" rule uses CodePath#currentSegments and will stop working in ESLint v9. Please read the documentation for how to update your code: https://eslint.org/docs/latest/extend/code-path-analysis#usage-examples`, + "DeprecationWarning" + ); + } +} + +/** + * Emit a deprecation warning if `context.parserServices` is used. + * @param {string} ruleName Name of the rule. + * @returns {void} + */ +function emitParserServicesWarning(ruleName) { + if (!emitParserServicesWarning[`warned-${ruleName}`]) { + emitParserServicesWarning[`warned-${ruleName}`] = true; + process.emitWarning( + `"${ruleName}" rule is using \`context.parserServices\`, which is deprecated and will be removed in ESLint v9. Please use \`sourceCode.parserServices\` instead.`, + "DeprecationWarning" + ); + } +} + + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -281,12 +438,14 @@ function wrapParser(parser) { // default separators for testing const DESCRIBE = Symbol("describe"); const IT = Symbol("it"); +const IT_ONLY = Symbol("itOnly"); /** * This is `it` default handler if `it` don't exist. * @this {Mocha} * @param {string} text The description of the test case. * @param {Function} method The logic of the test case. + * @throws {Error} Any error upon execution of `method`. * @returns {any} Returned value of `method`. */ function itDefaultHandler(text, method) { @@ -311,6 +470,9 @@ function describeDefaultHandler(text, method) { return method.call(this); } +/** + * Mocha test wrapper. + */ class RuleTester { /** @@ -324,10 +486,9 @@ class RuleTester { * configuration and the default configuration. * @type {Object} */ - this.testerConfig = lodash.merge( - - // we have to clone because merge uses the first argument for recipient - lodash.cloneDeep(defaultConfig), + this.testerConfig = merge( + {}, + defaultConfig, testerConfig, { rules: { "rule-tester/validate-ast": "error" } } ); @@ -343,10 +504,11 @@ class RuleTester { /** * Set the configuration to use for all future tests * @param {Object} config the configuration to use. + * @throws {TypeError} If non-object config. * @returns {void} */ static setDefaultConfig(config) { - if (typeof config !== "object") { + if (typeof config !== "object" || config === null) { throw new TypeError("RuleTester.setDefaultConfig: config must be an object"); } defaultConfig = config; @@ -369,7 +531,7 @@ class RuleTester { * @returns {void} */ static resetDefaultConfig() { - defaultConfig = lodash.cloneDeep(testerDefaultConfig); + defaultConfig = merge({}, testerDefaultConfig); } @@ -400,24 +562,69 @@ class RuleTester { this[IT] = value; } + /** + * Adds the `only` property to a test to run it in isolation. + * @param {string | ValidTestCase | InvalidTestCase} item A single test to run by itself. + * @returns {ValidTestCase | InvalidTestCase} The test with `only` set. + */ + static only(item) { + if (typeof item === "string") { + return { code: item, only: true }; + } + + return { ...item, only: true }; + } + + static get itOnly() { + if (typeof this[IT_ONLY] === "function") { + return this[IT_ONLY]; + } + if (typeof this[IT] === "function" && typeof this[IT].only === "function") { + return Function.bind.call(this[IT].only, this[IT]); + } + if (typeof it === "function" && typeof it.only === "function") { + return Function.bind.call(it.only, it); + } + + if (typeof this[DESCRIBE] === "function" || typeof this[IT] === "function") { + throw new Error( + "Set `RuleTester.itOnly` to use `only` with a custom test framework.\n" + + "See https://eslint.org/docs/latest/integrate/nodejs-api#customizing-ruletester for more." + ); + } + if (typeof it === "function") { + throw new Error("The current test framework does not support exclusive tests with `only`."); + } + throw new Error("To use `only`, use RuleTester with a test framework that provides `it.only()` like Mocha."); + } + + static set itOnly(value) { + this[IT_ONLY] = value; + } + /** * Define a rule for one particular run of tests. * @param {string} name The name of the rule to define. - * @param {Function} rule The rule definition. + * @param {Function | Rule} rule The rule definition. * @returns {void} */ defineRule(name, rule) { + if (typeof rule === "function") { + emitLegacyRuleAPIWarning(name); + } this.rules[name] = rule; } /** * Adds a new rule test to execute. * @param {string} ruleName The name of the rule to run. - * @param {Function} rule The rule to test. + * @param {Function | Rule} rule The rule to test. * @param {{ * valid: (ValidTestCase | string)[], * invalid: InvalidTestCase[] * }} test The collection of tests to run. + * @throws {TypeError|Error} If non-object `test`, or if a required + * scenario of the given type is missing. * @returns {void} */ run(ruleName, rule, test) { @@ -443,6 +650,9 @@ class RuleTester { ].concat(scenarioErrors).join("\n")); } + if (typeof rule === "function") { + emitLegacyRuleAPIWarning(ruleName); + } linter.defineRule(ruleName, Object.assign({}, rule, { @@ -452,7 +662,38 @@ class RuleTester { freezeDeeply(context.settings); freezeDeeply(context.parserOptions); - return (typeof rule === "function" ? rule : rule.create)(context); + // wrap all deprecated methods + const newContext = Object.create( + context, + Object.fromEntries(Object.keys(DEPRECATED_SOURCECODE_PASSTHROUGHS).map(methodName => [ + methodName, + { + value(...args) { + + // emit deprecation warning + emitDeprecatedContextMethodWarning(ruleName, methodName); + + // call the original method + return context[methodName].call(this, ...args); + }, + enumerable: true + } + ])) + ); + + // emit warning about context.parserServices + const parserServices = context.parserServices; + + Object.defineProperty(newContext, "parserServices", { + get() { + emitParserServicesWarning(ruleName); + return parserServices; + } + }); + + Object.freeze(newContext); + + return (typeof rule === "function" ? rule : rule.create)(newContext); } })); @@ -461,11 +702,12 @@ class RuleTester { /** * Run the rule for the given item * @param {string|Object} item Item to run the rule against + * @throws {Error} If an invalid schema. * @returns {Object} Eslint run result * @private */ function runRuleForItem(item) { - let config = lodash.cloneDeep(testerConfig), + let config = merge({}, testerConfig), code, filename, output, beforeAST, afterAST; if (typeof item === "string") { @@ -477,13 +719,17 @@ class RuleTester { * Assumes everything on the item is a config except for the * parameters used by this tester */ - const itemConfig = lodash.omit(item, RuleTesterParameters); + const itemConfig = { ...item }; + + for (const parameter of RuleTesterParameters) { + delete itemConfig[parameter]; + } /* * Create the config object from the tester config and this item * specific configurations. */ - config = lodash.merge( + config = merge( config, itemConfig ); @@ -495,6 +741,15 @@ class RuleTester { if (hasOwnProperty(item, "options")) { assert(Array.isArray(item.options), "options must be an array"); + if ( + item.options.length > 0 && + typeof rule === "object" && + ( + !rule.meta || (rule.meta && (typeof rule.meta.schema === "undefined" || rule.meta.schema === null)) + ) + ) { + emitMissingSchemaWarning(ruleName); + } config.rules[ruleName] = [1].concat(item.options); } else { config.rules[ruleName] = 1; @@ -507,14 +762,18 @@ class RuleTester { * The goal is to check whether or not AST was modified when * running the rule under test. */ - linter.defineRule("rule-tester/validate-ast", () => ({ - Program(node) { - beforeAST = cloneDeeplyExcludesParent(node); - }, - "Program:exit"(node) { - afterAST = node; + linter.defineRule("rule-tester/validate-ast", { + create() { + return { + Program(node) { + beforeAST = cloneDeeplyExcludesParent(node); + }, + "Program:exit"(node) { + afterAST = node; + } + }; } - })); + }); if (typeof config.parser === "string") { assert(path.isAbsolute(config.parser), "Parsers provided as strings to RuleTester must be absolute paths"); @@ -553,7 +812,32 @@ class RuleTester { validate(config, "rule-tester", id => (id === ruleName ? rule : null)); // Verify the code. - const messages = linter.verify(code, config, filename); + const { getComments, applyLanguageOptions, applyInlineConfig, finalize } = SourceCode.prototype; + const originalCurrentSegments = Object.getOwnPropertyDescriptor(CodePath.prototype, "currentSegments"); + let messages; + + try { + SourceCode.prototype.getComments = getCommentsDeprecation; + Object.defineProperty(CodePath.prototype, "currentSegments", { + get() { + emitCodePathCurrentSegmentsWarning(ruleName); + return originalCurrentSegments.get.call(this); + } + }); + + forbiddenMethods.forEach(methodName => { + SourceCode.prototype[methodName] = throwForbiddenMethodError(methodName); + }); + + messages = linter.verify(code, config, filename); + } finally { + SourceCode.prototype.getComments = getComments; + Object.defineProperty(CodePath.prototype, "currentSegments", originalCurrentSegments); + SourceCode.prototype.applyInlineConfig = applyInlineConfig; + SourceCode.prototype.applyLanguageOptions = applyLanguageOptions; + SourceCode.prototype.finalize = finalize; + } + const fatalErrorMessage = messages.find(m => m.fatal); assert(!fatalErrorMessage, `A fatal parsing error occurred: ${fatalErrorMessage && fatalErrorMessage.message}`); @@ -589,7 +873,7 @@ class RuleTester { * @private */ function assertASTDidntChange(beforeAST, afterAST) { - if (!lodash.isEqual(beforeAST, afterAST)) { + if (!equal(beforeAST, afterAST)) { assert.fail("Rule should not modify AST."); } } @@ -602,11 +886,19 @@ class RuleTester { * @private */ function testValidTemplate(item) { + const code = typeof item === "object" ? item.code : item; + + assert.ok(typeof code === "string", "Test case must specify a string value for 'code'"); + if (item.name) { + assert.ok(typeof item.name === "string", "Optional test case property 'name' must be a string"); + } + const result = runRuleForItem(item); const messages = result.messages; assert.strictEqual(messages.length, 0, util.format("Should have no errors but had %d: %s", - messages.length, util.inspect(messages))); + messages.length, + util.inspect(messages))); assertASTDidntChange(result.beforeAST, result.afterAST); } @@ -641,6 +933,10 @@ class RuleTester { * @private */ function testInvalidTemplate(item) { + assert.ok(typeof item.code === "string", "Test case must specify a string value for 'code'"); + if (item.name) { + assert.ok(typeof item.name === "string", "Optional test case property 'name' must be a string"); + } assert.ok(item.errors || item.errors === 0, `Did not specify errors for an invalid test of ${ruleName}`); @@ -661,13 +957,18 @@ class RuleTester { } assert.strictEqual(messages.length, item.errors, util.format("Should have %d error%s but had %d: %s", - item.errors, item.errors === 1 ? "" : "s", messages.length, util.inspect(messages))); + item.errors, + item.errors === 1 ? "" : "s", + messages.length, + util.inspect(messages))); } else { assert.strictEqual( - messages.length, item.errors.length, - util.format( + messages.length, item.errors.length, util.format( "Should have %d error%s but had %d: %s", - item.errors.length, item.errors.length === 1 ? "" : "s", messages.length, util.inspect(messages) + item.errors.length, + item.errors.length === 1 ? "" : "s", + messages.length, + util.inspect(messages) ) ); @@ -861,43 +1162,45 @@ class RuleTester { ); } - // Rules that produce fixes must have `meta.fixable` property. - if (result.output !== item.code) { - assert.ok( - hasOwnProperty(rule, "meta"), - "Fixable rules should export a `meta.fixable` property." - ); - - // Linter throws if a rule that produced a fix has `meta` but doesn't have `meta.fixable`. - } - assertASTDidntChange(result.beforeAST, result.afterAST); } /* * This creates a mocha test suite and pipes all supplied info through * one of the templates above. + * The test suites for valid/invalid are created conditionally as + * test runners (eg. vitest) fail for empty test suites. */ - RuleTester.describe(ruleName, () => { - RuleTester.describe("valid", () => { - test.valid.forEach(valid => { - RuleTester.it(sanitize(typeof valid === "object" ? valid.code : valid), () => { - testValidTemplate(valid); + this.constructor.describe(ruleName, () => { + if (test.valid.length > 0) { + this.constructor.describe("valid", () => { + test.valid.forEach(valid => { + this.constructor[valid.only ? "itOnly" : "it"]( + sanitize(typeof valid === "object" ? valid.name || valid.code : valid), + () => { + testValidTemplate(valid); + } + ); }); }); - }); + } - RuleTester.describe("invalid", () => { - test.invalid.forEach(invalid => { - RuleTester.it(sanitize(invalid.code), () => { - testInvalidTemplate(invalid); + if (test.invalid.length > 0) { + this.constructor.describe("invalid", () => { + test.invalid.forEach(invalid => { + this.constructor[invalid.only ? "itOnly" : "it"]( + sanitize(invalid.name || invalid.code), + () => { + testInvalidTemplate(invalid); + } + ); }); }); - }); + } }); } } -RuleTester[DESCRIBE] = RuleTester[IT] = null; +RuleTester[DESCRIBE] = RuleTester[IT] = RuleTester[IT_ONLY] = null; module.exports = RuleTester; diff --git a/node_modules/eslint/lib/rules/accessor-pairs.js b/node_modules/eslint/lib/rules/accessor-pairs.js index 0e0d07a00..f97032895 100644 --- a/node_modules/eslint/lib/rules/accessor-pairs.js +++ b/node_modules/eslint/lib/rules/accessor-pairs.js @@ -134,15 +134,15 @@ function isPropertyDescriptor(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce getter and setter pairs in objects and classes", - category: "Best Practices", + description: "Enforce getter and setter pairs in objects and classes", recommended: false, - url: "https://eslint.org/docs/rules/accessor-pairs" + url: "https://eslint.org/docs/latest/rules/accessor-pairs" }, schema: [{ @@ -178,7 +178,7 @@ module.exports = { const checkGetWithoutSet = config.getWithoutSet === true; const checkSetWithoutGet = config.setWithoutGet !== false; const enforceForClassMembers = config.enforceForClassMembers !== false; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Reports the given node. @@ -223,43 +223,6 @@ module.exports = { } } - /** - * Creates a new `AccessorData` object for the given getter or setter node. - * @param {ASTNode} node A getter or setter node. - * @returns {AccessorData} New `AccessorData` object that contains the given node. - * @private - */ - function createAccessorData(node) { - const name = astUtils.getStaticPropertyName(node); - const key = (name !== null) ? name : sourceCode.getTokens(node.key); - - return { - key, - getters: node.kind === "get" ? [node] : [], - setters: node.kind === "set" ? [node] : [] - }; - } - - /** - * Merges the given `AccessorData` object into the given accessors list. - * @param {AccessorData[]} accessors The list to merge into. - * @param {AccessorData} accessorData The object to merge. - * @returns {AccessorData[]} The same instance with the merged object. - * @private - */ - function mergeAccessorData(accessors, accessorData) { - const equalKeyElement = accessors.find(a => areEqualKeys(a.key, accessorData.key)); - - if (equalKeyElement) { - equalKeyElement.getters.push(...accessorData.getters); - equalKeyElement.setters.push(...accessorData.setters); - } else { - accessors.push(accessorData); - } - - return accessors; - } - /** * Checks accessor pairs in the given list of nodes. * @param {ASTNode[]} nodes The list to check. @@ -267,10 +230,39 @@ module.exports = { * @private */ function checkList(nodes) { - const accessors = nodes - .filter(isAccessorKind) - .map(createAccessorData) - .reduce(mergeAccessorData, []); + const accessors = []; + let found = false; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + + if (isAccessorKind(node)) { + + // Creates a new `AccessorData` object for the given getter or setter node. + const name = astUtils.getStaticPropertyName(node); + const key = (name !== null) ? name : sourceCode.getTokens(node.key); + + // Merges the given `AccessorData` object into the given accessors list. + for (let j = 0; j < accessors.length; j++) { + const accessor = accessors[j]; + + if (areEqualKeys(accessor.key, key)) { + accessor.getters.push(...node.kind === "get" ? [node] : []); + accessor.setters.push(...node.kind === "set" ? [node] : []); + found = true; + break; + } + } + if (!found) { + accessors.push({ + key, + getters: node.kind === "get" ? [node] : [], + setters: node.kind === "set" ? [node] : [] + }); + } + found = false; + } + } for (const { getters, setters } of accessors) { if (checkSetWithoutGet && setters.length && !getters.length) { @@ -299,12 +291,12 @@ module.exports = { * @private */ function checkPropertyDescriptor(node) { - const namesToCheck = node.properties + const namesToCheck = new Set(node.properties .filter(p => p.type === "Property" && p.kind === "init" && !p.computed) - .map(({ key }) => key.name); + .map(({ key }) => key.name)); - const hasGetter = namesToCheck.includes("get"); - const hasSetter = namesToCheck.includes("set"); + const hasGetter = namesToCheck.has("get"); + const hasSetter = namesToCheck.has("set"); if (checkSetWithoutGet && hasSetter && !hasGetter) { report(node, "missingGetter"); diff --git a/node_modules/eslint/lib/rules/array-bracket-newline.js b/node_modules/eslint/lib/rules/array-bracket-newline.js index b4b4dd430..12ef5b612 100644 --- a/node_modules/eslint/lib/rules/array-bracket-newline.js +++ b/node_modules/eslint/lib/rules/array-bracket-newline.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce linebreaks after open and before close array brackets * @author Jan Peer Stöcklmair + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce linebreaks after opening and before closing array brackets", - category: "Stylistic Issues", + description: "Enforce linebreaks after opening and before closing array brackets", recommended: false, - url: "https://eslint.org/docs/rules/array-bracket-newline" + url: "https://eslint.org/docs/latest/rules/array-bracket-newline" }, fixable: "whitespace", @@ -56,7 +59,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //---------------------------------------------------------------------- diff --git a/node_modules/eslint/lib/rules/array-bracket-spacing.js b/node_modules/eslint/lib/rules/array-bracket-spacing.js index c2b77a641..9dd3ffd90 100644 --- a/node_modules/eslint/lib/rules/array-bracket-spacing.js +++ b/node_modules/eslint/lib/rules/array-bracket-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallows or enforces spaces inside of array brackets. * @author Jamund Ferguson + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,15 +11,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing inside array brackets", - category: "Stylistic Issues", + description: "Enforce consistent spacing inside array brackets", recommended: false, - url: "https://eslint.org/docs/rules/array-bracket-spacing" + url: "https://eslint.org/docs/latest/rules/array-bracket-spacing" }, fixable: "whitespace", @@ -53,7 +56,7 @@ module.exports = { }, create(context) { const spaced = context.options[0] === "always", - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; /** * Determines whether an option is set, relative to the spacing option. diff --git a/node_modules/eslint/lib/rules/array-callback-return.js b/node_modules/eslint/lib/rules/array-callback-return.js index 726734714..6d8f258fa 100644 --- a/node_modules/eslint/lib/rules/array-callback-return.js +++ b/node_modules/eslint/lib/rules/array-callback-return.js @@ -16,16 +16,7 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/u; -const TARGET_METHODS = /^(?:every|filter|find(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort)$/u; - -/** - * Checks a given code path segment is reachable. - * @param {CodePathSegment} segment A segment to check. - * @returns {boolean} `true` if the segment is reachable. - */ -function isReachable(segment) { - return segment.reachable; -} +const TARGET_METHODS = /^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|reduce(?:Right)?|some|sort|toSorted)$/u; /** * Checks a given node is a member access which has the specified name's @@ -38,6 +29,22 @@ function isTargetMethod(node) { return astUtils.isSpecificMemberAccess(node, null, TARGET_METHODS); } +/** + * Checks all segments in a set and returns true if any are reachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if any segment is reachable; false otherwise. + */ +function isAnySegmentReachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return true; + } + } + + return false; +} + /** * Returns a human-legible description of an array method * @param {string} arrayMethodName A method name to fully qualify @@ -125,25 +132,98 @@ function getArrayMethodName(node) { } } - /* istanbul ignore next: unreachable */ + /* c8 ignore next */ return null; } +/** + * Checks if the given node is a void expression. + * @param {ASTNode} node The node to check. + * @returns {boolean} - `true` if the node is a void expression + */ +function isExpressionVoid(node) { + return node.type === "UnaryExpression" && node.operator === "void"; +} + +/** + * Fixes the linting error by prepending "void " to the given node + * @param {Object} sourceCode context given by context.sourceCode + * @param {ASTNode} node The node to fix. + * @param {Object} fixer The fixer object provided by ESLint. + * @returns {Array} - An array of fix objects to apply to the node. + */ +function voidPrependFixer(sourceCode, node, fixer) { + + const requiresParens = + + // prepending `void ` will fail if the node has a lower precedence than void + astUtils.getPrecedence(node) < astUtils.getPrecedence({ type: "UnaryExpression", operator: "void" }) && + + // check if there are parentheses around the node to avoid redundant parentheses + !astUtils.isParenthesised(sourceCode, node); + + // avoid parentheses issues + const returnOrArrowToken = sourceCode.getTokenBefore( + node, + node.parent.type === "ArrowFunctionExpression" + ? astUtils.isArrowToken + + // isReturnToken + : token => token.type === "Keyword" && token.value === "return" + ); + + const firstToken = sourceCode.getTokenAfter(returnOrArrowToken); + + const prependSpace = + + // is return token, as => allows void to be adjacent + returnOrArrowToken.value === "return" && + + // If two tokens (return and "(") are adjacent + returnOrArrowToken.range[1] === firstToken.range[0]; + + return [ + fixer.insertTextBefore(firstToken, `${prependSpace ? " " : ""}void ${requiresParens ? "(" : ""}`), + fixer.insertTextAfter(node, requiresParens ? ")" : "") + ]; +} + +/** + * Fixes the linting error by `wrapping {}` around the given node's body. + * @param {Object} sourceCode context given by context.sourceCode + * @param {ASTNode} node The node to fix. + * @param {Object} fixer The fixer object provided by ESLint. + * @returns {Array} - An array of fix objects to apply to the node. + */ +function curlyWrapFixer(sourceCode, node, fixer) { + const arrowToken = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken); + const firstToken = sourceCode.getTokenAfter(arrowToken); + const lastToken = sourceCode.getLastToken(node); + + return [ + fixer.insertTextBefore(firstToken, "{"), + fixer.insertTextAfter(lastToken, "}") + ]; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "enforce `return` statements in callbacks of array methods", - category: "Best Practices", + description: "Enforce `return` statements in callbacks of array methods", recommended: false, - url: "https://eslint.org/docs/rules/array-callback-return" + url: "https://eslint.org/docs/latest/rules/array-callback-return" }, + // eslint-disable-next-line eslint-plugin/require-meta-has-suggestions -- false positive + hasSuggestions: true, + schema: [ { type: "object", @@ -155,6 +235,10 @@ module.exports = { checkForEach: { type: "boolean", default: false + }, + allowVoid: { + type: "boolean", + default: false } }, additionalProperties: false @@ -165,14 +249,16 @@ module.exports = { expectedAtEnd: "{{arrayMethodName}}() expects a value to be returned at the end of {{name}}.", expectedInside: "{{arrayMethodName}}() expects a return value from {{name}}.", expectedReturnValue: "{{arrayMethodName}}() expects a return value from {{name}}.", - expectedNoReturnValue: "{{arrayMethodName}}() expects no useless return value from {{name}}." + expectedNoReturnValue: "{{arrayMethodName}}() expects no useless return value from {{name}}.", + wrapBraces: "Wrap the expression in `{}`.", + prependVoid: "Prepend `void` to the expression." } }, create(context) { - const options = context.options[0] || { allowImplicit: false, checkForEach: false }; - const sourceCode = context.getSourceCode(); + const options = context.options[0] || { allowImplicit: false, checkForEach: false, allowVoid: false }; + const sourceCode = context.sourceCode; let funcInfo = { arrayMethodName: null, @@ -198,26 +284,56 @@ module.exports = { return; } - let messageId = null; + const messageAndSuggestions = { messageId: "", suggest: [] }; if (funcInfo.arrayMethodName === "forEach") { if (options.checkForEach && node.type === "ArrowFunctionExpression" && node.expression) { - messageId = "expectedNoReturnValue"; + + if (options.allowVoid) { + if (isExpressionVoid(node.body)) { + return; + } + + messageAndSuggestions.messageId = "expectedNoReturnValue"; + messageAndSuggestions.suggest = [ + { + messageId: "wrapBraces", + fix(fixer) { + return curlyWrapFixer(sourceCode, node, fixer); + } + }, + { + messageId: "prependVoid", + fix(fixer) { + return voidPrependFixer(sourceCode, node.body, fixer); + } + } + ]; + } else { + messageAndSuggestions.messageId = "expectedNoReturnValue"; + messageAndSuggestions.suggest = [{ + messageId: "wrapBraces", + fix(fixer) { + return curlyWrapFixer(sourceCode, node, fixer); + } + }]; + } } } else { - if (node.body.type === "BlockStatement" && funcInfo.codePath.currentSegments.some(isReachable)) { - messageId = funcInfo.hasReturn ? "expectedAtEnd" : "expectedInside"; + if (node.body.type === "BlockStatement" && isAnySegmentReachable(funcInfo.currentSegments)) { + messageAndSuggestions.messageId = funcInfo.hasReturn ? "expectedAtEnd" : "expectedInside"; } } - if (messageId) { + if (messageAndSuggestions.messageId) { const name = astUtils.getFunctionNameWithKind(node); context.report({ node, loc: astUtils.getFunctionHeadLoc(node, sourceCode), - messageId, - data: { name, arrayMethodName: fullMethodName(funcInfo.arrayMethodName) } + messageId: messageAndSuggestions.messageId, + data: { name, arrayMethodName: fullMethodName(funcInfo.arrayMethodName) }, + suggest: messageAndSuggestions.suggest.length !== 0 ? messageAndSuggestions.suggest : null }); } } @@ -242,7 +358,8 @@ module.exports = { methodName && !node.async && !node.generator, - node + node, + currentSegments: new Set() }; }, @@ -251,6 +368,23 @@ module.exports = { funcInfo = funcInfo.upper; }, + onUnreachableCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + onCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + // Checks the return statement is valid. ReturnStatement(node) { @@ -260,30 +394,46 @@ module.exports = { funcInfo.hasReturn = true; - let messageId = null; + const messageAndSuggestions = { messageId: "", suggest: [] }; if (funcInfo.arrayMethodName === "forEach") { // if checkForEach: true, returning a value at any path inside a forEach is not allowed if (options.checkForEach && node.argument) { - messageId = "expectedNoReturnValue"; + + if (options.allowVoid) { + if (isExpressionVoid(node.argument)) { + return; + } + + messageAndSuggestions.messageId = "expectedNoReturnValue"; + messageAndSuggestions.suggest = [{ + messageId: "prependVoid", + fix(fixer) { + return voidPrependFixer(sourceCode, node.argument, fixer); + } + }]; + } else { + messageAndSuggestions.messageId = "expectedNoReturnValue"; + } } } else { // if allowImplicit: false, should also check node.argument if (!options.allowImplicit && !node.argument) { - messageId = "expectedReturnValue"; + messageAndSuggestions.messageId = "expectedReturnValue"; } } - if (messageId) { + if (messageAndSuggestions.messageId) { context.report({ node, - messageId, + messageId: messageAndSuggestions.messageId, data: { name: astUtils.getFunctionNameWithKind(funcInfo.node), arrayMethodName: fullMethodName(funcInfo.arrayMethodName) - } + }, + suggest: messageAndSuggestions.suggest.length !== 0 ? messageAndSuggestions.suggest : null }); } }, diff --git a/node_modules/eslint/lib/rules/array-element-newline.js b/node_modules/eslint/lib/rules/array-element-newline.js index b7a967865..504fe04a0 100644 --- a/node_modules/eslint/lib/rules/array-element-newline.js +++ b/node_modules/eslint/lib/rules/array-element-newline.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce line breaks after each array element * @author Jan Peer Stöcklmair + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce line breaks after each array element", - category: "Stylistic Issues", + description: "Enforce line breaks after each array element", recommended: false, - url: "https://eslint.org/docs/rules/array-element-newline" + url: "https://eslint.org/docs/latest/rules/array-element-newline" }, fixable: "whitespace", @@ -47,6 +50,7 @@ module.exports = { ] } }, + type: "array", items: [ { oneOf: [ @@ -78,7 +82,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //---------------------------------------------------------------------- // Helpers @@ -239,19 +243,25 @@ module.exports = { .some(element => element.loc.start.line !== element.loc.end.line); } - const linebreaksCount = node.elements.map((element, i) => { + let linebreaksCount = 0; + + for (let i = 0; i < node.elements.length; i++) { + const element = node.elements[i]; + const previousElement = elements[i - 1]; if (i === 0 || element === null || previousElement === null) { - return false; + continue; } const commaToken = sourceCode.getFirstTokenBetween(previousElement, element, astUtils.isCommaToken); const lastTokenOfPreviousElement = sourceCode.getTokenBefore(commaToken); const firstTokenOfCurrentElement = sourceCode.getTokenAfter(commaToken); - return !astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement); - }).filter(isBreak => isBreak === true).length; + if (!astUtils.isTokenOnSameLine(lastTokenOfPreviousElement, firstTokenOfCurrentElement)) { + linebreaksCount++; + } + } const needsLinebreaks = ( elements.length >= options.minItems || diff --git a/node_modules/eslint/lib/rules/arrow-body-style.js b/node_modules/eslint/lib/rules/arrow-body-style.js index b2167fde7..759070454 100644 --- a/node_modules/eslint/lib/rules/arrow-body-style.js +++ b/node_modules/eslint/lib/rules/arrow-body-style.js @@ -14,15 +14,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require braces around arrow function bodies", - category: "ECMAScript 6", + description: "Require braces around arrow function bodies", recommended: false, - url: "https://eslint.org/docs/rules/arrow-body-style" + url: "https://eslint.org/docs/latest/rules/arrow-body-style" }, schema: { @@ -74,7 +74,7 @@ module.exports = { const asNeeded = !options[0] || options[0] === "as-needed"; const never = options[0] === "never"; const requireReturnForObjectLiteral = options[1] && options[1].requireReturnForObjectLiteral; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let funcInfo = null; /** @@ -87,17 +87,17 @@ module.exports = { } /** - * Gets the closing parenthesis which is the pair of the given opening parenthesis. - * @param {Token} token The opening parenthesis token to get. + * Gets the closing parenthesis by the given node. + * @param {ASTNode} node first node after an opening parenthesis. * @returns {Token} The found closing parenthesis token. */ - function findClosingParen(token) { - let node = sourceCode.getNodeByRangeIndex(token.range[0]); + function findClosingParen(node) { + let nodeToCheck = node; - while (!astUtils.isParenthesised(sourceCode, node)) { - node = node.parent; + while (!astUtils.isParenthesised(sourceCode, nodeToCheck)) { + nodeToCheck = nodeToCheck.parent; } - return sourceCode.getTokenAfter(node); + return sourceCode.getTokenAfter(nodeToCheck); } /** @@ -226,12 +226,22 @@ module.exports = { const arrowToken = sourceCode.getTokenBefore(arrowBody, astUtils.isArrowToken); const [firstTokenAfterArrow, secondTokenAfterArrow] = sourceCode.getTokensAfter(arrowToken, { count: 2 }); const lastToken = sourceCode.getLastToken(node); - const isParenthesisedObjectLiteral = + + let parenthesisedObjectLiteral = null; + + if ( astUtils.isOpeningParenToken(firstTokenAfterArrow) && - astUtils.isOpeningBraceToken(secondTokenAfterArrow); + astUtils.isOpeningBraceToken(secondTokenAfterArrow) + ) { + const braceNode = sourceCode.getNodeByRangeIndex(secondTokenAfterArrow.range[0]); + + if (braceNode.type === "ObjectExpression") { + parenthesisedObjectLiteral = braceNode; + } + } // If the value is object literal, remove parentheses which were forced by syntax. - if (isParenthesisedObjectLiteral) { + if (parenthesisedObjectLiteral) { const openingParenToken = firstTokenAfterArrow; const openingBraceToken = secondTokenAfterArrow; @@ -247,7 +257,7 @@ module.exports = { } // Closing paren for the object doesn't have to be lastToken, e.g.: () => ({}).foo() - fixes.push(fixer.remove(findClosingParen(openingBraceToken))); + fixes.push(fixer.remove(findClosingParen(parenthesisedObjectLiteral))); fixes.push(fixer.insertTextAfter(lastToken, "}")); } else { diff --git a/node_modules/eslint/lib/rules/arrow-parens.js b/node_modules/eslint/lib/rules/arrow-parens.js index eaa1aab02..2206d8ce2 100644 --- a/node_modules/eslint/lib/rules/arrow-parens.js +++ b/node_modules/eslint/lib/rules/arrow-parens.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to require parens in arrow function arguments. * @author Jxck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -27,15 +28,17 @@ function hasBlockBody(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require parentheses around arrow function arguments", - category: "ECMAScript 6", + description: "Require parentheses around arrow function arguments", recommended: false, - url: "https://eslint.org/docs/rules/arrow-parens" + url: "https://eslint.org/docs/latest/rules/arrow-parens" }, fixable: "code", @@ -69,7 +72,7 @@ module.exports = { const asNeeded = context.options[0] === "as-needed"; const requireForBlockBody = asNeeded && context.options[1] && context.options[1].requireForBlockBody === true; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Finds opening paren of parameters for the given arrow function, if it exists. diff --git a/node_modules/eslint/lib/rules/arrow-spacing.js b/node_modules/eslint/lib/rules/arrow-spacing.js index e5110c6c8..2b7d464ff 100644 --- a/node_modules/eslint/lib/rules/arrow-spacing.js +++ b/node_modules/eslint/lib/rules/arrow-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to define spacing before/after arrow function's arrow. * @author Jxck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before and after the arrow in arrow functions", - category: "ECMAScript 6", + description: "Enforce consistent spacing before and after the arrow in arrow functions", recommended: false, - url: "https://eslint.org/docs/rules/arrow-spacing" + url: "https://eslint.org/docs/latest/rules/arrow-spacing" }, fixable: "whitespace", @@ -61,7 +64,7 @@ module.exports = { rule.before = rule.before !== false; rule.after = rule.after !== false; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Get tokens of arrow(`=>`) and before/after arrow. diff --git a/node_modules/eslint/lib/rules/block-scoped-var.js b/node_modules/eslint/lib/rules/block-scoped-var.js index 481057ba6..ec597d566 100644 --- a/node_modules/eslint/lib/rules/block-scoped-var.js +++ b/node_modules/eslint/lib/rules/block-scoped-var.js @@ -8,26 +8,27 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce the use of variables within the scope they are defined", - category: "Best Practices", + description: "Enforce the use of variables within the scope they are defined", recommended: false, - url: "https://eslint.org/docs/rules/block-scoped-var" + url: "https://eslint.org/docs/latest/rules/block-scoped-var" }, schema: [], messages: { - outOfScope: "'{{name}}' used outside of binding context." + outOfScope: "'{{name}}' declared on line {{definitionLine}} column {{definitionColumn}} is used outside of binding context." } }, create(context) { let stack = []; + const sourceCode = context.sourceCode; /** * Makes a block scope. @@ -49,12 +50,22 @@ module.exports = { /** * Reports a given reference. * @param {eslint-scope.Reference} reference A reference to report. + * @param {eslint-scope.Definition} definition A definition for which to report reference. * @returns {void} */ - function report(reference) { + function report(reference, definition) { const identifier = reference.identifier; - - context.report({ node: identifier, messageId: "outOfScope", data: { name: identifier.name } }); + const definitionPosition = definition.name.loc.start; + + context.report({ + node: identifier, + messageId: "outOfScope", + data: { + name: identifier.name, + definitionLine: definitionPosition.line, + definitionColumn: definitionPosition.column + 1 + } + }); } /** @@ -83,7 +94,7 @@ module.exports = { } // Gets declared variables, and checks its references. - const variables = context.getDeclaredVariables(node); + const variables = sourceCode.getDeclaredVariables(node); for (let i = 0; i < variables.length; ++i) { @@ -91,7 +102,7 @@ module.exports = { variables[i] .references .filter(isOutsideOfScope) - .forEach(report); + .forEach(ref => report(ref, variables[i].defs.find(def => def.parent === node))); } } @@ -113,6 +124,8 @@ module.exports = { "SwitchStatement:exit": exitScope, CatchClause: enterScope, "CatchClause:exit": exitScope, + StaticBlock: enterScope, + "StaticBlock:exit": exitScope, // Finds and reports references which are outside of valid scope. VariableDeclaration: checkForVariables diff --git a/node_modules/eslint/lib/rules/block-spacing.js b/node_modules/eslint/lib/rules/block-spacing.js index c4b30b0b7..9ca461158 100644 --- a/node_modules/eslint/lib/rules/block-spacing.js +++ b/node_modules/eslint/lib/rules/block-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview A rule to disallow or enforce spaces inside of single line blocks. * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const util = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow or enforce spaces inside of blocks after opening block and before closing block", - category: "Stylistic Issues", + description: "Disallow or enforce spaces inside of blocks after opening block and before closing block", recommended: false, - url: "https://eslint.org/docs/rules/block-spacing" + url: "https://eslint.org/docs/latest/rules/block-spacing" }, fixable: "whitespace", @@ -37,11 +40,11 @@ module.exports = { create(context) { const always = (context.options[0] !== "never"), messageId = always ? "missing" : "extra", - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; /** * Gets the open brace token from a given node. - * @param {ASTNode} node A BlockStatement/SwitchStatement node to get. + * @param {ASTNode} node A BlockStatement/StaticBlock/SwitchStatement node to get. * @returns {Token} The token of the open brace. */ function getOpenBrace(node) { @@ -51,6 +54,12 @@ module.exports = { } return sourceCode.getLastToken(node, 1); } + + if (node.type === "StaticBlock") { + return sourceCode.getFirstToken(node, { skip: 1 }); // skip the `static` token + } + + // "BlockStatement" return sourceCode.getFirstToken(node); } @@ -73,8 +82,8 @@ module.exports = { } /** - * Reports invalid spacing style inside braces. - * @param {ASTNode} node A BlockStatement/SwitchStatement node to get. + * Checks and reports invalid spacing style inside braces. + * @param {ASTNode} node A BlockStatement/StaticBlock/SwitchStatement node to check. * @returns {void} */ function checkSpacingInsideBraces(node) { @@ -158,6 +167,7 @@ module.exports = { return { BlockStatement: checkSpacingInsideBraces, + StaticBlock: checkSpacingInsideBraces, SwitchStatement: checkSpacingInsideBraces }; } diff --git a/node_modules/eslint/lib/rules/brace-style.js b/node_modules/eslint/lib/rules/brace-style.js index 07223d10d..0fb4c65e6 100644 --- a/node_modules/eslint/lib/rules/brace-style.js +++ b/node_modules/eslint/lib/rules/brace-style.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag block statements that do not use the one true brace style * @author Ian Christian Myers + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent brace style for blocks", - category: "Stylistic Issues", + description: "Enforce consistent brace style for blocks", recommended: false, - url: "https://eslint.org/docs/rules/brace-style" + url: "https://eslint.org/docs/latest/rules/brace-style" }, schema: [ @@ -53,7 +56,7 @@ module.exports = { create(context) { const style = context.options[0] || "1tbs", params = context.options[1] || {}, - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -156,6 +159,12 @@ module.exports = { validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node)); } }, + StaticBlock(node) { + validateCurlyPair( + sourceCode.getFirstToken(node, { skip: 1 }), // skip the `static` token + sourceCode.getLastToken(node) + ); + }, ClassBody(node) { validateCurlyPair(sourceCode.getFirstToken(node), sourceCode.getLastToken(node)); }, diff --git a/node_modules/eslint/lib/rules/callback-return.js b/node_modules/eslint/lib/rules/callback-return.js index fa66e6383..5d441bdd9 100644 --- a/node_modules/eslint/lib/rules/callback-return.js +++ b/node_modules/eslint/lib/rules/callback-return.js @@ -1,6 +1,7 @@ /** * @fileoverview Enforce return after a callback. * @author Jamund Ferguson + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -8,6 +9,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -17,10 +19,9 @@ module.exports = { type: "suggestion", docs: { - description: "require `return` statements after callbacks", - category: "Node.js and CommonJS", + description: "Require `return` statements after callbacks", recommended: false, - url: "https://eslint.org/docs/rules/callback-return" + url: "https://eslint.org/docs/latest/rules/callback-return" }, schema: [{ @@ -36,7 +37,7 @@ module.exports = { create(context) { const callbacks = context.options[0] || ["callback", "cb", "next"], - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -52,7 +53,7 @@ module.exports = { if (!node.parent) { return null; } - if (types.indexOf(node.parent.type) === -1) { + if (!types.includes(node.parent.type)) { return findClosestParentOfType(node.parent, types); } return node.parent; @@ -86,7 +87,7 @@ module.exports = { * @returns {boolean} Whether or not this function matches our callback name. */ function isCallback(node) { - return containsOnlyIdentifiers(node.callee) && callbacks.indexOf(sourceCode.getText(node.callee)) > -1; + return containsOnlyIdentifiers(node.callee) && callbacks.includes(sourceCode.getText(node.callee)); } /** diff --git a/node_modules/eslint/lib/rules/camelcase.js b/node_modules/eslint/lib/rules/camelcase.js index d34656cfa..51bb4122d 100644 --- a/node_modules/eslint/lib/rules/camelcase.js +++ b/node_modules/eslint/lib/rules/camelcase.js @@ -5,19 +5,25 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce camelcase naming convention", - category: "Stylistic Issues", + description: "Enforce camelcase naming convention", recommended: false, - url: "https://eslint.org/docs/rules/camelcase" + url: "https://eslint.org/docs/latest/rules/camelcase" }, schema: [ @@ -55,32 +61,26 @@ module.exports = { ], messages: { - notCamelCase: "Identifier '{{name}}' is not in camel case." + notCamelCase: "Identifier '{{name}}' is not in camel case.", + notCamelCasePrivate: "#{{name}} is not in camel case." } }, create(context) { - const options = context.options[0] || {}; - let properties = options.properties || ""; + const properties = options.properties === "never" ? "never" : "always"; const ignoreDestructuring = options.ignoreDestructuring; const ignoreImports = options.ignoreImports; const ignoreGlobals = options.ignoreGlobals; const allow = options.allow || []; - - let globalScope; - - if (properties !== "always" && properties !== "never") { - properties = "always"; - } + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- // contains reported nodes to avoid reporting twice on destructuring with shorthand notation - const reported = []; - const ALLOWED_PARENT_TYPES = new Set(["CallExpression", "NewExpression"]); + const reported = new Set(); /** * Checks if a string contains an underscore and isn't all upper-case @@ -89,9 +89,10 @@ module.exports = { * @private */ function isUnderscored(name) { + const nameBody = name.replace(/^_+|_+$/gu, ""); // if there's an underscore, it might be A_CONSTANT, which is okay - return name.includes("_") && name !== name.toUpperCase(); + return nameBody.includes("_") && nameBody !== nameBody.toUpperCase(); } /** @@ -107,94 +108,76 @@ module.exports = { } /** - * Checks if a parent of a node is an ObjectPattern. - * @param {ASTNode} node The node to check. - * @returns {boolean} if the node is inside an ObjectPattern + * Checks if a given name is good or not. + * @param {string} name The name to check. + * @returns {boolean} `true` if the name is good. * @private */ - function isInsideObjectPattern(node) { - let current = node; - - while (current) { - const parent = current.parent; - - if (parent && parent.type === "Property" && parent.computed && parent.key === current) { - return false; - } - - if (current.type === "ObjectPattern") { - return true; - } - - current = parent; - } - - return false; + function isGoodName(name) { + return !isUnderscored(name) || isAllowed(name); } /** - * Checks whether the given node represents assignment target property in destructuring. - * - * For examples: - * ({a: b.foo} = c); // => true for `foo` - * ([a.foo] = b); // => true for `foo` - * ([a.foo = 1] = b); // => true for `foo` - * ({...a.foo} = b); // => true for `foo` - * @param {ASTNode} node An Identifier node to check - * @returns {boolean} True if the node is an assignment target property in destructuring. + * Checks if a given identifier reference or member expression is an assignment + * target. + * @param {ASTNode} node The node to check. + * @returns {boolean} `true` if the node is an assignment target. */ - function isAssignmentTargetPropertyInDestructuring(node) { - if ( - node.parent.type === "MemberExpression" && - node.parent.property === node && - !node.parent.computed - ) { - const effectiveParent = node.parent.parent; - - return ( - effectiveParent.type === "Property" && - effectiveParent.value === node.parent && - effectiveParent.parent.type === "ObjectPattern" || - effectiveParent.type === "ArrayPattern" || - effectiveParent.type === "RestElement" || - ( - effectiveParent.type === "AssignmentPattern" && - effectiveParent.left === node.parent - ) - ); - } - return false; - } + function isAssignmentTarget(node) { + const parent = node.parent; - /** - * Checks whether the given node represents a reference to a global variable that is not declared in the source code. - * These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables. - * @param {ASTNode} node `Identifier` node to check. - * @returns {boolean} `true` if the node is a reference to a global variable. - */ - function isReferenceToGlobalVariable(node) { - const variable = globalScope.set.get(node.name); + switch (parent.type) { + case "AssignmentExpression": + case "AssignmentPattern": + return parent.left === node; + + case "Property": + return ( + parent.parent.type === "ObjectPattern" && + parent.value === node + ); + case "ArrayPattern": + case "RestElement": + return true; - return variable && variable.defs.length === 0 && - variable.references.some(ref => ref.identifier === node); + default: + return false; + } } /** - * Checks whether the given node represents a reference to a property of an object in an object literal expression. - * This allows to differentiate between a global variable that is allowed to be used as a reference, and the key - * of the expressed object (which shouldn't be allowed). - * @param {ASTNode} node `Identifier` node to check. - * @returns {boolean} `true` if the node is a property name of an object literal expression + * Checks if a given binding identifier uses the original name as-is. + * - If it's in object destructuring or object expression, the original name is its property name. + * - If it's in import declaration, the original name is its exported name. + * @param {ASTNode} node The `Identifier` node to check. + * @returns {boolean} `true` if the identifier uses the original name as-is. */ - function isPropertyNameInObjectLiteral(node) { - const parent = node.parent; - - return ( - parent.type === "Property" && - parent.parent.type === "ObjectExpression" && - !parent.computed && - parent.key === node - ); + function equalsToOriginalName(node) { + const localName = node.name; + const valueNode = node.parent.type === "AssignmentPattern" + ? node.parent + : node; + const parent = valueNode.parent; + + switch (parent.type) { + case "Property": + return ( + (parent.parent.type === "ObjectPattern" || parent.parent.type === "ObjectExpression") && + parent.value === valueNode && + !parent.computed && + parent.key.type === "Identifier" && + parent.key.name === localName + ); + + case "ImportSpecifier": + return ( + parent.local === node && + astUtils.getModuleExportName(parent.imported) === localName + ); + + default: + return false; + } } /** @@ -204,122 +187,213 @@ module.exports = { * @private */ function report(node) { - if (!reported.includes(node)) { - reported.push(node); - context.report({ node, messageId: "notCamelCase", data: { name: node.name } }); + if (reported.has(node.range[0])) { + return; } + reported.add(node.range[0]); + + // Report it. + context.report({ + node, + messageId: node.type === "PrivateIdentifier" + ? "notCamelCasePrivate" + : "notCamelCase", + data: { name: node.name } + }); } - return { - - Program() { - globalScope = context.getScope(); - }, + /** + * Reports an identifier reference or a binding identifier. + * @param {ASTNode} node The `Identifier` node to report. + * @returns {void} + */ + function reportReferenceId(node) { - Identifier(node) { + /* + * For backward compatibility, if it's in callings then ignore it. + * Not sure why it is. + */ + if ( + node.parent.type === "CallExpression" || + node.parent.type === "NewExpression" + ) { + return; + } - /* - * Leading and trailing underscores are commonly used to flag - * private/protected identifiers, strip them before checking if underscored - */ - const name = node.name, - nameIsUnderscored = isUnderscored(name.replace(/^_+|_+$/gu, "")), - effectiveParent = (node.parent.type === "MemberExpression") ? node.parent.parent : node.parent; + /* + * For backward compatibility, if it's a default value of + * destructuring/parameters then ignore it. + * Not sure why it is. + */ + if ( + node.parent.type === "AssignmentPattern" && + node.parent.right === node + ) { + return; + } - // First, we ignore the node if it match the ignore list - if (isAllowed(name)) { - return; - } + /* + * The `ignoreDestructuring` flag skips the identifiers that uses + * the property name as-is. + */ + if (ignoreDestructuring && equalsToOriginalName(node)) { + return; + } - // Check if it's a global variable - if (ignoreGlobals && isReferenceToGlobalVariable(node) && !isPropertyNameInObjectLiteral(node)) { - return; - } + report(node); + } - // MemberExpressions get special rules - if (node.parent.type === "MemberExpression") { + return { - // "never" check properties - if (properties === "never") { - return; - } + // Report camelcase of global variable references ------------------ + Program(node) { + const scope = sourceCode.getScope(node); - // Always report underscored object names - if (node.parent.object.type === "Identifier" && node.parent.object.name === node.name && nameIsUnderscored) { - report(node); + if (!ignoreGlobals) { - // Report AssignmentExpressions only if they are the left side of the assignment - } else if (effectiveParent.type === "AssignmentExpression" && nameIsUnderscored && (effectiveParent.right.type !== "MemberExpression" || effectiveParent.left.type === "MemberExpression" && effectiveParent.left.property.name === node.name)) { - report(node); + // Defined globals in config files or directive comments. + for (const variable of scope.variables) { + if ( + variable.identifiers.length > 0 || + isGoodName(variable.name) + ) { + continue; + } + for (const reference of variable.references) { - } else if (isAssignmentTargetPropertyInDestructuring(node) && nameIsUnderscored) { - report(node); + /* + * For backward compatibility, this rule reports read-only + * references as well. + */ + reportReferenceId(reference.identifier); + } } + } - /* - * Properties have their own rules, and - * AssignmentPattern nodes can be treated like Properties: - * e.g.: const { no_camelcased = false } = bar; - */ - } else if (node.parent.type === "Property" || node.parent.type === "AssignmentPattern") { - - if (node.parent.parent && node.parent.parent.type === "ObjectPattern") { - if (node.parent.shorthand && node.parent.value.left && nameIsUnderscored) { - report(node); - } + // Undefined globals. + for (const reference of scope.through) { + const id = reference.identifier; - const assignmentKeyEqualsValue = node.parent.key.name === node.parent.value.name; + if (isGoodName(id.name)) { + continue; + } - if (nameIsUnderscored && node.parent.computed) { - report(node); - } + /* + * For backward compatibility, this rule reports read-only + * references as well. + */ + reportReferenceId(id); + } + }, - // prevent checking righthand side of destructured object - if (node.parent.key === node && node.parent.value !== node) { - return; - } + // Report camelcase of declared variables -------------------------- + [[ + "VariableDeclaration", + "FunctionDeclaration", + "FunctionExpression", + "ArrowFunctionExpression", + "ClassDeclaration", + "ClassExpression", + "CatchClause" + ]](node) { + for (const variable of sourceCode.getDeclaredVariables(node)) { + if (isGoodName(variable.name)) { + continue; + } + const id = variable.identifiers[0]; - const valueIsUnderscored = node.parent.value.name && nameIsUnderscored; + // Report declaration. + if (!(ignoreDestructuring && equalsToOriginalName(id))) { + report(id); + } - // ignore destructuring if the option is set, unless a new identifier is created - if (valueIsUnderscored && !(assignmentKeyEqualsValue && ignoreDestructuring)) { - report(node); + /* + * For backward compatibility, report references as well. + * It looks unnecessary because declarations are reported. + */ + for (const reference of variable.references) { + if (reference.init) { + continue; // Skip the write references of initializers. } + reportReferenceId(reference.identifier); } + } + }, - // "never" check properties or always ignore destructuring - if (properties === "never" || (ignoreDestructuring && isInsideObjectPattern(node))) { - return; - } + // Report camelcase in properties ---------------------------------- + [[ + "ObjectExpression > Property[computed!=true] > Identifier.key", + "MethodDefinition[computed!=true] > Identifier.key", + "PropertyDefinition[computed!=true] > Identifier.key", + "MethodDefinition > PrivateIdentifier.key", + "PropertyDefinition > PrivateIdentifier.key" + ]](node) { + if (properties === "never" || isGoodName(node.name)) { + return; + } + report(node); + }, + "MemberExpression[computed!=true] > Identifier.property"(node) { + if ( + properties === "never" || + !isAssignmentTarget(node.parent) || // ← ignore read-only references. + isGoodName(node.name) + ) { + return; + } + report(node); + }, - // don't check right hand side of AssignmentExpression to prevent duplicate warnings - if (nameIsUnderscored && !ALLOWED_PARENT_TYPES.has(effectiveParent.type) && !(node.parent.right === node)) { - report(node); + // Report camelcase in import -------------------------------------- + ImportDeclaration(node) { + for (const variable of sourceCode.getDeclaredVariables(node)) { + if (isGoodName(variable.name)) { + continue; } + const id = variable.identifiers[0]; - // Check if it's an import specifier - } else if (["ImportSpecifier", "ImportNamespaceSpecifier", "ImportDefaultSpecifier"].includes(node.parent.type)) { - - if (node.parent.type === "ImportSpecifier" && ignoreImports) { - return; + // Report declaration. + if (!(ignoreImports && equalsToOriginalName(id))) { + report(id); } - // Report only if the local imported identifier is underscored - if ( - node.parent.local && - node.parent.local.name === node.name && - nameIsUnderscored - ) { - report(node); + /* + * For backward compatibility, report references as well. + * It looks unnecessary because declarations are reported. + */ + for (const reference of variable.references) { + reportReferenceId(reference.identifier); } + } + }, - // Report anything that is underscored that isn't a CallExpression - } else if (nameIsUnderscored && !ALLOWED_PARENT_TYPES.has(effectiveParent.type)) { - report(node); + // Report camelcase in re-export ----------------------------------- + [[ + "ExportAllDeclaration > Identifier.exported", + "ExportSpecifier > Identifier.exported" + ]](node) { + if (isGoodName(node.name)) { + return; } - } + report(node); + }, - }; + // Report camelcase in labels -------------------------------------- + [[ + "LabeledStatement > Identifier.label", + /* + * For backward compatibility, report references as well. + * It looks unnecessary because declarations are reported. + */ + "BreakStatement > Identifier.label", + "ContinueStatement > Identifier.label" + ]](node) { + if (isGoodName(node.name)) { + return; + } + report(node); + } + }; } }; diff --git a/node_modules/eslint/lib/rules/capitalized-comments.js b/node_modules/eslint/lib/rules/capitalized-comments.js index d7524b878..3a17b0566 100644 --- a/node_modules/eslint/lib/rules/capitalized-comments.js +++ b/node_modules/eslint/lib/rules/capitalized-comments.js @@ -99,15 +99,15 @@ function createRegExpForIgnorePatterns(normalizedOptions) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce or disallow capitalization of the first letter of a comment", - category: "Stylistic Issues", + description: "Enforce or disallow capitalization of the first letter of a comment", recommended: false, - url: "https://eslint.org/docs/rules/capitalized-comments" + url: "https://eslint.org/docs/latest/rules/capitalized-comments" }, fixable: "code", @@ -139,7 +139,7 @@ module.exports = { const capitalize = context.options[0] || "always", normalizedOptions = getAllNormalizedOptions(context.options[1]), - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; createRegExpForIgnorePatterns(normalizedOptions); @@ -185,7 +185,7 @@ module.exports = { return Boolean( previousTokenOrComment && - ["Block", "Line"].indexOf(previousTokenOrComment.type) !== -1 + ["Block", "Line"].includes(previousTokenOrComment.type) ); } diff --git a/node_modules/eslint/lib/rules/class-methods-use-this.js b/node_modules/eslint/lib/rules/class-methods-use-this.js index 2cc5cc418..9cf8a1b8a 100644 --- a/node_modules/eslint/lib/rules/class-methods-use-this.js +++ b/node_modules/eslint/lib/rules/class-methods-use-this.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce that class methods utilize `this`", - category: "Best Practices", + description: "Enforce that class methods utilize `this`", recommended: false, - url: "https://eslint.org/docs/rules/class-methods-use-this" + url: "https://eslint.org/docs/latest/rules/class-methods-use-this" }, schema: [{ @@ -34,6 +34,10 @@ module.exports = { items: { type: "string" } + }, + enforceForClassFields: { + type: "boolean", + default: true } }, additionalProperties: false @@ -45,10 +49,27 @@ module.exports = { }, create(context) { const config = Object.assign({}, context.options[0]); + const enforceForClassFields = config.enforceForClassFields !== false; const exceptMethods = new Set(config.exceptMethods || []); const stack = []; + /** + * Push `this` used flag initialized with `false` onto the stack. + * @returns {void} + */ + function pushContext() { + stack.push(false); + } + + /** + * Pop `this` used flag from the stack. + * @returns {boolean | undefined} `this` used flag + */ + function popContext() { + return stack.pop(); + } + /** * Initializes the current context to false and pushes it onto the stack. * These booleans represent whether 'this' has been used in the context. @@ -56,7 +77,7 @@ module.exports = { * @private */ function enterFunction() { - stack.push(false); + pushContext(); } /** @@ -66,7 +87,14 @@ module.exports = { * @private */ function isInstanceMethod(node) { - return !node.static && node.kind !== "constructor" && node.type === "MethodDefinition"; + switch (node.type) { + case "MethodDefinition": + return !node.static && node.kind !== "constructor"; + case "PropertyDefinition": + return !node.static && enforceForClassFields; + default: + return false; + } } /** @@ -76,8 +104,19 @@ module.exports = { * @private */ function isIncludedInstanceMethod(node) { - return isInstanceMethod(node) && - (node.computed || !exceptMethods.has(node.key.name)); + if (isInstanceMethod(node)) { + if (node.computed) { + return true; + } + + const hashIfNeeded = node.key.type === "PrivateIdentifier" ? "#" : ""; + const name = node.key.type === "Literal" + ? astUtils.getStaticStringValue(node.key) + : (node.key.name || ""); + + return !exceptMethods.has(hashIfNeeded + name); + } + return false; } /** @@ -89,11 +128,12 @@ module.exports = { * @private */ function exitFunction(node) { - const methodUsesThis = stack.pop(); + const methodUsesThis = popContext(); if (isIncludedInstanceMethod(node.parent) && !methodUsesThis) { context.report({ node, + loc: astUtils.getFunctionHeadLoc(node, context.sourceCode), messageId: "missingThis", data: { name: astUtils.getFunctionNameWithKind(node) @@ -118,8 +158,30 @@ module.exports = { "FunctionDeclaration:exit": exitFunction, FunctionExpression: enterFunction, "FunctionExpression:exit": exitFunction, + + /* + * Class field value are implicit functions. + */ + "PropertyDefinition > *.key:exit": pushContext, + "PropertyDefinition:exit": popContext, + + /* + * Class static blocks are implicit functions. They aren't required to use `this`, + * but we have to push context so that it captures any use of `this` in the static block + * separately from enclosing contexts, because static blocks have their own `this` and it + * shouldn't count as used `this` in enclosing contexts. + */ + StaticBlock: pushContext, + "StaticBlock:exit": popContext, + ThisExpression: markThisUsed, - Super: markThisUsed + Super: markThisUsed, + ...( + enforceForClassFields && { + "PropertyDefinition > ArrowFunctionExpression.value": enterFunction, + "PropertyDefinition > ArrowFunctionExpression.value:exit": exitFunction + } + ) }; } }; diff --git a/node_modules/eslint/lib/rules/comma-dangle.js b/node_modules/eslint/lib/rules/comma-dangle.js index e22b7f355..5f4180f12 100644 --- a/node_modules/eslint/lib/rules/comma-dangle.js +++ b/node_modules/eslint/lib/rules/comma-dangle.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to forbid or enforce dangling commas. * @author Ian Christian Myers + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,7 +10,6 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ @@ -51,7 +51,7 @@ function normalizeOptions(optionValue, ecmaVersion) { objects: optionValue, imports: optionValue, exports: optionValue, - functions: (!ecmaVersion || ecmaVersion < 8) ? "ignore" : optionValue + functions: ecmaVersion < 2017 ? "ignore" : optionValue }; } if (typeof optionValue === "object" && optionValue !== null) { @@ -71,15 +71,17 @@ function normalizeOptions(optionValue, ecmaVersion) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow trailing commas", - category: "Stylistic Issues", + description: "Require or disallow trailing commas", recommended: false, - url: "https://eslint.org/docs/rules/comma-dangle" + url: "https://eslint.org/docs/latest/rules/comma-dangle" }, fixable: "code", @@ -124,7 +126,8 @@ module.exports = { } ] } - ] + ], + additionalItems: false }, messages: { @@ -134,9 +137,9 @@ module.exports = { }, create(context) { - const options = normalizeOptions(context.options[0], context.parserOptions.ecmaVersion); + const options = normalizeOptions(context.options[0], context.languageOptions.ecmaVersion); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Gets the last item of the given node. @@ -144,23 +147,33 @@ module.exports = { * @returns {ASTNode|null} The last node or null. */ function getLastItem(node) { + + /** + * Returns the last element of an array + * @param {any[]} array The input array + * @returns {any} The last element + */ + function last(array) { + return array[array.length - 1]; + } + switch (node.type) { case "ObjectExpression": case "ObjectPattern": - return lodash.last(node.properties); + return last(node.properties); case "ArrayExpression": case "ArrayPattern": - return lodash.last(node.elements); + return last(node.elements); case "ImportDeclaration": case "ExportNamedDeclaration": - return lodash.last(node.specifiers); + return last(node.specifiers); case "FunctionDeclaration": case "FunctionExpression": case "ArrowFunctionExpression": - return lodash.last(node.params); + return last(node.params); case "CallExpression": case "NewExpression": - return lodash.last(node.arguments); + return last(node.arguments); default: return null; } @@ -233,8 +246,18 @@ module.exports = { node: lastItem, loc: trailingToken.loc, messageId: "unexpected", - fix(fixer) { - return fixer.remove(trailingToken); + *fix(fixer) { + yield fixer.remove(trailingToken); + + /* + * Extend the range of the fix to include surrounding tokens to ensure + * that the element after which the comma is removed stays _last_. + * This intentionally makes conflicts in fix ranges with rules that may be + * adding or removing elements in the same autofix pass. + * https://github.com/eslint/eslint/issues/15660 + */ + yield fixer.insertTextBefore(sourceCode.getTokenBefore(trailingToken), ""); + yield fixer.insertTextAfter(sourceCode.getTokenAfter(trailingToken), ""); } }); } @@ -272,8 +295,18 @@ module.exports = { end: astUtils.getNextLocation(sourceCode, trailingToken.loc.end) }, messageId: "missing", - fix(fixer) { - return fixer.insertTextAfter(trailingToken, ","); + *fix(fixer) { + yield fixer.insertTextAfter(trailingToken, ","); + + /* + * Extend the range of the fix to include surrounding tokens to ensure + * that the element after which the comma is inserted stays _last_. + * This intentionally makes conflicts in fix ranges with rules that may be + * adding or removing elements in the same autofix pass. + * https://github.com/eslint/eslint/issues/15660 + */ + yield fixer.insertTextBefore(trailingToken, ""); + yield fixer.insertTextAfter(sourceCode.getTokenAfter(trailingToken), ""); } }); } @@ -316,7 +349,7 @@ module.exports = { "always-multiline": forceTrailingCommaIfMultiline, "only-multiline": allowTrailingCommaIfMultiline, never: forbidTrailingComma, - ignore: lodash.noop + ignore() {} }; return { diff --git a/node_modules/eslint/lib/rules/comma-spacing.js b/node_modules/eslint/lib/rules/comma-spacing.js index 73c10a771..e266de4a9 100644 --- a/node_modules/eslint/lib/rules/comma-spacing.js +++ b/node_modules/eslint/lib/rules/comma-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Comma spacing - validates spacing before and after comma * @author Vignesh Anand aka vegetableman. + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,15 +11,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before and after commas", - category: "Stylistic Issues", + description: "Enforce consistent spacing before and after commas", recommended: false, - url: "https://eslint.org/docs/rules/comma-spacing" + url: "https://eslint.org/docs/latest/rules/comma-spacing" }, fixable: "whitespace", @@ -48,7 +51,7 @@ module.exports = { create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const tokensAndComments = sourceCode.tokensAndComments; const options = { @@ -103,38 +106,6 @@ module.exports = { }); } - /** - * Validates the spacing around a comma token. - * @param {Object} tokens The tokens to be validated. - * @param {Token} tokens.comma The token representing the comma. - * @param {Token} [tokens.left] The last token before the comma. - * @param {Token} [tokens.right] The first token after the comma. - * @param {Token|ASTNode} reportItem The item to use when reporting an error. - * @returns {void} - * @private - */ - function validateCommaItemSpacing(tokens, reportItem) { - if (tokens.left && astUtils.isTokenOnSameLine(tokens.left, tokens.comma) && - (options.before !== sourceCode.isSpaceBetweenTokens(tokens.left, tokens.comma)) - ) { - report(reportItem, "before", tokens.left); - } - - if (tokens.right && astUtils.isClosingParenToken(tokens.right)) { - return; - } - - if (tokens.right && !options.after && tokens.right.type === "Line") { - return; - } - - if (tokens.right && astUtils.isTokenOnSameLine(tokens.comma, tokens.right) && - (options.after !== sourceCode.isSpaceBetweenTokens(tokens.comma, tokens.right)) - ) { - report(reportItem, "after", tokens.right); - } - } - /** * Adds null elements of the given ArrayExpression or ArrayPattern node to the ignore list. * @param {ASTNode} node An ArrayExpression or ArrayPattern node. @@ -172,18 +143,44 @@ module.exports = { return; } - if (token && token.type === "JSXText") { - return; - } - const previousToken = tokensAndComments[i - 1]; const nextToken = tokensAndComments[i + 1]; - validateCommaItemSpacing({ - comma: token, - left: astUtils.isCommaToken(previousToken) || commaTokensToIgnore.indexOf(token) > -1 ? null : previousToken, - right: astUtils.isCommaToken(nextToken) ? null : nextToken - }, token); + if ( + previousToken && + !astUtils.isCommaToken(previousToken) && // ignore spacing between two commas + + /* + * `commaTokensToIgnore` are ending commas of `null` elements (array holes/elisions). + * In addition to spacing between two commas, this can also ignore: + * + * - Spacing after `[` (controlled by array-bracket-spacing) + * Example: [ , ] + * ^ + * - Spacing after a comment (for backwards compatibility, this was possibly unintentional) + * Example: [a, /* * / ,] + * ^ + */ + !commaTokensToIgnore.includes(token) && + + astUtils.isTokenOnSameLine(previousToken, token) && + options.before !== sourceCode.isSpaceBetweenTokens(previousToken, token) + ) { + report(token, "before", previousToken); + } + + if ( + nextToken && + !astUtils.isCommaToken(nextToken) && // ignore spacing between two commas + !astUtils.isClosingParenToken(nextToken) && // controlled by space-in-parens + !astUtils.isClosingBracketToken(nextToken) && // controlled by array-bracket-spacing + !astUtils.isClosingBraceToken(nextToken) && // controlled by object-curly-spacing + !(!options.after && nextToken.type === "Line") && // special case, allow space before line comment + astUtils.isTokenOnSameLine(token, nextToken) && + options.after !== sourceCode.isSpaceBetweenTokens(token, nextToken) + ) { + report(token, "after", nextToken); + } }); }, ArrayExpression: addNullElementsToIgnoreList, diff --git a/node_modules/eslint/lib/rules/comma-style.js b/node_modules/eslint/lib/rules/comma-style.js index f1a23d63b..0b5121953 100644 --- a/node_modules/eslint/lib/rules/comma-style.js +++ b/node_modules/eslint/lib/rules/comma-style.js @@ -1,6 +1,7 @@ /** * @fileoverview Comma style - enforces comma styles of two types: last and first * @author Vignesh Anand aka vegetableman + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent comma style", - category: "Stylistic Issues", + description: "Enforce consistent comma style", recommended: false, - url: "https://eslint.org/docs/rules/comma-style" + url: "https://eslint.org/docs/latest/rules/comma-style" }, fixable: "code", @@ -51,7 +54,7 @@ module.exports = { create(context) { const style = context.options[0] || "last", - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; const exceptions = { ArrayPattern: true, ArrowFunctionExpression: true, @@ -207,8 +210,7 @@ module.exports = { * they are always valid regardless of an undefined item. */ if (astUtils.isCommaToken(commaToken)) { - validateCommaItemSpacing(previousItemToken, commaToken, - currentItemToken, reportItem); + validateCommaItemSpacing(previousItemToken, commaToken, currentItemToken, reportItem); } if (item) { @@ -217,6 +219,8 @@ module.exports = { previousItemToken = tokenAfterItem ? sourceCode.getTokenBefore(tokenAfterItem) : sourceCode.ast.tokens[sourceCode.ast.tokens.length - 1]; + } else { + previousItemToken = currentItemToken; } }); diff --git a/node_modules/eslint/lib/rules/complexity.js b/node_modules/eslint/lib/rules/complexity.js index 5d62c6ff4..b7925074d 100644 --- a/node_modules/eslint/lib/rules/complexity.js +++ b/node_modules/eslint/lib/rules/complexity.js @@ -10,23 +10,22 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); - const astUtils = require("./utils/ast-utils"); +const { upperCaseFirst } = require("../shared/string-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum cyclomatic complexity allowed in a program", - category: "Best Practices", + description: "Enforce a maximum cyclomatic complexity allowed in a program", recommended: false, - url: "https://eslint.org/docs/rules/complexity" + url: "https://eslint.org/docs/latest/rules/complexity" }, schema: [ @@ -76,60 +75,16 @@ module.exports = { // Helpers //-------------------------------------------------------------------------- - // Using a stack to store complexity (handling nested functions) - const fns = []; - - /** - * When parsing a new function, store it in our function stack - * @returns {void} - * @private - */ - function startFunction() { - fns.push(1); - } - - /** - * Evaluate the node at the end of function - * @param {ASTNode} node node to evaluate - * @returns {void} - * @private - */ - function endFunction(node) { - const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(node)); - const complexity = fns.pop(); - - if (complexity > THRESHOLD) { - context.report({ - node, - messageId: "complex", - data: { name, complexity, max: THRESHOLD } - }); - } - } + // Using a stack to store complexity per code path + const complexities = []; /** - * Increase the complexity of the function in context + * Increase the complexity of the code path in context * @returns {void} * @private */ function increaseComplexity() { - if (fns.length) { - fns[fns.length - 1]++; - } - } - - /** - * Increase the switch complexity in context - * @param {ASTNode} node node to evaluate - * @returns {void} - * @private - */ - function increaseSwitchComplexity(node) { - - // Avoiding `default` - if (node.test) { - increaseComplexity(); - } + complexities[complexities.length - 1]++; } //-------------------------------------------------------------------------- @@ -137,13 +92,14 @@ module.exports = { //-------------------------------------------------------------------------- return { - FunctionDeclaration: startFunction, - FunctionExpression: startFunction, - ArrowFunctionExpression: startFunction, - "FunctionDeclaration:exit": endFunction, - "FunctionExpression:exit": endFunction, - "ArrowFunctionExpression:exit": endFunction, + onCodePathStart() { + + // The initial complexity is 1, representing one execution path in the CodePath + complexities.push(1); + }, + + // Each branching in the code adds 1 to the complexity CatchClause: increaseComplexity, ConditionalExpression: increaseComplexity, LogicalExpression: increaseComplexity, @@ -151,14 +107,57 @@ module.exports = { ForInStatement: increaseComplexity, ForOfStatement: increaseComplexity, IfStatement: increaseComplexity, - SwitchCase: increaseSwitchComplexity, WhileStatement: increaseComplexity, DoWhileStatement: increaseComplexity, + // Avoid `default` + "SwitchCase[test]": increaseComplexity, + + // Logical assignment operators have short-circuiting behavior AssignmentExpression(node) { if (astUtils.isLogicalAssignmentOperator(node.operator)) { increaseComplexity(); } + }, + + onCodePathEnd(codePath, node) { + const complexity = complexities.pop(); + + /* + * This rule only evaluates complexity of functions, so "program" is excluded. + * Class field initializers and class static blocks are implicit functions. Therefore, + * they shouldn't contribute to the enclosing function's complexity, but their + * own complexity should be evaluated. + */ + if ( + codePath.origin !== "function" && + codePath.origin !== "class-field-initializer" && + codePath.origin !== "class-static-block" + ) { + return; + } + + if (complexity > THRESHOLD) { + let name; + + if (codePath.origin === "class-field-initializer") { + name = "class field initializer"; + } else if (codePath.origin === "class-static-block") { + name = "class static block"; + } else { + name = astUtils.getFunctionNameWithKind(node); + } + + context.report({ + node, + messageId: "complex", + data: { + name: upperCaseFirst(name), + complexity, + max: THRESHOLD + } + }); + } } }; diff --git a/node_modules/eslint/lib/rules/computed-property-spacing.js b/node_modules/eslint/lib/rules/computed-property-spacing.js index 53fdb8f4e..2852877fd 100644 --- a/node_modules/eslint/lib/rules/computed-property-spacing.js +++ b/node_modules/eslint/lib/rules/computed-property-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallows or enforces spaces inside computed properties. * @author Jamund Ferguson + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,15 +11,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing inside computed property brackets", - category: "Stylistic Issues", + description: "Enforce consistent spacing inside computed property brackets", recommended: false, - url: "https://eslint.org/docs/rules/computed-property-spacing" + url: "https://eslint.org/docs/latest/rules/computed-property-spacing" }, fixable: "whitespace", @@ -49,7 +52,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const propertyNameMustBeSpaced = context.options[0] === "always"; // default is "never" const enforceForClassMembers = !context.options[1] || context.options[1].enforceForClassMembers; @@ -195,7 +198,8 @@ module.exports = { }; if (enforceForClassMembers) { - listeners.MethodDefinition = checkSpacing("key"); + listeners.MethodDefinition = + listeners.PropertyDefinition = listeners.Property; } return listeners; diff --git a/node_modules/eslint/lib/rules/consistent-return.js b/node_modules/eslint/lib/rules/consistent-return.js index 94db253d2..304e924b1 100644 --- a/node_modules/eslint/lib/rules/consistent-return.js +++ b/node_modules/eslint/lib/rules/consistent-return.js @@ -8,20 +8,27 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); const astUtils = require("./utils/ast-utils"); +const { upperCaseFirst } = require("../shared/string-utils"); //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ /** - * Checks whether or not a given code path segment is unreachable. - * @param {CodePathSegment} segment A CodePathSegment to check. - * @returns {boolean} `true` if the segment is unreachable. + * Checks all segments in a set and returns true if all are unreachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if all segments are unreachable; false otherwise. */ -function isUnreachable(segment) { - return !segment.reachable; +function areAllSegmentsUnreachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return false; + } + } + + return true; } /** @@ -40,15 +47,15 @@ function isClassConstructor(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `return` statements to either always or never specify values", - category: "Best Practices", + description: "Require `return` statements to either always or never specify values", recommended: false, - url: "https://eslint.org/docs/rules/consistent-return" + url: "https://eslint.org/docs/latest/rules/consistent-return" }, schema: [{ @@ -88,7 +95,7 @@ module.exports = { * When unreachable, all paths are returned or thrown. */ if (!funcInfo.hasReturnValue || - funcInfo.codePath.currentSegments.every(isUnreachable) || + areAllSegmentsUnreachable(funcInfo.currentSegments) || astUtils.isES5Constructor(node) || isClassConstructor(node) ) { @@ -104,18 +111,18 @@ module.exports = { } else if (node.type === "ArrowFunctionExpression") { // `=>` token - loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc.start; + loc = context.sourceCode.getTokenBefore(node.body, astUtils.isArrowToken).loc; } else if ( node.parent.type === "MethodDefinition" || (node.parent.type === "Property" && node.parent.method) ) { // Method name. - loc = node.parent.key.loc.start; + loc = node.parent.key.loc; } else { // Function name or `function` keyword. - loc = (node.id || node).loc.start; + loc = (node.id || context.sourceCode.getFirstToken(node)).loc; } if (!name) { @@ -141,13 +148,31 @@ module.exports = { hasReturn: false, hasReturnValue: false, messageId: "", - node + node, + currentSegments: new Set() }; }, onCodePathEnd() { funcInfo = funcInfo.upper; }, + onUnreachableCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + onCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + // Reports a given return statement if it's inconsistent. ReturnStatement(node) { const argument = node.argument; @@ -164,7 +189,7 @@ module.exports = { funcInfo.data = { name: funcInfo.node.type === "Program" ? "Program" - : lodash.upperFirst(astUtils.getFunctionNameWithKind(funcInfo.node)) + : upperCaseFirst(astUtils.getFunctionNameWithKind(funcInfo.node)) }; } else if (funcInfo.hasReturnValue !== hasReturnValue) { context.report({ diff --git a/node_modules/eslint/lib/rules/consistent-this.js b/node_modules/eslint/lib/rules/consistent-this.js index e5bc9678d..658957ae2 100644 --- a/node_modules/eslint/lib/rules/consistent-this.js +++ b/node_modules/eslint/lib/rules/consistent-this.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce consistent naming when capturing the current execution context", - category: "Stylistic Issues", + description: "Enforce consistent naming when capturing the current execution context", recommended: false, - url: "https://eslint.org/docs/rules/consistent-this" + url: "https://eslint.org/docs/latest/rules/consistent-this" }, schema: { @@ -36,6 +36,7 @@ module.exports = { create(context) { let aliases = []; + const sourceCode = context.sourceCode; if (context.options.length === 0) { aliases.push("that"); @@ -47,7 +48,7 @@ module.exports = { * Reports that a variable declarator or assignment expression is assigning * a non-'this' value to the specified alias. * @param {ASTNode} node The assigning node. - * @param {string} name the name of the alias that was incorrectly used. + * @param {string} name the name of the alias that was incorrectly used. * @returns {void} */ function reportBadAssignment(node, name) { @@ -65,7 +66,7 @@ module.exports = { function checkAssignment(node, name, value) { const isThis = value.type === "ThisExpression"; - if (aliases.indexOf(name) !== -1) { + if (aliases.includes(name)) { if (!isThis || node.operator && node.operator !== "=") { reportBadAssignment(node, name); } @@ -115,10 +116,11 @@ module.exports = { /** * Check each alias to ensure that is was assigned to the correct value. + * @param {ASTNode} node The node that represents the scope to check. * @returns {void} */ - function ensureWasAssigned() { - const scope = context.getScope(); + function ensureWasAssigned(node) { + const scope = sourceCode.getScope(node); aliases.forEach(alias => { checkWasAssigned(alias, scope); diff --git a/node_modules/eslint/lib/rules/constructor-super.js b/node_modules/eslint/lib/rules/constructor-super.js index dfec18fb6..330be80f3 100644 --- a/node_modules/eslint/lib/rules/constructor-super.js +++ b/node_modules/eslint/lib/rules/constructor-super.js @@ -10,12 +10,19 @@ //------------------------------------------------------------------------------ /** - * Checks whether a given code path segment is reachable or not. - * @param {CodePathSegment} segment A code path segment to check. - * @returns {boolean} `true` if the segment is reachable. + * Checks all segments in a set and returns true if any are reachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if any segment is reachable; false otherwise. */ -function isReachable(segment) { - return segment.reachable; +function isAnySegmentReachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return true; + } + } + + return false; } /** @@ -116,15 +123,15 @@ function isPossibleConstructor(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "require `super()` calls in constructors", - category: "ECMAScript 6", + description: "Require `super()` calls in constructors", recommended: true, - url: "https://eslint.org/docs/rules/constructor-super" + url: "https://eslint.org/docs/latest/rules/constructor-super" }, schema: [], @@ -210,7 +217,8 @@ module.exports = { isConstructor: true, hasExtends: Boolean(superClass), superIsConstructor: isPossibleConstructor(superClass), - codePath + codePath, + currentSegments: new Set() }; } else { funcInfo = { @@ -218,7 +226,8 @@ module.exports = { isConstructor: false, hasExtends: false, superIsConstructor: false, - codePath + codePath, + currentSegments: new Set() }; } }, @@ -261,6 +270,9 @@ module.exports = { * @returns {void} */ onCodePathSegmentStart(segment) { + + funcInfo.currentSegments.add(segment); + if (!(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends)) { return; } @@ -281,6 +293,19 @@ module.exports = { } }, + onUnreachableCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + onCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + /** * Update information of the code path segment when a code path was * looped. @@ -344,12 +369,11 @@ module.exports = { // Reports if needed. if (funcInfo.hasExtends) { - const segments = funcInfo.codePath.currentSegments; + const segments = funcInfo.currentSegments; let duplicate = false; let info = null; - for (let i = 0; i < segments.length; ++i) { - const segment = segments[i]; + for (const segment of segments) { if (segment.reachable) { info = segInfoMap[segment.id]; @@ -374,7 +398,7 @@ module.exports = { info.validNodes.push(node); } } - } else if (funcInfo.codePath.currentSegments.some(isReachable)) { + } else if (isAnySegmentReachable(funcInfo.currentSegments)) { context.report({ messageId: "unexpected", node @@ -398,10 +422,9 @@ module.exports = { } // Returning argument is a substitute of 'super()'. - const segments = funcInfo.codePath.currentSegments; + const segments = funcInfo.currentSegments; - for (let i = 0; i < segments.length; ++i) { - const segment = segments[i]; + for (const segment of segments) { if (segment.reachable) { const info = segInfoMap[segment.id]; diff --git a/node_modules/eslint/lib/rules/curly.js b/node_modules/eslint/lib/rules/curly.js index 92d31a647..35408247a 100644 --- a/node_modules/eslint/lib/rules/curly.js +++ b/node_modules/eslint/lib/rules/curly.js @@ -14,15 +14,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce consistent brace style for all control statements", - category: "Best Practices", + description: "Enforce consistent brace style for all control statements", recommended: false, - url: "https://eslint.org/docs/rules/curly" + url: "https://eslint.org/docs/latest/rules/curly" }, schema: { @@ -70,7 +70,7 @@ module.exports = { const multiOrNest = (context.options[0] === "multi-or-nest"); const consistent = (context.options[1] === "consistent"); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -131,15 +131,6 @@ module.exports = { return token.value === "else" && token.type === "Keyword"; } - /** - * Gets the `else` keyword token of a given `IfStatement` node. - * @param {ASTNode} node A `IfStatement` node to get. - * @returns {Token} The `else` keyword token. - */ - function getElseKeyword(node) { - return node.alternate && sourceCode.getFirstTokenBetween(node.consequent, node.alternate, isElseKeywordToken); - } - /** * Determines whether the given node has an `else` keyword token as the first token after. * @param {ASTNode} node The node to check. @@ -361,7 +352,7 @@ module.exports = { if (this.expected) { context.report({ node, - loc: (name !== "else" ? node : getElseKeyword(node)).loc.start, + loc: body.loc, messageId: opts && opts.condition ? "missingCurlyAfterCondition" : "missingCurlyAfter", data: { name @@ -371,7 +362,7 @@ module.exports = { } else { context.report({ node, - loc: (name !== "else" ? node : getElseKeyword(node)).loc.start, + loc: body.loc, messageId: opts && opts.condition ? "unexpectedCurlyAfterCondition" : "unexpectedCurlyAfter", data: { name diff --git a/node_modules/eslint/lib/rules/default-case-last.js b/node_modules/eslint/lib/rules/default-case-last.js index 80c5d6bda..d4a83b5fd 100644 --- a/node_modules/eslint/lib/rules/default-case-last.js +++ b/node_modules/eslint/lib/rules/default-case-last.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce default clauses in switch statements to be last", - category: "Best Practices", + description: "Enforce default clauses in switch statements to be last", recommended: false, - url: "https://eslint.org/docs/rules/default-case-last" + url: "https://eslint.org/docs/latest/rules/default-case-last" }, schema: [], diff --git a/node_modules/eslint/lib/rules/default-case.js b/node_modules/eslint/lib/rules/default-case.js index 821e0d72b..4f2fad0c4 100644 --- a/node_modules/eslint/lib/rules/default-case.js +++ b/node_modules/eslint/lib/rules/default-case.js @@ -10,15 +10,15 @@ const DEFAULT_COMMENT_PATTERN = /^no default$/iu; // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `default` cases in `switch` statements", - category: "Best Practices", + description: "Require `default` cases in `switch` statements", recommended: false, - url: "https://eslint.org/docs/rules/default-case" + url: "https://eslint.org/docs/latest/rules/default-case" }, schema: [{ @@ -42,7 +42,7 @@ module.exports = { ? new RegExp(options.commentPattern, "u") : DEFAULT_COMMENT_PATTERN; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -50,8 +50,8 @@ module.exports = { /** * Shortcut to get last element of array - * @param {*[]} collection Array - * @returns {*} Last element + * @param {*[]} collection Array + * @returns {any} Last element */ function last(collection) { return collection[collection.length - 1]; diff --git a/node_modules/eslint/lib/rules/default-param-last.js b/node_modules/eslint/lib/rules/default-param-last.js index 12e0b5950..3254fa802 100644 --- a/node_modules/eslint/lib/rules/default-param-last.js +++ b/node_modules/eslint/lib/rules/default-param-last.js @@ -5,15 +5,15 @@ "use strict"; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce default parameters to be last", - category: "Best Practices", + description: "Enforce default parameters to be last", recommended: false, - url: "https://eslint.org/docs/rules/default-param-last" + url: "https://eslint.org/docs/latest/rules/default-param-last" }, schema: [], @@ -25,8 +25,8 @@ module.exports = { create(context) { - // eslint-disable-next-line jsdoc/require-description /** + * Handler for function contexts. * @param {ASTNode} node function node * @returns {void} */ diff --git a/node_modules/eslint/lib/rules/dot-location.js b/node_modules/eslint/lib/rules/dot-location.js index a8d5a7605..0d017c162 100644 --- a/node_modules/eslint/lib/rules/dot-location.js +++ b/node_modules/eslint/lib/rules/dot-location.js @@ -1,6 +1,7 @@ /** * @fileoverview Validates newlines before and after dots * @author Greg Cochard + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent newlines before and after dots", - category: "Best Practices", + description: "Enforce consistent newlines before and after dots", recommended: false, - url: "https://eslint.org/docs/rules/dot-location" + url: "https://eslint.org/docs/latest/rules/dot-location" }, schema: [ @@ -43,7 +46,7 @@ module.exports = { // default to onObject if no preference is passed const onObject = config === "object" || !config; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Reports if the dot between object and property is on the correct location. diff --git a/node_modules/eslint/lib/rules/dot-notation.js b/node_modules/eslint/lib/rules/dot-notation.js index 751b4628e..21cba54e2 100644 --- a/node_modules/eslint/lib/rules/dot-notation.js +++ b/node_modules/eslint/lib/rules/dot-notation.js @@ -20,15 +20,15 @@ const validIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/u; // `null` literal must be handled separately. const literalTypesToCheck = new Set(["string", "boolean"]); +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce dot notation whenever possible", - category: "Best Practices", + description: "Enforce dot notation whenever possible", recommended: false, - url: "https://eslint.org/docs/rules/dot-notation" + url: "https://eslint.org/docs/latest/rules/dot-notation" }, schema: [ @@ -59,7 +59,7 @@ module.exports = { create(context) { const options = context.options[0] || {}; const allowKeywords = options.allowKeywords === void 0 || options.allowKeywords; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let allowPattern; @@ -76,7 +76,7 @@ module.exports = { function checkComputedProperty(node, value) { if ( validIdentifier.test(value) && - (allowKeywords || keywords.indexOf(String(value)) === -1) && + (allowKeywords || !keywords.includes(String(value))) && !(allowPattern && allowPattern.test(value)) ) { const formattedValue = node.property.type === "Literal" ? JSON.stringify(value) : `\`${value}\``; @@ -94,7 +94,7 @@ module.exports = { // Don't perform any fixes if there are comments inside the brackets. if (sourceCode.commentsExistBetween(leftBracket, rightBracket)) { - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } // Replace the brackets by an identifier. @@ -133,15 +133,15 @@ module.exports = { } if ( node.computed && - node.property.type === "TemplateLiteral" && - node.property.expressions.length === 0 + astUtils.isStaticTemplateLiteral(node.property) ) { checkComputedProperty(node, node.property.quasis[0].value.cooked); } if ( !allowKeywords && !node.computed && - keywords.indexOf(String(node.property.name)) !== -1 + node.property.type === "Identifier" && + keywords.includes(String(node.property.name)) ) { context.report({ node: node.property, @@ -154,12 +154,12 @@ module.exports = { // A statement that starts with `let[` is parsed as a destructuring variable declaration, not a MemberExpression. if (node.object.type === "Identifier" && node.object.name === "let" && !node.optional) { - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } // Don't perform any fixes if there are comments between the dot and the property name. if (sourceCode.commentsExistBetween(dotToken, node.property)) { - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } // Replace the identifier to brackets. diff --git a/node_modules/eslint/lib/rules/eol-last.js b/node_modules/eslint/lib/rules/eol-last.js index 89c76acb2..03487b039 100644 --- a/node_modules/eslint/lib/rules/eol-last.js +++ b/node_modules/eslint/lib/rules/eol-last.js @@ -1,28 +1,25 @@ /** * @fileoverview Require or disallow newline at the end of files * @author Nodeca Team + * @deprecated in ESLint v8.53.0 */ "use strict"; -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const lodash = require("lodash"); - //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow newline at the end of files", - category: "Stylistic Issues", + description: "Require or disallow newline at the end of files", recommended: false, - url: "https://eslint.org/docs/rules/eol-last" + url: "https://eslint.org/docs/latest/rules/eol-last" }, fixable: "whitespace", @@ -46,10 +43,11 @@ module.exports = { return { Program: function checkBadEOF(node) { - const sourceCode = context.getSourceCode(), + const sourceCode = context.sourceCode, src = sourceCode.getText(), + lastLine = sourceCode.lines[sourceCode.lines.length - 1], location = { - column: lodash.last(sourceCode.lines).length, + column: lastLine.length, line: sourceCode.lines.length }, LF = "\n", @@ -91,10 +89,15 @@ module.exports = { }); } else if (mode === "never" && endsWithNewline) { + const secondLastLine = sourceCode.lines[sourceCode.lines.length - 2]; + // File is newline-terminated, but shouldn't be context.report({ node, - loc: location, + loc: { + start: { line: sourceCode.lines.length - 1, column: secondLastLine.length }, + end: { line: sourceCode.lines.length, column: 0 } + }, messageId: "unexpected", fix(fixer) { const finalEOLs = /(?:\r?\n)+$/u, diff --git a/node_modules/eslint/lib/rules/eqeqeq.js b/node_modules/eslint/lib/rules/eqeqeq.js index 57926dbed..12b1e805e 100644 --- a/node_modules/eslint/lib/rules/eqeqeq.js +++ b/node_modules/eslint/lib/rules/eqeqeq.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require the use of `===` and `!==`", - category: "Best Practices", + description: "Require the use of `===` and `!==`", recommended: false, - url: "https://eslint.org/docs/rules/eqeqeq" + url: "https://eslint.org/docs/latest/rules/eqeqeq" }, schema: { @@ -68,7 +68,7 @@ module.exports = { create(context) { const config = context.options[0] || "always"; const options = context.options[1] || {}; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const nullOption = (config === "always") ? options.null || "always" @@ -78,7 +78,7 @@ module.exports = { /** * Checks if an expression is a typeof expression - * @param {ASTNode} node The node to check + * @param {ASTNode} node The node to check * @returns {boolean} if the node is a typeof expression */ function isTypeOf(node) { diff --git a/node_modules/eslint/lib/rules/for-direction.js b/node_modules/eslint/lib/rules/for-direction.js index c15d10e5f..69198d11a 100644 --- a/node_modules/eslint/lib/rules/for-direction.js +++ b/node_modules/eslint/lib/rules/for-direction.js @@ -5,19 +5,25 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { getStaticValue } = require("@eslint-community/eslint-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "enforce \"for\" loop update clause moving the counter in the right direction.", - category: "Possible Errors", + description: "Enforce \"for\" loop update clause moving the counter in the right direction", recommended: true, - url: "https://eslint.org/docs/rules/for-direction" + url: "https://eslint.org/docs/latest/rules/for-direction" }, fixable: null, @@ -29,6 +35,7 @@ module.exports = { }, create(context) { + const { sourceCode } = context; /** * report an error. @@ -46,17 +53,17 @@ module.exports = { * check the right side of the assignment * @param {ASTNode} update UpdateExpression to check * @param {int} dir expected direction that could either be turned around or invalidated - * @returns {int} return dir, the negated dir or zero if it's not clear for identifiers + * @returns {int} return dir, the negated dir, or zero if the counter does not change or the direction is not clear */ function getRightDirection(update, dir) { - if (update.right.type === "UnaryExpression") { - if (update.right.operator === "-") { - return -dir; - } - } else if (update.right.type === "Identifier") { - return 0; + const staticValue = getStaticValue(update.right, sourceCode.getScope(update)); + + if (staticValue && ["bigint", "boolean", "number"].includes(typeof staticValue.value)) { + const sign = Math.sign(Number(staticValue.value)) || 0; // convert NaN to 0 + + return dir * sign; } - return dir; + return 0; } /** @@ -94,30 +101,37 @@ module.exports = { } return 0; } + return { ForStatement(node) { - if (node.test && node.test.type === "BinaryExpression" && node.test.left.type === "Identifier" && node.update) { - const counter = node.test.left.name; - const operator = node.test.operator; - const update = node.update; + if (node.test && node.test.type === "BinaryExpression" && node.update) { + for (const counterPosition of ["left", "right"]) { + if (node.test[counterPosition].type !== "Identifier") { + continue; + } + + const counter = node.test[counterPosition].name; + const operator = node.test.operator; + const update = node.update; - let wrongDirection; + let wrongDirection; - if (operator === "<" || operator === "<=") { - wrongDirection = -1; - } else if (operator === ">" || operator === ">=") { - wrongDirection = 1; - } else { - return; - } + if (operator === "<" || operator === "<=") { + wrongDirection = counterPosition === "left" ? -1 : 1; + } else if (operator === ">" || operator === ">=") { + wrongDirection = counterPosition === "left" ? 1 : -1; + } else { + return; + } - if (update.type === "UpdateExpression") { - if (getUpdateDirection(update, counter) === wrongDirection) { + if (update.type === "UpdateExpression") { + if (getUpdateDirection(update, counter) === wrongDirection) { + report(node); + } + } else if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) === wrongDirection) { report(node); } - } else if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) === wrongDirection) { - report(node); } } } diff --git a/node_modules/eslint/lib/rules/func-call-spacing.js b/node_modules/eslint/lib/rules/func-call-spacing.js index 132a58331..33f73727b 100644 --- a/node_modules/eslint/lib/rules/func-call-spacing.js +++ b/node_modules/eslint/lib/rules/func-call-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to control spacing within function calls * @author Matt DuVall + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow spacing between function identifiers and their invocations", - category: "Stylistic Issues", + description: "Require or disallow spacing between function identifiers and their invocations", recommended: false, - url: "https://eslint.org/docs/rules/func-call-spacing" + url: "https://eslint.org/docs/latest/rules/func-call-spacing" }, fixable: "whitespace", @@ -73,7 +76,7 @@ module.exports = { const never = context.options[0] !== "always"; const allowNewlines = !never && context.options[1] && context.options[1].allowNewlines; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const text = sourceCode.getText(); /** diff --git a/node_modules/eslint/lib/rules/func-name-matching.js b/node_modules/eslint/lib/rules/func-name-matching.js index 755c2ee50..b9555d6bd 100644 --- a/node_modules/eslint/lib/rules/func-name-matching.js +++ b/node_modules/eslint/lib/rules/func-name-matching.js @@ -44,7 +44,7 @@ function isModuleExports(pattern) { * @returns {boolean} True if the string is a valid identifier */ function isIdentifier(name, ecmaVersion) { - if (ecmaVersion >= 6) { + if (ecmaVersion >= 2015) { return esutils.keyword.isIdentifierES6(name); } return esutils.keyword.isIdentifierES5(name); @@ -68,15 +68,15 @@ const optionsObject = { additionalProperties: false }; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require function names to match the name of the variable or property to which they are assigned", - category: "Stylistic Issues", + description: "Require function names to match the name of the variable or property to which they are assigned", recommended: false, - url: "https://eslint.org/docs/rules/func-name-matching" + url: "https://eslint.org/docs/latest/rules/func-name-matching" }, schema: { @@ -104,7 +104,7 @@ module.exports = { const nameMatches = typeof context.options[0] === "string" ? context.options[0] : "always"; const considerPropertyDescriptor = options.considerPropertyDescriptor; const includeModuleExports = options.includeCommonJSModuleExports; - const ecmaVersion = context.parserOptions && context.parserOptions.ecmaVersion ? context.parserOptions.ecmaVersion : 5; + const ecmaVersion = context.languageOptions.ecmaVersion; /** * Check whether node is a certain CallExpression. @@ -196,21 +196,25 @@ module.exports = { const isProp = node.left.type === "MemberExpression"; const name = isProp ? astUtils.getStaticPropertyName(node.left) : node.left.name; - if (node.right.id && isIdentifier(name) && shouldWarn(name, node.right.id.name)) { + if (node.right.id && name && isIdentifier(name) && shouldWarn(name, node.right.id.name)) { report(node, name, node.right.id.name, isProp); } }, - Property(node) { - if (node.value.type !== "FunctionExpression" || !node.value.id || node.computed && !isStringLiteral(node.key)) { + "Property, PropertyDefinition[value]"(node) { + if (!(node.value.type === "FunctionExpression" && node.value.id)) { return; } - if (node.key.type === "Identifier") { + if (node.key.type === "Identifier" && !node.computed) { const functionName = node.value.id.name; let propertyName = node.key.name; - if (considerPropertyDescriptor && propertyName === "value") { + if ( + considerPropertyDescriptor && + propertyName === "value" && + node.parent.type === "ObjectExpression" + ) { if (isPropertyCall("Object", "defineProperty", node.parent.parent) || isPropertyCall("Reflect", "defineProperty", node.parent.parent)) { const property = node.parent.parent.arguments[1]; diff --git a/node_modules/eslint/lib/rules/func-names.js b/node_modules/eslint/lib/rules/func-names.js index ecfedb9e0..b180580e1 100644 --- a/node_modules/eslint/lib/rules/func-names.js +++ b/node_modules/eslint/lib/rules/func-names.js @@ -24,15 +24,15 @@ function isFunctionName(variable) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require or disallow named `function` expressions", - category: "Stylistic Issues", + description: "Require or disallow named `function` expressions", recommended: false, - url: "https://eslint.org/docs/rules/func-names" + url: "https://eslint.org/docs/latest/rules/func-names" }, schema: { @@ -69,7 +69,7 @@ module.exports = { create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Returns the config option for the given node. @@ -118,6 +118,7 @@ module.exports = { return isObjectOrClassMethod(node) || (parent.type === "VariableDeclarator" && parent.id.type === "Identifier" && parent.init === node) || (parent.type === "Property" && parent.value === node) || + (parent.type === "PropertyDefinition" && parent.value === node) || (parent.type === "AssignmentExpression" && parent.left.type === "Identifier" && parent.right === node) || (parent.type === "AssignmentPattern" && parent.left.type === "Identifier" && parent.right === node); } @@ -158,7 +159,7 @@ module.exports = { function handleFunction(node) { // Skip recursive functions. - const nameVar = context.getDeclaredVariables(node)[0]; + const nameVar = sourceCode.getDeclaredVariables(node)[0]; if (isFunctionName(nameVar) && nameVar.references.length > 0) { return; diff --git a/node_modules/eslint/lib/rules/func-style.js b/node_modules/eslint/lib/rules/func-style.js index e150b1a76..ab83772ef 100644 --- a/node_modules/eslint/lib/rules/func-style.js +++ b/node_modules/eslint/lib/rules/func-style.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce the consistent use of either `function` declarations or expressions", - category: "Stylistic Issues", + description: "Enforce the consistent use of either `function` declarations or expressions", recommended: false, - url: "https://eslint.org/docs/rules/func-style" + url: "https://eslint.org/docs/latest/rules/func-style" }, schema: [ diff --git a/node_modules/eslint/lib/rules/function-call-argument-newline.js b/node_modules/eslint/lib/rules/function-call-argument-newline.js index b6abbe95f..458399d62 100644 --- a/node_modules/eslint/lib/rules/function-call-argument-newline.js +++ b/node_modules/eslint/lib/rules/function-call-argument-newline.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce line breaks between arguments of a function call * @author Alexey Gonchar + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce line breaks between arguments of a function call", - category: "Stylistic Issues", + description: "Enforce line breaks between arguments of a function call", recommended: false, - url: "https://eslint.org/docs/rules/function-call-argument-newline" + url: "https://eslint.org/docs/latest/rules/function-call-argument-newline" }, fixable: "whitespace", @@ -35,7 +38,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const checkers = { unexpected: { diff --git a/node_modules/eslint/lib/rules/function-paren-newline.js b/node_modules/eslint/lib/rules/function-paren-newline.js index 9d8d67ba1..de315a020 100644 --- a/node_modules/eslint/lib/rules/function-paren-newline.js +++ b/node_modules/eslint/lib/rules/function-paren-newline.js @@ -1,6 +1,7 @@ /** * @fileoverview enforce consistent line breaks inside function parentheses * @author Teddy Katz + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent line breaks inside function parentheses", - category: "Stylistic Issues", + description: "Enforce consistent line breaks inside function parentheses", recommended: false, - url: "https://eslint.org/docs/rules/function-paren-newline" + url: "https://eslint.org/docs/latest/rules/function-paren-newline" }, fixable: "whitespace", @@ -57,7 +60,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const rawOption = context.options[0] || "multiline"; const multilineOption = rawOption === "multiline"; const multilineArgumentsOption = rawOption === "multiline-arguments"; @@ -183,6 +186,7 @@ module.exports = { /** * Gets the left paren and right paren tokens of a node. * @param {ASTNode} node The node with parens + * @throws {TypeError} Unexpected node type. * @returns {Object} An object with keys `leftParen` for the left paren token, and `rightParen` for the right paren token. * Can also return `null` if an expression has no parens (e.g. a NewExpression with no arguments, or an ArrowFunctionExpression * with a single parameter) @@ -190,10 +194,13 @@ module.exports = { function getParenTokens(node) { switch (node.type) { case "NewExpression": - if (!node.arguments.length && !( - astUtils.isOpeningParenToken(sourceCode.getLastToken(node, { skip: 1 })) && - astUtils.isClosingParenToken(sourceCode.getLastToken(node)) - )) { + if (!node.arguments.length && + !( + astUtils.isOpeningParenToken(sourceCode.getLastToken(node, { skip: 1 })) && + astUtils.isClosingParenToken(sourceCode.getLastToken(node)) && + node.callee.range[1] < node.range[1] + ) + ) { // If the NewExpression does not have parens (e.g. `new Foo`), return null. return null; @@ -226,9 +233,13 @@ module.exports = { return null; } + const rightParen = node.params.length + ? sourceCode.getTokenAfter(node.params[node.params.length - 1], astUtils.isClosingParenToken) + : sourceCode.getTokenAfter(firstToken); + return { leftParen: firstToken, - rightParen: sourceCode.getTokenBefore(node.body, astUtils.isClosingParenToken) + rightParen }; } diff --git a/node_modules/eslint/lib/rules/generator-star-spacing.js b/node_modules/eslint/lib/rules/generator-star-spacing.js index 65534f727..c633f979f 100644 --- a/node_modules/eslint/lib/rules/generator-star-spacing.js +++ b/node_modules/eslint/lib/rules/generator-star-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to check the spacing around the * in generator functions. * @author Jamund Ferguson + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -25,15 +26,17 @@ const OVERRIDE_SCHEMA = { ] }; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing around `*` operators in generator functions", - category: "ECMAScript 6", + description: "Enforce consistent spacing around `*` operators in generator functions", recommended: false, - url: "https://eslint.org/docs/rules/generator-star-spacing" + url: "https://eslint.org/docs/latest/rules/generator-star-spacing" }, fixable: "whitespace", @@ -102,7 +105,7 @@ module.exports = { }; }(context.options[0] || {})); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Checks if the given token is a star token or not. diff --git a/node_modules/eslint/lib/rules/getter-return.js b/node_modules/eslint/lib/rules/getter-return.js index c54ebfb4f..79ebf3e09 100644 --- a/node_modules/eslint/lib/rules/getter-return.js +++ b/node_modules/eslint/lib/rules/getter-return.js @@ -14,30 +14,38 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ + const TARGET_NODE_TYPE = /^(?:Arrow)?FunctionExpression$/u; /** - * Checks a given code path segment is reachable. - * @param {CodePathSegment} segment A segment to check. - * @returns {boolean} `true` if the segment is reachable. + * Checks all segments in a set and returns true if any are reachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if any segment is reachable; false otherwise. */ -function isReachable(segment) { - return segment.reachable; +function isAnySegmentReachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return true; + } + } + + return false; } //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "enforce `return` statements in getters", - category: "Possible Errors", + description: "Enforce `return` statements in getters", recommended: true, - url: "https://eslint.org/docs/rules/getter-return" + url: "https://eslint.org/docs/latest/rules/getter-return" }, fixable: null, @@ -64,14 +72,15 @@ module.exports = { create(context) { const options = context.options[0] || { allowImplicit: false }; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let funcInfo = { upper: null, codePath: null, hasReturn: false, shouldCheck: false, - node: null + node: null, + currentSegments: [] }; /** @@ -85,7 +94,7 @@ module.exports = { */ function checkLastSegment(node) { if (funcInfo.shouldCheck && - funcInfo.codePath.currentSegments.some(isReachable) + isAnySegmentReachable(funcInfo.currentSegments) ) { context.report({ node, @@ -112,18 +121,24 @@ module.exports = { } if (parent.type === "Property" && astUtils.getStaticPropertyName(parent) === "get" && parent.parent.type === "ObjectExpression") { - // Object.defineProperty() - if (parent.parent.parent.type === "CallExpression" && - astUtils.getStaticPropertyName(parent.parent.parent.callee) === "defineProperty") { - return true; + // Object.defineProperty() or Reflect.defineProperty() + if (parent.parent.parent.type === "CallExpression") { + const callNode = parent.parent.parent.callee; + + if (astUtils.isSpecificMemberAccess(callNode, "Object", "defineProperty") || + astUtils.isSpecificMemberAccess(callNode, "Reflect", "defineProperty")) { + return true; + } } - // Object.defineProperties() + // Object.defineProperties() or Object.create() if (parent.parent.parent.type === "Property" && parent.parent.parent.parent.type === "ObjectExpression" && - parent.parent.parent.parent.parent.type === "CallExpression" && - astUtils.getStaticPropertyName(parent.parent.parent.parent.parent.callee) === "defineProperties") { - return true; + parent.parent.parent.parent.parent.type === "CallExpression") { + const callNode = parent.parent.parent.parent.parent.callee; + + return astUtils.isSpecificMemberAccess(callNode, "Object", "defineProperties") || + astUtils.isSpecificMemberAccess(callNode, "Object", "create"); } } } @@ -138,7 +153,8 @@ module.exports = { codePath, hasReturn: false, shouldCheck: isGetter(node), - node + node, + currentSegments: new Set() }; }, @@ -146,6 +162,21 @@ module.exports = { onCodePathEnd() { funcInfo = funcInfo.upper; }, + onUnreachableCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + onCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, // Checks the return statement is valid. ReturnStatement(node) { diff --git a/node_modules/eslint/lib/rules/global-require.js b/node_modules/eslint/lib/rules/global-require.js index 09d033200..deae9d267 100644 --- a/node_modules/eslint/lib/rules/global-require.js +++ b/node_modules/eslint/lib/rules/global-require.js @@ -1,11 +1,12 @@ /** * @fileoverview Rule for disallowing require() outside of the top-level module context * @author Jamund Ferguson + * @deprecated in ESLint v7.0.0 */ "use strict"; -const ACCEPTABLE_PARENTS = [ +const ACCEPTABLE_PARENTS = new Set([ "AssignmentExpression", "VariableDeclarator", "MemberExpression", @@ -15,7 +16,7 @@ const ACCEPTABLE_PARENTS = [ "Program", "VariableDeclaration", "ChainExpression" -]; +]); /** * Finds the eslint-scope reference in the given scope. @@ -27,10 +28,11 @@ function findReference(scope, node) { const references = scope.references.filter(reference => reference.identifier.range[0] === node.range[0] && reference.identifier.range[1] === node.range[1]); - /* istanbul ignore else: correctly returns null */ if (references.length === 1) { return references[0]; } + + /* c8 ignore next */ return null; } @@ -47,6 +49,7 @@ function isShadowed(scope, node) { return reference && reference.resolved && reference.resolved.defs.length > 0; } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -56,10 +59,9 @@ module.exports = { type: "suggestion", docs: { - description: "require `require()` calls to be placed at top-level module scope", - category: "Node.js and CommonJS", + description: "Require `require()` calls to be placed at top-level module scope", recommended: false, - url: "https://eslint.org/docs/rules/global-require" + url: "https://eslint.org/docs/latest/rules/global-require" }, schema: [], @@ -69,12 +71,14 @@ module.exports = { }, create(context) { + const sourceCode = context.sourceCode; + return { CallExpression(node) { - const currentScope = context.getScope(); + const currentScope = sourceCode.getScope(node); if (node.callee.name === "require" && !isShadowed(currentScope, node.callee)) { - const isGoodRequire = context.getAncestors().every(parent => ACCEPTABLE_PARENTS.indexOf(parent.type) > -1); + const isGoodRequire = sourceCode.getAncestors(node).every(parent => ACCEPTABLE_PARENTS.has(parent.type)); if (!isGoodRequire) { context.report({ node, messageId: "unexpected" }); diff --git a/node_modules/eslint/lib/rules/grouped-accessor-pairs.js b/node_modules/eslint/lib/rules/grouped-accessor-pairs.js index a790f8375..9556f4756 100644 --- a/node_modules/eslint/lib/rules/grouped-accessor-pairs.js +++ b/node_modules/eslint/lib/rules/grouped-accessor-pairs.js @@ -90,15 +90,15 @@ function isAccessorKind(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require grouped accessor pairs in object literals and classes", - category: "Best Practices", + description: "Require grouped accessor pairs in object literals and classes", recommended: false, - url: "https://eslint.org/docs/rules/grouped-accessor-pairs" + url: "https://eslint.org/docs/latest/rules/grouped-accessor-pairs" }, schema: [ @@ -115,7 +115,7 @@ module.exports = { create(context) { const order = context.options[0] || "anyOrder"; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Reports the given accessor pair. @@ -137,43 +137,6 @@ module.exports = { }); } - /** - * Creates a new `AccessorData` object for the given getter or setter node. - * @param {ASTNode} node A getter or setter node. - * @returns {AccessorData} New `AccessorData` object that contains the given node. - * @private - */ - function createAccessorData(node) { - const name = astUtils.getStaticPropertyName(node); - const key = (name !== null) ? name : sourceCode.getTokens(node.key); - - return { - key, - getters: node.kind === "get" ? [node] : [], - setters: node.kind === "set" ? [node] : [] - }; - } - - /** - * Merges the given `AccessorData` object into the given accessors list. - * @param {AccessorData[]} accessors The list to merge into. - * @param {AccessorData} accessorData The object to merge. - * @returns {AccessorData[]} The same instance with the merged object. - * @private - */ - function mergeAccessorData(accessors, accessorData) { - const equalKeyElement = accessors.find(a => areEqualKeys(a.key, accessorData.key)); - - if (equalKeyElement) { - equalKeyElement.getters.push(...accessorData.getters); - equalKeyElement.setters.push(...accessorData.setters); - } else { - accessors.push(accessorData); - } - - return accessors; - } - /** * Checks accessor pairs in the given list of nodes. * @param {ASTNode[]} nodes The list to check. @@ -182,11 +145,39 @@ module.exports = { * @private */ function checkList(nodes, shouldCheck) { - const accessors = nodes - .filter(shouldCheck) - .filter(isAccessorKind) - .map(createAccessorData) - .reduce(mergeAccessorData, []); + const accessors = []; + let found = false; + + for (let i = 0; i < nodes.length; i++) { + const node = nodes[i]; + + if (shouldCheck(node) && isAccessorKind(node)) { + + // Creates a new `AccessorData` object for the given getter or setter node. + const name = astUtils.getStaticPropertyName(node); + const key = (name !== null) ? name : sourceCode.getTokens(node.key); + + // Merges the given `AccessorData` object into the given accessors list. + for (let j = 0; j < accessors.length; j++) { + const accessor = accessors[j]; + + if (areEqualKeys(accessor.key, key)) { + accessor.getters.push(...node.kind === "get" ? [node] : []); + accessor.setters.push(...node.kind === "set" ? [node] : []); + found = true; + break; + } + } + if (!found) { + accessors.push({ + key, + getters: node.kind === "get" ? [node] : [], + setters: node.kind === "set" ? [node] : [] + }); + } + found = false; + } + } for (const { getters, setters } of accessors) { diff --git a/node_modules/eslint/lib/rules/guard-for-in.js b/node_modules/eslint/lib/rules/guard-for-in.js index 2c0976d99..d6e70d0d7 100644 --- a/node_modules/eslint/lib/rules/guard-for-in.js +++ b/node_modules/eslint/lib/rules/guard-for-in.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `for-in` loops to include an `if` statement", - category: "Best Practices", + description: "Require `for-in` loops to include an `if` statement", recommended: false, - url: "https://eslint.org/docs/rules/guard-for-in" + url: "https://eslint.org/docs/latest/rules/guard-for-in" }, schema: [], diff --git a/node_modules/eslint/lib/rules/handle-callback-err.js b/node_modules/eslint/lib/rules/handle-callback-err.js index b92490ad1..ad84931a9 100644 --- a/node_modules/eslint/lib/rules/handle-callback-err.js +++ b/node_modules/eslint/lib/rules/handle-callback-err.js @@ -1,6 +1,7 @@ /** * @fileoverview Ensure handling of errors when we know they exist. * @author Jamund Ferguson + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -9,6 +10,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -18,10 +20,9 @@ module.exports = { type: "suggestion", docs: { - description: "require error handling in callbacks", - category: "Node.js and CommonJS", + description: "Require error handling in callbacks", recommended: false, - url: "https://eslint.org/docs/rules/handle-callback-err" + url: "https://eslint.org/docs/latest/rules/handle-callback-err" }, schema: [ @@ -37,6 +38,7 @@ module.exports = { create(context) { const errorArgument = context.options[0] || "err"; + const sourceCode = context.sourceCode; /** * Checks if the given argument should be interpreted as a regexp pattern. @@ -78,7 +80,7 @@ module.exports = { * @returns {void} */ function checkForError(node) { - const scope = context.getScope(), + const scope = sourceCode.getScope(node), parameters = getParameters(scope), firstParameter = parameters[0]; diff --git a/node_modules/eslint/lib/rules/id-blacklist.js b/node_modules/eslint/lib/rules/id-blacklist.js index 4fbba909f..6b7f561ee 100644 --- a/node_modules/eslint/lib/rules/id-blacklist.js +++ b/node_modules/eslint/lib/rules/id-blacklist.js @@ -2,6 +2,7 @@ * @fileoverview Rule that warns when identifier names that are * specified in the configuration are used. * @author Keith Cirkel (http://keithcirkel.co.uk) + * @deprecated in ESLint v7.5.0 */ "use strict"; @@ -109,6 +110,7 @@ function isShorthandPropertyDefinition(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -117,10 +119,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow specified identifiers", - category: "Stylistic Issues", + description: "Disallow specified identifiers", recommended: false, - url: "https://eslint.org/docs/rules/id-blacklist" + url: "https://eslint.org/docs/latest/rules/id-blacklist" }, schema: { @@ -139,6 +140,7 @@ module.exports = { const denyList = new Set(context.options); const reportedNodes = new Set(); + const sourceCode = context.sourceCode; let globalScope; @@ -205,7 +207,17 @@ module.exports = { * @private */ function report(node) { - if (!reportedNodes.has(node)) { + + /* + * We used the range instead of the node because it's possible + * for the same identifier to be represented by two different + * nodes, with the most clear example being shorthand properties: + * { foo } + * In this case, "foo" is represented by one node for the name + * and one for the value. The only way to know they are the same + * is to look at the range. + */ + if (!reportedNodes.has(node.range.toString())) { context.report({ node, messageId: "restricted", @@ -213,14 +225,15 @@ module.exports = { name: node.name } }); - reportedNodes.add(node); + reportedNodes.add(node.range.toString()); } + } return { - Program() { - globalScope = context.getScope(); + Program(node) { + globalScope = sourceCode.getScope(node); }, Identifier(node) { diff --git a/node_modules/eslint/lib/rules/id-denylist.js b/node_modules/eslint/lib/rules/id-denylist.js index 112fd8a9d..baaa65fe0 100644 --- a/node_modules/eslint/lib/rules/id-denylist.js +++ b/node_modules/eslint/lib/rules/id-denylist.js @@ -69,14 +69,14 @@ function isRenamedImport(node) { } /** - * Checks whether the given node is a renamed identifier node in an ObjectPattern destructuring. + * Checks whether the given node is an ObjectPattern destructuring. * * Examples: - * const { a : b } = foo; // node `a` is renamed node. + * const { a : b } = foo; * @param {ASTNode} node `Identifier` node to check. - * @returns {boolean} `true` if the node is a renamed node in an ObjectPattern destructuring. + * @returns {boolean} `true` if the node is in an ObjectPattern destructuring. */ -function isRenamedInDestructuring(node) { +function isPropertyNameInDestructuring(node) { const parent = node.parent; return ( @@ -84,40 +84,24 @@ function isRenamedInDestructuring(node) { !parent.computed && parent.type === "Property" && parent.parent.type === "ObjectPattern" && - parent.value !== node && parent.key === node ) ); } -/** - * Checks whether the given node represents shorthand definition of a property in an object literal. - * @param {ASTNode} node `Identifier` node to check. - * @returns {boolean} `true` if the node is a shorthand property definition. - */ -function isShorthandPropertyDefinition(node) { - const parent = node.parent; - - return ( - parent.type === "Property" && - parent.parent.type === "ObjectExpression" && - parent.shorthand - ); -} - //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow specified identifiers", - category: "Stylistic Issues", + description: "Disallow specified identifiers", recommended: false, - url: "https://eslint.org/docs/rules/id-denylist" + url: "https://eslint.org/docs/latest/rules/id-denylist" }, schema: { @@ -128,7 +112,8 @@ module.exports = { uniqueItems: true }, messages: { - restricted: "Identifier '{{name}}' is restricted." + restricted: "Identifier '{{name}}' is restricted.", + restrictedPrivate: "Identifier '#{{name}}' is restricted." } }, @@ -136,6 +121,7 @@ module.exports = { const denyList = new Set(context.options); const reportedNodes = new Set(); + const sourceCode = context.sourceCode; let globalScope; @@ -187,11 +173,8 @@ module.exports = { parent.type !== "CallExpression" && parent.type !== "NewExpression" && !isRenamedImport(node) && - !isRenamedInDestructuring(node) && - !( - isReferenceToGlobalVariable(node) && - !isShorthandPropertyDefinition(node) - ) + !isPropertyNameInDestructuring(node) && + !isReferenceToGlobalVariable(node) ); } @@ -202,25 +185,40 @@ module.exports = { * @private */ function report(node) { - if (!reportedNodes.has(node)) { + + /* + * We used the range instead of the node because it's possible + * for the same identifier to be represented by two different + * nodes, with the most clear example being shorthand properties: + * { foo } + * In this case, "foo" is represented by one node for the name + * and one for the value. The only way to know they are the same + * is to look at the range. + */ + if (!reportedNodes.has(node.range.toString())) { + const isPrivate = node.type === "PrivateIdentifier"; + context.report({ node, - messageId: "restricted", + messageId: isPrivate ? "restrictedPrivate" : "restricted", data: { name: node.name } }); - reportedNodes.add(node); + reportedNodes.add(node.range.toString()); } } return { - Program() { - globalScope = context.getScope(); + Program(node) { + globalScope = sourceCode.getScope(node); }, - Identifier(node) { + [[ + "Identifier", + "PrivateIdentifier" + ]](node) { if (isRestricted(node.name) && shouldCheck(node)) { report(node); } diff --git a/node_modules/eslint/lib/rules/id-length.js b/node_modules/eslint/lib/rules/id-length.js index 4df081ff9..97bc0e430 100644 --- a/node_modules/eslint/lib/rules/id-length.js +++ b/node_modules/eslint/lib/rules/id-length.js @@ -6,19 +6,25 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { getGraphemeCount } = require("../shared/string-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce minimum and maximum identifier lengths", - category: "Stylistic Issues", + description: "Enforce minimum and maximum identifier lengths", recommended: false, - url: "https://eslint.org/docs/rules/id-length" + url: "https://eslint.org/docs/latest/rules/id-length" }, schema: [ @@ -55,7 +61,9 @@ module.exports = { ], messages: { tooShort: "Identifier name '{{name}}' is too short (< {{min}}).", - tooLong: "Identifier name '{{name}}' is too long (> {{max}})." + tooShortPrivate: "Identifier name '#{{name}}' is too short (< {{min}}).", + tooLong: "Identifier name '{{name}}' is too long (> {{max}}).", + tooLongPrivate: "Identifier name #'{{name}}' is too long (> {{max}})." } }, @@ -66,7 +74,7 @@ module.exports = { const properties = options.properties !== "never"; const exceptions = new Set(options.exceptions); const exceptionPatterns = (options.exceptionPatterns || []).map(pattern => new RegExp(pattern, "u")); - const reportedNode = new Set(); + const reportedNodes = new Set(); /** * Checks if a string matches the provided exception patterns @@ -99,12 +107,14 @@ module.exports = { Property(parent, node) { if (parent.parent.type === "ObjectPattern") { + const isKeyAndValueSame = parent.value.name === parent.key.name; + return ( - parent.value !== parent.key && parent.value === node || - parent.value === parent.key && parent.key === node && properties + !isKeyAndValueSame && parent.value === node || + isKeyAndValueSame && parent.key === node && properties ); } - return properties && !parent.computed && parent.key === node; + return properties && !parent.computed && parent.key.name === node.name; }, ImportDefaultSpecifier: true, RestElement: true, @@ -113,17 +123,23 @@ module.exports = { ClassDeclaration: true, FunctionDeclaration: true, MethodDefinition: true, + PropertyDefinition: true, CatchClause: true, ArrayPattern: true }; return { - Identifier(node) { + [[ + "Identifier", + "PrivateIdentifier" + ]](node) { const name = node.name; const parent = node.parent; - const isShort = name.length < minLength; - const isLong = name.length > maxLength; + const nameLength = getGraphemeCount(name); + + const isShort = nameLength < minLength; + const isLong = nameLength > maxLength; if (!(isShort || isLong) || exceptions.has(name) || matchesExceptionPattern(name)) { return; // Nothing to report @@ -131,11 +147,27 @@ module.exports = { const isValidExpression = SUPPORTED_EXPRESSIONS[parent.type]; - if (isValidExpression && !reportedNode.has(node) && (isValidExpression === true || isValidExpression(parent, node))) { - reportedNode.add(node); + /* + * We used the range instead of the node because it's possible + * for the same identifier to be represented by two different + * nodes, with the most clear example being shorthand properties: + * { foo } + * In this case, "foo" is represented by one node for the name + * and one for the value. The only way to know they are the same + * is to look at the range. + */ + if (isValidExpression && !reportedNodes.has(node.range.toString()) && (isValidExpression === true || isValidExpression(parent, node))) { + reportedNodes.add(node.range.toString()); + + let messageId = isShort ? "tooShort" : "tooLong"; + + if (node.type === "PrivateIdentifier") { + messageId += "Private"; + } + context.report({ node, - messageId: isShort ? "tooShort" : "tooLong", + messageId, data: { name, min: minLength, max: maxLength } }); } diff --git a/node_modules/eslint/lib/rules/id-match.js b/node_modules/eslint/lib/rules/id-match.js index 7e400d037..e225454e7 100644 --- a/node_modules/eslint/lib/rules/id-match.js +++ b/node_modules/eslint/lib/rules/id-match.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require identifiers to match a specified regular expression", - category: "Stylistic Issues", + description: "Require identifiers to match a specified regular expression", recommended: false, - url: "https://eslint.org/docs/rules/id-match" + url: "https://eslint.org/docs/latest/rules/id-match" }, schema: [ @@ -31,6 +31,10 @@ module.exports = { type: "boolean", default: false }, + classFields: { + type: "boolean", + default: false + }, onlyDeclarations: { type: "boolean", default: false @@ -44,7 +48,8 @@ module.exports = { } ], messages: { - notMatch: "Identifier '{{name}}' does not match the pattern '{{pattern}}'." + notMatch: "Identifier '{{name}}' does not match the pattern '{{pattern}}'.", + notMatchPrivate: "Identifier '#{{name}}' does not match the pattern '{{pattern}}'." } }, @@ -57,20 +62,37 @@ module.exports = { regexp = new RegExp(pattern, "u"); const options = context.options[1] || {}, - properties = !!options.properties, + checkProperties = !!options.properties, + checkClassFields = !!options.classFields, onlyDeclarations = !!options.onlyDeclarations, ignoreDestructuring = !!options.ignoreDestructuring; + const sourceCode = context.sourceCode; + let globalScope; + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- // contains reported nodes to avoid reporting twice on destructuring with shorthand notation - const reported = new Map(); + const reportedNodes = new Set(); const ALLOWED_PARENT_TYPES = new Set(["CallExpression", "NewExpression"]); const DECLARATION_TYPES = new Set(["FunctionDeclaration", "VariableDeclarator"]); const IMPORT_TYPES = new Set(["ImportSpecifier", "ImportNamespaceSpecifier", "ImportDefaultSpecifier"]); + /** + * Checks whether the given node represents a reference to a global variable that is not declared in the source code. + * These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables. + * @param {ASTNode} node `Identifier` node to check. + * @returns {boolean} `true` if the node is a reference to a global variable. + */ + function isReferenceToGlobalVariable(node) { + const variable = globalScope.set.get(node.name); + + return variable && variable.defs.length === 0 && + variable.references.some(ref => ref.identifier === node); + } + /** * Checks if a string matches the provided pattern * @param {string} name The string to check. @@ -120,29 +142,51 @@ module.exports = { * @private */ function report(node) { - if (!reported.has(node)) { + + /* + * We used the range instead of the node because it's possible + * for the same identifier to be represented by two different + * nodes, with the most clear example being shorthand properties: + * { foo } + * In this case, "foo" is represented by one node for the name + * and one for the value. The only way to know they are the same + * is to look at the range. + */ + if (!reportedNodes.has(node.range.toString())) { + + const messageId = (node.type === "PrivateIdentifier") + ? "notMatchPrivate" : "notMatch"; + context.report({ node, - messageId: "notMatch", + messageId, data: { name: node.name, pattern } }); - reported.set(node, true); + reportedNodes.add(node.range.toString()); } } return { + Program(node) { + globalScope = sourceCode.getScope(node); + }, + Identifier(node) { const name = node.name, parent = node.parent, effectiveParent = (parent.type === "MemberExpression") ? parent.parent : parent; + if (isReferenceToGlobalVariable(node)) { + return; + } + if (parent.type === "MemberExpression") { - if (!properties) { + if (!checkProperties) { return; } @@ -168,6 +212,17 @@ module.exports = { } } + // For https://github.com/eslint/eslint/issues/15123 + } else if ( + parent.type === "Property" && + parent.parent.type === "ObjectExpression" && + parent.key === node && + !parent.computed + ) { + if (checkProperties && isInvalid(name)) { + report(node); + } + /* * Properties have their own rules, and * AssignmentPattern nodes can be treated like Properties: @@ -176,8 +231,7 @@ module.exports = { } else if (parent.type === "Property" || parent.type === "AssignmentPattern") { if (parent.parent && parent.parent.type === "ObjectPattern") { - if (parent.shorthand && parent.value.left && isInvalid(name)) { - + if (!ignoreDestructuring && parent.shorthand && parent.value.left && isInvalid(name)) { report(node); } @@ -197,7 +251,7 @@ module.exports = { } // never check properties or always ignore destructuring - if (!properties || (ignoreDestructuring && isInsideObjectPattern(node))) { + if ((!checkProperties && !parent.computed) || (ignoreDestructuring && isInsideObjectPattern(node))) { return; } @@ -214,10 +268,29 @@ module.exports = { report(node); } + } else if (parent.type === "PropertyDefinition") { + + if (checkClassFields && isInvalid(name)) { + report(node); + } + // Report anything that is invalid that isn't a CallExpression } else if (shouldReport(effectiveParent, name)) { report(node); } + }, + + "PrivateIdentifier"(node) { + + const isClassField = node.parent.type === "PropertyDefinition"; + + if (isClassField && !checkClassFields) { + return; + } + + if (isInvalid(node.name)) { + report(node); + } } }; diff --git a/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js b/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js index 409145e7d..32f422ce8 100644 --- a/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js +++ b/node_modules/eslint/lib/rules/implicit-arrow-linebreak.js @@ -1,6 +1,7 @@ /** * @fileoverview enforce the location of arrow function bodies * @author Sharmila Jesupaul + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ const { isCommentToken, isNotOpeningParenToken } = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce the location of arrow function bodies", - category: "Stylistic Issues", + description: "Enforce the location of arrow function bodies", recommended: false, - url: "https://eslint.org/docs/rules/implicit-arrow-linebreak" + url: "https://eslint.org/docs/latest/rules/implicit-arrow-linebreak" }, fixable: "whitespace", @@ -34,7 +37,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const option = context.options[0] || "beside"; /** diff --git a/node_modules/eslint/lib/rules/indent-legacy.js b/node_modules/eslint/lib/rules/indent-legacy.js index a26ee87b1..78bf965cb 100644 --- a/node_modules/eslint/lib/rules/indent-legacy.js +++ b/node_modules/eslint/lib/rules/indent-legacy.js @@ -4,6 +4,7 @@ * This rule has been ported and modified from nodeca. * @author Vitaly Puzrin * @author Gyandeep Singh + * @deprecated in ESLint v4.0.0 */ "use strict"; @@ -17,17 +18,17 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ - -/* istanbul ignore next: this rule has known coverage issues, but it's deprecated and shouldn't be updated in the future anyway. */ +// this rule has known coverage issues, but it's deprecated and shouldn't be updated in the future anyway. +/* c8 ignore next */ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "enforce consistent indentation", - category: "Stylistic Issues", + description: "Enforce consistent indentation", recommended: false, - url: "https://eslint.org/docs/rules/indent-legacy" + url: "https://eslint.org/docs/latest/rules/indent-legacy" }, deprecated: true, @@ -205,16 +206,16 @@ module.exports = { ObjectExpression: 1 }; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; if (context.options.length) { if (context.options[0] === "tab") { indentSize = 1; indentType = "tab"; - } else /* istanbul ignore else : this will be caught by options validation */ if (typeof context.options[0] === "number") { + } else /* c8 ignore start */ if (typeof context.options[0] === "number") { indentSize = context.options[0]; indentType = "space"; - } + }/* c8 ignore stop */ if (context.options[1]) { const opts = context.options[1]; @@ -752,7 +753,7 @@ module.exports = { if (typeof options.CallExpression.arguments === "number") { nodeIndent += options.CallExpression.arguments * indentSize; } else if (options.CallExpression.arguments === "first") { - if (parent.arguments.indexOf(node) !== -1) { + if (parent.arguments.includes(node)) { nodeIndent = parent.arguments[0].loc.start.column; } } else { @@ -839,7 +840,7 @@ module.exports = { "IfStatement", "WhileStatement", "ForStatement", "ForInStatement", "ForOfStatement", "DoWhileStatement", "ClassDeclaration", "TryStatement" ]; - if (node.parent && statementsWithProperties.indexOf(node.parent.type) !== -1 && isNodeBodyBlock(node)) { + if (node.parent && statementsWithProperties.includes(node.parent.type) && isNodeBodyBlock(node)) { indent = getNodeIndent(node.parent).goodChar; } else if (node.parent && node.parent.type === "CatchClause") { indent = getNodeIndent(node.parent.parent).goodChar; diff --git a/node_modules/eslint/lib/rules/indent.js b/node_modules/eslint/lib/rules/indent.js index 8f4079d31..9bcbd640c 100644 --- a/node_modules/eslint/lib/rules/indent.js +++ b/node_modules/eslint/lib/rules/indent.js @@ -4,6 +4,7 @@ * @author Teddy Katz * @author Vitaly Puzrin * @author Gyandeep Singh + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -12,9 +13,7 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); const astUtils = require("./utils/ast-utils"); -const createTree = require("functional-red-black-tree"); //------------------------------------------------------------------------------ // Rule Definition @@ -60,12 +59,15 @@ const KNOWN_NODES = new Set([ "NewExpression", "ObjectExpression", "ObjectPattern", + "PrivateIdentifier", "Program", "Property", + "PropertyDefinition", "RestElement", "ReturnStatement", "SequenceExpression", "SpreadElement", + "StaticBlock", "Super", "SwitchCase", "SwitchStatement", @@ -122,44 +124,48 @@ const KNOWN_NODES = new Set([ /** - * A mutable balanced binary search tree that stores (key, value) pairs. The keys are numeric, and must be unique. - * This is intended to be a generic wrapper around a balanced binary search tree library, so that the underlying implementation + * A mutable map that stores (key, value) pairs. The keys are numeric indices, and must be unique. + * This is intended to be a generic wrapper around a map with non-negative integer keys, so that the underlying implementation * can easily be swapped out. */ -class BinarySearchTree { +class IndexMap { /** - * Creates an empty tree + * Creates an empty map + * @param {number} maxKey The maximum key */ - constructor() { - this._rbTree = createTree(); + constructor(maxKey) { + + // Initializing the array with the maximum expected size avoids dynamic reallocations that could degrade performance. + this._values = Array(maxKey + 1); } /** - * Inserts an entry into the tree. + * Inserts an entry into the map. * @param {number} key The entry's key - * @param {*} value The entry's value + * @param {any} value The entry's value * @returns {void} */ insert(key, value) { - const iterator = this._rbTree.find(key); - - if (iterator.valid) { - this._rbTree = iterator.update(value); - } else { - this._rbTree = this._rbTree.insert(key, value); - } + this._values[key] = value; } /** - * Finds the entry with the largest key less than or equal to the provided key + * Finds the value of the entry with the largest key less than or equal to the provided key * @param {number} key The provided key - * @returns {{key: number, value: *}|null} The found entry, or null if no such entry exists. + * @returns {*|undefined} The value of the found entry, or undefined if no such entry exists. */ - findLe(key) { - const iterator = this._rbTree.le(key); + findLastNotAfter(key) { + const values = this._values; - return iterator && { key: iterator.key, value: iterator.value }; + for (let index = key; index >= 0; index--) { + const value = values[index]; + + if (value) { + return value; + } + } + return void 0; } /** @@ -169,17 +175,7 @@ class BinarySearchTree { * @returns {void} */ deleteRange(start, end) { - - // Exit without traversing the tree if the range has zero size. - if (start === end) { - return; - } - const iterator = this._rbTree.ge(start); - - while (iterator.valid && iterator.key < end) { - this._rbTree = this._rbTree.remove(iterator.key); - iterator.next(); - } + this._values.fill(void 0, start, end); } } @@ -188,21 +184,24 @@ class BinarySearchTree { */ class TokenInfo { - // eslint-disable-next-line jsdoc/require-description /** * @param {SourceCode} sourceCode A SourceCode object */ constructor(sourceCode) { this.sourceCode = sourceCode; - this.firstTokensByLineNumber = sourceCode.tokensAndComments.reduce((map, token) => { - if (!map.has(token.loc.start.line)) { - map.set(token.loc.start.line, token); + this.firstTokensByLineNumber = new Map(); + const tokens = sourceCode.tokensAndComments; + + for (let i = 0; i < tokens.length; i++) { + const token = tokens[i]; + + if (!this.firstTokensByLineNumber.has(token.loc.start.line)) { + this.firstTokensByLineNumber.set(token.loc.start.line, token); } - if (!map.has(token.loc.end.line) && sourceCode.text.slice(token.range[1] - token.loc.end.column, token.range[1]).trim()) { - map.set(token.loc.end.line, token); + if (!this.firstTokensByLineNumber.has(token.loc.end.line) && sourceCode.text.slice(token.range[1] - token.loc.end.column, token.range[1]).trim()) { + this.firstTokensByLineNumber.set(token.loc.end.line, token); } - return map; - }, new Map()); + } } /** @@ -238,19 +237,19 @@ class TokenInfo { */ class OffsetStorage { - // eslint-disable-next-line jsdoc/require-description /** * @param {TokenInfo} tokenInfo a TokenInfo instance * @param {number} indentSize The desired size of each indentation level * @param {string} indentType The indentation character + * @param {number} maxIndex The maximum end index of any token */ - constructor(tokenInfo, indentSize, indentType) { + constructor(tokenInfo, indentSize, indentType, maxIndex) { this._tokenInfo = tokenInfo; this._indentSize = indentSize; this._indentType = indentType; - this._tree = new BinarySearchTree(); - this._tree.insert(0, { offset: 0, from: null, force: false }); + this._indexMap = new IndexMap(maxIndex); + this._indexMap.insert(0, { offset: 0, from: null, force: false }); this._lockedFirstTokens = new WeakMap(); this._desiredIndentCache = new WeakMap(); @@ -258,12 +257,12 @@ class OffsetStorage { } _getOffsetDescriptor(token) { - return this._tree.findLe(token.range[0]).value; + return this._indexMap.findLastNotAfter(token.range[0]); } /** * Sets the offset column of token B to match the offset column of token A. - * **WARNING**: This matches a *column*, even if baseToken is not the first token on its line. In + * - **WARNING**: This matches a *column*, even if baseToken is not the first token on its line. In * most cases, `setDesiredOffset` should be used instead. * @param {Token} baseToken The first token * @param {Token} offsetToken The second token, whose offset should be matched to the first token @@ -352,11 +351,11 @@ class OffsetStorage { * Instead, the offset tree is represented as a collection of contiguous offset ranges in a file. For example, the following * list could represent the state of the offset tree at a given point: * - * * Tokens starting in the interval [0, 15) are aligned with the beginning of the file - * * Tokens starting in the interval [15, 30) are offset by 1 indent level from the `bar` token - * * Tokens starting in the interval [30, 43) are offset by 1 indent level from the `foo` token - * * Tokens starting in the interval [43, 820) are offset by 2 indent levels from the `bar` token - * * Tokens starting in the interval [820, ∞) are offset by 1 indent level from the `baz` token + * - Tokens starting in the interval [0, 15) are aligned with the beginning of the file + * - Tokens starting in the interval [15, 30) are offset by 1 indent level from the `bar` token + * - Tokens starting in the interval [30, 43) are offset by 1 indent level from the `foo` token + * - Tokens starting in the interval [43, 820) are offset by 2 indent levels from the `bar` token + * - Tokens starting in the interval [820, ∞) are offset by 1 indent level from the `baz` token * * The `setDesiredOffsets` methods inserts ranges like the ones above. The third line above would be inserted by using: * `setDesiredOffsets([30, 43], fooToken, 1);` @@ -379,37 +378,36 @@ class OffsetStorage { * * key: 820, value: { offset: 1, from: bazToken } * * To find the offset descriptor for any given token, one needs to find the node with the largest key - * which is <= token.start. To make this operation fast, the nodes are stored in a balanced binary - * search tree indexed by key. + * which is <= token.start. To make this operation fast, the nodes are stored in a map indexed by key. */ const descriptorToInsert = { offset, from: fromToken, force }; - const descriptorAfterRange = this._tree.findLe(range[1]).value; + const descriptorAfterRange = this._indexMap.findLastNotAfter(range[1]); const fromTokenIsInRange = fromToken && fromToken.range[0] >= range[0] && fromToken.range[1] <= range[1]; const fromTokenDescriptor = fromTokenIsInRange && this._getOffsetDescriptor(fromToken); - // First, remove any existing nodes in the range from the tree. - this._tree.deleteRange(range[0] + 1, range[1]); + // First, remove any existing nodes in the range from the map. + this._indexMap.deleteRange(range[0] + 1, range[1]); - // Insert a new node into the tree for this range - this._tree.insert(range[0], descriptorToInsert); + // Insert a new node into the map for this range + this._indexMap.insert(range[0], descriptorToInsert); /* * To avoid circular offset dependencies, keep the `fromToken` token mapped to whatever it was mapped to previously, * even if it's in the current range. */ if (fromTokenIsInRange) { - this._tree.insert(fromToken.range[0], fromTokenDescriptor); - this._tree.insert(fromToken.range[1], descriptorToInsert); + this._indexMap.insert(fromToken.range[0], fromTokenDescriptor); + this._indexMap.insert(fromToken.range[1], descriptorToInsert); } /* * To avoid modifying the offset of tokens after the range, insert another node to keep the offset of the following * tokens the same as it was before. */ - this._tree.insert(range[1], descriptorAfterRange); + this._indexMap.insert(range[1], descriptorAfterRange); } /** @@ -493,15 +491,17 @@ const ELEMENT_LIST_SCHEMA = { ] }; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent indentation", - category: "Stylistic Issues", + description: "Enforce consistent indentation", recommended: false, - url: "https://eslint.org/docs/rules/indent" + url: "https://eslint.org/docs/latest/rules/indent" }, fixable: "whitespace", @@ -584,6 +584,16 @@ module.exports = { }, additionalProperties: false }, + StaticBlock: { + type: "object", + properties: { + body: { + type: "integer", + minimum: 0 + } + }, + additionalProperties: false + }, CallExpression: { type: "object", properties: { @@ -647,6 +657,9 @@ module.exports = { parameters: DEFAULT_PARAMETER_INDENT, body: DEFAULT_FUNCTION_BODY_INDENT }, + StaticBlock: { + body: DEFAULT_FUNCTION_BODY_INDENT + }, CallExpression: { arguments: DEFAULT_PARAMETER_INDENT }, @@ -681,9 +694,9 @@ module.exports = { } } - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const tokenInfo = new TokenInfo(sourceCode); - const offsets = new OffsetStorage(tokenInfo, indentSize, indentType === "space" ? " " : "\t"); + const offsets = new OffsetStorage(tokenInfo, indentSize, indentType === "space" ? " " : "\t", sourceCode.text.length); const parameterParens = new WeakSet(); /** @@ -782,7 +795,7 @@ module.exports = { let statement = node.parent && node.parent.parent; while ( - statement.type === "UnaryExpression" && ["!", "~", "+", "-"].indexOf(statement.operator) > -1 || + statement.type === "UnaryExpression" && ["!", "~", "+", "-"].includes(statement.operator) || statement.type === "AssignmentExpression" || statement.type === "LogicalExpression" || statement.type === "SequenceExpression" || @@ -902,18 +915,6 @@ module.exports = { } offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1); - - /* - * For blockless nodes with semicolon-first style, don't indent the semicolon. - * e.g. - * if (foo) bar() - * ; [1, 2, 3].map(foo) - */ - const lastToken = sourceCode.getLastToken(node); - - if (node.type !== "EmptyStatement" && astUtils.isSemicolonToken(lastToken)) { - offsets.setDesiredOffset(lastToken, lastParentToken, 0); - } } } @@ -970,19 +971,19 @@ module.exports = { const parenStack = []; const parenPairs = []; - tokens.forEach(nextToken => { + for (let i = 0; i < tokens.length; i++) { + const nextToken = tokens[i]; - // Accumulate a list of parenthesis pairs if (astUtils.isOpeningParenToken(nextToken)) { parenStack.push(nextToken); } else if (astUtils.isClosingParenToken(nextToken)) { - parenPairs.unshift({ left: parenStack.pop(), right: nextToken }); + parenPairs.push({ left: parenStack.pop(), right: nextToken }); } - }); + } - parenPairs.forEach(pair => { - const leftParen = pair.left; - const rightParen = pair.right; + for (let i = parenPairs.length - 1; i >= 0; i--) { + const leftParen = parenPairs[i].left; + const rightParen = parenPairs[i].right; // We only want to handle parens around expressions, so exclude parentheses that are in function parameters and function call arguments. if (!parameterParens.has(leftParen) && !parameterParens.has(rightParen)) { @@ -996,7 +997,7 @@ module.exports = { } offsets.setDesiredOffset(rightParen, leftParen, 0); - }); + } } /** @@ -1068,7 +1069,7 @@ module.exports = { const baseOffsetListeners = { "ArrayExpression, ArrayPattern"(node) { const openingBracket = sourceCode.getFirstToken(node); - const closingBracket = sourceCode.getTokenAfter(lodash.findLast(node.elements) || openingBracket, astUtils.isClosingBracketToken); + const closingBracket = sourceCode.getTokenAfter([...node.elements].reverse().find(_ => _) || openingBracket, astUtils.isClosingBracketToken); addElementListIndent(node.elements, openingBracket, closingBracket, options.ArrayExpression); }, @@ -1177,8 +1178,7 @@ module.exports = { offsets.setDesiredOffset(questionMarkToken, firstToken, 1); offsets.setDesiredOffset(colonToken, firstToken, 1); - offsets.setDesiredOffset(firstConsequentToken, firstToken, - firstConsequentToken.type === "Punctuator" && + offsets.setDesiredOffset(firstConsequentToken, firstToken, firstConsequentToken.type === "Punctuator" && options.offsetTernaryExpressions ? 2 : 1); /* @@ -1204,14 +1204,13 @@ module.exports = { * If `baz` were aligned with `bar` rather than being offset by 1 from `foo`, `baz` would end up * having no expected indentation. */ - offsets.setDesiredOffset(firstAlternateToken, firstToken, - firstAlternateToken.type === "Punctuator" && + offsets.setDesiredOffset(firstAlternateToken, firstToken, firstAlternateToken.type === "Punctuator" && options.offsetTernaryExpressions ? 2 : 1); } } }, - "DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement": node => addBlocklessNodeIndent(node.body), + "DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement, WithStatement": node => addBlocklessNodeIndent(node.body), ExportNamedDeclaration(node) { if (node.declaration === null) { @@ -1254,11 +1253,55 @@ module.exports = { IfStatement(node) { addBlocklessNodeIndent(node.consequent); - if (node.alternate && node.alternate.type !== "IfStatement") { + if (node.alternate) { addBlocklessNodeIndent(node.alternate); } }, + /* + * For blockless nodes with semicolon-first style, don't indent the semicolon. + * e.g. + * if (foo) + * bar() + * ; [1, 2, 3].map(foo) + * + * Traversal into the node sets indentation of the semicolon, so we need to override it on exit. + */ + ":matches(DoWhileStatement, ForStatement, ForInStatement, ForOfStatement, IfStatement, WhileStatement, WithStatement):exit"(node) { + let nodesToCheck; + + if (node.type === "IfStatement") { + nodesToCheck = [node.consequent]; + if (node.alternate) { + nodesToCheck.push(node.alternate); + } + } else { + nodesToCheck = [node.body]; + } + + for (const nodeToCheck of nodesToCheck) { + const lastToken = sourceCode.getLastToken(nodeToCheck); + + if (astUtils.isSemicolonToken(lastToken)) { + const tokenBeforeLast = sourceCode.getTokenBefore(lastToken); + const tokenAfterLast = sourceCode.getTokenAfter(lastToken); + + // override indentation of `;` only if its line looks like a semicolon-first style line + if ( + !astUtils.isTokenOnSameLine(tokenBeforeLast, lastToken) && + tokenAfterLast && + astUtils.isTokenOnSameLine(lastToken, tokenAfterLast) + ) { + offsets.setDesiredOffset( + lastToken, + sourceCode.getFirstToken(node), + 0 + ); + } + } + } + }, + ImportDeclaration(node) { if (node.specifiers.some(specifier => specifier.type === "ImportSpecifier")) { const openingCurly = sourceCode.getFirstToken(node, astUtils.isOpeningBraceToken); @@ -1361,6 +1404,52 @@ module.exports = { } }, + PropertyDefinition(node) { + const firstToken = sourceCode.getFirstToken(node); + const maybeSemicolonToken = sourceCode.getLastToken(node); + let keyLastToken = null; + + // Indent key. + if (node.computed) { + const bracketTokenL = sourceCode.getTokenBefore(node.key, astUtils.isOpeningBracketToken); + const bracketTokenR = keyLastToken = sourceCode.getTokenAfter(node.key, astUtils.isClosingBracketToken); + const keyRange = [bracketTokenL.range[1], bracketTokenR.range[0]]; + + if (bracketTokenL !== firstToken) { + offsets.setDesiredOffset(bracketTokenL, firstToken, 0); + } + offsets.setDesiredOffsets(keyRange, bracketTokenL, 1); + offsets.setDesiredOffset(bracketTokenR, bracketTokenL, 0); + } else { + const idToken = keyLastToken = sourceCode.getFirstToken(node.key); + + if (idToken !== firstToken) { + offsets.setDesiredOffset(idToken, firstToken, 1); + } + } + + // Indent initializer. + if (node.value) { + const eqToken = sourceCode.getTokenBefore(node.value, astUtils.isEqToken); + const valueToken = sourceCode.getTokenAfter(eqToken); + + offsets.setDesiredOffset(eqToken, keyLastToken, 1); + offsets.setDesiredOffset(valueToken, eqToken, 1); + if (astUtils.isSemicolonToken(maybeSemicolonToken)) { + offsets.setDesiredOffset(maybeSemicolonToken, eqToken, 1); + } + } else if (astUtils.isSemicolonToken(maybeSemicolonToken)) { + offsets.setDesiredOffset(maybeSemicolonToken, keyLastToken, 1); + } + }, + + StaticBlock(node) { + const openingCurly = sourceCode.getFirstToken(node, { skip: 1 }); // skip the `static` token + const closingCurly = sourceCode.getLastToken(node); + + addElementListIndent(node.body, openingCurly, closingCurly, options.StaticBlock.body); + }, + SwitchStatement(node) { const openingCurly = sourceCode.getTokenAfter(node.discriminant, astUtils.isOpeningBraceToken); const closingCurly = sourceCode.getLastToken(node); @@ -1560,8 +1649,9 @@ module.exports = { * 2. Don't set any offsets against the first token of the node. * 3. Call `ignoreNode` on the node sometime after exiting it and before validating offsets. */ - const offsetListeners = lodash.mapValues( - baseOffsetListeners, + const offsetListeners = {}; + + for (const [selector, listener] of Object.entries(baseOffsetListeners)) { /* * Offset listener calls are deferred until traversal is finished, and are called as @@ -1579,10 +1669,8 @@ module.exports = { * To avoid this, the `Identifier` listener isn't called until traversal finishes and all * ignored nodes are known. */ - listener => - node => - listenerCallQueue.push({ listener, node }) - ); + offsetListeners[selector] = node => listenerCallQueue.push({ listener, node }); + } // For each ignored node selector, set up a listener to collect it into the `ignoredNodes` set. const ignoredNodes = new Set(); @@ -1630,9 +1718,13 @@ module.exports = { } // Invoke the queued offset listeners for the nodes that aren't ignored. - listenerCallQueue - .filter(nodeInfo => !ignoredNodes.has(nodeInfo.node)) - .forEach(nodeInfo => nodeInfo.listener(nodeInfo.node)); + for (let i = 0; i < listenerCallQueue.length; i++) { + const nodeInfo = listenerCallQueue[i]; + + if (!ignoredNodes.has(nodeInfo.node)) { + nodeInfo.listener(nodeInfo.node); + } + } // Update the offsets for ignored nodes to prevent their child tokens from being reported. ignoredNodes.forEach(ignoreNode); @@ -1643,27 +1735,31 @@ module.exports = { * Create a Map from (tokenOrComment) => (precedingToken). * This is necessary because sourceCode.getTokenBefore does not handle a comment as an argument correctly. */ - const precedingTokens = sourceCode.ast.comments.reduce((commentMap, comment) => { + const precedingTokens = new WeakMap(); + + for (let i = 0; i < sourceCode.ast.comments.length; i++) { + const comment = sourceCode.ast.comments[i]; + const tokenOrCommentBefore = sourceCode.getTokenBefore(comment, { includeComments: true }); + const hasToken = precedingTokens.has(tokenOrCommentBefore) ? precedingTokens.get(tokenOrCommentBefore) : tokenOrCommentBefore; - return commentMap.set(comment, commentMap.has(tokenOrCommentBefore) ? commentMap.get(tokenOrCommentBefore) : tokenOrCommentBefore); - }, new WeakMap()); + precedingTokens.set(comment, hasToken); + } - sourceCode.lines.forEach((line, lineIndex) => { - const lineNumber = lineIndex + 1; + for (let i = 1; i < sourceCode.lines.length + 1; i++) { - if (!tokenInfo.firstTokensByLineNumber.has(lineNumber)) { + if (!tokenInfo.firstTokensByLineNumber.has(i)) { // Don't check indentation on blank lines - return; + continue; } - const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get(lineNumber); + const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get(i); - if (firstTokenOfLine.loc.start.line !== lineNumber) { + if (firstTokenOfLine.loc.start.line !== i) { // Don't check the indentation of multi-line tokens (e.g. template literals or block comments) twice. - return; + continue; } if (astUtils.isCommentToken(firstTokenOfLine)) { @@ -1688,18 +1784,18 @@ module.exports = { mayAlignWithBefore && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenBefore)) || mayAlignWithAfter && validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenAfter)) ) { - return; + continue; } } // If the token matches the expected indentation, don't report it. if (validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine))) { - return; + continue; } // Otherwise, report the token/comment. report(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine)); - }); + } } } ); diff --git a/node_modules/eslint/lib/rules/index.js b/node_modules/eslint/lib/rules/index.js index 35af38fd1..840abe73b 100644 --- a/node_modules/eslint/lib/rules/index.js +++ b/node_modules/eslint/lib/rules/index.js @@ -6,7 +6,7 @@ "use strict"; -/* eslint sort-keys: ["error", "asc"] */ +/* eslint sort-keys: ["error", "asc"] -- More readable for long list */ const { LazyLoadingRuleMap } = require("./utils/lazy-loading-rule-map"); @@ -72,6 +72,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "lines-around-comment": () => require("./lines-around-comment"), "lines-around-directive": () => require("./lines-around-directive"), "lines-between-class-members": () => require("./lines-between-class-members"), + "logical-assignment-operators": () => require("./logical-assignment-operators"), "max-classes-per-file": () => require("./max-classes-per-file"), "max-depth": () => require("./max-depth"), "max-len": () => require("./max-len"), @@ -103,6 +104,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-confusing-arrow": () => require("./no-confusing-arrow"), "no-console": () => require("./no-console"), "no-const-assign": () => require("./no-const-assign"), + "no-constant-binary-expression": () => require("./no-constant-binary-expression"), "no-constant-condition": () => require("./no-constant-condition"), "no-constructor-return": () => require("./no-constructor-return"), "no-continue": () => require("./no-continue"), @@ -121,6 +123,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-empty-character-class": () => require("./no-empty-character-class"), "no-empty-function": () => require("./no-empty-function"), "no-empty-pattern": () => require("./no-empty-pattern"), + "no-empty-static-block": () => require("./no-empty-static-block"), "no-eq-null": () => require("./no-eq-null"), "no-eval": () => require("./no-eval"), "no-ex-assign": () => require("./no-ex-assign"), @@ -165,12 +168,14 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-nested-ternary": () => require("./no-nested-ternary"), "no-new": () => require("./no-new"), "no-new-func": () => require("./no-new-func"), + "no-new-native-nonconstructor": () => require("./no-new-native-nonconstructor"), "no-new-object": () => require("./no-new-object"), "no-new-require": () => require("./no-new-require"), "no-new-symbol": () => require("./no-new-symbol"), "no-new-wrappers": () => require("./no-new-wrappers"), "no-nonoctal-decimal-escape": () => require("./no-nonoctal-decimal-escape"), "no-obj-calls": () => require("./no-obj-calls"), + "no-object-constructor": () => require("./no-object-constructor"), "no-octal": () => require("./no-octal"), "no-octal-escape": () => require("./no-octal-escape"), "no-param-reassign": () => require("./no-param-reassign"), @@ -221,6 +226,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "no-unsafe-optional-chaining": () => require("./no-unsafe-optional-chaining"), "no-unused-expressions": () => require("./no-unused-expressions"), "no-unused-labels": () => require("./no-unused-labels"), + "no-unused-private-class-members": () => require("./no-unused-private-class-members"), "no-unused-vars": () => require("./no-unused-vars"), "no-use-before-define": () => require("./no-use-before-define"), "no-useless-backreference": () => require("./no-useless-backreference"), @@ -254,6 +260,7 @@ module.exports = new LazyLoadingRuleMap(Object.entries({ "prefer-exponentiation-operator": () => require("./prefer-exponentiation-operator"), "prefer-named-capture-group": () => require("./prefer-named-capture-group"), "prefer-numeric-literals": () => require("./prefer-numeric-literals"), + "prefer-object-has-own": () => require("./prefer-object-has-own"), "prefer-object-spread": () => require("./prefer-object-spread"), "prefer-promise-reject-errors": () => require("./prefer-promise-reject-errors"), "prefer-reflect": () => require("./prefer-reflect"), diff --git a/node_modules/eslint/lib/rules/init-declarations.js b/node_modules/eslint/lib/rules/init-declarations.js index 6cfdf92c9..3abe107f1 100644 --- a/node_modules/eslint/lib/rules/init-declarations.js +++ b/node_modules/eslint/lib/rules/init-declarations.js @@ -42,15 +42,15 @@ function isInitialized(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require or disallow initialization in variable declarations", - category: "Variables", + description: "Require or disallow initialization in variable declarations", recommended: false, - url: "https://eslint.org/docs/rules/init-declarations" + url: "https://eslint.org/docs/latest/rules/init-declarations" }, schema: { diff --git a/node_modules/eslint/lib/rules/jsx-quotes.js b/node_modules/eslint/lib/rules/jsx-quotes.js index 3b282df2f..3dcd5fa9d 100644 --- a/node_modules/eslint/lib/rules/jsx-quotes.js +++ b/node_modules/eslint/lib/rules/jsx-quotes.js @@ -1,6 +1,7 @@ /** * @fileoverview A rule to ensure consistent quotes used in jsx syntax. * @author Mathias Schreck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -36,15 +37,17 @@ const QUOTE_SETTINGS = { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce the consistent use of either double or single quotes in JSX attributes", - category: "Stylistic Issues", + description: "Enforce the consistent use of either double or single quotes in JSX attributes", recommended: false, - url: "https://eslint.org/docs/rules/jsx-quotes" + url: "https://eslint.org/docs/latest/rules/jsx-quotes" }, fixable: "whitespace", @@ -70,7 +73,7 @@ module.exports = { * @public */ function usesExpectedQuotes(node) { - return node.value.indexOf(setting.quote) !== -1 || astUtils.isSurroundedBy(node.raw, setting.quote); + return node.value.includes(setting.quote) || astUtils.isSurroundedBy(node.raw, setting.quote); } return { diff --git a/node_modules/eslint/lib/rules/key-spacing.js b/node_modules/eslint/lib/rules/key-spacing.js index fc885a117..19fc0167a 100644 --- a/node_modules/eslint/lib/rules/key-spacing.js +++ b/node_modules/eslint/lib/rules/key-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to specify spacing of object literal keys and values * @author Brandon Mills + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,10 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ +const { getGraphemeCount } = require("../shared/string-utils"); /** * Checks whether a string contains a line terminator as defined in @@ -133,15 +131,17 @@ function initOptions(toOptions, fromOptions) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing between keys and values in object literal properties", - category: "Stylistic Issues", + description: "Enforce consistent spacing between keys and values in object literal properties", recommended: false, - url: "https://eslint.org/docs/rules/key-spacing" + url: "https://eslint.org/docs/latest/rules/key-spacing" }, fixable: "whitespace", @@ -329,7 +329,54 @@ module.exports = { singleLineOptions = ruleOptions.singleLine, alignmentOptions = ruleOptions.align || null; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; + + /** + * Determines if the given property is key-value property. + * @param {ASTNode} property Property node to check. + * @returns {boolean} Whether the property is a key-value property. + */ + function isKeyValueProperty(property) { + return !( + (property.method || + property.shorthand || + property.kind !== "init" || property.type !== "Property") // Could be "ExperimentalSpreadProperty" or "SpreadElement" + ); + } + + /** + * Starting from the given node (a property.key node here) looks forward + * until it finds the colon punctuator and returns it. + * @param {ASTNode} node The node to start looking from. + * @returns {ASTNode} The colon punctuator. + */ + function getNextColon(node) { + return sourceCode.getTokenAfter(node, astUtils.isColonToken); + } + + /** + * Starting from the given node (a property.key node here) looks forward + * until it finds the last token before a colon punctuator and returns it. + * @param {ASTNode} node The node to start looking from. + * @returns {ASTNode} The last token before a colon punctuator. + */ + function getLastTokenBeforeColon(node) { + const colonToken = getNextColon(node); + + return sourceCode.getTokenBefore(colonToken); + } + + /** + * Starting from the given node (a property.key node here) looks forward + * until it finds the first token after a colon punctuator and returns it. + * @param {ASTNode} node The node to start looking from. + * @returns {ASTNode} The first token after a colon punctuator. + */ + function getFirstTokenAfterColon(node) { + const colonToken = getNextColon(node); + + return sourceCode.getTokenAfter(colonToken); + } /** * Checks whether a property is a member of the property group it follows. @@ -339,9 +386,9 @@ module.exports = { */ function continuesPropertyGroup(lastMember, candidate) { const groupEndLine = lastMember.loc.start.line, - candidateStartLine = candidate.loc.start.line; + candidateValueStartLine = (isKeyValueProperty(candidate) ? getFirstTokenAfterColon(candidate.key) : candidate).loc.start.line; - if (candidateStartLine - groupEndLine <= 1) { + if (candidateValueStartLine - groupEndLine <= 1) { return true; } @@ -355,7 +402,7 @@ module.exports = { if ( leadingComments.length && leadingComments[0].loc.start.line - groupEndLine <= 1 && - candidateStartLine - last(leadingComments).loc.end.line <= 1 + candidateValueStartLine - last(leadingComments).loc.end.line <= 1 ) { for (let i = 1; i < leadingComments.length; i++) { if (leadingComments[i].loc.start.line - leadingComments[i - 1].loc.end.line > 1) { @@ -368,41 +415,6 @@ module.exports = { return false; } - /** - * Determines if the given property is key-value property. - * @param {ASTNode} property Property node to check. - * @returns {boolean} Whether the property is a key-value property. - */ - function isKeyValueProperty(property) { - return !( - (property.method || - property.shorthand || - property.kind !== "init" || property.type !== "Property") // Could be "ExperimentalSpreadProperty" or "SpreadElement" - ); - } - - /** - * Starting from the given a node (a property.key node here) looks forward - * until it finds the last token before a colon punctuator and returns it. - * @param {ASTNode} node The node to start looking from. - * @returns {ASTNode} The last token before a colon punctuator. - */ - function getLastTokenBeforeColon(node) { - const colonToken = sourceCode.getTokenAfter(node, astUtils.isColonToken); - - return sourceCode.getTokenBefore(colonToken); - } - - /** - * Starting from the given a node (a property.key node here) looks forward - * until it finds the colon punctuator and returns it. - * @param {ASTNode} node The node to start looking from. - * @returns {ASTNode} The colon punctuator. - */ - function getNextColon(node) { - return sourceCode.getTokenAfter(node, astUtils.isColonToken); - } - /** * Gets an object literal property's key as the identifier name or string value. * @param {ASTNode} property Property node whose key to retrieve. @@ -428,19 +440,7 @@ module.exports = { * @returns {void} */ function report(property, side, whitespace, expected, mode) { - const diff = whitespace.length - expected, - nextColon = getNextColon(property.key), - tokenBeforeColon = sourceCode.getTokenBefore(nextColon, { includeComments: true }), - tokenAfterColon = sourceCode.getTokenAfter(nextColon, { includeComments: true }), - isKeySide = side === "key", - isExtra = diff > 0, - diffAbs = Math.abs(diff), - spaces = Array(diffAbs + 1).join(" "); - - const locStart = isKeySide ? tokenBeforeColon.loc.end : nextColon.loc.start; - const locEnd = isKeySide ? nextColon.loc.start : tokenAfterColon.loc.start; - const missingLoc = isKeySide ? tokenBeforeColon.loc : tokenAfterColon.loc; - const loc = isExtra ? { start: locStart, end: locEnd } : missingLoc; + const diff = whitespace.length - expected; if (( diff && mode === "strict" || @@ -448,6 +448,19 @@ module.exports = { diff > 0 && !expected && mode === "minimum") && !(expected && containsLineTerminator(whitespace)) ) { + const nextColon = getNextColon(property.key), + tokenBeforeColon = sourceCode.getTokenBefore(nextColon, { includeComments: true }), + tokenAfterColon = sourceCode.getTokenAfter(nextColon, { includeComments: true }), + isKeySide = side === "key", + isExtra = diff > 0, + diffAbs = Math.abs(diff), + spaces = Array(diffAbs + 1).join(" "); + + const locStart = isKeySide ? tokenBeforeColon.loc.end : nextColon.loc.start; + const locEnd = isKeySide ? nextColon.loc.start : tokenAfterColon.loc.start; + const missingLoc = isKeySide ? tokenBeforeColon.loc : tokenAfterColon.loc; + const loc = isExtra ? { start: locStart, end: locEnd } : missingLoc; + let fix; if (isExtra) { @@ -507,7 +520,7 @@ module.exports = { const startToken = sourceCode.getFirstToken(property); const endToken = getLastTokenBeforeColon(property.key); - return endToken.range[1] - startToken.range[0]; + return getGraphemeCount(sourceCode.getText().slice(startToken.range[0], endToken.range[1])); } /** @@ -531,8 +544,8 @@ module.exports = { /** * Creates groups of properties. - * @param {ASTNode} node ObjectExpression node being evaluated. - * @returns {Array.} Groups of property AST node lists. + * @param {ASTNode} node ObjectExpression node being evaluated. + * @returns {Array} Groups of property AST node lists. */ function createGroups(node) { if (node.properties.length === 1) { @@ -600,7 +613,7 @@ module.exports = { /** * Verifies spacing of property conforms to specified options. - * @param {ASTNode} node Property node being evaluated. + * @param {ASTNode} node Property node being evaluated. * @param {Object} lineOptions Configured singleLine or multiLine options * @returns {void} */ @@ -629,7 +642,7 @@ module.exports = { /** * Verifies vertical alignment, taking into account groups of properties. - * @param {ASTNode} node ObjectExpression node being evaluated. + * @param {ASTNode} node ObjectExpression node being evaluated. * @returns {void} */ function verifyAlignment(node) { diff --git a/node_modules/eslint/lib/rules/keyword-spacing.js b/node_modules/eslint/lib/rules/keyword-spacing.js index 913cf4682..9d18441e0 100644 --- a/node_modules/eslint/lib/rules/keyword-spacing.js +++ b/node_modules/eslint/lib/rules/keyword-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce spacing before and after keywords. * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -22,7 +23,7 @@ const PREV_TOKEN_M = /^[)\]}>*]$/u; const NEXT_TOKEN_M = /^[{*]$/u; const TEMPLATE_OPEN_PAREN = /\$\{$/u; const TEMPLATE_CLOSE_PAREN = /^\}/u; -const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template)$/u; +const CHECK_TYPE = /^(?:JSXElement|RegularExpression|String|Template|PrivateIdentifier)$/u; const KEYS = keywords.concat(["as", "async", "await", "from", "get", "let", "of", "set", "yield"]); // check duplications. @@ -61,15 +62,17 @@ function isCloseParenOfTemplate(token) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before and after keywords", - category: "Stylistic Issues", + description: "Enforce consistent spacing before and after keywords", recommended: false, - url: "https://eslint.org/docs/rules/keyword-spacing" + url: "https://eslint.org/docs/latest/rules/keyword-spacing" }, fixable: "whitespace", @@ -108,7 +111,9 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; + + const tokensToIgnore = new WeakSet(); /** * Reports a given token if there are not space(s) before the token. @@ -122,6 +127,7 @@ module.exports = { if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && + !tokensToIgnore.has(prevToken) && astUtils.isTokenOnSameLine(prevToken, token) && !sourceCode.isSpaceBetweenTokens(prevToken, token) ) { @@ -148,6 +154,7 @@ module.exports = { if (prevToken && (CHECK_TYPE.test(prevToken.type) || pattern.test(prevToken.value)) && !isOpenParenOfTemplate(prevToken) && + !tokensToIgnore.has(prevToken) && astUtils.isTokenOnSameLine(prevToken, token) && sourceCode.isSpaceBetweenTokens(prevToken, token) ) { @@ -174,6 +181,7 @@ module.exports = { if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && + !tokensToIgnore.has(nextToken) && astUtils.isTokenOnSameLine(token, nextToken) && !sourceCode.isSpaceBetweenTokens(token, nextToken) ) { @@ -200,6 +208,7 @@ module.exports = { if (nextToken && (CHECK_TYPE.test(nextToken.type) || pattern.test(nextToken.value)) && !isCloseParenOfTemplate(nextToken) && + !tokensToIgnore.has(nextToken) && astUtils.isTokenOnSameLine(token, nextToken) && sourceCode.isSpaceBetweenTokens(token, nextToken) ) { @@ -403,7 +412,15 @@ module.exports = { */ function checkSpacingForForInStatement(node) { checkSpacingAroundFirstToken(node); - checkSpacingAroundTokenBefore(node.right); + + const inToken = sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken); + const previousToken = sourceCode.getTokenBefore(inToken); + + if (previousToken.type !== "PrivateIdentifier") { + checkSpacingBefore(inToken); + } + + checkSpacingAfter(inToken); } /** @@ -419,7 +436,15 @@ module.exports = { } else { checkSpacingAroundFirstToken(node); } - checkSpacingAround(sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken)); + + const ofToken = sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken); + const previousToken = sourceCode.getTokenBefore(ofToken); + + if (previousToken.type !== "PrivateIdentifier") { + checkSpacingBefore(ofToken); + } + + checkSpacingAfter(ofToken); } /** @@ -447,6 +472,7 @@ module.exports = { const asToken = sourceCode.getTokenBefore(node.exported); checkSpacingBefore(asToken, PREV_TOKEN_M); + checkSpacingAfter(asToken, NEXT_TOKEN_M); } if (node.source) { @@ -457,6 +483,35 @@ module.exports = { } } + /** + * Reports `as` keyword of a given node if usage of spacing around this + * keyword is invalid. + * @param {ASTNode} node An `ImportSpecifier` node to check. + * @returns {void} + */ + function checkSpacingForImportSpecifier(node) { + if (node.imported.range[0] !== node.local.range[0]) { + const asToken = sourceCode.getTokenBefore(node.local); + + checkSpacingBefore(asToken, PREV_TOKEN_M); + } + } + + /** + * Reports `as` keyword of a given node if usage of spacing around this + * keyword is invalid. + * @param {ASTNode} node An `ExportSpecifier` node to check. + * @returns {void} + */ + function checkSpacingForExportSpecifier(node) { + if (node.local.range[0] !== node.exported.range[0]) { + const asToken = sourceCode.getTokenBefore(node.exported); + + checkSpacingBefore(asToken, PREV_TOKEN_M); + checkSpacingAfter(asToken, NEXT_TOKEN_M); + } + } + /** * Reports `as` keyword of a given node if usage of spacing around this * keyword is invalid. @@ -473,6 +528,7 @@ module.exports = { * Reports `static`, `get`, and `set` keywords of a given node if usage of * spacing around those keywords is invalid. * @param {ASTNode} node A node to report. + * @throws {Error} If unable to find token get, set, or async beside method name. * @returns {void} */ function checkSpacingForProperty(node) { @@ -565,9 +621,20 @@ module.exports = { YieldExpression: checkSpacingBeforeFirstToken, // Others + ImportSpecifier: checkSpacingForImportSpecifier, + ExportSpecifier: checkSpacingForExportSpecifier, ImportNamespaceSpecifier: checkSpacingForImportNamespaceSpecifier, MethodDefinition: checkSpacingForProperty, - Property: checkSpacingForProperty + PropertyDefinition: checkSpacingForProperty, + StaticBlock: checkSpacingAroundFirstToken, + Property: checkSpacingForProperty, + + // To avoid conflicts with `space-infix-ops`, e.g. `a > this.b` + "BinaryExpression[operator='>']"(node) { + const operatorToken = sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken); + + tokensToIgnore.add(operatorToken); + } }; } }; diff --git a/node_modules/eslint/lib/rules/line-comment-position.js b/node_modules/eslint/lib/rules/line-comment-position.js index 77ee147cb..314fac167 100644 --- a/node_modules/eslint/lib/rules/line-comment-position.js +++ b/node_modules/eslint/lib/rules/line-comment-position.js @@ -10,15 +10,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "enforce position of line comments", - category: "Stylistic Issues", + description: "Enforce position of line comments", recommended: false, - url: "https://eslint.org/docs/rules/line-comment-position" + url: "https://eslint.org/docs/latest/rules/line-comment-position" }, schema: [ @@ -78,7 +78,7 @@ module.exports = { const defaultIgnoreRegExp = astUtils.COMMENTS_IGNORE_PATTERN; const fallThroughRegExp = /^\s*falls?\s?through/u; const customIgnoreRegExp = new RegExp(ignorePattern, "u"); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Public diff --git a/node_modules/eslint/lib/rules/linebreak-style.js b/node_modules/eslint/lib/rules/linebreak-style.js index b3b393ead..e59acca1b 100644 --- a/node_modules/eslint/lib/rules/linebreak-style.js +++ b/node_modules/eslint/lib/rules/linebreak-style.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce a single linebreak style. * @author Erik Mueller + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent linebreak style", - category: "Stylistic Issues", + description: "Enforce consistent linebreak style", recommended: false, - url: "https://eslint.org/docs/rules/linebreak-style" + url: "https://eslint.org/docs/latest/rules/linebreak-style" }, fixable: "whitespace", @@ -40,7 +43,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers diff --git a/node_modules/eslint/lib/rules/lines-around-comment.js b/node_modules/eslint/lib/rules/lines-around-comment.js index 6806e793c..2a6e472f9 100644 --- a/node_modules/eslint/lib/rules/lines-around-comment.js +++ b/node_modules/eslint/lib/rules/lines-around-comment.js @@ -1,6 +1,7 @@ /** * @fileoverview Enforces empty lines around comments. * @author Jamund Ferguson + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,7 +16,7 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ /** - * Return an array with with any line numbers that are empty. + * Return an array with any line numbers that are empty. * @param {Array} lines An array of each line of the file. * @returns {Array} An array of line numbers. */ @@ -29,7 +30,7 @@ function getEmptyLineNums(lines) { } /** - * Return an array with with any line numbers that contain comments. + * Return an array with any line numbers that contain comments. * @param {Array} comments An array of comment tokens. * @returns {Array} An array of line numbers. */ @@ -49,15 +50,17 @@ function getCommentLineNums(comments) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require empty lines around comments", - category: "Stylistic Issues", + description: "Require empty lines around comments", recommended: false, - url: "https://eslint.org/docs/rules/lines-around-comment" + url: "https://eslint.org/docs/latest/rules/lines-around-comment" }, fixable: "whitespace", @@ -113,6 +116,10 @@ module.exports = { }, applyDefaultIgnorePatterns: { type: "boolean" + }, + afterHashbangComment: { + type: "boolean", + default: false } }, additionalProperties: false @@ -134,14 +141,14 @@ module.exports = { options.beforeBlockComment = typeof options.beforeBlockComment !== "undefined" ? options.beforeBlockComment : true; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const lines = sourceCode.lines, numLines = lines.length + 1, comments = sourceCode.getAllComments(), commentLines = getCommentLineNums(comments), emptyLines = getEmptyLineNums(lines), - commentAndEmptyLines = commentLines.concat(emptyLines); + commentAndEmptyLines = new Set(commentLines.concat(emptyLines)); /** * Returns whether or not comments are on lines starting with or ending with code @@ -186,10 +193,39 @@ module.exports = { /** * Returns the parent node that contains the given token. * @param {token} token The token to check. - * @returns {ASTNode} The parent node that contains the given token. + * @returns {ASTNode|null} The parent node that contains the given token. */ function getParentNodeOfToken(token) { - return sourceCode.getNodeByRangeIndex(token.range[0]); + const node = sourceCode.getNodeByRangeIndex(token.range[0]); + + /* + * For the purpose of this rule, the comment token is in a `StaticBlock` node only + * if it's inside the braces of that `StaticBlock` node. + * + * Example where this function returns `null`: + * + * static + * // comment + * { + * } + * + * Example where this function returns `StaticBlock` node: + * + * static + * { + * // comment + * } + * + */ + if (node && node.type === "StaticBlock") { + const openingBrace = sourceCode.getFirstToken(node, { skip: 1 }); // skip the `static` token + + return token.range[0] >= openingBrace.range[0] + ? node + : null; + } + + return node; } /** @@ -201,8 +237,21 @@ module.exports = { function isCommentAtParentStart(token, nodeType) { const parent = getParentNodeOfToken(token); - return parent && isParentNodeType(parent, nodeType) && - token.loc.start.line - parent.loc.start.line === 1; + if (parent && isParentNodeType(parent, nodeType)) { + let parentStartNodeOrToken = parent; + + if (parent.type === "StaticBlock") { + parentStartNodeOrToken = sourceCode.getFirstToken(parent, { skip: 1 }); // opening brace of the static block + } else if (parent.type === "SwitchStatement") { + parentStartNodeOrToken = sourceCode.getTokenAfter(parent.discriminant, { + filter: astUtils.isOpeningBraceToken + }); // opening brace of the switch statement + } + + return token.loc.start.line - parentStartNodeOrToken.loc.start.line === 1; + } + + return false; } /** @@ -214,7 +263,7 @@ module.exports = { function isCommentAtParentEnd(token, nodeType) { const parent = getParentNodeOfToken(token); - return parent && isParentNodeType(parent, nodeType) && + return !!parent && isParentNodeType(parent, nodeType) && parent.loc.end.line - token.loc.end.line === 1; } @@ -224,7 +273,13 @@ module.exports = { * @returns {boolean} True if the comment is at block start. */ function isCommentAtBlockStart(token) { - return isCommentAtParentStart(token, "ClassBody") || isCommentAtParentStart(token, "BlockStatement") || isCommentAtParentStart(token, "SwitchCase"); + return ( + isCommentAtParentStart(token, "ClassBody") || + isCommentAtParentStart(token, "BlockStatement") || + isCommentAtParentStart(token, "StaticBlock") || + isCommentAtParentStart(token, "SwitchCase") || + isCommentAtParentStart(token, "SwitchStatement") + ); } /** @@ -233,7 +288,13 @@ module.exports = { * @returns {boolean} True if the comment is at block end. */ function isCommentAtBlockEnd(token) { - return isCommentAtParentEnd(token, "ClassBody") || isCommentAtParentEnd(token, "BlockStatement") || isCommentAtParentEnd(token, "SwitchCase") || isCommentAtParentEnd(token, "SwitchStatement"); + return ( + isCommentAtParentEnd(token, "ClassBody") || + isCommentAtParentEnd(token, "BlockStatement") || + isCommentAtParentEnd(token, "StaticBlock") || + isCommentAtParentEnd(token, "SwitchCase") || + isCommentAtParentEnd(token, "SwitchStatement") + ); } /** @@ -346,7 +407,7 @@ module.exports = { const nextTokenOrComment = sourceCode.getTokenAfter(token, { includeComments: true }); // check for newline before - if (!exceptionStartAllowed && before && !commentAndEmptyLines.includes(prevLineNum) && + if (!exceptionStartAllowed && before && !commentAndEmptyLines.has(prevLineNum) && !(astUtils.isCommentToken(previousTokenOrComment) && astUtils.isTokenOnSameLine(previousTokenOrComment, token))) { const lineStart = token.range[0] - token.loc.start.column; const range = [lineStart, lineStart]; @@ -361,7 +422,7 @@ module.exports = { } // check for newline after - if (!exceptionEndAllowed && after && !commentAndEmptyLines.includes(nextLineNum) && + if (!exceptionEndAllowed && after && !commentAndEmptyLines.has(nextLineNum) && !(astUtils.isCommentToken(nextTokenOrComment) && astUtils.isTokenOnSameLine(token, nextTokenOrComment))) { context.report({ node: token, @@ -395,6 +456,13 @@ module.exports = { before: options.beforeBlockComment }); } + } else if (token.type === "Shebang") { + if (options.afterHashbangComment) { + checkForEmptyLine(token, { + after: options.afterHashbangComment, + before: false + }); + } } }); } diff --git a/node_modules/eslint/lib/rules/lines-around-directive.js b/node_modules/eslint/lib/rules/lines-around-directive.js index fb439dad6..1c82d8f98 100644 --- a/node_modules/eslint/lib/rules/lines-around-directive.js +++ b/node_modules/eslint/lib/rules/lines-around-directive.js @@ -1,7 +1,7 @@ /** * @fileoverview Require or disallow newlines around directives. * @author Kai Cataldo - * @deprecated + * @deprecated in ESLint v4.0.0 */ "use strict"; @@ -12,15 +12,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "require or disallow newlines around directives", - category: "Stylistic Issues", + description: "Require or disallow newlines around directives", recommended: false, - url: "https://eslint.org/docs/rules/lines-around-directive" + url: "https://eslint.org/docs/latest/rules/lines-around-directive" }, schema: [{ @@ -54,7 +54,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const config = context.options[0] || "always"; const expectLineBefore = typeof config === "string" ? config : config.before; const expectLineAfter = typeof config === "string" ? config : config.after; diff --git a/node_modules/eslint/lib/rules/lines-between-class-members.js b/node_modules/eslint/lib/rules/lines-between-class-members.js index 972353036..5f36d468d 100644 --- a/node_modules/eslint/lib/rules/lines-between-class-members.js +++ b/node_modules/eslint/lib/rules/lines-between-class-members.js @@ -1,31 +1,78 @@ /** * @fileoverview Rule to check empty newline between class members * @author 薛定谔的猫 + * @deprecated in ESLint v8.53.0 */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Types of class members. + * Those have `test` method to check it matches to the given class member. + * @private + */ +const ClassMemberTypes = { + "*": { test: () => true }, + field: { test: node => node.type === "PropertyDefinition" }, + method: { test: node => node.type === "MethodDefinition" } +}; + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow an empty line between class members", - category: "Stylistic Issues", + description: "Require or disallow an empty line between class members", recommended: false, - url: "https://eslint.org/docs/rules/lines-between-class-members" + url: "https://eslint.org/docs/latest/rules/lines-between-class-members" }, fixable: "whitespace", schema: [ { - enum: ["always", "never"] + anyOf: [ + { + type: "object", + properties: { + enforce: { + type: "array", + items: { + type: "object", + properties: { + blankLine: { enum: ["always", "never"] }, + prev: { enum: ["method", "field", "*"] }, + next: { enum: ["method", "field", "*"] } + }, + additionalProperties: false, + required: ["blankLine", "prev", "next"] + }, + minItems: 1 + } + }, + additionalProperties: false, + required: ["enforce"] + }, + { + enum: ["always", "never"] + } + ] }, { type: "object", @@ -51,7 +98,53 @@ module.exports = { options[0] = context.options[0] || "always"; options[1] = context.options[1] || { exceptAfterSingleLine: false }; - const sourceCode = context.getSourceCode(); + const configureList = typeof options[0] === "object" ? options[0].enforce : [{ blankLine: options[0], prev: "*", next: "*" }]; + const sourceCode = context.sourceCode; + + /** + * Gets a pair of tokens that should be used to check lines between two class member nodes. + * + * In most cases, this returns the very last token of the current node and + * the very first token of the next node. + * For example: + * + * class C { + * x = 1; // curLast: `;` nextFirst: `in` + * in = 2 + * } + * + * There is only one exception. If the given node ends with a semicolon, and it looks like + * a semicolon-less style's semicolon - one that is not on the same line as the preceding + * token, but is on the line where the next class member starts - this returns the preceding + * token and the semicolon as boundary tokens. + * For example: + * + * class C { + * x = 1 // curLast: `1` nextFirst: `;` + * ;in = 2 + * } + * When determining the desired layout of the code, we should treat this semicolon as + * a part of the next class member node instead of the one it technically belongs to. + * @param {ASTNode} curNode Current class member node. + * @param {ASTNode} nextNode Next class member node. + * @returns {Token} The actual last token of `node`. + * @private + */ + function getBoundaryTokens(curNode, nextNode) { + const lastToken = sourceCode.getLastToken(curNode); + const prevToken = sourceCode.getTokenBefore(lastToken); + const nextToken = sourceCode.getFirstToken(nextNode); // skip possible lone `;` between nodes + + const isSemicolonLessStyle = ( + astUtils.isSemicolonToken(lastToken) && + !astUtils.isTokenOnSameLine(prevToken, lastToken) && + astUtils.isTokenOnSameLine(lastToken, nextToken) + ); + + return isSemicolonLessStyle + ? { curLast: prevToken, nextFirst: lastToken } + : { curLast: lastToken, nextFirst: nextToken }; + } /** * Return the last token among the consecutive tokens that have no exceed max line difference in between, before the first token in the next member. @@ -95,14 +188,45 @@ module.exports = { return sourceCode.getTokensBetween(before, after, { includeComments: true }).length !== 0; } + /** + * Checks whether the given node matches the given type. + * @param {ASTNode} node The class member node to check. + * @param {string} type The class member type to check. + * @returns {boolean} `true` if the class member node matched the type. + * @private + */ + function match(node, type) { + return ClassMemberTypes[type].test(node); + } + + /** + * Finds the last matched configuration from the configureList. + * @param {ASTNode} prevNode The previous node to match. + * @param {ASTNode} nextNode The current node to match. + * @returns {string|null} Padding type or `null` if no matches were found. + * @private + */ + function getPaddingType(prevNode, nextNode) { + for (let i = configureList.length - 1; i >= 0; --i) { + const configure = configureList[i]; + const matched = + match(prevNode, configure.prev) && + match(nextNode, configure.next); + + if (matched) { + return configure.blankLine; + } + } + return null; + } + return { ClassBody(node) { const body = node.body; for (let i = 0; i < body.length - 1; i++) { const curFirst = sourceCode.getFirstToken(body[i]); - const curLast = sourceCode.getLastToken(body[i]); - const nextFirst = sourceCode.getFirstToken(body[i + 1]); + const { curLast, nextFirst } = getBoundaryTokens(body[i], body[i + 1]); const isMulti = !astUtils.isTokenOnSameLine(curFirst, curLast); const skip = !isMulti && options[1].exceptAfterSingleLine; const beforePadding = findLastConsecutiveTokenAfter(curLast, nextFirst, 1); @@ -110,22 +234,34 @@ module.exports = { const isPadded = afterPadding.loc.start.line - beforePadding.loc.end.line > 1; const hasTokenInPadding = hasTokenOrCommentBetween(beforePadding, afterPadding); const curLineLastToken = findLastConsecutiveTokenAfter(curLast, nextFirst, 0); + const paddingType = getPaddingType(body[i], body[i + 1]); + + if (paddingType === "never" && isPadded) { + context.report({ + node: body[i + 1], + messageId: "never", - if ((options[0] === "always" && !skip && !isPadded) || - (options[0] === "never" && isPadded)) { + fix(fixer) { + if (hasTokenInPadding) { + return null; + } + return fixer.replaceTextRange([beforePadding.range[1], afterPadding.range[0]], "\n"); + } + }); + } else if (paddingType === "always" && !skip && !isPadded) { context.report({ node: body[i + 1], - messageId: isPadded ? "never" : "always", + messageId: "always", + fix(fixer) { if (hasTokenInPadding) { return null; } - return isPadded - ? fixer.replaceTextRange([beforePadding.range[1], afterPadding.range[0]], "\n") - : fixer.insertTextAfter(curLineLastToken, "\n"); + return fixer.insertTextAfter(curLineLastToken, "\n"); } }); } + } } }; diff --git a/node_modules/eslint/lib/rules/logical-assignment-operators.js b/node_modules/eslint/lib/rules/logical-assignment-operators.js new file mode 100644 index 000000000..c084c04c8 --- /dev/null +++ b/node_modules/eslint/lib/rules/logical-assignment-operators.js @@ -0,0 +1,504 @@ +/** + * @fileoverview Rule to replace assignment expressions with logical operator assignment + * @author Daniel Martens + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ +const astUtils = require("./utils/ast-utils.js"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const baseTypes = new Set(["Identifier", "Super", "ThisExpression"]); + +/** + * Returns true iff either "undefined" or a void expression (eg. "void 0") + * @param {ASTNode} expression Expression to check + * @param {import('eslint-scope').Scope} scope Scope of the expression + * @returns {boolean} True iff "undefined" or "void ..." + */ +function isUndefined(expression, scope) { + if (expression.type === "Identifier" && expression.name === "undefined") { + return astUtils.isReferenceToGlobalVariable(scope, expression); + } + + return expression.type === "UnaryExpression" && + expression.operator === "void" && + expression.argument.type === "Literal" && + expression.argument.value === 0; +} + +/** + * Returns true iff the reference is either an identifier or member expression + * @param {ASTNode} expression Expression to check + * @returns {boolean} True for identifiers and member expressions + */ +function isReference(expression) { + return (expression.type === "Identifier" && expression.name !== "undefined") || + expression.type === "MemberExpression"; +} + +/** + * Returns true iff the expression checks for nullish with loose equals. + * Examples: value == null, value == void 0 + * @param {ASTNode} expression Test condition + * @param {import('eslint-scope').Scope} scope Scope of the expression + * @returns {boolean} True iff implicit nullish comparison + */ +function isImplicitNullishComparison(expression, scope) { + if (expression.type !== "BinaryExpression" || expression.operator !== "==") { + return false; + } + + const reference = isReference(expression.left) ? "left" : "right"; + const nullish = reference === "left" ? "right" : "left"; + + return isReference(expression[reference]) && + (astUtils.isNullLiteral(expression[nullish]) || isUndefined(expression[nullish], scope)); +} + +/** + * Condition with two equal comparisons. + * @param {ASTNode} expression Condition + * @returns {boolean} True iff matches ? === ? || ? === ? + */ +function isDoubleComparison(expression) { + return expression.type === "LogicalExpression" && + expression.operator === "||" && + expression.left.type === "BinaryExpression" && + expression.left.operator === "===" && + expression.right.type === "BinaryExpression" && + expression.right.operator === "==="; +} + +/** + * Returns true iff the expression checks for undefined and null. + * Example: value === null || value === undefined + * @param {ASTNode} expression Test condition + * @param {import('eslint-scope').Scope} scope Scope of the expression + * @returns {boolean} True iff explicit nullish comparison + */ +function isExplicitNullishComparison(expression, scope) { + if (!isDoubleComparison(expression)) { + return false; + } + const leftReference = isReference(expression.left.left) ? "left" : "right"; + const leftNullish = leftReference === "left" ? "right" : "left"; + const rightReference = isReference(expression.right.left) ? "left" : "right"; + const rightNullish = rightReference === "left" ? "right" : "left"; + + return astUtils.isSameReference(expression.left[leftReference], expression.right[rightReference]) && + ((astUtils.isNullLiteral(expression.left[leftNullish]) && isUndefined(expression.right[rightNullish], scope)) || + (isUndefined(expression.left[leftNullish], scope) && astUtils.isNullLiteral(expression.right[rightNullish]))); +} + +/** + * Returns true for Boolean(arg) calls + * @param {ASTNode} expression Test condition + * @param {import('eslint-scope').Scope} scope Scope of the expression + * @returns {boolean} Whether the expression is a boolean cast + */ +function isBooleanCast(expression, scope) { + return expression.type === "CallExpression" && + expression.callee.name === "Boolean" && + expression.arguments.length === 1 && + astUtils.isReferenceToGlobalVariable(scope, expression.callee); +} + +/** + * Returns true for: + * truthiness checks: value, Boolean(value), !!value + * falsiness checks: !value, !Boolean(value) + * nullish checks: value == null, value === undefined || value === null + * @param {ASTNode} expression Test condition + * @param {import('eslint-scope').Scope} scope Scope of the expression + * @returns {?{ reference: ASTNode, operator: '??'|'||'|'&&'}} Null if not a known existence + */ +function getExistence(expression, scope) { + const isNegated = expression.type === "UnaryExpression" && expression.operator === "!"; + const base = isNegated ? expression.argument : expression; + + switch (true) { + case isReference(base): + return { reference: base, operator: isNegated ? "||" : "&&" }; + case base.type === "UnaryExpression" && base.operator === "!" && isReference(base.argument): + return { reference: base.argument, operator: "&&" }; + case isBooleanCast(base, scope) && isReference(base.arguments[0]): + return { reference: base.arguments[0], operator: isNegated ? "||" : "&&" }; + case isImplicitNullishComparison(expression, scope): + return { reference: isReference(expression.left) ? expression.left : expression.right, operator: "??" }; + case isExplicitNullishComparison(expression, scope): + return { reference: isReference(expression.left.left) ? expression.left.left : expression.left.right, operator: "??" }; + default: return null; + } +} + +/** + * Returns true iff the node is inside a with block + * @param {ASTNode} node Node to check + * @returns {boolean} True iff passed node is inside a with block + */ +function isInsideWithBlock(node) { + if (node.type === "Program") { + return false; + } + + return node.parent.type === "WithStatement" && node.parent.body === node ? true : isInsideWithBlock(node.parent); +} + +/** + * Gets the leftmost operand of a consecutive logical expression. + * @param {SourceCode} sourceCode The ESLint source code object + * @param {LogicalExpression} node LogicalExpression + * @returns {Expression} Leftmost operand + */ +function getLeftmostOperand(sourceCode, node) { + let left = node.left; + + while (left.type === "LogicalExpression" && left.operator === node.operator) { + + if (astUtils.isParenthesised(sourceCode, left)) { + + /* + * It should have associativity, + * but ignore it if use parentheses to make the evaluation order clear. + */ + return left; + } + left = left.left; + } + return left; + +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "suggestion", + + docs: { + description: "Require or disallow logical assignment operator shorthand", + recommended: false, + url: "https://eslint.org/docs/latest/rules/logical-assignment-operators" + }, + + schema: { + type: "array", + oneOf: [{ + items: [ + { const: "always" }, + { + type: "object", + properties: { + enforceForIfStatements: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + minItems: 0, // 0 for allowing passing no options + maxItems: 2 + }, { + items: [{ const: "never" }], + minItems: 1, + maxItems: 1 + }] + }, + fixable: "code", + hasSuggestions: true, + messages: { + assignment: "Assignment (=) can be replaced with operator assignment ({{operator}}).", + useLogicalOperator: "Convert this assignment to use the operator {{ operator }}.", + logical: "Logical expression can be replaced with an assignment ({{ operator }}).", + convertLogical: "Replace this logical expression with an assignment with the operator {{ operator }}.", + if: "'if' statement can be replaced with a logical operator assignment with operator {{ operator }}.", + convertIf: "Replace this 'if' statement with a logical assignment with operator {{ operator }}.", + unexpected: "Unexpected logical operator assignment ({{operator}}) shorthand.", + separate: "Separate the logical assignment into an assignment with a logical operator." + } + }, + + create(context) { + const mode = context.options[0] === "never" ? "never" : "always"; + const checkIf = mode === "always" && context.options.length > 1 && context.options[1].enforceForIfStatements; + const sourceCode = context.sourceCode; + const isStrict = sourceCode.getScope(sourceCode.ast).isStrict; + + /** + * Returns false if the access could be a getter + * @param {ASTNode} node Assignment expression + * @returns {boolean} True iff the fix is safe + */ + function cannotBeGetter(node) { + return node.type === "Identifier" && + (isStrict || !isInsideWithBlock(node)); + } + + /** + * Check whether only a single property is accessed + * @param {ASTNode} node reference + * @returns {boolean} True iff a single property is accessed + */ + function accessesSingleProperty(node) { + if (!isStrict && isInsideWithBlock(node)) { + return node.type === "Identifier"; + } + + return node.type === "MemberExpression" && + baseTypes.has(node.object.type) && + (!node.computed || (node.property.type !== "MemberExpression" && node.property.type !== "ChainExpression")); + } + + /** + * Adds a fixer or suggestion whether on the fix is safe. + * @param {{ messageId: string, node: ASTNode }} descriptor Report descriptor without fix or suggest + * @param {{ messageId: string, fix: Function }} suggestion Adds the fix or the whole suggestion as only element in "suggest" to suggestion + * @param {boolean} shouldBeFixed Fix iff the condition is true + * @returns {Object} Descriptor with either an added fix or suggestion + */ + function createConditionalFixer(descriptor, suggestion, shouldBeFixed) { + if (shouldBeFixed) { + return { + ...descriptor, + fix: suggestion.fix + }; + } + + return { + ...descriptor, + suggest: [suggestion] + }; + } + + + /** + * Returns the operator token for assignments and binary expressions + * @param {ASTNode} node AssignmentExpression or BinaryExpression + * @returns {import('eslint').AST.Token} Operator token between the left and right expression + */ + function getOperatorToken(node) { + return sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator); + } + + if (mode === "never") { + return { + + // foo ||= bar + "AssignmentExpression"(assignment) { + if (!astUtils.isLogicalAssignmentOperator(assignment.operator)) { + return; + } + + const descriptor = { + messageId: "unexpected", + node: assignment, + data: { operator: assignment.operator } + }; + const suggestion = { + messageId: "separate", + *fix(ruleFixer) { + if (sourceCode.getCommentsInside(assignment).length > 0) { + return; + } + + const operatorToken = getOperatorToken(assignment); + + // -> foo = bar + yield ruleFixer.replaceText(operatorToken, "="); + + const assignmentText = sourceCode.getText(assignment.left); + const operator = assignment.operator.slice(0, -1); + + // -> foo = foo || bar + yield ruleFixer.insertTextAfter(operatorToken, ` ${assignmentText} ${operator}`); + + const precedence = astUtils.getPrecedence(assignment.right) <= astUtils.getPrecedence({ type: "LogicalExpression", operator }); + + // ?? and || / && cannot be mixed but have same precedence + const mixed = assignment.operator === "??=" && astUtils.isLogicalExpression(assignment.right); + + if (!astUtils.isParenthesised(sourceCode, assignment.right) && (precedence || mixed)) { + + // -> foo = foo || (bar) + yield ruleFixer.insertTextBefore(assignment.right, "("); + yield ruleFixer.insertTextAfter(assignment.right, ")"); + } + } + }; + + context.report(createConditionalFixer(descriptor, suggestion, cannotBeGetter(assignment.left))); + } + }; + } + + return { + + // foo = foo || bar + "AssignmentExpression[operator='='][right.type='LogicalExpression']"(assignment) { + const leftOperand = getLeftmostOperand(sourceCode, assignment.right); + + if (!astUtils.isSameReference(assignment.left, leftOperand) + ) { + return; + } + + const descriptor = { + messageId: "assignment", + node: assignment, + data: { operator: `${assignment.right.operator}=` } + }; + const suggestion = { + messageId: "useLogicalOperator", + data: { operator: `${assignment.right.operator}=` }, + *fix(ruleFixer) { + if (sourceCode.getCommentsInside(assignment).length > 0) { + return; + } + + // No need for parenthesis around the assignment based on precedence as the precedence stays the same even with changed operator + const assignmentOperatorToken = getOperatorToken(assignment); + + // -> foo ||= foo || bar + yield ruleFixer.insertTextBefore(assignmentOperatorToken, assignment.right.operator); + + // -> foo ||= bar + const logicalOperatorToken = getOperatorToken(leftOperand.parent); + const firstRightOperandToken = sourceCode.getTokenAfter(logicalOperatorToken); + + yield ruleFixer.removeRange([leftOperand.parent.range[0], firstRightOperandToken.range[0]]); + } + }; + + context.report(createConditionalFixer(descriptor, suggestion, cannotBeGetter(assignment.left))); + }, + + // foo || (foo = bar) + 'LogicalExpression[right.type="AssignmentExpression"][right.operator="="]'(logical) { + + // Right side has to be parenthesized, otherwise would be parsed as (foo || foo) = bar which is illegal + if (isReference(logical.left) && astUtils.isSameReference(logical.left, logical.right.left)) { + const descriptor = { + messageId: "logical", + node: logical, + data: { operator: `${logical.operator}=` } + }; + const suggestion = { + messageId: "convertLogical", + data: { operator: `${logical.operator}=` }, + *fix(ruleFixer) { + if (sourceCode.getCommentsInside(logical).length > 0) { + return; + } + + const parentPrecedence = astUtils.getPrecedence(logical.parent); + const requiresOuterParenthesis = logical.parent.type !== "ExpressionStatement" && ( + parentPrecedence === -1 || + astUtils.getPrecedence({ type: "AssignmentExpression" }) < parentPrecedence + ); + + if (!astUtils.isParenthesised(sourceCode, logical) && requiresOuterParenthesis) { + yield ruleFixer.insertTextBefore(logical, "("); + yield ruleFixer.insertTextAfter(logical, ")"); + } + + // Also removes all opening parenthesis + yield ruleFixer.removeRange([logical.range[0], logical.right.range[0]]); // -> foo = bar) + + // Also removes all ending parenthesis + yield ruleFixer.removeRange([logical.right.range[1], logical.range[1]]); // -> foo = bar + + const operatorToken = getOperatorToken(logical.right); + + yield ruleFixer.insertTextBefore(operatorToken, logical.operator); // -> foo ||= bar + } + }; + const fix = cannotBeGetter(logical.left) || accessesSingleProperty(logical.left); + + context.report(createConditionalFixer(descriptor, suggestion, fix)); + } + }, + + // if (foo) foo = bar + "IfStatement[alternate=null]"(ifNode) { + if (!checkIf) { + return; + } + + const hasBody = ifNode.consequent.type === "BlockStatement"; + + if (hasBody && ifNode.consequent.body.length !== 1) { + return; + } + + const body = hasBody ? ifNode.consequent.body[0] : ifNode.consequent; + const scope = sourceCode.getScope(ifNode); + const existence = getExistence(ifNode.test, scope); + + if ( + body.type === "ExpressionStatement" && + body.expression.type === "AssignmentExpression" && + body.expression.operator === "=" && + existence !== null && + astUtils.isSameReference(existence.reference, body.expression.left) + ) { + const descriptor = { + messageId: "if", + node: ifNode, + data: { operator: `${existence.operator}=` } + }; + const suggestion = { + messageId: "convertIf", + data: { operator: `${existence.operator}=` }, + *fix(ruleFixer) { + if (sourceCode.getCommentsInside(ifNode).length > 0) { + return; + } + + const firstBodyToken = sourceCode.getFirstToken(body); + const prevToken = sourceCode.getTokenBefore(ifNode); + + if ( + prevToken !== null && + prevToken.value !== ";" && + prevToken.value !== "{" && + firstBodyToken.type !== "Identifier" && + firstBodyToken.type !== "Keyword" + ) { + + // Do not fix if the fixed statement could be part of the previous statement (eg. fn() if (a == null) (a) = b --> fn()(a) ??= b) + return; + } + + + const operatorToken = getOperatorToken(body.expression); + + yield ruleFixer.insertTextBefore(operatorToken, existence.operator); // -> if (foo) foo ||= bar + + yield ruleFixer.removeRange([ifNode.range[0], body.range[0]]); // -> foo ||= bar + + yield ruleFixer.removeRange([body.range[1], ifNode.range[1]]); // -> foo ||= bar, only present if "if" had a body + + const nextToken = sourceCode.getTokenAfter(body.expression); + + if (hasBody && (nextToken !== null && nextToken.value !== ";")) { + yield ruleFixer.insertTextAfter(ifNode, ";"); + } + } + }; + const shouldBeFixed = cannotBeGetter(existence.reference) || + (ifNode.test.type !== "LogicalExpression" && accessesSingleProperty(existence.reference)); + + context.report(createConditionalFixer(descriptor, suggestion, shouldBeFixed)); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/max-classes-per-file.js b/node_modules/eslint/lib/rules/max-classes-per-file.js index bb48a546e..241e06023 100644 --- a/node_modules/eslint/lib/rules/max-classes-per-file.js +++ b/node_modules/eslint/lib/rules/max-classes-per-file.js @@ -13,21 +13,38 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum number of classes per file", - category: "Best Practices", + description: "Enforce a maximum number of classes per file", recommended: false, - url: "https://eslint.org/docs/rules/max-classes-per-file" + url: "https://eslint.org/docs/latest/rules/max-classes-per-file" }, schema: [ { - type: "integer", - minimum: 1 + oneOf: [ + { + type: "integer", + minimum: 1 + }, + { + type: "object", + properties: { + ignoreExpressions: { + type: "boolean" + }, + max: { + type: "integer", + minimum: 1 + } + }, + additionalProperties: false + } + ] } ], @@ -36,8 +53,10 @@ module.exports = { } }, create(context) { - - const maxClasses = context.options[0] || 1; + const [option = {}] = context.options; + const [ignoreExpressions, max] = typeof option === "number" + ? [false, option || 1] + : [option.ignoreExpressions, option.max || 1]; let classCount = 0; @@ -46,19 +65,24 @@ module.exports = { classCount = 0; }, "Program:exit"(node) { - if (classCount > maxClasses) { + if (classCount > max) { context.report({ node, messageId: "maximumExceeded", data: { classCount, - max: maxClasses + max } }); } }, - "ClassDeclaration, ClassExpression"() { + "ClassDeclaration"() { classCount++; + }, + "ClassExpression"() { + if (!ignoreExpressions) { + classCount++; + } } }; } diff --git a/node_modules/eslint/lib/rules/max-depth.js b/node_modules/eslint/lib/rules/max-depth.js index 5c5296bec..7a8e9f94e 100644 --- a/node_modules/eslint/lib/rules/max-depth.js +++ b/node_modules/eslint/lib/rules/max-depth.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum depth that blocks can be nested", - category: "Stylistic Issues", + description: "Enforce a maximum depth that blocks can be nested", recommended: false, - url: "https://eslint.org/docs/rules/max-depth" + url: "https://eslint.org/docs/latest/rules/max-depth" }, schema: [ @@ -119,6 +119,7 @@ module.exports = { FunctionDeclaration: startFunction, FunctionExpression: startFunction, ArrowFunctionExpression: startFunction, + StaticBlock: startFunction, IfStatement(node) { if (node.parent.type !== "IfStatement") { @@ -147,6 +148,7 @@ module.exports = { "FunctionDeclaration:exit": endFunction, "FunctionExpression:exit": endFunction, "ArrowFunctionExpression:exit": endFunction, + "StaticBlock:exit": endFunction, "Program:exit": endFunction }; diff --git a/node_modules/eslint/lib/rules/max-len.js b/node_modules/eslint/lib/rules/max-len.js index dd76760c5..138a0f239 100644 --- a/node_modules/eslint/lib/rules/max-len.js +++ b/node_modules/eslint/lib/rules/max-len.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to check for max length on a line. * @author Matt DuVall + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -63,15 +64,17 @@ const OPTIONS_OR_INTEGER_SCHEMA = { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce a maximum line length", - category: "Stylistic Issues", + description: "Enforce a maximum line length", recommended: false, - url: "https://eslint.org/docs/rules/max-len" + url: "https://eslint.org/docs/latest/rules/max-len" }, schema: [ @@ -97,7 +100,7 @@ module.exports = { */ const URL_REGEXP = /[^:/?#]:\/\/[^?#]/u; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Computes the length of a line that may contain tabs. The width of each @@ -215,7 +218,7 @@ module.exports = { * Ensure that an array exists at [key] on `object`, and add `value` to it. * @param {Object} object the object to mutate * @param {string} key the object's key - * @param {*} value the value to add + * @param {any} value the value to add * @returns {void} * @private */ @@ -252,19 +255,23 @@ module.exports = { return sourceCode.ast.tokens.filter(token => token.type === "RegularExpression"); } - /** - * A reducer to group an AST node by line number, both start and end. - * @param {Object} acc the accumulator - * @param {ASTNode} node the AST node in question - * @returns {Object} the modified accumulator - * @private + * + * reduce an array of AST nodes by line number, both start and end. + * @param {ASTNode[]} arr array of AST nodes + * @returns {Object} accululated AST nodes */ - function groupByLineNumber(acc, node) { - for (let i = node.loc.start.line; i <= node.loc.end.line; ++i) { - ensureArrayAndPush(acc, i, node); + function groupArrayByLineNumber(arr) { + const obj = {}; + + for (let i = 0; i < arr.length; i++) { + const node = arr[i]; + + for (let j = node.loc.start.line; j <= node.loc.end.line; ++j) { + ensureArrayAndPush(obj, j, node); + } } - return acc; + return obj; } /** @@ -312,13 +319,13 @@ module.exports = { let commentsIndex = 0; const strings = getAllStrings(); - const stringsByLine = strings.reduce(groupByLineNumber, {}); + const stringsByLine = groupArrayByLineNumber(strings); const templateLiterals = getAllTemplateLiterals(); - const templateLiteralsByLine = templateLiterals.reduce(groupByLineNumber, {}); + const templateLiteralsByLine = groupArrayByLineNumber(templateLiterals); const regExpLiterals = getAllRegExpLiterals(); - const regExpLiteralsByLine = regExpLiterals.reduce(groupByLineNumber, {}); + const regExpLiteralsByLine = groupArrayByLineNumber(regExpLiterals); lines.forEach((line, i) => { diff --git a/node_modules/eslint/lib/rules/max-lines-per-function.js b/node_modules/eslint/lib/rules/max-lines-per-function.js index de70cecb4..f981922a7 100644 --- a/node_modules/eslint/lib/rules/max-lines-per-function.js +++ b/node_modules/eslint/lib/rules/max-lines-per-function.js @@ -9,8 +9,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); - -const lodash = require("lodash"); +const { upperCaseFirst } = require("../shared/string-utils"); //------------------------------------------------------------------------------ // Constants @@ -49,7 +48,7 @@ const OPTIONS_OR_INTEGER_SCHEMA = { /** * Given a list of comment nodes, return a map with numeric keys (source code line numbers) and comment token values. * @param {Array} comments An array of comment nodes. - * @returns {Map.} A map with numeric keys (source code line numbers) and comment token values. + * @returns {Map} A map with numeric keys (source code line numbers) and comment token values. */ function getCommentLineNumbers(comments) { const map = new Map(); @@ -66,15 +65,15 @@ function getCommentLineNumbers(comments) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum number of lines of code in a function", - category: "Stylistic Issues", + description: "Enforce a maximum number of lines of code in a function", recommended: false, - url: "https://eslint.org/docs/rules/max-lines-per-function" + url: "https://eslint.org/docs/latest/rules/max-lines-per-function" }, schema: [ @@ -86,7 +85,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const lines = sourceCode.lines; const option = context.options[0]; @@ -191,7 +190,7 @@ module.exports = { } if (lineCount > maxLines) { - const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(funcNode)); + const name = upperCaseFirst(astUtils.getFunctionNameWithKind(funcNode)); context.report({ node, diff --git a/node_modules/eslint/lib/rules/max-lines.js b/node_modules/eslint/lib/rules/max-lines.js index ceb014aff..e85d44290 100644 --- a/node_modules/eslint/lib/rules/max-lines.js +++ b/node_modules/eslint/lib/rules/max-lines.js @@ -8,22 +8,35 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Creates an array of numbers from `start` up to, but not including, `end` + * @param {number} start The start of the range + * @param {number} end The end of the range + * @returns {number[]} The range of numbers + */ +function range(start, end) { + return [...Array(end - start).keys()].map(x => x + start); +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum number of lines per file", - category: "Stylistic Issues", + description: "Enforce a maximum number of lines per file", recommended: false, - url: "https://eslint.org/docs/rules/max-lines" + url: "https://eslint.org/docs/latest/rules/max-lines" }, schema: [ @@ -74,7 +87,7 @@ module.exports = { const skipComments = option && option.skipComments; const skipBlankLines = option && option.skipBlankLines; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Returns whether or not a token is a comment node type @@ -119,7 +132,7 @@ module.exports = { } if (start <= end) { - return lodash.range(start, end + 1); + return range(start, end + 1); } return []; } @@ -135,7 +148,7 @@ module.exports = { * If file ends with a linebreak, `sourceCode.lines` will have one extra empty line at the end. * That isn't a real line, so we shouldn't count it. */ - if (lines.length > 1 && lodash.last(lines).text === "") { + if (lines.length > 1 && lines[lines.length - 1].text === "") { lines.pop(); } @@ -146,12 +159,10 @@ module.exports = { if (skipComments) { const comments = sourceCode.getAllComments(); - const commentLines = lodash.flatten( - comments.map(comment => getLinesWithoutCode(comment)) - ); + const commentLines = new Set(comments.flatMap(getLinesWithoutCode)); lines = lines.filter( - l => !commentLines.includes(l.lineNumber) + l => !commentLines.has(l.lineNumber) ); } @@ -163,7 +174,7 @@ module.exports = { }, end: { line: sourceCode.lines.length, - column: lodash.last(sourceCode.lines).length + column: sourceCode.lines[sourceCode.lines.length - 1].length } }; diff --git a/node_modules/eslint/lib/rules/max-nested-callbacks.js b/node_modules/eslint/lib/rules/max-nested-callbacks.js index df1baceeb..d8f380b3c 100644 --- a/node_modules/eslint/lib/rules/max-nested-callbacks.js +++ b/node_modules/eslint/lib/rules/max-nested-callbacks.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum depth that callbacks can be nested", - category: "Stylistic Issues", + description: "Enforce a maximum depth that callbacks can be nested", recommended: false, - url: "https://eslint.org/docs/rules/max-nested-callbacks" + url: "https://eslint.org/docs/latest/rules/max-nested-callbacks" }, schema: [ diff --git a/node_modules/eslint/lib/rules/max-params.js b/node_modules/eslint/lib/rules/max-params.js index 4eebe2d95..213477a15 100644 --- a/node_modules/eslint/lib/rules/max-params.js +++ b/node_modules/eslint/lib/rules/max-params.js @@ -9,23 +9,22 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); - const astUtils = require("./utils/ast-utils"); +const { upperCaseFirst } = require("../shared/string-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum number of parameters in function definitions", - category: "Stylistic Issues", + description: "Enforce a maximum number of parameters in function definitions", recommended: false, - url: "https://eslint.org/docs/rules/max-params" + url: "https://eslint.org/docs/latest/rules/max-params" }, schema: [ @@ -58,7 +57,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const option = context.options[0]; let numParams = 3; @@ -85,7 +84,7 @@ module.exports = { node, messageId: "exceed", data: { - name: lodash.upperFirst(astUtils.getFunctionNameWithKind(node)), + name: upperCaseFirst(astUtils.getFunctionNameWithKind(node)), count: node.params.length, max: numParams } diff --git a/node_modules/eslint/lib/rules/max-statements-per-line.js b/node_modules/eslint/lib/rules/max-statements-per-line.js index 5407cff3c..4ad73a67f 100644 --- a/node_modules/eslint/lib/rules/max-statements-per-line.js +++ b/node_modules/eslint/lib/rules/max-statements-per-line.js @@ -1,6 +1,7 @@ /** * @fileoverview Specify the maximum number of statements allowed per line. * @author Kenneth Williams + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce a maximum number of statements allowed per line", - category: "Stylistic Issues", + description: "Enforce a maximum number of statements allowed per line", recommended: false, - url: "https://eslint.org/docs/rules/max-statements-per-line" + url: "https://eslint.org/docs/latest/rules/max-statements-per-line" }, schema: [ @@ -45,7 +48,7 @@ module.exports = { create(context) { - const sourceCode = context.getSourceCode(), + const sourceCode = context.sourceCode, options = context.options[0] || {}, maxStatementsPerLine = typeof options.max !== "undefined" ? options.max : 1; diff --git a/node_modules/eslint/lib/rules/max-statements.js b/node_modules/eslint/lib/rules/max-statements.js index 437b393a5..78053831f 100644 --- a/node_modules/eslint/lib/rules/max-statements.js +++ b/node_modules/eslint/lib/rules/max-statements.js @@ -9,23 +9,22 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); - const astUtils = require("./utils/ast-utils"); +const { upperCaseFirst } = require("../shared/string-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a maximum number of statements allowed in function blocks", - category: "Stylistic Issues", + description: "Enforce a maximum number of statements allowed in function blocks", recommended: false, - url: "https://eslint.org/docs/rules/max-statements" + url: "https://eslint.org/docs/latest/rules/max-statements" }, schema: [ @@ -97,7 +96,7 @@ module.exports = { */ function reportIfTooManyStatements(node, count, max) { if (count > max) { - const name = lodash.upperFirst(astUtils.getFunctionNameWithKind(node)); + const name = upperCaseFirst(astUtils.getFunctionNameWithKind(node)); context.report({ node, @@ -125,6 +124,14 @@ module.exports = { function endFunction(node) { const count = functionStack.pop(); + /* + * This rule does not apply to class static blocks, but we have to track them so + * that statements in them do not count as statements in the enclosing function. + */ + if (node.type === "StaticBlock") { + return; + } + if (ignoreTopLevelFunctions && functionStack.length === 0) { topLevelFunctions.push({ node, count }); } else { @@ -150,12 +157,14 @@ module.exports = { FunctionDeclaration: startFunction, FunctionExpression: startFunction, ArrowFunctionExpression: startFunction, + StaticBlock: startFunction, BlockStatement: countStatements, "FunctionDeclaration:exit": endFunction, "FunctionExpression:exit": endFunction, "ArrowFunctionExpression:exit": endFunction, + "StaticBlock:exit": endFunction, "Program:exit"() { if (topLevelFunctions.length === 1) { diff --git a/node_modules/eslint/lib/rules/multiline-comment-style.js b/node_modules/eslint/lib/rules/multiline-comment-style.js index 9524818b8..6da986201 100644 --- a/node_modules/eslint/lib/rules/multiline-comment-style.js +++ b/node_modules/eslint/lib/rules/multiline-comment-style.js @@ -10,19 +10,49 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce a particular style for multiline comments", - category: "Stylistic Issues", + description: "Enforce a particular style for multiline comments", recommended: false, - url: "https://eslint.org/docs/rules/multiline-comment-style" + url: "https://eslint.org/docs/latest/rules/multiline-comment-style" }, fixable: "whitespace", - schema: [{ enum: ["starred-block", "separate-lines", "bare-block"] }], + schema: { + anyOf: [ + { + type: "array", + items: [ + { + enum: ["starred-block", "bare-block"] + } + ], + additionalItems: false + }, + { + type: "array", + items: [ + { + enum: ["separate-lines"] + }, + { + type: "object", + properties: { + checkJSDoc: { + type: "boolean" + } + }, + additionalProperties: false + } + ], + additionalItems: false + } + ] + }, messages: { expectedBlock: "Expected a block comment instead of consecutive line comments.", expectedBareBlock: "Expected a block comment without padding stars.", @@ -35,8 +65,10 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const option = context.options[0] || "starred-block"; + const params = context.options[1] || {}; + const checkJSDoc = !!params.checkJSDoc; //---------------------------------------------------------------------- // Helpers @@ -333,11 +365,18 @@ module.exports = { "separate-lines"(commentGroup) { const [firstComment] = commentGroup; - if (firstComment.type !== "Block" || isJSDocComment(commentGroup)) { + const isJSDoc = isJSDocComment(commentGroup); + + if (firstComment.type !== "Block" || (!checkJSDoc && isJSDoc)) { return; } - const commentLines = getCommentLines(commentGroup); + let commentLines = getCommentLines(commentGroup); + + if (isJSDoc) { + commentLines = commentLines.slice(1, commentLines.length - 1); + } + const tokenAfter = sourceCode.getTokenAfter(firstComment, { includeComments: true }); if (tokenAfter && firstComment.loc.end.line === tokenAfter.loc.start.line) { diff --git a/node_modules/eslint/lib/rules/multiline-ternary.js b/node_modules/eslint/lib/rules/multiline-ternary.js index 98360b9ca..8155dd7a5 100644 --- a/node_modules/eslint/lib/rules/multiline-ternary.js +++ b/node_modules/eslint/lib/rules/multiline-ternary.js @@ -1,6 +1,7 @@ /** * @fileoverview Enforce newlines between operands of ternary expressions * @author Kai Cataldo + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce newlines between operands of ternary expressions", - category: "Stylistic Issues", + description: "Enforce newlines between operands of ternary expressions", recommended: false, - url: "https://eslint.org/docs/rules/multiline-ternary" + url: "https://eslint.org/docs/latest/rules/multiline-ternary" }, schema: [ @@ -39,7 +42,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const option = context.options[0]; const multiline = option !== "never"; const allowSingleLine = option === "always-multiline"; @@ -73,7 +76,7 @@ module.exports = { end: lastTokenOfTest.loc.end }, messageId: "unexpectedTestCons", - fix: fixer => { + fix(fixer) { if (hasComments) { return null; } @@ -101,7 +104,7 @@ module.exports = { end: lastTokenOfConsequent.loc.end }, messageId: "unexpectedConsAlt", - fix: fixer => { + fix(fixer) { if (hasComments) { return null; } diff --git a/node_modules/eslint/lib/rules/new-cap.js b/node_modules/eslint/lib/rules/new-cap.js index 4249a5428..f81e42fd0 100644 --- a/node_modules/eslint/lib/rules/new-cap.js +++ b/node_modules/eslint/lib/rules/new-cap.js @@ -33,15 +33,16 @@ const CAPS_ALLOWED = [ * Ensure that if the key is provided, it must be an array. * @param {Object} obj Object to check with `key`. * @param {string} key Object key to check on `obj`. - * @param {*} fallback If obj[key] is not present, this will be returned. + * @param {any} fallback If obj[key] is not present, this will be returned. + * @throws {TypeError} If key is not an own array type property of `obj`. * @returns {string[]} Returns obj[key] if it's an Array, otherwise `fallback` */ function checkArray(obj, key, fallback) { - /* istanbul ignore if */ + /* c8 ignore start */ if (Object.prototype.hasOwnProperty.call(obj, key) && !Array.isArray(obj[key])) { throw new TypeError(`${key}, if provided, must be an Array`); - } + }/* c8 ignore stop */ return obj[key] || fallback; } @@ -75,15 +76,15 @@ function calculateCapIsNewExceptions(config) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require constructor names to begin with a capital letter", - category: "Stylistic Issues", + description: "Require constructor names to begin with a capital letter", recommended: false, - url: "https://eslint.org/docs/rules/new-cap" + url: "https://eslint.org/docs/latest/rules/new-cap" }, schema: [ @@ -146,7 +147,7 @@ module.exports = { const listeners = {}; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers diff --git a/node_modules/eslint/lib/rules/new-parens.js b/node_modules/eslint/lib/rules/new-parens.js index 405ec1b51..1c5d21d4a 100644 --- a/node_modules/eslint/lib/rules/new-parens.js +++ b/node_modules/eslint/lib/rules/new-parens.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag when using constructor without parentheses * @author Ilya Volodin + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -19,32 +20,25 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce or disallow parentheses when invoking a constructor with no arguments", - category: "Stylistic Issues", + description: "Enforce or disallow parentheses when invoking a constructor with no arguments", recommended: false, - url: "https://eslint.org/docs/rules/new-parens" + url: "https://eslint.org/docs/latest/rules/new-parens" }, fixable: "code", - schema: { - anyOf: [ - { - type: "array", - items: [ - { - enum: ["always", "never"] - } - ], - minItems: 0, - maxItems: 1 - } - ] - }, + schema: [ + { + enum: ["always", "never"] + } + ], messages: { missing: "Missing '()' invoking a constructor.", unnecessary: "Unnecessary '()' invoking a constructor with no arguments." @@ -55,7 +49,7 @@ module.exports = { const options = context.options; const always = options[0] !== "never"; // Default is always - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { NewExpression(node) { diff --git a/node_modules/eslint/lib/rules/newline-after-var.js b/node_modules/eslint/lib/rules/newline-after-var.js index 4809d9bfc..dc8b24d47 100644 --- a/node_modules/eslint/lib/rules/newline-after-var.js +++ b/node_modules/eslint/lib/rules/newline-after-var.js @@ -1,7 +1,7 @@ /** * @fileoverview Rule to check empty newline after "var" statement * @author Gopal Venkatesan - * @deprecated + * @deprecated in ESLint v4.0.0 */ "use strict"; @@ -16,15 +16,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "require or disallow an empty line after variable declarations", - category: "Stylistic Issues", + description: "Require or disallow an empty line after variable declarations", recommended: false, - url: "https://eslint.org/docs/rules/newline-after-var" + url: "https://eslint.org/docs/latest/rules/newline-after-var" }, schema: [ { @@ -43,7 +43,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; // Default `mode` to "always". const mode = context.options[0] === "never" ? "never" : "always"; @@ -145,9 +145,9 @@ module.exports = { /** * Determine if a token starts more than one line after a comment ends - * @param {token} token The token being checked - * @param {integer} commentStartLine The line number on which the comment starts - * @returns {boolean} True if `token` does not start immediately after a comment + * @param {token} token The token being checked + * @param {integer} commentStartLine The line number on which the comment starts + * @returns {boolean} True if `token` does not start immediately after a comment */ function hasBlankLineAfterComment(token, commentStartLine) { return token.loc.start.line > getLastCommentLineOfBlock(commentStartLine) + 1; @@ -212,7 +212,6 @@ module.exports = { context.report({ node, messageId: "unexpected", - data: { identifier: node.name }, fix(fixer) { const linesBetween = sourceCode.getText().slice(lastToken.range[1], nextToken.range[0]).split(astUtils.LINEBREAK_MATCHER); @@ -231,7 +230,6 @@ module.exports = { context.report({ node, messageId: "expected", - data: { identifier: node.name }, fix(fixer) { if ((noNextLineToken ? getLastCommentLineOfBlock(nextLineNum) : lastToken.loc.end.line) === nextToken.loc.start.line) { return fixer.insertTextBefore(nextToken, "\n\n"); diff --git a/node_modules/eslint/lib/rules/newline-before-return.js b/node_modules/eslint/lib/rules/newline-before-return.js index 65ca32321..73d8ef99f 100644 --- a/node_modules/eslint/lib/rules/newline-before-return.js +++ b/node_modules/eslint/lib/rules/newline-before-return.js @@ -1,7 +1,7 @@ /** * @fileoverview Rule to require newlines before `return` statement * @author Kai Cataldo - * @deprecated + * @deprecated in ESLint v4.0.0 */ "use strict"; @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "require an empty line before `return` statements", - category: "Stylistic Issues", + description: "Require an empty line before `return` statements", recommended: false, - url: "https://eslint.org/docs/rules/newline-before-return" + url: "https://eslint.org/docs/latest/rules/newline-before-return" }, fixable: "whitespace", @@ -31,7 +31,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -47,7 +47,7 @@ module.exports = { function isPrecededByTokens(node, testTokens) { const tokenBefore = sourceCode.getTokenBefore(node); - return testTokens.some(token => tokenBefore.value === token); + return testTokens.includes(tokenBefore.value); } /** diff --git a/node_modules/eslint/lib/rules/newline-per-chained-call.js b/node_modules/eslint/lib/rules/newline-per-chained-call.js index 46c9d6c10..3124ac2d1 100644 --- a/node_modules/eslint/lib/rules/newline-per-chained-call.js +++ b/node_modules/eslint/lib/rules/newline-per-chained-call.js @@ -2,6 +2,7 @@ * @fileoverview Rule to ensure newline per method call when chaining calls * @author Rajendra Patil * @author Burak Yigit Kaya + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -12,15 +13,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require a newline after each call in a method chain", - category: "Stylistic Issues", + description: "Require a newline after each call in a method chain", recommended: false, - url: "https://eslint.org/docs/rules/newline-per-chained-call" + url: "https://eslint.org/docs/latest/rules/newline-per-chained-call" }, fixable: "whitespace", @@ -47,13 +50,13 @@ module.exports = { const options = context.options[0] || {}, ignoreChainWithDepth = options.ignoreChainWithDepth || 2; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Get the prefix of a given MemberExpression node. * If the MemberExpression node is a computed value it returns a * left bracket. If not it returns a period. - * @param {ASTNode} node A MemberExpression node to get + * @param {ASTNode} node A MemberExpression node to get * @returns {string} The prefix of the node. */ function getPrefix(node) { diff --git a/node_modules/eslint/lib/rules/no-alert.js b/node_modules/eslint/lib/rules/no-alert.js index 702b4d2ba..cc8728565 100644 --- a/node_modules/eslint/lib/rules/no-alert.js +++ b/node_modules/eslint/lib/rules/no-alert.js @@ -82,15 +82,15 @@ function isGlobalThisReferenceOrGlobalWindow(scope, node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `alert`, `confirm`, and `prompt`", - category: "Best Practices", + description: "Disallow the use of `alert`, `confirm`, and `prompt`", recommended: false, - url: "https://eslint.org/docs/rules/no-alert" + url: "https://eslint.org/docs/latest/rules/no-alert" }, schema: [], @@ -101,10 +101,12 @@ module.exports = { }, create(context) { + const sourceCode = context.sourceCode; + return { CallExpression(node) { const callee = skipChainExpression(node.callee), - currentScope = context.getScope(); + currentScope = sourceCode.getScope(node); // without window. if (callee.type === "Identifier") { diff --git a/node_modules/eslint/lib/rules/no-array-constructor.js b/node_modules/eslint/lib/rules/no-array-constructor.js index 90c6d6bbd..f56b68766 100644 --- a/node_modules/eslint/lib/rules/no-array-constructor.js +++ b/node_modules/eslint/lib/rules/no-array-constructor.js @@ -5,30 +5,72 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { + getVariableByName, + isClosingParenToken, + isOpeningParenToken, + isStartOfExpressionStatement, + needsPrecedingSemicolon +} = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `Array` constructors", - category: "Stylistic Issues", + description: "Disallow `Array` constructors", recommended: false, - url: "https://eslint.org/docs/rules/no-array-constructor" + url: "https://eslint.org/docs/latest/rules/no-array-constructor" }, + hasSuggestions: true, + schema: [], messages: { - preferLiteral: "The array literal notation [] is preferable." + preferLiteral: "The array literal notation [] is preferable.", + useLiteral: "Replace with an array literal.", + useLiteralAfterSemicolon: "Replace with an array literal, add preceding semicolon." } }, create(context) { + const sourceCode = context.sourceCode; + + /** + * Gets the text between the calling parentheses of a CallExpression or NewExpression. + * @param {ASTNode} node A CallExpression or NewExpression node. + * @returns {string} The text between the calling parentheses, or an empty string if there are none. + */ + function getArgumentsText(node) { + const lastToken = sourceCode.getLastToken(node); + + if (!isClosingParenToken(lastToken)) { + return ""; + } + + let firstToken = node.callee; + + do { + firstToken = sourceCode.getTokenAfter(firstToken); + if (!firstToken || firstToken === lastToken) { + return ""; + } + } while (!isOpeningParenToken(firstToken)); + + return sourceCode.text.slice(firstToken.range[1], lastToken.range[0]); + } + /** * Disallow construction of dense arrays using the Array constructor * @param {ASTNode} node node to evaluate @@ -37,11 +79,48 @@ module.exports = { */ function check(node) { if ( - node.arguments.length !== 1 && - node.callee.type === "Identifier" && - node.callee.name === "Array" - ) { - context.report({ node, messageId: "preferLiteral" }); + node.callee.type !== "Identifier" || + node.callee.name !== "Array" || + node.arguments.length === 1 && + node.arguments[0].type !== "SpreadElement") { + return; + } + + const variable = getVariableByName(sourceCode.getScope(node), "Array"); + + /* + * Check if `Array` is a predefined global variable: predefined globals have no declarations, + * meaning that the `identifiers` list of the variable object is empty. + */ + if (variable && variable.identifiers.length === 0) { + const argsText = getArgumentsText(node); + let fixText; + let messageId; + + /* + * Check if the suggested change should include a preceding semicolon or not. + * Due to JavaScript's ASI rules, a missing semicolon may be inserted automatically + * before an expression like `Array()` or `new Array()`, but not when the expression + * is changed into an array literal like `[]`. + */ + if (isStartOfExpressionStatement(node) && needsPrecedingSemicolon(sourceCode, node)) { + fixText = `;[${argsText}]`; + messageId = "useLiteralAfterSemicolon"; + } else { + fixText = `[${argsText}]`; + messageId = "useLiteral"; + } + + context.report({ + node, + messageId: "preferLiteral", + suggest: [ + { + messageId, + fix: fixer => fixer.replaceText(node, fixText) + } + ] + }); } } diff --git a/node_modules/eslint/lib/rules/no-async-promise-executor.js b/node_modules/eslint/lib/rules/no-async-promise-executor.js index 553311e58..ea6c85114 100644 --- a/node_modules/eslint/lib/rules/no-async-promise-executor.js +++ b/node_modules/eslint/lib/rules/no-async-promise-executor.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow using an async function as a Promise executor", - category: "Possible Errors", + description: "Disallow using an async function as a Promise executor", recommended: true, - url: "https://eslint.org/docs/rules/no-async-promise-executor" + url: "https://eslint.org/docs/latest/rules/no-async-promise-executor" }, fixable: null, @@ -30,7 +30,7 @@ module.exports = { return { "NewExpression[callee.name='Promise'][arguments.0.async=true]"(node) { context.report({ - node: context.getSourceCode().getFirstToken(node.arguments[0], token => token.value === "async"), + node: context.sourceCode.getFirstToken(node.arguments[0], token => token.value === "async"), messageId: "async" }); } diff --git a/node_modules/eslint/lib/rules/no-await-in-loop.js b/node_modules/eslint/lib/rules/no-await-in-loop.js index 9ca89866a..20230defa 100644 --- a/node_modules/eslint/lib/rules/no-await-in-loop.js +++ b/node_modules/eslint/lib/rules/no-await-in-loop.js @@ -53,15 +53,15 @@ function isLooped(node, parent) { } } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow `await` inside of loops", - category: "Possible Errors", + description: "Disallow `await` inside of loops", recommended: false, - url: "https://eslint.org/docs/rules/no-await-in-loop" + url: "https://eslint.org/docs/latest/rules/no-await-in-loop" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-bitwise.js b/node_modules/eslint/lib/rules/no-bitwise.js index a9c3360a7..d90992b20 100644 --- a/node_modules/eslint/lib/rules/no-bitwise.js +++ b/node_modules/eslint/lib/rules/no-bitwise.js @@ -20,15 +20,15 @@ const BITWISE_OPERATORS = [ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow bitwise operators", - category: "Stylistic Issues", + description: "Disallow bitwise operators", recommended: false, - url: "https://eslint.org/docs/rules/no-bitwise" + url: "https://eslint.org/docs/latest/rules/no-bitwise" }, schema: [ @@ -63,7 +63,7 @@ module.exports = { /** * Reports an unexpected use of a bitwise operator. - * @param {ASTNode} node Node which contains the bitwise operator. + * @param {ASTNode} node Node which contains the bitwise operator. * @returns {void} */ function report(node) { @@ -72,25 +72,25 @@ module.exports = { /** * Checks if the given node has a bitwise operator. - * @param {ASTNode} node The node to check. + * @param {ASTNode} node The node to check. * @returns {boolean} Whether or not the node has a bitwise operator. */ function hasBitwiseOperator(node) { - return BITWISE_OPERATORS.indexOf(node.operator) !== -1; + return BITWISE_OPERATORS.includes(node.operator); } /** * Checks if exceptions were provided, e.g. `{ allow: ['~', '|'] }`. - * @param {ASTNode} node The node to check. + * @param {ASTNode} node The node to check. * @returns {boolean} Whether or not the node has a bitwise operator. */ function allowedOperator(node) { - return allowed.indexOf(node.operator) !== -1; + return allowed.includes(node.operator); } /** * Checks if the given bitwise operator is used for integer typecasting, i.e. "|0" - * @param {ASTNode} node The node to check. + * @param {ASTNode} node The node to check. * @returns {boolean} whether the node is used in integer typecasting. */ function isInt32Hint(node) { @@ -100,7 +100,7 @@ module.exports = { /** * Report if the given node contains a bitwise operator. - * @param {ASTNode} node The node to check. + * @param {ASTNode} node The node to check. * @returns {void} */ function checkNodeForBitwiseOperator(node) { diff --git a/node_modules/eslint/lib/rules/no-buffer-constructor.js b/node_modules/eslint/lib/rules/no-buffer-constructor.js index 152dda0ce..0b73c7674 100644 --- a/node_modules/eslint/lib/rules/no-buffer-constructor.js +++ b/node_modules/eslint/lib/rules/no-buffer-constructor.js @@ -1,6 +1,7 @@ /** * @fileoverview disallow use of the Buffer() constructor * @author Teddy Katz + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -8,6 +9,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -17,10 +19,9 @@ module.exports = { type: "problem", docs: { - description: "disallow use of the `Buffer()` constructor", - category: "Node.js and CommonJS", + description: "Disallow use of the `Buffer()` constructor", recommended: false, - url: "https://eslint.org/docs/rules/no-buffer-constructor" + url: "https://eslint.org/docs/latest/rules/no-buffer-constructor" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-caller.js b/node_modules/eslint/lib/rules/no-caller.js index 5fe1bd449..3e61a8e1c 100644 --- a/node_modules/eslint/lib/rules/no-caller.js +++ b/node_modules/eslint/lib/rules/no-caller.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `arguments.caller` or `arguments.callee`", - category: "Best Practices", + description: "Disallow the use of `arguments.caller` or `arguments.callee`", recommended: false, - url: "https://eslint.org/docs/rules/no-caller" + url: "https://eslint.org/docs/latest/rules/no-caller" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-case-declarations.js b/node_modules/eslint/lib/rules/no-case-declarations.js index 1d54e2216..8dc5b021d 100644 --- a/node_modules/eslint/lib/rules/no-case-declarations.js +++ b/node_modules/eslint/lib/rules/no-case-declarations.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow lexical declarations in case clauses", - category: "Best Practices", + description: "Disallow lexical declarations in case clauses", recommended: true, - url: "https://eslint.org/docs/rules/no-case-declarations" + url: "https://eslint.org/docs/latest/rules/no-case-declarations" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-catch-shadow.js b/node_modules/eslint/lib/rules/no-catch-shadow.js index 4917af84e..f9d855243 100644 --- a/node_modules/eslint/lib/rules/no-catch-shadow.js +++ b/node_modules/eslint/lib/rules/no-catch-shadow.js @@ -16,15 +16,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `catch` clause parameters from shadowing variables in the outer scope", - category: "Variables", + description: "Disallow `catch` clause parameters from shadowing variables in the outer scope", recommended: false, - url: "https://eslint.org/docs/rules/no-catch-shadow" + url: "https://eslint.org/docs/latest/rules/no-catch-shadow" }, replacedBy: ["no-shadow"], @@ -39,6 +39,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -60,7 +62,7 @@ module.exports = { return { "CatchClause[param!=null]"(node) { - let scope = context.getScope(); + let scope = sourceCode.getScope(node); /* * When ecmaVersion >= 6, CatchClause creates its own scope diff --git a/node_modules/eslint/lib/rules/no-class-assign.js b/node_modules/eslint/lib/rules/no-class-assign.js index 887058ba0..49f3b844e 100644 --- a/node_modules/eslint/lib/rules/no-class-assign.js +++ b/node_modules/eslint/lib/rules/no-class-assign.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow reassigning class members", - category: "ECMAScript 6", + description: "Disallow reassigning class members", recommended: true, - url: "https://eslint.org/docs/rules/no-class-assign" + url: "https://eslint.org/docs/latest/rules/no-class-assign" }, schema: [], @@ -31,6 +31,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Finds and reports references that are non initializer and writable. * @param {Variable} variable A variable to check. @@ -49,7 +51,7 @@ module.exports = { * @returns {void} */ function checkForClass(node) { - context.getDeclaredVariables(node).forEach(checkVariable); + sourceCode.getDeclaredVariables(node).forEach(checkVariable); } return { diff --git a/node_modules/eslint/lib/rules/no-compare-neg-zero.js b/node_modules/eslint/lib/rules/no-compare-neg-zero.js index 0c6865ad5..112f6c1d1 100644 --- a/node_modules/eslint/lib/rules/no-compare-neg-zero.js +++ b/node_modules/eslint/lib/rules/no-compare-neg-zero.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow comparing against -0", - category: "Possible Errors", + description: "Disallow comparing against -0", recommended: true, - url: "https://eslint.org/docs/rules/no-compare-neg-zero" + url: "https://eslint.org/docs/latest/rules/no-compare-neg-zero" }, fixable: null, diff --git a/node_modules/eslint/lib/rules/no-cond-assign.js b/node_modules/eslint/lib/rules/no-cond-assign.js index 3843a7ac2..952920215 100644 --- a/node_modules/eslint/lib/rules/no-cond-assign.js +++ b/node_modules/eslint/lib/rules/no-cond-assign.js @@ -28,15 +28,15 @@ const NODE_DESCRIPTIONS = { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow assignment operators in conditional expressions", - category: "Possible Errors", + description: "Disallow assignment operators in conditional expressions", recommended: true, - url: "https://eslint.org/docs/rules/no-cond-assign" + url: "https://eslint.org/docs/latest/rules/no-cond-assign" }, schema: [ @@ -57,7 +57,7 @@ module.exports = { const prohibitAssign = (context.options[0] || "except-parens"); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Check whether an AST node is the test expression for a conditional statement. diff --git a/node_modules/eslint/lib/rules/no-confusing-arrow.js b/node_modules/eslint/lib/rules/no-confusing-arrow.js index 9009b64fa..6fef1870e 100644 --- a/node_modules/eslint/lib/rules/no-confusing-arrow.js +++ b/node_modules/eslint/lib/rules/no-confusing-arrow.js @@ -2,6 +2,7 @@ * @fileoverview A rule to warn against using arrow functions when they could be * confused with comparisons * @author Jxck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -25,15 +26,17 @@ function isConditional(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "disallow arrow functions where they could be confused with comparisons", - category: "ECMAScript 6", + description: "Disallow arrow functions where they could be confused with comparisons", recommended: false, - url: "https://eslint.org/docs/rules/no-confusing-arrow" + url: "https://eslint.org/docs/latest/rules/no-confusing-arrow" }, fixable: "code", @@ -41,7 +44,8 @@ module.exports = { schema: [{ type: "object", properties: { - allowParens: { type: "boolean", default: true } + allowParens: { type: "boolean", default: true }, + onlyOneSimpleParam: { type: "boolean", default: false } }, additionalProperties: false }], @@ -54,7 +58,8 @@ module.exports = { create(context) { const config = context.options[0] || {}; const allowParens = config.allowParens || (config.allowParens === void 0); - const sourceCode = context.getSourceCode(); + const onlyOneSimpleParam = config.onlyOneSimpleParam; + const sourceCode = context.sourceCode; /** @@ -65,7 +70,9 @@ module.exports = { function checkArrowFunc(node) { const body = node.body; - if (isConditional(body) && !(allowParens && astUtils.isParenthesised(sourceCode, body))) { + if (isConditional(body) && + !(allowParens && astUtils.isParenthesised(sourceCode, body)) && + !(onlyOneSimpleParam && !(node.params.length === 1 && node.params[0].type === "Identifier"))) { context.report({ node, messageId: "confusing", diff --git a/node_modules/eslint/lib/rules/no-console.js b/node_modules/eslint/lib/rules/no-console.js index 56dbbc3a9..d20477c5d 100644 --- a/node_modules/eslint/lib/rules/no-console.js +++ b/node_modules/eslint/lib/rules/no-console.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `console`", - category: "Possible Errors", + description: "Disallow the use of `console`", recommended: false, - url: "https://eslint.org/docs/rules/no-console" + url: "https://eslint.org/docs/latest/rules/no-console" }, schema: [ @@ -43,14 +43,18 @@ module.exports = { } ], + hasSuggestions: true, + messages: { - unexpected: "Unexpected console statement." + unexpected: "Unexpected console statement.", + removeConsole: "Remove the console.{{ propertyName }}()." } }, create(context) { const options = context.options[0] || {}; const allowed = options.allow || []; + const sourceCode = context.sourceCode; /** * Checks whether the given reference is 'console' or not. @@ -72,7 +76,7 @@ module.exports = { function isAllowed(node) { const propertyName = astUtils.getStaticPropertyName(node); - return propertyName && allowed.indexOf(propertyName) !== -1; + return propertyName && allowed.includes(propertyName); } /** @@ -93,6 +97,64 @@ module.exports = { ); } + /** + * Checks if removing the ExpressionStatement node will cause ASI to + * break. + * eg. + * foo() + * console.log(); + * [1, 2, 3].forEach(a => doSomething(a)) + * + * Removing the console.log(); statement should leave two statements, but + * here the two statements will become one because [ causes continuation after + * foo(). + * @param {ASTNode} node The ExpressionStatement node to check. + * @returns {boolean} `true` if ASI will break after removing the ExpressionStatement + * node. + */ + function maybeAsiHazard(node) { + const SAFE_TOKENS_BEFORE = /^[:;{]$/u; // One of :;{ + const UNSAFE_CHARS_AFTER = /^[-[(/+`]/u; // One of [(/+-` + + const tokenBefore = sourceCode.getTokenBefore(node); + const tokenAfter = sourceCode.getTokenAfter(node); + + return ( + Boolean(tokenAfter) && + UNSAFE_CHARS_AFTER.test(tokenAfter.value) && + tokenAfter.value !== "++" && + tokenAfter.value !== "--" && + Boolean(tokenBefore) && + !SAFE_TOKENS_BEFORE.test(tokenBefore.value) + ); + } + + /** + * Checks if the MemberExpression node's parent.parent.parent is a + * Program, BlockStatement, StaticBlock, or SwitchCase node. This check + * is necessary to avoid providing a suggestion that might cause a syntax error. + * + * eg. if (a) console.log(b), removing console.log() here will lead to a + * syntax error. + * if (a) { console.log(b) }, removing console.log() here is acceptable. + * + * Additionally, it checks if the callee of the CallExpression node is + * the node itself. + * + * eg. foo(console.log), cannot provide a suggestion here. + * @param {ASTNode} node The MemberExpression node to check. + * @returns {boolean} `true` if a suggestion can be provided for a node. + */ + function canProvideSuggestions(node) { + return ( + node.parent.type === "CallExpression" && + node.parent.callee === node && + node.parent.parent.type === "ExpressionStatement" && + astUtils.STATEMENT_LIST_PARENTS.has(node.parent.parent.parent.type) && + !maybeAsiHazard(node.parent.parent) + ); + } + /** * Reports the given reference as a violation. * @param {eslint-scope.Reference} reference The reference to report. @@ -101,16 +163,27 @@ module.exports = { function report(reference) { const node = reference.identifier.parent; + const propertyName = astUtils.getStaticPropertyName(node); + context.report({ node, loc: node.loc, - messageId: "unexpected" + messageId: "unexpected", + suggest: canProvideSuggestions(node) + ? [{ + messageId: "removeConsole", + data: { propertyName }, + fix(fixer) { + return fixer.remove(node.parent.parent); + } + }] + : [] }); } return { - "Program:exit"() { - const scope = context.getScope(); + "Program:exit"(node) { + const scope = sourceCode.getScope(node); const consoleVar = astUtils.getVariableByName(scope, "console"); const shadowed = consoleVar && consoleVar.defs.length > 0; diff --git a/node_modules/eslint/lib/rules/no-const-assign.js b/node_modules/eslint/lib/rules/no-const-assign.js index e4ae89170..0ceaf7ea5 100644 --- a/node_modules/eslint/lib/rules/no-const-assign.js +++ b/node_modules/eslint/lib/rules/no-const-assign.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow reassigning `const` variables", - category: "ECMAScript 6", + description: "Disallow reassigning `const` variables", recommended: true, - url: "https://eslint.org/docs/rules/no-const-assign" + url: "https://eslint.org/docs/latest/rules/no-const-assign" }, schema: [], @@ -31,6 +31,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Finds and reports references that are non initializer and writable. * @param {Variable} variable A variable to check. @@ -45,7 +47,7 @@ module.exports = { return { VariableDeclaration(node) { if (node.kind === "const") { - context.getDeclaredVariables(node).forEach(checkVariable); + sourceCode.getDeclaredVariables(node).forEach(checkVariable); } } }; diff --git a/node_modules/eslint/lib/rules/no-constant-binary-expression.js b/node_modules/eslint/lib/rules/no-constant-binary-expression.js new file mode 100644 index 000000000..845255a0c --- /dev/null +++ b/node_modules/eslint/lib/rules/no-constant-binary-expression.js @@ -0,0 +1,509 @@ +/** + * @fileoverview Rule to flag constant comparisons and logical expressions that always/never short circuit + * @author Jordan Eldredge + */ + +"use strict"; + +const globals = require("globals"); +const { isNullLiteral, isConstant, isReferenceToGlobalVariable, isLogicalAssignmentOperator } = require("./utils/ast-utils"); + +const NUMERIC_OR_STRING_BINARY_OPERATORS = new Set(["+", "-", "*", "/", "%", "|", "^", "&", "**", "<<", ">>", ">>>"]); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks whether or not a node is `null` or `undefined`. Similar to the one + * found in ast-utils.js, but this one correctly handles the edge case that + * `undefined` has been redefined. + * @param {Scope} scope Scope in which the expression was found. + * @param {ASTNode} node A node to check. + * @returns {boolean} Whether or not the node is a `null` or `undefined`. + * @public + */ +function isNullOrUndefined(scope, node) { + return ( + isNullLiteral(node) || + (node.type === "Identifier" && node.name === "undefined" && isReferenceToGlobalVariable(scope, node)) || + (node.type === "UnaryExpression" && node.operator === "void") + ); +} + +/** + * Test if an AST node has a statically knowable constant nullishness. Meaning, + * it will always resolve to a constant value of either: `null`, `undefined` + * or not `null` _or_ `undefined`. An expression that can vary between those + * three states at runtime would return `false`. + * @param {Scope} scope The scope in which the node was found. + * @param {ASTNode} node The AST node being tested. + * @param {boolean} nonNullish if `true` then nullish values are not considered constant. + * @returns {boolean} Does `node` have constant nullishness? + */ +function hasConstantNullishness(scope, node, nonNullish) { + if (nonNullish && isNullOrUndefined(scope, node)) { + return false; + } + + switch (node.type) { + case "ObjectExpression": // Objects are never nullish + case "ArrayExpression": // Arrays are never nullish + case "ArrowFunctionExpression": // Functions never nullish + case "FunctionExpression": // Functions are never nullish + case "ClassExpression": // Classes are never nullish + case "NewExpression": // Objects are never nullish + case "Literal": // Nullish, or non-nullish, literals never change + case "TemplateLiteral": // A string is never nullish + case "UpdateExpression": // Numbers are never nullish + case "BinaryExpression": // Numbers, strings, or booleans are never nullish + return true; + case "CallExpression": { + if (node.callee.type !== "Identifier") { + return false; + } + const functionName = node.callee.name; + + return (functionName === "Boolean" || functionName === "String" || functionName === "Number") && + isReferenceToGlobalVariable(scope, node.callee); + } + case "LogicalExpression": { + return node.operator === "??" && hasConstantNullishness(scope, node.right, true); + } + case "AssignmentExpression": + if (node.operator === "=") { + return hasConstantNullishness(scope, node.right, nonNullish); + } + + /* + * Handling short-circuiting assignment operators would require + * walking the scope. We won't attempt that (for now...) / + */ + if (isLogicalAssignmentOperator(node.operator)) { + return false; + } + + /* + * The remaining assignment expressions all result in a numeric or + * string (non-nullish) value: + * "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&=" + */ + + return true; + case "UnaryExpression": + + /* + * "void" Always returns `undefined` + * "typeof" All types are strings, and thus non-nullish + * "!" Boolean is never nullish + * "delete" Returns a boolean, which is never nullish + * Math operators always return numbers or strings, neither of which + * are non-nullish "+", "-", "~" + */ + + return true; + case "SequenceExpression": { + const last = node.expressions[node.expressions.length - 1]; + + return hasConstantNullishness(scope, last, nonNullish); + } + case "Identifier": + return node.name === "undefined" && isReferenceToGlobalVariable(scope, node); + case "JSXElement": // ESLint has a policy of not assuming any specific JSX behavior. + case "JSXFragment": + return false; + default: + return false; + } +} + +/** + * Test if an AST node is a boolean value that never changes. Specifically we + * test for: + * 1. Literal booleans (`true` or `false`) + * 2. Unary `!` expressions with a constant value + * 3. Constant booleans created via the `Boolean` global function + * @param {Scope} scope The scope in which the node was found. + * @param {ASTNode} node The node to test + * @returns {boolean} Is `node` guaranteed to be a boolean? + */ +function isStaticBoolean(scope, node) { + switch (node.type) { + case "Literal": + return typeof node.value === "boolean"; + case "CallExpression": + return node.callee.type === "Identifier" && node.callee.name === "Boolean" && + isReferenceToGlobalVariable(scope, node.callee) && + (node.arguments.length === 0 || isConstant(scope, node.arguments[0], true)); + case "UnaryExpression": + return node.operator === "!" && isConstant(scope, node.argument, true); + default: + return false; + } +} + + +/** + * Test if an AST node will always give the same result when compared to a + * boolean value. Note that comparison to boolean values is different than + * truthiness. + * https://262.ecma-international.org/5.1/#sec-11.9.3 + * + * Javascript `==` operator works by converting the boolean to `1` (true) or + * `+0` (false) and then checks the values `==` equality to that number. + * @param {Scope} scope The scope in which node was found. + * @param {ASTNode} node The node to test. + * @returns {boolean} Will `node` always coerce to the same boolean value? + */ +function hasConstantLooseBooleanComparison(scope, node) { + switch (node.type) { + case "ObjectExpression": + case "ClassExpression": + + /** + * In theory objects like: + * + * `{toString: () => a}` + * `{valueOf: () => a}` + * + * Or a classes like: + * + * `class { static toString() { return a } }` + * `class { static valueOf() { return a } }` + * + * Are not constant verifiably when `inBooleanPosition` is + * false, but it's an edge case we've opted not to handle. + */ + return true; + case "ArrayExpression": { + const nonSpreadElements = node.elements.filter(e => + + // Elements can be `null` in sparse arrays: `[,,]`; + e !== null && e.type !== "SpreadElement"); + + + /* + * Possible future direction if needed: We could check if the + * single value would result in variable boolean comparison. + * For now we will err on the side of caution since `[x]` could + * evaluate to `[0]` or `[1]`. + */ + return node.elements.length === 0 || nonSpreadElements.length > 1; + } + case "ArrowFunctionExpression": + case "FunctionExpression": + return true; + case "UnaryExpression": + if (node.operator === "void" || // Always returns `undefined` + node.operator === "typeof" // All `typeof` strings, when coerced to number, are not 0 or 1. + ) { + return true; + } + if (node.operator === "!") { + return isConstant(scope, node.argument, true); + } + + /* + * We won't try to reason about +, -, ~, or delete + * In theory, for the mathematical operators, we could look at the + * argument and try to determine if it coerces to a constant numeric + * value. + */ + return false; + case "NewExpression": // Objects might have custom `.valueOf` or `.toString`. + return false; + case "CallExpression": { + if (node.callee.type === "Identifier" && + node.callee.name === "Boolean" && + isReferenceToGlobalVariable(scope, node.callee) + ) { + return node.arguments.length === 0 || isConstant(scope, node.arguments[0], true); + } + return false; + } + case "Literal": // True or false, literals never change + return true; + case "Identifier": + return node.name === "undefined" && isReferenceToGlobalVariable(scope, node); + case "TemplateLiteral": + + /* + * In theory we could try to check if the quasi are sufficient to + * prove that the expression will always be true, but it would be + * tricky to get right. For example: `000.${foo}000` + */ + return node.expressions.length === 0; + case "AssignmentExpression": + if (node.operator === "=") { + return hasConstantLooseBooleanComparison(scope, node.right); + } + + /* + * Handling short-circuiting assignment operators would require + * walking the scope. We won't attempt that (for now...) + * + * The remaining assignment expressions all result in a numeric or + * string (non-nullish) values which could be truthy or falsy: + * "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", "|=", "^=", "&=" + */ + return false; + case "SequenceExpression": { + const last = node.expressions[node.expressions.length - 1]; + + return hasConstantLooseBooleanComparison(scope, last); + } + case "JSXElement": // ESLint has a policy of not assuming any specific JSX behavior. + case "JSXFragment": + return false; + default: + return false; + } +} + + +/** + * Test if an AST node will always give the same result when _strictly_ compared + * to a boolean value. This can happen if the expression can never be boolean, or + * if it is always the same boolean value. + * @param {Scope} scope The scope in which the node was found. + * @param {ASTNode} node The node to test + * @returns {boolean} Will `node` always give the same result when compared to a + * static boolean value? + */ +function hasConstantStrictBooleanComparison(scope, node) { + switch (node.type) { + case "ObjectExpression": // Objects are not booleans + case "ArrayExpression": // Arrays are not booleans + case "ArrowFunctionExpression": // Functions are not booleans + case "FunctionExpression": + case "ClassExpression": // Classes are not booleans + case "NewExpression": // Objects are not booleans + case "TemplateLiteral": // Strings are not booleans + case "Literal": // True, false, or not boolean, literals never change. + case "UpdateExpression": // Numbers are not booleans + return true; + case "BinaryExpression": + return NUMERIC_OR_STRING_BINARY_OPERATORS.has(node.operator); + case "UnaryExpression": { + if (node.operator === "delete") { + return false; + } + if (node.operator === "!") { + return isConstant(scope, node.argument, true); + } + + /* + * The remaining operators return either strings or numbers, neither + * of which are boolean. + */ + return true; + } + case "SequenceExpression": { + const last = node.expressions[node.expressions.length - 1]; + + return hasConstantStrictBooleanComparison(scope, last); + } + case "Identifier": + return node.name === "undefined" && isReferenceToGlobalVariable(scope, node); + case "AssignmentExpression": + if (node.operator === "=") { + return hasConstantStrictBooleanComparison(scope, node.right); + } + + /* + * Handling short-circuiting assignment operators would require + * walking the scope. We won't attempt that (for now...) + */ + if (isLogicalAssignmentOperator(node.operator)) { + return false; + } + + /* + * The remaining assignment expressions all result in either a number + * or a string, neither of which can ever be boolean. + */ + return true; + case "CallExpression": { + if (node.callee.type !== "Identifier") { + return false; + } + const functionName = node.callee.name; + + if ( + (functionName === "String" || functionName === "Number") && + isReferenceToGlobalVariable(scope, node.callee) + ) { + return true; + } + if (functionName === "Boolean" && isReferenceToGlobalVariable(scope, node.callee)) { + return ( + node.arguments.length === 0 || isConstant(scope, node.arguments[0], true)); + } + return false; + } + case "JSXElement": // ESLint has a policy of not assuming any specific JSX behavior. + case "JSXFragment": + return false; + default: + return false; + } +} + +/** + * Test if an AST node will always result in a newly constructed object + * @param {Scope} scope The scope in which the node was found. + * @param {ASTNode} node The node to test + * @returns {boolean} Will `node` always be new? + */ +function isAlwaysNew(scope, node) { + switch (node.type) { + case "ObjectExpression": + case "ArrayExpression": + case "ArrowFunctionExpression": + case "FunctionExpression": + case "ClassExpression": + return true; + case "NewExpression": { + if (node.callee.type !== "Identifier") { + return false; + } + + /* + * All the built-in constructors are always new, but + * user-defined constructors could return a sentinel + * object. + * + * Catching these is especially useful for primitive constructors + * which return boxed values, a surprising gotcha' in JavaScript. + */ + return Object.hasOwnProperty.call(globals.builtin, node.callee.name) && + isReferenceToGlobalVariable(scope, node.callee); + } + case "Literal": + + // Regular expressions are objects, and thus always new + return typeof node.regex === "object"; + case "SequenceExpression": { + const last = node.expressions[node.expressions.length - 1]; + + return isAlwaysNew(scope, last); + } + case "AssignmentExpression": + if (node.operator === "=") { + return isAlwaysNew(scope, node.right); + } + return false; + case "ConditionalExpression": + return isAlwaysNew(scope, node.consequent) && isAlwaysNew(scope, node.alternate); + case "JSXElement": // ESLint has a policy of not assuming any specific JSX behavior. + case "JSXFragment": + return false; + default: + return false; + } +} + +/** + * Checks if one operand will cause the result to be constant. + * @param {Scope} scope Scope in which the expression was found. + * @param {ASTNode} a One side of the expression + * @param {ASTNode} b The other side of the expression + * @param {string} operator The binary expression operator + * @returns {ASTNode | null} The node which will cause the expression to have a constant result. + */ +function findBinaryExpressionConstantOperand(scope, a, b, operator) { + if (operator === "==" || operator === "!=") { + if ( + (isNullOrUndefined(scope, a) && hasConstantNullishness(scope, b, false)) || + (isStaticBoolean(scope, a) && hasConstantLooseBooleanComparison(scope, b)) + ) { + return b; + } + } else if (operator === "===" || operator === "!==") { + if ( + (isNullOrUndefined(scope, a) && hasConstantNullishness(scope, b, false)) || + (isStaticBoolean(scope, a) && hasConstantStrictBooleanComparison(scope, b)) + ) { + return b; + } + } + return null; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "problem", + docs: { + description: "Disallow expressions where the operation doesn't affect the value", + recommended: false, + url: "https://eslint.org/docs/latest/rules/no-constant-binary-expression" + }, + schema: [], + messages: { + constantBinaryOperand: "Unexpected constant binary expression. Compares constantly with the {{otherSide}}-hand side of the `{{operator}}`.", + constantShortCircuit: "Unexpected constant {{property}} on the left-hand side of a `{{operator}}` expression.", + alwaysNew: "Unexpected comparison to newly constructed object. These two values can never be equal.", + bothAlwaysNew: "Unexpected comparison of two newly constructed objects. These two values can never be equal." + } + }, + + create(context) { + const sourceCode = context.sourceCode; + + return { + LogicalExpression(node) { + const { operator, left } = node; + const scope = sourceCode.getScope(node); + + if ((operator === "&&" || operator === "||") && isConstant(scope, left, true)) { + context.report({ node: left, messageId: "constantShortCircuit", data: { property: "truthiness", operator } }); + } else if (operator === "??" && hasConstantNullishness(scope, left, false)) { + context.report({ node: left, messageId: "constantShortCircuit", data: { property: "nullishness", operator } }); + } + }, + BinaryExpression(node) { + const scope = sourceCode.getScope(node); + const { right, left, operator } = node; + const rightConstantOperand = findBinaryExpressionConstantOperand(scope, left, right, operator); + const leftConstantOperand = findBinaryExpressionConstantOperand(scope, right, left, operator); + + if (rightConstantOperand) { + context.report({ node: rightConstantOperand, messageId: "constantBinaryOperand", data: { operator, otherSide: "left" } }); + } else if (leftConstantOperand) { + context.report({ node: leftConstantOperand, messageId: "constantBinaryOperand", data: { operator, otherSide: "right" } }); + } else if (operator === "===" || operator === "!==") { + if (isAlwaysNew(scope, left)) { + context.report({ node: left, messageId: "alwaysNew" }); + } else if (isAlwaysNew(scope, right)) { + context.report({ node: right, messageId: "alwaysNew" }); + } + } else if (operator === "==" || operator === "!=") { + + /* + * If both sides are "new", then both sides are objects and + * therefore they will be compared by reference even with `==` + * equality. + */ + if (isAlwaysNew(scope, left) && isAlwaysNew(scope, right)) { + context.report({ node: left, messageId: "bothAlwaysNew" }); + } + } + + } + + /* + * In theory we could handle short-circuiting assignment operators, + * for some constant values, but that would require walking the + * scope to find the value of the variable being assigned. This is + * dependant on https://github.com/eslint/eslint/issues/13776 + * + * AssignmentExpression() {}, + */ + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-constant-condition.js b/node_modules/eslint/lib/rules/no-constant-condition.js index 3c2d68cbf..24abe3632 100644 --- a/node_modules/eslint/lib/rules/no-constant-condition.js +++ b/node_modules/eslint/lib/rules/no-constant-condition.js @@ -5,6 +5,8 @@ "use strict"; +const { isConstant } = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ @@ -13,15 +15,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow constant expressions in conditions", - category: "Possible Errors", + description: "Disallow constant expressions in conditions", recommended: true, - url: "https://eslint.org/docs/rules/no-constant-condition" + url: "https://eslint.org/docs/latest/rules/no-constant-condition" }, schema: [ @@ -46,6 +48,7 @@ module.exports = { const options = context.options[0] || {}, checkLoops = options.checkLoops !== false, loopSetStack = []; + const sourceCode = context.sourceCode; let loopsInCurrentScope = new Set(); @@ -53,153 +56,6 @@ module.exports = { // Helpers //-------------------------------------------------------------------------- - /** - * Returns literal's value converted to the Boolean type - * @param {ASTNode} node any `Literal` node - * @returns {boolean | null} `true` when node is truthy, `false` when node is falsy, - * `null` when it cannot be determined. - */ - function getBooleanValue(node) { - if (node.value === null) { - - /* - * it might be a null literal or bigint/regex literal in unsupported environments . - * https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es5.md#regexpliteral - * https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es2020.md#bigintliteral - */ - - if (node.raw === "null") { - return false; - } - - // regex is always truthy - if (typeof node.regex === "object") { - return true; - } - - return null; - } - - return !!node.value; - } - - /** - * Checks if a branch node of LogicalExpression short circuits the whole condition - * @param {ASTNode} node The branch of main condition which needs to be checked - * @param {string} operator The operator of the main LogicalExpression. - * @returns {boolean} true when condition short circuits whole condition - */ - function isLogicalIdentity(node, operator) { - switch (node.type) { - case "Literal": - return (operator === "||" && getBooleanValue(node) === true) || - (operator === "&&" && getBooleanValue(node) === false); - - case "UnaryExpression": - return (operator === "&&" && node.operator === "void"); - - case "LogicalExpression": - - /* - * handles `a && false || b` - * `false` is an identity element of `&&` but not `||` - */ - return operator === node.operator && - ( - isLogicalIdentity(node.left, operator) || - isLogicalIdentity(node.right, operator) - ); - - case "AssignmentExpression": - return ["||=", "&&="].includes(node.operator) && - operator === node.operator.slice(0, -1) && - isLogicalIdentity(node.right, operator); - - // no default - } - return false; - } - - /** - * Checks if a node has a constant truthiness value. - * @param {ASTNode} node The AST node to check. - * @param {boolean} inBooleanPosition `false` if checking branch of a condition. - * `true` in all other cases - * @returns {Bool} true when node's truthiness is constant - * @private - */ - function isConstant(node, inBooleanPosition) { - - // node.elements can return null values in the case of sparse arrays ex. [,] - if (!node) { - return true; - } - switch (node.type) { - case "Literal": - case "ArrowFunctionExpression": - case "FunctionExpression": - case "ObjectExpression": - return true; - case "TemplateLiteral": - return (inBooleanPosition && node.quasis.some(quasi => quasi.value.cooked.length)) || - node.expressions.every(exp => isConstant(exp, inBooleanPosition)); - - case "ArrayExpression": { - if (node.parent.type === "BinaryExpression" && node.parent.operator === "+") { - return node.elements.every(element => isConstant(element, false)); - } - return true; - } - - case "UnaryExpression": - if ( - node.operator === "void" || - node.operator === "typeof" && inBooleanPosition - ) { - return true; - } - - if (node.operator === "!") { - return isConstant(node.argument, true); - } - - return isConstant(node.argument, false); - - case "BinaryExpression": - return isConstant(node.left, false) && - isConstant(node.right, false) && - node.operator !== "in"; - - case "LogicalExpression": { - const isLeftConstant = isConstant(node.left, inBooleanPosition); - const isRightConstant = isConstant(node.right, inBooleanPosition); - const isLeftShortCircuit = (isLeftConstant && isLogicalIdentity(node.left, node.operator)); - const isRightShortCircuit = (inBooleanPosition && isRightConstant && isLogicalIdentity(node.right, node.operator)); - - return (isLeftConstant && isRightConstant) || - isLeftShortCircuit || - isRightShortCircuit; - } - - case "AssignmentExpression": - if (node.operator === "=") { - return isConstant(node.right, inBooleanPosition); - } - - if (["||=", "&&="].includes(node.operator) && inBooleanPosition) { - return isLogicalIdentity(node.right, node.operator.slice(0, -1)); - } - - return false; - - case "SequenceExpression": - return isConstant(node.expressions[node.expressions.length - 1], inBooleanPosition); - - // no default - } - return false; - } - /** * Tracks when the given node contains a constant condition. * @param {ASTNode} node The AST node to check. @@ -207,7 +63,7 @@ module.exports = { * @private */ function trackConstantConditionLoop(node) { - if (node.test && isConstant(node.test, true)) { + if (node.test && isConstant(sourceCode.getScope(node), node.test, true)) { loopsInCurrentScope.add(node); } } @@ -232,7 +88,7 @@ module.exports = { * @private */ function reportIfConstant(node) { - if (node.test && isConstant(node.test, true)) { + if (node.test && isConstant(sourceCode.getScope(node), node.test, true)) { context.report({ node: node.test, messageId: "unexpected" }); } } diff --git a/node_modules/eslint/lib/rules/no-constructor-return.js b/node_modules/eslint/lib/rules/no-constructor-return.js index 4757770b7..d7d98939b 100644 --- a/node_modules/eslint/lib/rules/no-constructor-return.js +++ b/node_modules/eslint/lib/rules/no-constructor-return.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow returning value from constructor", - category: "Best Practices", + description: "Disallow returning value from constructor", recommended: false, - url: "https://eslint.org/docs/rules/no-constructor-return" + url: "https://eslint.org/docs/latest/rules/no-constructor-return" }, schema: {}, diff --git a/node_modules/eslint/lib/rules/no-continue.js b/node_modules/eslint/lib/rules/no-continue.js index 96718d17a..f6e484b2f 100644 --- a/node_modules/eslint/lib/rules/no-continue.js +++ b/node_modules/eslint/lib/rules/no-continue.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `continue` statements", - category: "Stylistic Issues", + description: "Disallow `continue` statements", recommended: false, - url: "https://eslint.org/docs/rules/no-continue" + url: "https://eslint.org/docs/latest/rules/no-continue" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-control-regex.js b/node_modules/eslint/lib/rules/no-control-regex.js index 6feeb6419..dc412fcab 100644 --- a/node_modules/eslint/lib/rules/no-control-regex.js +++ b/node_modules/eslint/lib/rules/no-control-regex.js @@ -5,7 +5,7 @@ "use strict"; -const RegExpValidator = require("regexpp").RegExpValidator; +const RegExpValidator = require("@eslint-community/regexpp").RegExpValidator; const collector = new (class { constructor() { this._source = ""; @@ -14,6 +14,16 @@ const collector = new (class { } onPatternEnter() { + + /* + * `RegExpValidator` may parse the pattern twice in one `validatePattern`. + * So `this._controlChars` should be cleared here as well. + * + * For example, the `/(?\x1f)/` regex will parse the pattern twice. + * This is based on the content described in Annex B. + * If the regex contains a `GroupName` and the `u` flag is not used, `ParseText` will be called twice. + * See https://tc39.es/ecma262/2023/multipage/additional-ecmascript-features-for-web-browsers.html#sec-parsepattern-annexb + */ this._controlChars = []; } @@ -30,10 +40,15 @@ const collector = new (class { } } - collectControlChars(regexpStr) { + collectControlChars(regexpStr, flags) { + const uFlag = typeof flags === "string" && flags.includes("u"); + const vFlag = typeof flags === "string" && flags.includes("v"); + + this._controlChars = []; + this._source = regexpStr; + try { - this._source = regexpStr; - this._validator.validatePattern(regexpStr); // Call onCharacter hook + this._validator.validatePattern(regexpStr, void 0, void 0, { unicode: uFlag, unicodeSets: vFlag }); // Call onCharacter hook } catch { // Ignore syntax errors in RegExp. @@ -46,15 +61,15 @@ const collector = new (class { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow control characters in regular expressions", - category: "Possible Errors", + description: "Disallow control characters in regular expressions", recommended: true, - url: "https://eslint.org/docs/rules/no-control-regex" + url: "https://eslint.org/docs/latest/rules/no-control-regex" }, schema: [], @@ -68,13 +83,15 @@ module.exports = { /** * Get the regex expression - * @param {ASTNode} node node to evaluate - * @returns {RegExp|null} Regex if found else null + * @param {ASTNode} node `Literal` node to evaluate + * @returns {{ pattern: string, flags: string | null } | null} Regex if found (the given node is either a regex literal + * or a string literal that is the pattern argument of a RegExp constructor call). Otherwise `null`. If flags cannot be determined, + * the `flags` property will be `null`. * @private */ - function getRegExpPattern(node) { + function getRegExp(node) { if (node.regex) { - return node.regex.pattern; + return node.regex; } if (typeof node.value === "string" && (node.parent.type === "NewExpression" || node.parent.type === "CallExpression") && @@ -82,7 +99,15 @@ module.exports = { node.parent.callee.name === "RegExp" && node.parent.arguments[0] === node ) { - return node.value; + const pattern = node.value; + const flags = + node.parent.arguments.length > 1 && + node.parent.arguments[1].type === "Literal" && + typeof node.parent.arguments[1].value === "string" + ? node.parent.arguments[1].value + : null; + + return { pattern, flags }; } return null; @@ -90,10 +115,11 @@ module.exports = { return { Literal(node) { - const pattern = getRegExpPattern(node); + const regExp = getRegExp(node); - if (pattern) { - const controlCharacters = collector.collectControlChars(pattern); + if (regExp) { + const { pattern, flags } = regExp; + const controlCharacters = collector.collectControlChars(pattern, flags); if (controlCharacters.length > 0) { context.report({ diff --git a/node_modules/eslint/lib/rules/no-debugger.js b/node_modules/eslint/lib/rules/no-debugger.js index 95a28a862..f69843515 100644 --- a/node_modules/eslint/lib/rules/no-debugger.js +++ b/node_modules/eslint/lib/rules/no-debugger.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow the use of `debugger`", - category: "Possible Errors", + description: "Disallow the use of `debugger`", recommended: true, - url: "https://eslint.org/docs/rules/no-debugger" + url: "https://eslint.org/docs/latest/rules/no-debugger" }, fixable: null, diff --git a/node_modules/eslint/lib/rules/no-delete-var.js b/node_modules/eslint/lib/rules/no-delete-var.js index aeab951d7..126603c83 100644 --- a/node_modules/eslint/lib/rules/no-delete-var.js +++ b/node_modules/eslint/lib/rules/no-delete-var.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow deleting variables", - category: "Variables", + description: "Disallow deleting variables", recommended: true, - url: "https://eslint.org/docs/rules/no-delete-var" + url: "https://eslint.org/docs/latest/rules/no-delete-var" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-div-regex.js b/node_modules/eslint/lib/rules/no-div-regex.js index 0ccabdcc6..208f840be 100644 --- a/node_modules/eslint/lib/rules/no-div-regex.js +++ b/node_modules/eslint/lib/rules/no-div-regex.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow division operators explicitly at the beginning of regular expressions", - category: "Best Practices", + description: "Disallow equal signs explicitly at the beginning of regular expressions", recommended: false, - url: "https://eslint.org/docs/rules/no-div-regex" + url: "https://eslint.org/docs/latest/rules/no-div-regex" }, fixable: "code", @@ -30,7 +30,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { diff --git a/node_modules/eslint/lib/rules/no-dupe-args.js b/node_modules/eslint/lib/rules/no-dupe-args.js index 817277f52..c04ede5af 100644 --- a/node_modules/eslint/lib/rules/no-dupe-args.js +++ b/node_modules/eslint/lib/rules/no-dupe-args.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow duplicate arguments in `function` definitions", - category: "Possible Errors", + description: "Disallow duplicate arguments in `function` definitions", recommended: true, - url: "https://eslint.org/docs/rules/no-dupe-args" + url: "https://eslint.org/docs/latest/rules/no-dupe-args" }, schema: [], @@ -29,6 +29,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -49,7 +51,7 @@ module.exports = { * @private */ function checkParams(node) { - const variables = context.getDeclaredVariables(node); + const variables = sourceCode.getDeclaredVariables(node); for (let i = 0; i < variables.length; ++i) { const variable = variables[i]; diff --git a/node_modules/eslint/lib/rules/no-dupe-class-members.js b/node_modules/eslint/lib/rules/no-dupe-class-members.js index b12939d57..2a7a9e810 100644 --- a/node_modules/eslint/lib/rules/no-dupe-class-members.js +++ b/node_modules/eslint/lib/rules/no-dupe-class-members.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow duplicate class members", - category: "ECMAScript 6", + description: "Disallow duplicate class members", recommended: true, - url: "https://eslint.org/docs/rules/no-dupe-class-members" + url: "https://eslint.org/docs/latest/rules/no-dupe-class-members" }, schema: [], @@ -73,20 +73,21 @@ module.exports = { }, // Reports the node if its name has been declared already. - MethodDefinition(node) { + "MethodDefinition, PropertyDefinition"(node) { const name = astUtils.getStaticPropertyName(node); + const kind = node.type === "MethodDefinition" ? node.kind : "field"; - if (name === null || node.kind === "constructor") { + if (name === null || kind === "constructor") { return; } const state = getState(name, node.static); let isDuplicate = false; - if (node.kind === "get") { + if (kind === "get") { isDuplicate = (state.init || state.get); state.get = true; - } else if (node.kind === "set") { + } else if (kind === "set") { isDuplicate = (state.init || state.set); state.set = true; } else { diff --git a/node_modules/eslint/lib/rules/no-dupe-else-if.js b/node_modules/eslint/lib/rules/no-dupe-else-if.js index cbeb437da..60f436d1d 100644 --- a/node_modules/eslint/lib/rules/no-dupe-else-if.js +++ b/node_modules/eslint/lib/rules/no-dupe-else-if.js @@ -46,15 +46,15 @@ const splitByAnd = splitByLogicalOperator.bind(null, "&&"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow duplicate conditions in if-else-if chains", - category: "Possible Errors", + description: "Disallow duplicate conditions in if-else-if chains", recommended: true, - url: "https://eslint.org/docs/rules/no-dupe-else-if" + url: "https://eslint.org/docs/latest/rules/no-dupe-else-if" }, schema: [], @@ -65,7 +65,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Determines whether the two given nodes are considered to be equal. In particular, given that the nodes diff --git a/node_modules/eslint/lib/rules/no-dupe-keys.js b/node_modules/eslint/lib/rules/no-dupe-keys.js index 89e1f2de6..980b0044a 100644 --- a/node_modules/eslint/lib/rules/no-dupe-keys.js +++ b/node_modules/eslint/lib/rules/no-dupe-keys.js @@ -23,7 +23,6 @@ const SET_KIND = /^(?:init|set)$/u; */ class ObjectInfo { - // eslint-disable-next-line jsdoc/require-description /** * @param {ObjectInfo|null} upper The information of the outer object. * @param {ASTNode} node The ObjectExpression node of this information. @@ -83,15 +82,15 @@ class ObjectInfo { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow duplicate keys in object literals", - category: "Possible Errors", + description: "Disallow duplicate keys in object literals", recommended: true, - url: "https://eslint.org/docs/rules/no-dupe-keys" + url: "https://eslint.org/docs/latest/rules/no-dupe-keys" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-duplicate-case.js b/node_modules/eslint/lib/rules/no-duplicate-case.js index e2d9665e7..839f357e7 100644 --- a/node_modules/eslint/lib/rules/no-duplicate-case.js +++ b/node_modules/eslint/lib/rules/no-duplicate-case.js @@ -16,15 +16,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow duplicate case labels", - category: "Possible Errors", + description: "Disallow duplicate case labels", recommended: true, - url: "https://eslint.org/docs/rules/no-duplicate-case" + url: "https://eslint.org/docs/latest/rules/no-duplicate-case" }, schema: [], @@ -35,7 +35,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Determines whether the two given nodes are considered to be equal. diff --git a/node_modules/eslint/lib/rules/no-duplicate-imports.js b/node_modules/eslint/lib/rules/no-duplicate-imports.js index 7218dc64a..25c07b750 100644 --- a/node_modules/eslint/lib/rules/no-duplicate-imports.js +++ b/node_modules/eslint/lib/rules/no-duplicate-imports.js @@ -4,117 +4,253 @@ */ "use strict"; +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const NAMED_TYPES = ["ImportSpecifier", "ExportSpecifier"]; +const NAMESPACE_TYPES = [ + "ImportNamespaceSpecifier", + "ExportNamespaceSpecifier" +]; + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ /** - * Returns the name of the module imported or re-exported. + * Check if an import/export type belongs to (ImportSpecifier|ExportSpecifier) or (ImportNamespaceSpecifier|ExportNamespaceSpecifier). + * @param {string} importExportType An import/export type to check. + * @param {string} type Can be "named" or "namespace" + * @returns {boolean} True if import/export type belongs to (ImportSpecifier|ExportSpecifier) or (ImportNamespaceSpecifier|ExportNamespaceSpecifier) and false if it doesn't. + */ +function isImportExportSpecifier(importExportType, type) { + const arrayToCheck = type === "named" ? NAMED_TYPES : NAMESPACE_TYPES; + + return arrayToCheck.includes(importExportType); +} + +/** + * Return the type of (import|export). * @param {ASTNode} node A node to get. - * @returns {string} the name of the module, or empty string if no name. + * @returns {string} The type of the (import|export). */ -function getValue(node) { - if (node && node.source && node.source.value) { - return node.source.value.trim(); +function getImportExportType(node) { + if (node.specifiers && node.specifiers.length > 0) { + const nodeSpecifiers = node.specifiers; + const index = nodeSpecifiers.findIndex( + ({ type }) => + isImportExportSpecifier(type, "named") || + isImportExportSpecifier(type, "namespace") + ); + const i = index > -1 ? index : 0; + + return nodeSpecifiers[i].type; } + if (node.type === "ExportAllDeclaration") { + if (node.exported) { + return "ExportNamespaceSpecifier"; + } + return "ExportAll"; + } + return "SideEffectImport"; +} - return ""; +/** + * Returns a boolean indicates if two (import|export) can be merged + * @param {ASTNode} node1 A node to check. + * @param {ASTNode} node2 A node to check. + * @returns {boolean} True if two (import|export) can be merged, false if they can't. + */ +function isImportExportCanBeMerged(node1, node2) { + const importExportType1 = getImportExportType(node1); + const importExportType2 = getImportExportType(node2); + + if ( + (importExportType1 === "ExportAll" && + importExportType2 !== "ExportAll" && + importExportType2 !== "SideEffectImport") || + (importExportType1 !== "ExportAll" && + importExportType1 !== "SideEffectImport" && + importExportType2 === "ExportAll") + ) { + return false; + } + if ( + (isImportExportSpecifier(importExportType1, "namespace") && + isImportExportSpecifier(importExportType2, "named")) || + (isImportExportSpecifier(importExportType2, "namespace") && + isImportExportSpecifier(importExportType1, "named")) + ) { + return false; + } + return true; } /** - * Checks if the name of the import or export exists in the given array, and reports if so. - * @param {RuleContext} context The ESLint rule context object. - * @param {ASTNode} node A node to get. - * @param {string} value The name of the imported or exported module. - * @param {string[]} array The array containing other imports or exports in the file. - * @param {string} messageId A messageId to be reported after the name of the module - * - * @returns {void} No return value + * Returns a boolean if we should report (import|export). + * @param {ASTNode} node A node to be reported or not. + * @param {[ASTNode]} previousNodes An array contains previous nodes of the module imported or exported. + * @returns {boolean} True if the (import|export) should be reported. */ -function checkAndReport(context, node, value, array, messageId) { - if (array.indexOf(value) !== -1) { - context.report({ - node, - messageId, - data: { - module: value - } - }); +function shouldReportImportExport(node, previousNodes) { + let i = 0; + + while (i < previousNodes.length) { + if (isImportExportCanBeMerged(node, previousNodes[i])) { + return true; + } + i++; } + return false; } /** - * @callback nodeCallback - * @param {ASTNode} node A node to handle. + * Returns array contains only nodes with declarations types equal to type. + * @param {[{node: ASTNode, declarationType: string}]} nodes An array contains objects, each object contains a node and a declaration type. + * @param {string} type Declaration type. + * @returns {[ASTNode]} An array contains only nodes with declarations types equal to type. + */ +function getNodesByDeclarationType(nodes, type) { + return nodes + .filter(({ declarationType }) => declarationType === type) + .map(({ node }) => node); +} + +/** + * Returns the name of the module imported or re-exported. + * @param {ASTNode} node A node to get. + * @returns {string} The name of the module, or empty string if no name. */ +function getModule(node) { + if (node && node.source && node.source.value) { + return node.source.value.trim(); + } + return ""; +} /** - * Returns a function handling the imports of a given file + * Checks if the (import|export) can be merged with at least one import or one export, and reports if so. * @param {RuleContext} context The ESLint rule context object. + * @param {ASTNode} node A node to get. + * @param {Map} modules A Map object contains as a key a module name and as value an array contains objects, each object contains a node and a declaration type. + * @param {string} declarationType A declaration type can be an import or export. * @param {boolean} includeExports Whether or not to check for exports in addition to imports. - * @param {string[]} importsInFile The array containing other imports in the file. - * @param {string[]} exportsInFile The array containing other exports in the file. - * - * @returns {nodeCallback} A function passed to ESLint to handle the statement. + * @returns {void} No return value. */ -function handleImports(context, includeExports, importsInFile, exportsInFile) { - return function(node) { - const value = getValue(node); +function checkAndReport( + context, + node, + modules, + declarationType, + includeExports +) { + const module = getModule(node); - if (value) { - checkAndReport(context, node, value, importsInFile, "import"); + if (modules.has(module)) { + const previousNodes = modules.get(module); + const messagesIds = []; + const importNodes = getNodesByDeclarationType(previousNodes, "import"); + let exportNodes; + if (includeExports) { + exportNodes = getNodesByDeclarationType(previousNodes, "export"); + } + if (declarationType === "import") { + if (shouldReportImportExport(node, importNodes)) { + messagesIds.push("import"); + } if (includeExports) { - checkAndReport(context, node, value, exportsInFile, "importAs"); + if (shouldReportImportExport(node, exportNodes)) { + messagesIds.push("importAs"); + } + } + } else if (declarationType === "export") { + if (shouldReportImportExport(node, exportNodes)) { + messagesIds.push("export"); + } + if (shouldReportImportExport(node, importNodes)) { + messagesIds.push("exportAs"); } - - importsInFile.push(value); } - }; + messagesIds.forEach(messageId => + context.report({ + node, + messageId, + data: { + module + } + })); + } } /** - * Returns a function handling the exports of a given file + * @callback nodeCallback + * @param {ASTNode} node A node to handle. + */ + +/** + * Returns a function handling the (imports|exports) of a given file * @param {RuleContext} context The ESLint rule context object. - * @param {string[]} importsInFile The array containing other imports in the file. - * @param {string[]} exportsInFile The array containing other exports in the file. - * + * @param {Map} modules A Map object contains as a key a module name and as value an array contains objects, each object contains a node and a declaration type. + * @param {string} declarationType A declaration type can be an import or export. + * @param {boolean} includeExports Whether or not to check for exports in addition to imports. * @returns {nodeCallback} A function passed to ESLint to handle the statement. */ -function handleExports(context, importsInFile, exportsInFile) { +function handleImportsExports( + context, + modules, + declarationType, + includeExports +) { return function(node) { - const value = getValue(node); + const module = getModule(node); + + if (module) { + checkAndReport( + context, + node, + modules, + declarationType, + includeExports + ); + const currentNode = { node, declarationType }; + let nodes = [currentNode]; - if (value) { - checkAndReport(context, node, value, exportsInFile, "export"); - checkAndReport(context, node, value, importsInFile, "exportAs"); + if (modules.has(module)) { + const previousNodes = modules.get(module); - exportsInFile.push(value); + nodes = [...previousNodes, currentNode]; + } + modules.set(module, nodes); } }; } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow duplicate module imports", - category: "ECMAScript 6", + description: "Disallow duplicate module imports", recommended: false, - url: "https://eslint.org/docs/rules/no-duplicate-imports" + url: "https://eslint.org/docs/latest/rules/no-duplicate-imports" }, - schema: [{ - type: "object", - properties: { - includeExports: { - type: "boolean", - default: false - } - }, - additionalProperties: false - }], + schema: [ + { + type: "object", + properties: { + includeExports: { + type: "boolean", + default: false + } + }, + additionalProperties: false + } + ], + messages: { import: "'{{module}}' import is duplicated.", importAs: "'{{module}}' import is duplicated as export.", @@ -125,18 +261,30 @@ module.exports = { create(context) { const includeExports = (context.options[0] || {}).includeExports, - importsInFile = [], - exportsInFile = []; - + modules = new Map(); const handlers = { - ImportDeclaration: handleImports(context, includeExports, importsInFile, exportsInFile) + ImportDeclaration: handleImportsExports( + context, + modules, + "import", + includeExports + ) }; if (includeExports) { - handlers.ExportNamedDeclaration = handleExports(context, importsInFile, exportsInFile); - handlers.ExportAllDeclaration = handleExports(context, importsInFile, exportsInFile); + handlers.ExportNamedDeclaration = handleImportsExports( + context, + modules, + "export", + includeExports + ); + handlers.ExportAllDeclaration = handleImportsExports( + context, + modules, + "export", + includeExports + ); } - return handlers; } }; diff --git a/node_modules/eslint/lib/rules/no-else-return.js b/node_modules/eslint/lib/rules/no-else-return.js index 84409fac8..9dbf56965 100644 --- a/node_modules/eslint/lib/rules/no-else-return.js +++ b/node_modules/eslint/lib/rules/no-else-return.js @@ -16,15 +16,15 @@ const FixTracker = require("./utils/fix-tracker"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `else` blocks after `return` statements in `if` statements", - category: "Best Practices", + description: "Disallow `else` blocks after `return` statements in `if` statements", recommended: false, - url: "https://eslint.org/docs/rules/no-else-return" + url: "https://eslint.org/docs/latest/rules/no-else-return" }, schema: [{ @@ -47,6 +47,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- @@ -169,25 +171,24 @@ module.exports = { /** * Display the context report if rule is violated - * @param {Node} node The 'else' node + * @param {Node} elseNode The 'else' node * @returns {void} */ - function displayReport(node) { - const currentScope = context.getScope(); + function displayReport(elseNode) { + const currentScope = sourceCode.getScope(elseNode.parent); context.report({ - node, + node: elseNode, messageId: "unexpected", - fix: fixer => { + fix(fixer) { - if (!isSafeFromNameCollisions(node, currentScope)) { + if (!isSafeFromNameCollisions(elseNode, currentScope)) { return null; } - const sourceCode = context.getSourceCode(); - const startToken = sourceCode.getFirstToken(node); + const startToken = sourceCode.getFirstToken(elseNode); const elseToken = sourceCode.getTokenBefore(startToken); - const source = sourceCode.getText(node); + const source = sourceCode.getText(elseNode); const lastIfToken = sourceCode.getTokenBefore(elseToken); let fixedSource, firstTokenOfElseBlock; @@ -203,14 +204,14 @@ module.exports = { * safe to remove the else keyword, because ASI will not add a semicolon * after the if block */ - const ifBlockMaybeUnsafe = node.parent.consequent.type !== "BlockStatement" && lastIfToken.value !== ";"; + const ifBlockMaybeUnsafe = elseNode.parent.consequent.type !== "BlockStatement" && lastIfToken.value !== ";"; const elseBlockUnsafe = /^[([/+`-]/u.test(firstTokenOfElseBlock.value); if (ifBlockMaybeUnsafe && elseBlockUnsafe) { return null; } - const endToken = sourceCode.getLastToken(node); + const endToken = sourceCode.getLastToken(elseNode); const lastTokenOfElseBlock = sourceCode.getTokenBefore(endToken); if (lastTokenOfElseBlock.value !== ";") { @@ -244,8 +245,8 @@ module.exports = { * Also, to avoid name collisions between two else blocks. */ return new FixTracker(fixer, sourceCode) - .retainEnclosingFunction(node) - .replaceTextRange([elseToken.range[0], node.range[1]], fixedSource); + .retainEnclosingFunction(elseNode) + .replaceTextRange([elseToken.range[0], elseNode.range[1]], fixedSource); } }); } diff --git a/node_modules/eslint/lib/rules/no-empty-character-class.js b/node_modules/eslint/lib/rules/no-empty-character-class.js index 7dc219fe1..5c8410235 100644 --- a/node_modules/eslint/lib/rules/no-empty-character-class.js +++ b/node_modules/eslint/lib/rules/no-empty-character-class.js @@ -5,37 +5,32 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp"); + //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ -/* - * plain-English description of the following regexp: - * 0. `^` fix the match at the beginning of the string - * 1. `\/`: the `/` that begins the regexp - * 2. `([^\\[]|\\.|\[([^\\\]]|\\.)+\])*`: regexp contents; 0 or more of the following - * 2.0. `[^\\[]`: any character that's not a `\` or a `[` (anything but escape sequences and character classes) - * 2.1. `\\.`: an escape sequence - * 2.2. `\[([^\\\]]|\\.)+\]`: a character class that isn't empty - * 3. `\/` the `/` that ends the regexp - * 4. `[gimuy]*`: optional regexp flags - * 5. `$`: fix the match at the end of the string - */ -const regex = /^\/([^\\[]|\\.|\[([^\\\]]|\\.)+\])*\/[gimuys]*$/u; +const parser = new RegExpParser(); +const QUICK_TEST_REGEX = /\[\]/u; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow empty character classes in regular expressions", - category: "Possible Errors", + description: "Disallow empty character classes in regular expressions", recommended: true, - url: "https://eslint.org/docs/rules/no-empty-character-class" + url: "https://eslint.org/docs/latest/rules/no-empty-character-class" }, schema: [], @@ -46,18 +41,35 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); - return { + "Literal[regex]"(node) { + const { pattern, flags } = node.regex; - Literal(node) { - const token = sourceCode.getFirstToken(node); + if (!QUICK_TEST_REGEX.test(pattern)) { + return; + } + + let regExpAST; + + try { + regExpAST = parser.parsePattern(pattern, 0, pattern.length, { + unicode: flags.includes("u"), + unicodeSets: flags.includes("v") + }); + } catch { - if (token.type === "RegularExpression" && !regex.test(token.value)) { - context.report({ node, messageId: "unexpected" }); + // Ignore regular expressions that regexpp cannot parse + return; } - } + visitRegExpAST(regExpAST, { + onCharacterClassEnter(characterClass) { + if (!characterClass.negate && characterClass.elements.length === 0) { + context.report({ node, messageId: "unexpected" }); + } + } + }); + } }; } diff --git a/node_modules/eslint/lib/rules/no-empty-function.js b/node_modules/eslint/lib/rules/no-empty-function.js index c512f8cd5..2fcb75534 100644 --- a/node_modules/eslint/lib/rules/no-empty-function.js +++ b/node_modules/eslint/lib/rules/no-empty-function.js @@ -89,15 +89,15 @@ function getKind(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow empty functions", - category: "Best Practices", + description: "Disallow empty functions", recommended: false, - url: "https://eslint.org/docs/rules/no-empty-function" + url: "https://eslint.org/docs/latest/rules/no-empty-function" }, schema: [ @@ -123,7 +123,7 @@ module.exports = { const options = context.options[0] || {}; const allowed = options.allow || []; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Reports a given function node if the node matches the following patterns. @@ -144,7 +144,7 @@ module.exports = { filter: astUtils.isCommentToken }); - if (allowed.indexOf(kind) === -1 && + if (!allowed.includes(kind) && node.body.type === "BlockStatement" && node.body.body.length === 0 && innerComments.length === 0 diff --git a/node_modules/eslint/lib/rules/no-empty-pattern.js b/node_modules/eslint/lib/rules/no-empty-pattern.js index 9f34bfde9..fb75f6d25 100644 --- a/node_modules/eslint/lib/rules/no-empty-pattern.js +++ b/node_modules/eslint/lib/rules/no-empty-pattern.js @@ -4,22 +4,35 @@ */ "use strict"; +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow empty destructuring patterns", - category: "Best Practices", + description: "Disallow empty destructuring patterns", recommended: true, - url: "https://eslint.org/docs/rules/no-empty-pattern" + url: "https://eslint.org/docs/latest/rules/no-empty-pattern" }, - schema: [], + schema: [ + { + type: "object", + properties: { + allowObjectPatternsAsParameters: { + type: "boolean", + default: false + } + }, + additionalProperties: false + } + ], messages: { unexpected: "Unexpected empty {{type}} pattern." @@ -27,11 +40,33 @@ module.exports = { }, create(context) { + const options = context.options[0] || {}, + allowObjectPatternsAsParameters = options.allowObjectPatternsAsParameters || false; + return { ObjectPattern(node) { - if (node.properties.length === 0) { - context.report({ node, messageId: "unexpected", data: { type: "object" } }); + + if (node.properties.length > 0) { + return; } + + // Allow {} and {} = {} empty object patterns as parameters when allowObjectPatternsAsParameters is true + if ( + allowObjectPatternsAsParameters && + ( + astUtils.isFunction(node.parent) || + ( + node.parent.type === "AssignmentPattern" && + astUtils.isFunction(node.parent.parent) && + node.parent.right.type === "ObjectExpression" && + node.parent.right.properties.length === 0 + ) + ) + ) { + return; + } + + context.report({ node, messageId: "unexpected", data: { type: "object" } }); }, ArrayPattern(node) { if (node.elements.length === 0) { diff --git a/node_modules/eslint/lib/rules/no-empty-static-block.js b/node_modules/eslint/lib/rules/no-empty-static-block.js new file mode 100644 index 000000000..81fc449b8 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-empty-static-block.js @@ -0,0 +1,47 @@ +/** + * @fileoverview Rule to disallow empty static blocks. + * @author Sosuke Suzuki + */ +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "suggestion", + + docs: { + description: "Disallow empty static blocks", + recommended: false, + url: "https://eslint.org/docs/latest/rules/no-empty-static-block" + }, + + schema: [], + + messages: { + unexpected: "Unexpected empty static block." + } + }, + + create(context) { + const sourceCode = context.sourceCode; + + return { + StaticBlock(node) { + if (node.body.length === 0) { + const closingBrace = sourceCode.getLastToken(node); + + if (sourceCode.getCommentsBefore(closingBrace).length === 0) { + context.report({ + node, + messageId: "unexpected" + }); + } + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-empty.js b/node_modules/eslint/lib/rules/no-empty.js index 45bf03c13..1c157963e 100644 --- a/node_modules/eslint/lib/rules/no-empty.js +++ b/node_modules/eslint/lib/rules/no-empty.js @@ -14,15 +14,16 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + hasSuggestions: true, type: "suggestion", docs: { - description: "disallow empty block statements", - category: "Possible Errors", + description: "Disallow empty block statements", recommended: true, - url: "https://eslint.org/docs/rules/no-empty" + url: "https://eslint.org/docs/latest/rules/no-empty" }, schema: [ @@ -39,7 +40,8 @@ module.exports = { ], messages: { - unexpected: "Empty {{type}} statement." + unexpected: "Empty {{type}} statement.", + suggestComment: "Add comment inside empty {{type}} statement." } }, @@ -47,7 +49,7 @@ module.exports = { const options = context.options[0] || {}, allowEmptyCatch = options.allowEmptyCatch || false; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { BlockStatement(node) { @@ -71,7 +73,22 @@ module.exports = { return; } - context.report({ node, messageId: "unexpected", data: { type: "block" } }); + context.report({ + node, + messageId: "unexpected", + data: { type: "block" }, + suggest: [ + { + messageId: "suggestComment", + data: { type: "block" }, + fix(fixer) { + const range = [node.range[0] + 1, node.range[1] - 1]; + + return fixer.replaceTextRange(range, " /* empty */ "); + } + } + ] + }); }, SwitchStatement(node) { diff --git a/node_modules/eslint/lib/rules/no-eq-null.js b/node_modules/eslint/lib/rules/no-eq-null.js index b8dead96d..9252907b6 100644 --- a/node_modules/eslint/lib/rules/no-eq-null.js +++ b/node_modules/eslint/lib/rules/no-eq-null.js @@ -10,15 +10,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `null` comparisons without type-checking operators", - category: "Best Practices", + description: "Disallow `null` comparisons without type-checking operators", recommended: false, - url: "https://eslint.org/docs/rules/no-eq-null" + url: "https://eslint.org/docs/latest/rules/no-eq-null" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-eval.js b/node_modules/eslint/lib/rules/no-eval.js index a020fdee0..a059526a6 100644 --- a/node_modules/eslint/lib/rules/no-eval.js +++ b/node_modules/eslint/lib/rules/no-eval.js @@ -37,15 +37,15 @@ function isMember(node, name) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `eval()`", - category: "Best Practices", + description: "Disallow the use of `eval()`", recommended: false, - url: "https://eslint.org/docs/rules/no-eval" + url: "https://eslint.org/docs/latest/rules/no-eval" }, schema: [ @@ -68,25 +68,29 @@ module.exports = { context.options[0] && context.options[0].allowIndirect ); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let funcInfo = null; /** - * Pushs a variable scope (Program or Function) information to the stack. + * Pushes a `this` scope (non-arrow function, class static block, or class field initializer) information to the stack. + * Top-level scopes are handled separately. * * This is used in order to check whether or not `this` binding is a * reference to the global object. - * @param {ASTNode} node A node of the scope. This is one of Program, - * FunctionDeclaration, FunctionExpression, and ArrowFunctionExpression. + * @param {ASTNode} node A node of the scope. + * For functions, this is one of FunctionDeclaration, FunctionExpression. + * For class static blocks, this is StaticBlock. + * For class field initializers, this can be any node that is PropertyDefinition#value. * @returns {void} */ - function enterVarScope(node) { - const strict = context.getScope().isStrict; + function enterThisScope(node) { + const strict = sourceCode.getScope(node).isStrict; funcInfo = { upper: funcInfo, node, strict, + isTopLevelOfScript: false, defaultThis: false, initialized: strict }; @@ -96,7 +100,7 @@ module.exports = { * Pops a variable scope from the stack. * @returns {void} */ - function exitVarScope() { + function exitThisScope() { funcInfo = funcInfo.upper; } @@ -217,36 +221,40 @@ module.exports = { }, Program(node) { - const scope = context.getScope(), + const scope = sourceCode.getScope(node), features = context.parserOptions.ecmaFeatures || {}, strict = scope.isStrict || node.sourceType === "module" || - (features.globalReturn && scope.childScopes[0].isStrict); + (features.globalReturn && scope.childScopes[0].isStrict), + isTopLevelOfScript = node.sourceType !== "module" && !features.globalReturn; funcInfo = { upper: null, node, strict, + isTopLevelOfScript, defaultThis: true, initialized: true }; }, - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); - exitVarScope(); + exitThisScope(); reportAccessingEval(globalScope); reportAccessingEvalViaGlobalObject(globalScope); }, - FunctionDeclaration: enterVarScope, - "FunctionDeclaration:exit": exitVarScope, - FunctionExpression: enterVarScope, - "FunctionExpression:exit": exitVarScope, - ArrowFunctionExpression: enterVarScope, - "ArrowFunctionExpression:exit": exitVarScope, + FunctionDeclaration: enterThisScope, + "FunctionDeclaration:exit": exitThisScope, + FunctionExpression: enterThisScope, + "FunctionExpression:exit": exitThisScope, + "PropertyDefinition > *.value": enterThisScope, + "PropertyDefinition > *.value:exit": exitThisScope, + StaticBlock: enterThisScope, + "StaticBlock:exit": exitThisScope, ThisExpression(node) { if (!isMember(node.parent, "eval")) { @@ -265,7 +273,8 @@ module.exports = { ); } - if (!funcInfo.strict && funcInfo.defaultThis) { + // `this` at the top level of scripts always refers to the global object + if (funcInfo.isTopLevelOfScript || (!funcInfo.strict && funcInfo.defaultThis)) { // `this.eval` is possible built-in `eval`. report(node.parent); diff --git a/node_modules/eslint/lib/rules/no-ex-assign.js b/node_modules/eslint/lib/rules/no-ex-assign.js index 116392036..d0e9febae 100644 --- a/node_modules/eslint/lib/rules/no-ex-assign.js +++ b/node_modules/eslint/lib/rules/no-ex-assign.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow reassigning exceptions in `catch` clauses", - category: "Possible Errors", + description: "Disallow reassigning exceptions in `catch` clauses", recommended: true, - url: "https://eslint.org/docs/rules/no-ex-assign" + url: "https://eslint.org/docs/latest/rules/no-ex-assign" }, schema: [], @@ -31,6 +31,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Finds and reports references that are non initializer and writable. * @param {Variable} variable A variable to check. @@ -44,7 +46,7 @@ module.exports = { return { CatchClause(node) { - context.getDeclaredVariables(node).forEach(checkVariable); + sourceCode.getDeclaredVariables(node).forEach(checkVariable); } }; diff --git a/node_modules/eslint/lib/rules/no-extend-native.js b/node_modules/eslint/lib/rules/no-extend-native.js index 2a804b563..fcbb38557 100644 --- a/node_modules/eslint/lib/rules/no-extend-native.js +++ b/node_modules/eslint/lib/rules/no-extend-native.js @@ -16,15 +16,15 @@ const globals = require("globals"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow extending native types", - category: "Best Practices", + description: "Disallow extending native types", recommended: false, - url: "https://eslint.org/docs/rules/no-extend-native" + url: "https://eslint.org/docs/latest/rules/no-extend-native" }, schema: [ @@ -51,6 +51,7 @@ module.exports = { create(context) { const config = context.options[0] || {}; + const sourceCode = context.sourceCode; const exceptions = new Set(config.exceptions || []); const modifiedBuiltins = new Set( Object.keys(globals.builtin) @@ -159,8 +160,8 @@ module.exports = { return { - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); modifiedBuiltins.forEach(builtin => { const builtinVar = globalScope.set.get(builtin); diff --git a/node_modules/eslint/lib/rules/no-extra-bind.js b/node_modules/eslint/lib/rules/no-extra-bind.js index 2db440dc1..e1e72b0c7 100644 --- a/node_modules/eslint/lib/rules/no-extra-bind.js +++ b/node_modules/eslint/lib/rules/no-extra-bind.js @@ -20,15 +20,15 @@ const SIDE_EFFECT_FREE_NODE_TYPES = new Set(["Literal", "Identifier", "ThisExpre // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary calls to `.bind()`", - category: "Best Practices", + description: "Disallow unnecessary calls to `.bind()`", recommended: false, - url: "https://eslint.org/docs/rules/no-extra-bind" + url: "https://eslint.org/docs/latest/rules/no-extra-bind" }, schema: [], @@ -40,7 +40,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let scopeInfo = null; /** diff --git a/node_modules/eslint/lib/rules/no-extra-boolean-cast.js b/node_modules/eslint/lib/rules/no-extra-boolean-cast.js index 6ae3ea62c..f342533bf 100644 --- a/node_modules/eslint/lib/rules/no-extra-boolean-cast.js +++ b/node_modules/eslint/lib/rules/no-extra-boolean-cast.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const eslintUtils = require("eslint-utils"); +const eslintUtils = require("@eslint-community/eslint-utils"); const precedence = astUtils.getPrecedence; @@ -18,15 +18,15 @@ const precedence = astUtils.getPrecedence; // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary boolean casts", - category: "Possible Errors", + description: "Disallow unnecessary boolean casts", recommended: true, - url: "https://eslint.org/docs/rules/no-extra-boolean-cast" + url: "https://eslint.org/docs/latest/rules/no-extra-boolean-cast" }, schema: [{ @@ -48,16 +48,16 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; // Node types which have a test which will coerce values to booleans. - const BOOLEAN_NODE_TYPES = [ + const BOOLEAN_NODE_TYPES = new Set([ "IfStatement", "DoWhileStatement", "WhileStatement", "ConditionalExpression", "ForStatement" - ]; + ]); /** * Check if a node is a Boolean function or constructor. @@ -95,7 +95,7 @@ module.exports = { (isBooleanFunctionOrConstructorCall(node.parent) && node === node.parent.arguments[0]) || - (BOOLEAN_NODE_TYPES.indexOf(node.parent.type) !== -1 && + (BOOLEAN_NODE_TYPES.has(node.parent.type) && node === node.parent.test) || // ! @@ -150,6 +150,7 @@ module.exports = { * For example, if the parent is `ConditionalExpression`, `previousNode` must be its `test` child. * @param {ASTNode} previousNode Previous node. * @param {ASTNode} node The node to check. + * @throws {Error} (Unreachable.) * @returns {boolean} `true` if the node needs to be parenthesized. */ function needsParens(previousNode, node) { @@ -187,7 +188,7 @@ module.exports = { } return precedence(node) <= precedence(parent); - /* istanbul ignore next */ + /* c8 ignore next */ default: throw new Error(`Unexpected parent type: ${parent.type}`); } diff --git a/node_modules/eslint/lib/rules/no-extra-label.js b/node_modules/eslint/lib/rules/no-extra-label.js index 81406e760..45ff441d0 100644 --- a/node_modules/eslint/lib/rules/no-extra-label.js +++ b/node_modules/eslint/lib/rules/no-extra-label.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary labels", - category: "Best Practices", + description: "Disallow unnecessary labels", recommended: false, - url: "https://eslint.org/docs/rules/no-extra-label" + url: "https://eslint.org/docs/latest/rules/no-extra-label" }, schema: [], @@ -35,7 +35,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let scopeInfo = null; /** diff --git a/node_modules/eslint/lib/rules/no-extra-parens.js b/node_modules/eslint/lib/rules/no-extra-parens.js index 307e340c9..75c082baf 100644 --- a/node_modules/eslint/lib/rules/no-extra-parens.js +++ b/node_modules/eslint/lib/rules/no-extra-parens.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow parenthesising higher precedence subexpressions. * @author Michael Ficarra + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -8,18 +9,20 @@ // Rule Definition //------------------------------------------------------------------------------ -const { isParenthesized: isParenthesizedRaw } = require("eslint-utils"); +const { isParenthesized: isParenthesizedRaw } = require("@eslint-community/eslint-utils"); const astUtils = require("./utils/ast-utils.js"); +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow unnecessary parentheses", - category: "Possible Errors", + description: "Disallow unnecessary parentheses", recommended: false, - url: "https://eslint.org/docs/rules/no-extra-parens" + url: "https://eslint.org/docs/latest/rules/no-extra-parens" }, fixable: "code", @@ -46,13 +49,15 @@ module.exports = { type: "object", properties: { conditionalAssign: { type: "boolean" }, + ternaryOperandBinaryExpressions: { type: "boolean" }, nestedBinaryExpressions: { type: "boolean" }, returnAssign: { type: "boolean" }, ignoreJSX: { enum: ["none", "all", "single-line", "multi-line"] }, enforceForArrowConditionals: { type: "boolean" }, enforceForSequenceExpressions: { type: "boolean" }, enforceForNewInMemberExpressions: { type: "boolean" }, - enforceForFunctionPrototypeMethods: { type: "boolean" } + enforceForFunctionPrototypeMethods: { type: "boolean" }, + allowParensAfterCommentPattern: { type: "string" } }, additionalProperties: false } @@ -69,12 +74,13 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const tokensToIgnore = new WeakSet(); const precedence = astUtils.getPrecedence; const ALL_NODES = context.options[0] !== "functions"; const EXCEPT_COND_ASSIGN = ALL_NODES && context.options[1] && context.options[1].conditionalAssign === false; + const EXCEPT_COND_TERNARY = ALL_NODES && context.options[1] && context.options[1].ternaryOperandBinaryExpressions === false; const NESTED_BINARY = ALL_NODES && context.options[1] && context.options[1].nestedBinaryExpressions === false; const EXCEPT_RETURN_ASSIGN = ALL_NODES && context.options[1] && context.options[1].returnAssign === false; const IGNORE_JSX = ALL_NODES && context.options[1] && context.options[1].ignoreJSX; @@ -86,6 +92,7 @@ module.exports = { context.options[1].enforceForNewInMemberExpressions === false; const IGNORE_FUNCTION_PROTOTYPE_METHODS = ALL_NODES && context.options[1] && context.options[1].enforceForFunctionPrototypeMethods === false; + const ALLOW_PARENS_AFTER_COMMENT_PATTERN = ALL_NODES && context.options[1] && context.options[1].allowParensAfterCommentPattern; const PRECEDENCE_OF_ASSIGNMENT_EXPR = precedence({ type: "AssignmentExpression" }); const PRECEDENCE_OF_UPDATE_EXPR = precedence({ type: "UpdateExpression" }); @@ -384,6 +391,30 @@ module.exports = { return node && (node.type === "Identifier" || node.type === "MemberExpression"); } + /** + * Checks if a node is fixable. + * A node is fixable if removing a single pair of surrounding parentheses does not turn it + * into a directive after fixing other nodes. + * Almost all nodes are fixable, except if all of the following conditions are met: + * The node is a string Literal + * It has a single pair of parentheses + * It is the only child of an ExpressionStatement + * @param {ASTNode} node The node to evaluate. + * @returns {boolean} Whether or not the node is fixable. + * @private + */ + function isFixable(node) { + + // if it's not a string literal it can be autofixed + if (node.type !== "Literal" || typeof node.value !== "string") { + return true; + } + if (isParenthesisedTwice(node)) { + return true; + } + return !astUtils.isTopLevelExpressionStatement(node.parent); + } + /** * Report the node * @param {ASTNode} node node to evaluate @@ -402,6 +433,19 @@ module.exports = { if (isIIFE(node) && !isParenthesised(node.callee)) { return; } + + if (ALLOW_PARENS_AFTER_COMMENT_PATTERN) { + const commentsBeforeLeftParenToken = sourceCode.getCommentsBefore(leftParenToken); + const totalCommentsBeforeLeftParenTokenCount = commentsBeforeLeftParenToken.length; + const ignorePattern = new RegExp(ALLOW_PARENS_AFTER_COMMENT_PATTERN, "u"); + + if ( + totalCommentsBeforeLeftParenTokenCount > 0 && + ignorePattern.test(commentsBeforeLeftParenToken[totalCommentsBeforeLeftParenTokenCount - 1].value) + ) { + return; + } + } } /** @@ -414,14 +458,16 @@ module.exports = { node, loc: leftParenToken.loc, messageId: "unexpected", - fix(fixer) { - const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); - - return fixer.replaceTextRange([ - leftParenToken.range[0], - rightParenToken.range[1] - ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); - } + fix: isFixable(node) + ? fixer => { + const parenthesizedSource = sourceCode.text.slice(leftParenToken.range[1], rightParenToken.range[0]); + + return fixer.replaceTextRange([ + leftParenToken.range[0], + rightParenToken.range[1] + ], (requiresLeadingSpace(node) ? " " : "") + parenthesizedSource + (requiresTrailingSpace(node) ? " " : "")); + } + : null }); } @@ -634,10 +680,10 @@ module.exports = { currentNode = currentNode.parent; - /* istanbul ignore if */ + /* c8 ignore start */ if (currentNode === null) { throw new Error("Nodes are not in the ancestor-descendant relationship."); - } + }/* c8 ignore stop */ path.push(currentNode); } @@ -751,6 +797,38 @@ module.exports = { return false; } + /** + * Checks if the left-hand side of an assignment is an identifier, the operator is one of + * `=`, `&&=`, `||=` or `??=` and the right-hand side is an anonymous class or function. + * + * As per https://tc39.es/ecma262/#sec-assignment-operators-runtime-semantics-evaluation, an + * assignment involving one of the operators `=`, `&&=`, `||=` or `??=` where the right-hand + * side is an anonymous class or function and the left-hand side is an *unparenthesized* + * identifier has different semantics than other assignments. + * Specifically, when an expression like `foo = function () {}` is evaluated, `foo.name` + * will be set to the string "foo", i.e. the identifier name. The same thing does not happen + * when evaluating `(foo) = function () {}`. + * Since the parenthesizing of the identifier in the left-hand side is significant in this + * special case, the parentheses, if present, should not be flagged as unnecessary. + * @param {ASTNode} node an AssignmentExpression node. + * @returns {boolean} `true` if the left-hand side of the assignment is an identifier, the + * operator is one of `=`, `&&=`, `||=` or `??=` and the right-hand side is an anonymous + * class or function; otherwise, `false`. + */ + function isAnonymousFunctionAssignmentException({ left, operator, right }) { + if (left.type === "Identifier" && ["=", "&&=", "||=", "??="].includes(operator)) { + const rhsType = right.type; + + if (rhsType === "ArrowFunctionExpression") { + return true; + } + if ((rhsType === "FunctionExpression" || rhsType === "ClassExpression") && !right.id) { + return true; + } + } + return false; + } + return { ArrayExpression(node) { node.elements @@ -789,7 +867,8 @@ module.exports = { }, AssignmentExpression(node) { - if (canBeAssignmentTarget(node.left) && hasExcessParens(node.left)) { + if (canBeAssignmentTarget(node.left) && hasExcessParens(node.left) && + (!isAnonymousFunctionAssignmentException(node) || isParenthesisedTwice(node.left))) { report(node.left); } @@ -808,29 +887,30 @@ module.exports = { CallExpression: checkCallNew, - ClassBody(node) { - node.body - .filter(member => member.type === "MethodDefinition" && member.computed && member.key) - .filter(member => hasExcessParensWithPrecedence(member.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) - .forEach(member => report(member.key)); - }, - ConditionalExpression(node) { if (isReturnAssignException(node)) { return; } + + const availableTypes = new Set(["BinaryExpression", "LogicalExpression"]); + if ( + !(EXCEPT_COND_TERNARY && availableTypes.has(node.test.type)) && !isCondAssignException(node) && hasExcessParensWithPrecedence(node.test, precedence({ type: "LogicalExpression", operator: "||" })) ) { report(node.test); } - if (hasExcessParensWithPrecedence(node.consequent, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { + if ( + !(EXCEPT_COND_TERNARY && availableTypes.has(node.consequent.type)) && + hasExcessParensWithPrecedence(node.consequent, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { report(node.consequent); } - if (hasExcessParensWithPrecedence(node.alternate, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { + if ( + !(EXCEPT_COND_TERNARY && availableTypes.has(node.alternate.type)) && + hasExcessParensWithPrecedence(node.alternate, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { report(node.alternate); } }, @@ -1063,6 +1143,12 @@ module.exports = { } }, + "MethodDefinition[computed=true]"(node) { + if (hasExcessParensWithPrecedence(node.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { + report(node.key); + } + }, + NewExpression: checkCallNew, ObjectExpression(node) { @@ -1090,6 +1176,16 @@ module.exports = { } }, + PropertyDefinition(node) { + if (node.computed && hasExcessParensWithPrecedence(node.key, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { + report(node.key); + } + + if (node.value && hasExcessParensWithPrecedence(node.value, PRECEDENCE_OF_ASSIGNMENT_EXPR)) { + report(node.value); + } + }, + RestElement(node) { const argument = node.argument; diff --git a/node_modules/eslint/lib/rules/no-extra-semi.js b/node_modules/eslint/lib/rules/no-extra-semi.js index e0a8df056..af7eb8888 100644 --- a/node_modules/eslint/lib/rules/no-extra-semi.js +++ b/node_modules/eslint/lib/rules/no-extra-semi.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag use of unnecessary semicolons * @author Nicholas C. Zakas + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -16,15 +17,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "disallow unnecessary semicolons", - category: "Possible Errors", + description: "Disallow unnecessary semicolons", recommended: true, - url: "https://eslint.org/docs/rules/no-extra-semi" + url: "https://eslint.org/docs/latest/rules/no-extra-semi" }, fixable: "code", @@ -36,7 +39,24 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; + + /** + * Checks if a node or token is fixable. + * A node is fixable if it can be removed without turning a subsequent statement into a directive after fixing other nodes. + * @param {Token} nodeOrToken The node or token to check. + * @returns {boolean} Whether or not the node is fixable. + */ + function isFixable(nodeOrToken) { + const nextToken = sourceCode.getTokenAfter(nodeOrToken); + + if (!nextToken || nextToken.type !== "String") { + return true; + } + const stringNode = sourceCode.getNodeByRangeIndex(nextToken.range[0]); + + return !astUtils.isTopLevelExpressionStatement(stringNode.parent); + } /** * Reports an unnecessary semicolon error. @@ -47,17 +67,18 @@ module.exports = { context.report({ node: nodeOrToken, messageId: "unexpected", - fix(fixer) { - - /* - * Expand the replacement range to include the surrounding - * tokens to avoid conflicting with semi. - * https://github.com/eslint/eslint/issues/7928 - */ - return new FixTracker(fixer, context.getSourceCode()) - .retainSurroundingTokens(nodeOrToken) - .remove(nodeOrToken); - } + fix: isFixable(nodeOrToken) + ? fixer => + + /* + * Expand the replacement range to include the surrounding + * tokens to avoid conflicting with semi. + * https://github.com/eslint/eslint/issues/7928 + */ + new FixTracker(fixer, context.sourceCode) + .retainSurroundingTokens(nodeOrToken) + .remove(nodeOrToken) + : null }); } @@ -98,7 +119,7 @@ module.exports = { "WithStatement" ]; - if (allowedParentTypes.indexOf(parent.type) === -1) { + if (!allowedParentTypes.includes(parent.type)) { report(node); } }, @@ -117,7 +138,7 @@ module.exports = { * @param {Node} node A MethodDefinition node of the start point. * @returns {void} */ - MethodDefinition(node) { + "MethodDefinition, PropertyDefinition, StaticBlock"(node) { checkForPartOfClassBody(sourceCode.getTokenAfter(node)); } }; diff --git a/node_modules/eslint/lib/rules/no-fallthrough.js b/node_modules/eslint/lib/rules/no-fallthrough.js index dd1f3ed9d..91da12120 100644 --- a/node_modules/eslint/lib/rules/no-fallthrough.js +++ b/node_modules/eslint/lib/rules/no-fallthrough.js @@ -8,7 +8,7 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); +const { directivesPattern } = require("../shared/directives"); //------------------------------------------------------------------------------ // Helpers @@ -17,26 +17,54 @@ const lodash = require("lodash"); const DEFAULT_FALLTHROUGH_COMMENT = /falls?\s?through/iu; /** - * Checks whether or not a given node has a fallthrough comment. - * @param {ASTNode} node A SwitchCase node to get comments. - * @param {RuleContext} context A rule context which stores comments. - * @param {RegExp} fallthroughCommentPattern A pattern to match comment to. - * @returns {boolean} `true` if the node has a valid fallthrough comment. + * Checks all segments in a set and returns true if any are reachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if any segment is reachable; false otherwise. */ -function hasFallthroughComment(node, context, fallthroughCommentPattern) { - const sourceCode = context.getSourceCode(); - const comment = lodash.last(sourceCode.getCommentsBefore(node)); +function isAnySegmentReachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return true; + } + } - return Boolean(comment && fallthroughCommentPattern.test(comment.value)); + return false; } /** - * Checks whether or not a given code path segment is reachable. - * @param {CodePathSegment} segment A CodePathSegment to check. - * @returns {boolean} `true` if the segment is reachable. + * Checks whether or not a given comment string is really a fallthrough comment and not an ESLint directive. + * @param {string} comment The comment string to check. + * @param {RegExp} fallthroughCommentPattern The regular expression used for checking for fallthrough comments. + * @returns {boolean} `true` if the comment string is truly a fallthrough comment. */ -function isReachable(segment) { - return segment.reachable; +function isFallThroughComment(comment, fallthroughCommentPattern) { + return fallthroughCommentPattern.test(comment) && !directivesPattern.test(comment.trim()); +} + +/** + * Checks whether or not a given case has a fallthrough comment. + * @param {ASTNode} caseWhichFallsThrough SwitchCase node which falls through. + * @param {ASTNode} subsequentCase The case after caseWhichFallsThrough. + * @param {RuleContext} context A rule context which stores comments. + * @param {RegExp} fallthroughCommentPattern A pattern to match comment to. + * @returns {boolean} `true` if the case has a valid fallthrough comment. + */ +function hasFallthroughComment(caseWhichFallsThrough, subsequentCase, context, fallthroughCommentPattern) { + const sourceCode = context.sourceCode; + + if (caseWhichFallsThrough.consequent.length === 1 && caseWhichFallsThrough.consequent[0].type === "BlockStatement") { + const trailingCloseBrace = sourceCode.getLastToken(caseWhichFallsThrough.consequent[0]); + const commentInBlock = sourceCode.getCommentsBefore(trailingCloseBrace).pop(); + + if (commentInBlock && isFallThroughComment(commentInBlock.value, fallthroughCommentPattern)) { + return true; + } + } + + const comment = sourceCode.getCommentsBefore(subsequentCase).pop(); + + return Boolean(comment && isFallThroughComment(comment.value, fallthroughCommentPattern)); } /** @@ -53,15 +81,15 @@ function hasBlankLinesBetween(node, token) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow fallthrough of `case` statements", - category: "Best Practices", + description: "Disallow fallthrough of `case` statements", recommended: true, - url: "https://eslint.org/docs/rules/no-fallthrough" + url: "https://eslint.org/docs/latest/rules/no-fallthrough" }, schema: [ @@ -71,6 +99,10 @@ module.exports = { commentPattern: { type: "string", default: "" + }, + allowEmptyCase: { + type: "boolean", + default: false } }, additionalProperties: false @@ -84,8 +116,10 @@ module.exports = { create(context) { const options = context.options[0] || {}; - let currentCodePath = null; - const sourceCode = context.getSourceCode(); + const codePathSegments = []; + let currentCodePathSegments = new Set(); + const sourceCode = context.sourceCode; + const allowEmptyCase = options.allowEmptyCase || false; /* * We need to use leading comments of the next SwitchCase node because @@ -99,22 +133,42 @@ module.exports = { } else { fallthroughCommentPattern = DEFAULT_FALLTHROUGH_COMMENT; } - return { - onCodePathStart(codePath) { - currentCodePath = codePath; + + onCodePathStart() { + codePathSegments.push(currentCodePathSegments); + currentCodePathSegments = new Set(); }, + onCodePathEnd() { - currentCodePath = currentCodePath.upper; + currentCodePathSegments = codePathSegments.pop(); + }, + + onUnreachableCodePathSegmentStart(segment) { + currentCodePathSegments.add(segment); }, + onUnreachableCodePathSegmentEnd(segment) { + currentCodePathSegments.delete(segment); + }, + + onCodePathSegmentStart(segment) { + currentCodePathSegments.add(segment); + }, + + onCodePathSegmentEnd(segment) { + currentCodePathSegments.delete(segment); + }, + + SwitchCase(node) { /* * Checks whether or not there is a fallthrough comment. * And reports the previous fallthrough node if that does not exist. */ - if (fallthroughCase && !hasFallthroughComment(node, context, fallthroughCommentPattern)) { + + if (fallthroughCase && (!hasFallthroughComment(fallthroughCase, node, context, fallthroughCommentPattern))) { context.report({ messageId: node.test ? "case" : "default", node @@ -131,9 +185,9 @@ module.exports = { * `break`, `return`, or `throw` are unreachable. * And allows empty cases and the last case. */ - if (currentCodePath.currentSegments.some(isReachable) && - (node.consequent.length > 0 || hasBlankLinesBetween(node, nextToken)) && - lodash.last(node.parent.cases) !== node) { + if (isAnySegmentReachable(currentCodePathSegments) && + (node.consequent.length > 0 || (!allowEmptyCase && hasBlankLinesBetween(node, nextToken))) && + node.parent.cases[node.parent.cases.length - 1] !== node) { fallthroughCase = node; } } diff --git a/node_modules/eslint/lib/rules/no-floating-decimal.js b/node_modules/eslint/lib/rules/no-floating-decimal.js index b1d883212..80e4994cd 100644 --- a/node_modules/eslint/lib/rules/no-floating-decimal.js +++ b/node_modules/eslint/lib/rules/no-floating-decimal.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag use of a leading/trailing decimal point in a numeric literal * @author James Allardice + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "disallow leading or trailing decimal points in numeric literals", - category: "Best Practices", + description: "Disallow leading or trailing decimal points in numeric literals", recommended: false, - url: "https://eslint.org/docs/rules/no-floating-decimal" + url: "https://eslint.org/docs/latest/rules/no-floating-decimal" }, schema: [], @@ -35,7 +38,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { Literal(node) { diff --git a/node_modules/eslint/lib/rules/no-func-assign.js b/node_modules/eslint/lib/rules/no-func-assign.js index 33d0ad9ec..8084af6eb 100644 --- a/node_modules/eslint/lib/rules/no-func-assign.js +++ b/node_modules/eslint/lib/rules/no-func-assign.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow reassigning `function` declarations", - category: "Possible Errors", + description: "Disallow reassigning `function` declarations", recommended: true, - url: "https://eslint.org/docs/rules/no-func-assign" + url: "https://eslint.org/docs/latest/rules/no-func-assign" }, schema: [], @@ -31,6 +31,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Reports a reference if is non initializer and writable. * @param {References} references Collection of reference to check. @@ -65,7 +67,7 @@ module.exports = { * @returns {void} */ function checkForFunction(node) { - context.getDeclaredVariables(node).forEach(checkVariable); + sourceCode.getDeclaredVariables(node).forEach(checkVariable); } return { diff --git a/node_modules/eslint/lib/rules/no-global-assign.js b/node_modules/eslint/lib/rules/no-global-assign.js index ea854c4aa..99ae7a2ee 100644 --- a/node_modules/eslint/lib/rules/no-global-assign.js +++ b/node_modules/eslint/lib/rules/no-global-assign.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow assignments to native objects or read-only global variables", - category: "Best Practices", + description: "Disallow assignments to native objects or read-only global variables", recommended: true, - url: "https://eslint.org/docs/rules/no-global-assign" + url: "https://eslint.org/docs/latest/rules/no-global-assign" }, schema: [ @@ -41,6 +41,7 @@ module.exports = { create(context) { const config = context.options[0]; + const sourceCode = context.sourceCode; const exceptions = (config && config.exceptions) || []; /** @@ -78,14 +79,14 @@ module.exports = { * @returns {void} */ function checkVariable(variable) { - if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) { + if (variable.writeable === false && !exceptions.includes(variable.name)) { variable.references.forEach(checkReference); } } return { - Program() { - const globalScope = context.getScope(); + Program(node) { + const globalScope = sourceCode.getScope(node); globalScope.variables.forEach(checkVariable); } diff --git a/node_modules/eslint/lib/rules/no-implicit-coercion.js b/node_modules/eslint/lib/rules/no-implicit-coercion.js index a639711ec..36baad383 100644 --- a/node_modules/eslint/lib/rules/no-implicit-coercion.js +++ b/node_modules/eslint/lib/rules/no-implicit-coercion.js @@ -24,14 +24,15 @@ function parseOptions(options) { boolean: "boolean" in options ? options.boolean : true, number: "number" in options ? options.number : true, string: "string" in options ? options.string : true, + disallowTemplateShorthand: "disallowTemplateShorthand" in options ? options.disallowTemplateShorthand : false, allow: options.allow || [] }; } /** - * Checks whether or not a node is a double logical nigating. + * Checks whether or not a node is a double logical negating. * @param {ASTNode} node An UnaryExpression node to check. - * @returns {boolean} Whether or not the node is a double logical nigating. + * @returns {boolean} Whether or not the node is a double logical negating. */ function isDoubleLogicalNegating(node) { return ( @@ -70,6 +71,24 @@ function isMultiplyByOne(node) { ); } +/** + * Checks whether the given node logically represents multiplication by a fraction of `1`. + * For example, `a * 1` in `a * 1 / b` is technically multiplication by `1`, but the + * whole expression can be logically interpreted as `a * (1 / b)` rather than `(a * 1) / b`. + * @param {BinaryExpression} node A BinaryExpression node to check. + * @param {SourceCode} sourceCode The source code object. + * @returns {boolean} Whether or not the node is a multiplying by a fraction of `1`. + */ +function isMultiplyByFractionOfOne(node, sourceCode) { + return node.type === "BinaryExpression" && + node.operator === "*" && + (node.right.type === "Literal" && node.right.value === 1) && + node.parent.type === "BinaryExpression" && + node.parent.operator === "/" && + node.parent.left === node && + !astUtils.isParenthesised(sourceCode, node); +} + /** * Checks whether the result of a node is numeric or not * @param {ASTNode} node The node to test @@ -108,6 +127,20 @@ function getNonNumericOperand(node) { return null; } +/** + * Checks whether an expression evaluates to a string. + * @param {ASTNode} node node that represents the expression to check. + * @returns {boolean} Whether or not the expression evaluates to a string. + */ +function isStringType(node) { + return astUtils.isStringLiteral(node) || + ( + node.type === "CallExpression" && + node.callee.type === "Identifier" && + node.callee.name === "String" + ); +} + /** * Checks whether a node is an empty string literal or not. * @param {ASTNode} node The node to check. @@ -125,8 +158,8 @@ function isEmptyString(node) { */ function isConcatWithEmptyString(node) { return node.operator === "+" && ( - (isEmptyString(node.left) && !astUtils.isStringLiteral(node.right)) || - (isEmptyString(node.right) && !astUtils.isStringLiteral(node.left)) + (isEmptyString(node.left) && !isStringType(node.right)) || + (isEmptyString(node.right) && !isStringType(node.left)) ); } @@ -152,15 +185,15 @@ function getNonEmptyOperand(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow shorthand type conversions", - category: "Best Practices", + description: "Disallow shorthand type conversions", recommended: false, - url: "https://eslint.org/docs/rules/no-implicit-coercion" + url: "https://eslint.org/docs/latest/rules/no-implicit-coercion" }, fixable: "code", @@ -180,6 +213,10 @@ module.exports = { type: "boolean", default: true }, + disallowTemplateShorthand: { + type: "boolean", + default: false + }, allow: { type: "array", items: { @@ -198,7 +235,7 @@ module.exports = { create(context) { const options = parseOptions(context.options[0] || {}); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Reports an error and autofixes the node @@ -238,7 +275,7 @@ module.exports = { let operatorAllowed; // !!foo - operatorAllowed = options.allow.indexOf("!!") >= 0; + operatorAllowed = options.allow.includes("!!"); if (!operatorAllowed && options.boolean && isDoubleLogicalNegating(node)) { const recommendation = `Boolean(${sourceCode.getText(node.argument.argument)})`; @@ -246,7 +283,7 @@ module.exports = { } // ~foo.indexOf(bar) - operatorAllowed = options.allow.indexOf("~") >= 0; + operatorAllowed = options.allow.includes("~"); if (!operatorAllowed && options.boolean && isBinaryNegatingOfIndexOf(node)) { // `foo?.indexOf(bar) !== -1` will be true (== found) if the `foo` is nullish. So use `>= 0` in that case. @@ -257,7 +294,7 @@ module.exports = { } // +foo - operatorAllowed = options.allow.indexOf("+") >= 0; + operatorAllowed = options.allow.includes("+"); if (!operatorAllowed && options.number && node.operator === "+" && !isNumeric(node.argument)) { const recommendation = `Number(${sourceCode.getText(node.argument)})`; @@ -270,8 +307,9 @@ module.exports = { let operatorAllowed; // 1 * foo - operatorAllowed = options.allow.indexOf("*") >= 0; - const nonNumericOperand = !operatorAllowed && options.number && isMultiplyByOne(node) && getNonNumericOperand(node); + operatorAllowed = options.allow.includes("*"); + const nonNumericOperand = !operatorAllowed && options.number && isMultiplyByOne(node) && !isMultiplyByFractionOfOne(node, sourceCode) && + getNonNumericOperand(node); if (nonNumericOperand) { const recommendation = `Number(${sourceCode.getText(nonNumericOperand)})`; @@ -280,7 +318,7 @@ module.exports = { } // "" + foo - operatorAllowed = options.allow.indexOf("+") >= 0; + operatorAllowed = options.allow.includes("+"); if (!operatorAllowed && options.string && isConcatWithEmptyString(node)) { const recommendation = `String(${sourceCode.getText(getNonEmptyOperand(node))})`; @@ -291,7 +329,7 @@ module.exports = { AssignmentExpression(node) { // foo += "" - const operatorAllowed = options.allow.indexOf("+") >= 0; + const operatorAllowed = options.allow.includes("+"); if (!operatorAllowed && options.string && isAppendEmptyString(node)) { const code = sourceCode.getText(getNonEmptyOperand(node)); @@ -299,6 +337,43 @@ module.exports = { report(node, recommendation, true); } + }, + + TemplateLiteral(node) { + if (!options.disallowTemplateShorthand) { + return; + } + + // tag`${foo}` + if (node.parent.type === "TaggedTemplateExpression") { + return; + } + + // `` or `${foo}${bar}` + if (node.expressions.length !== 1) { + return; + } + + + // `prefix${foo}` + if (node.quasis[0].value.cooked !== "") { + return; + } + + // `${foo}postfix` + if (node.quasis[1].value.cooked !== "") { + return; + } + + // if the expression is already a string, then this isn't a coercion + if (isStringType(node.expressions[0])) { + return; + } + + const code = sourceCode.getText(node.expressions[0]); + const recommendation = `String(${code})`; + + report(node, recommendation, true); } }; } diff --git a/node_modules/eslint/lib/rules/no-implicit-globals.js b/node_modules/eslint/lib/rules/no-implicit-globals.js index d4bfa3af8..2a182477c 100644 --- a/node_modules/eslint/lib/rules/no-implicit-globals.js +++ b/node_modules/eslint/lib/rules/no-implicit-globals.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow declarations in the global scope", - category: "Best Practices", + description: "Disallow declarations in the global scope", recommended: false, - url: "https://eslint.org/docs/rules/no-implicit-globals" + url: "https://eslint.org/docs/latest/rules/no-implicit-globals" }, schema: [{ @@ -43,6 +43,7 @@ module.exports = { create(context) { const checkLexicalBindings = context.options[0] && context.options[0].lexicalBindings === true; + const sourceCode = context.sourceCode; /** * Reports the node. @@ -62,8 +63,8 @@ module.exports = { } return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); scope.variables.forEach(variable => { @@ -77,6 +78,11 @@ module.exports = { return; } + // Variables exported by "exported" block comments + if (variable.eslintExported) { + return; + } + variable.defs.forEach(def => { const defNode = def.node; diff --git a/node_modules/eslint/lib/rules/no-implied-eval.js b/node_modules/eslint/lib/rules/no-implied-eval.js index b8120a648..9a84f8cba 100644 --- a/node_modules/eslint/lib/rules/no-implied-eval.js +++ b/node_modules/eslint/lib/rules/no-implied-eval.js @@ -10,21 +10,21 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { getStaticValue } = require("eslint-utils"); +const { getStaticValue } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `eval()`-like methods", - category: "Best Practices", + description: "Disallow the use of `eval()`-like methods", recommended: false, - url: "https://eslint.org/docs/rules/no-implied-eval" + url: "https://eslint.org/docs/latest/rules/no-implied-eval" }, schema: [], @@ -37,6 +37,7 @@ module.exports = { create(context) { const GLOBAL_CANDIDATES = Object.freeze(["global", "window", "globalThis"]); const EVAL_LIKE_FUNC_PATTERN = /^(?:set(?:Interval|Timeout)|execScript)$/u; + const sourceCode = context.sourceCode; /** * Checks whether a node is evaluated as a string or not. @@ -66,7 +67,7 @@ module.exports = { if (firstArgument) { - const staticValue = getStaticValue(firstArgument, context.getScope()); + const staticValue = getStaticValue(firstArgument, sourceCode.getScope(node)); const isStaticString = staticValue && typeof staticValue.value === "string"; const isString = isStaticString || isEvaluatedString(firstArgument); @@ -117,8 +118,8 @@ module.exports = { reportImpliedEvalCallExpression(node); } }, - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); GLOBAL_CANDIDATES .map(candidate => astUtils.getVariableByName(globalScope, candidate)) diff --git a/node_modules/eslint/lib/rules/no-import-assign.js b/node_modules/eslint/lib/rules/no-import-assign.js index 41060d8ac..c69988666 100644 --- a/node_modules/eslint/lib/rules/no-import-assign.js +++ b/node_modules/eslint/lib/rules/no-import-assign.js @@ -9,7 +9,7 @@ // Helpers //------------------------------------------------------------------------------ -const { findVariable } = require("eslint-utils"); +const { findVariable } = require("@eslint-community/eslint-utils"); const astUtils = require("./utils/ast-utils"); const WellKnownMutationFunctions = { @@ -174,15 +174,15 @@ function getWriteNode(id) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow assigning to imported bindings", - category: "Possible Errors", + description: "Disallow assigning to imported bindings", recommended: true, - url: "https://eslint.org/docs/rules/no-import-assign" + url: "https://eslint.org/docs/latest/rules/no-import-assign" }, schema: [], @@ -194,11 +194,13 @@ module.exports = { }, create(context) { + const sourceCode = context.sourceCode; + return { ImportDeclaration(node) { - const scope = context.getScope(); + const scope = sourceCode.getScope(node); - for (const variable of context.getDeclaredVariables(node)) { + for (const variable of sourceCode.getDeclaredVariables(node)) { const shouldCheckMembers = variable.defs.some( d => d.node.type === "ImportNamespaceSpecifier" ); diff --git a/node_modules/eslint/lib/rules/no-inline-comments.js b/node_modules/eslint/lib/rules/no-inline-comments.js index dec278615..d96e6472d 100644 --- a/node_modules/eslint/lib/rules/no-inline-comments.js +++ b/node_modules/eslint/lib/rules/no-inline-comments.js @@ -10,15 +10,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow inline comments after code", - category: "Stylistic Issues", + description: "Disallow inline comments after code", recommended: false, - url: "https://eslint.org/docs/rules/no-inline-comments" + url: "https://eslint.org/docs/latest/rules/no-inline-comments" }, schema: [ @@ -39,7 +39,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const options = context.options[0]; let customIgnoreRegExp; diff --git a/node_modules/eslint/lib/rules/no-inner-declarations.js b/node_modules/eslint/lib/rules/no-inner-declarations.js index 0768bc611..f4bae43e5 100644 --- a/node_modules/eslint/lib/rules/no-inner-declarations.js +++ b/node_modules/eslint/lib/rules/no-inner-declarations.js @@ -15,18 +15,42 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ -const validParent = new Set(["Program", "ExportNamedDeclaration", "ExportDefaultDeclaration"]); +const validParent = new Set(["Program", "StaticBlock", "ExportNamedDeclaration", "ExportDefaultDeclaration"]); const validBlockStatementParent = new Set(["FunctionDeclaration", "FunctionExpression", "ArrowFunctionExpression"]); +/** + * Finds the nearest enclosing context where this rule allows declarations and returns its description. + * @param {ASTNode} node Node to search from. + * @returns {string} Description. One of "program", "function body", "class static block body". + */ +function getAllowedBodyDescription(node) { + let { parent } = node; + + while (parent) { + + if (parent.type === "StaticBlock") { + return "class static block body"; + } + + if (astUtils.isFunction(parent)) { + return "function body"; + } + + ({ parent } = parent); + } + + return "program"; +} + +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow variable or `function` declarations in nested blocks", - category: "Possible Errors", + description: "Disallow variable or `function` declarations in nested blocks", recommended: true, - url: "https://eslint.org/docs/rules/no-inner-declarations" + url: "https://eslint.org/docs/latest/rules/no-inner-declarations" }, schema: [ @@ -60,14 +84,12 @@ module.exports = { return; } - const upperFunction = astUtils.getUpperFunction(parent); - context.report({ node, messageId: "moveDeclToRoot", data: { type: (node.type === "FunctionDeclaration" ? "function" : "variable"), - body: (upperFunction === null ? "program" : "function body") + body: getAllowedBodyDescription(node) } }); } diff --git a/node_modules/eslint/lib/rules/no-invalid-regexp.js b/node_modules/eslint/lib/rules/no-invalid-regexp.js index 94ad5ba6d..3c42a68e8 100644 --- a/node_modules/eslint/lib/rules/no-invalid-regexp.js +++ b/node_modules/eslint/lib/rules/no-invalid-regexp.js @@ -8,24 +8,24 @@ // Requirements //------------------------------------------------------------------------------ -const RegExpValidator = require("regexpp").RegExpValidator; +const RegExpValidator = require("@eslint-community/regexpp").RegExpValidator; const validator = new RegExpValidator(); -const validFlags = /[gimuys]/gu; +const validFlags = /[dgimsuvy]/gu; const undefined1 = void 0; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow invalid regular expression strings in `RegExp` constructors", - category: "Possible Errors", + description: "Disallow invalid regular expression strings in `RegExp` constructors", recommended: true, - url: "https://eslint.org/docs/rules/no-invalid-regexp" + url: "https://eslint.org/docs/latest/rules/no-invalid-regexp" }, schema: [{ @@ -59,6 +59,20 @@ module.exports = { } } + /** + * Reports error with the provided message. + * @param {ASTNode} node The node holding the invalid RegExp + * @param {string} message The message to report. + * @returns {void} + */ + function report(node, message) { + context.report({ + node, + messageId: "regexMessage", + data: { message } + }); + } + /** * Check if node is a string * @param {ASTNode} node node to evaluate @@ -94,12 +108,14 @@ module.exports = { /** * Check syntax error in a given pattern. * @param {string} pattern The RegExp pattern to validate. - * @param {boolean} uFlag The Unicode flag. + * @param {Object} flags The RegExp flags to validate. + * @param {boolean} [flags.unicode] The Unicode flag. + * @param {boolean} [flags.unicodeSets] The UnicodeSets flag. * @returns {string|null} The syntax error. */ - function validateRegExpPattern(pattern, uFlag) { + function validateRegExpPattern(pattern, flags) { try { - validator.validatePattern(pattern, undefined1, undefined1, uFlag); + validator.validatePattern(pattern, undefined1, undefined1, flags); return null; } catch (err) { return err.message; @@ -108,48 +124,69 @@ module.exports = { /** * Check syntax error in a given flags. - * @param {string} flags The RegExp flags to validate. + * @param {string|null} flags The RegExp flags to validate. * @returns {string|null} The syntax error. */ function validateRegExpFlags(flags) { + if (!flags) { + return null; + } try { validator.validateFlags(flags); - return null; } catch { return `Invalid flags supplied to RegExp constructor '${flags}'`; } + + /* + * `regexpp` checks the combination of `u` and `v` flags when parsing `Pattern` according to `ecma262`, + * but this rule may check only the flag when the pattern is unidentifiable, so check it here. + * https://tc39.es/ecma262/multipage/text-processing.html#sec-parsepattern + */ + if (flags.includes("u") && flags.includes("v")) { + return "Regex 'u' and 'v' flags cannot be used together"; + } + return null; } return { "CallExpression, NewExpression"(node) { - if (node.callee.type !== "Identifier" || node.callee.name !== "RegExp" || !isString(node.arguments[0])) { + if (node.callee.type !== "Identifier" || node.callee.name !== "RegExp") { return; } - const pattern = node.arguments[0].value; + let flags = getFlags(node); if (flags && allowedFlags) { flags = flags.replace(allowedFlags, ""); } - const message = - ( - flags && validateRegExpFlags(flags) - ) || - ( + let message = validateRegExpFlags(flags); + + if (message) { + report(node, message); + return; + } + + if (!isString(node.arguments[0])) { + return; + } + + const pattern = node.arguments[0].value; + + message = ( - // If flags are unknown, report the regex only if its pattern is invalid both with and without the "u" flag - flags === null - ? validateRegExpPattern(pattern, true) && validateRegExpPattern(pattern, false) - : validateRegExpPattern(pattern, flags.includes("u")) - ); + // If flags are unknown, report the regex only if its pattern is invalid both with and without the "u" flag + flags === null + ? ( + validateRegExpPattern(pattern, { unicode: true, unicodeSets: false }) && + validateRegExpPattern(pattern, { unicode: false, unicodeSets: true }) && + validateRegExpPattern(pattern, { unicode: false, unicodeSets: false }) + ) + : validateRegExpPattern(pattern, { unicode: flags.includes("u"), unicodeSets: flags.includes("v") }) + ); if (message) { - context.report({ - node, - messageId: "regexMessage", - data: { message } - }); + report(node, message); } } }; diff --git a/node_modules/eslint/lib/rules/no-invalid-this.js b/node_modules/eslint/lib/rules/no-invalid-this.js index a79c586d7..9e214035c 100644 --- a/node_modules/eslint/lib/rules/no-invalid-this.js +++ b/node_modules/eslint/lib/rules/no-invalid-this.js @@ -1,5 +1,5 @@ /** - * @fileoverview A rule to disallow `this` keywords outside of classes or class-like objects. + * @fileoverview A rule to disallow `this` keywords in contexts where the value of `this` is `undefined`. * @author Toru Nagashima */ @@ -11,19 +11,34 @@ const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Determines if the given code path is a code path with lexical `this` binding. + * That is, if `this` within the code path refers to `this` of surrounding code path. + * @param {CodePath} codePath Code path. + * @param {ASTNode} node Node that started the code path. + * @returns {boolean} `true` if it is a code path with lexical `this` binding. + */ +function isCodePathWithLexicalThis(codePath, node) { + return codePath.origin === "function" && node.type === "ArrowFunctionExpression"; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `this` keywords outside of classes or class-like objects", - category: "Best Practices", + description: "Disallow use of `this` in contexts where the value of `this` is `undefined`", recommended: false, - url: "https://eslint.org/docs/rules/no-invalid-this" + url: "https://eslint.org/docs/latest/rules/no-invalid-this" }, schema: [ @@ -48,7 +63,7 @@ module.exports = { const options = context.options[0] || {}; const capIsConstructor = options.capIsConstructor !== false; const stack = [], - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; /** * Gets the current checking context. @@ -72,63 +87,53 @@ module.exports = { return current; }; - /** - * Pushs new checking context into the stack. - * - * The checking context is not initialized yet. - * Because most functions don't have `this` keyword. - * When `this` keyword was found, the checking context is initialized. - * @param {ASTNode} node A function node that was entered. - * @returns {void} - */ - function enterFunction(node) { - - // `this` can be invalid only under strict mode. - stack.push({ - init: !context.getScope().isStrict, - node, - valid: true - }); - } + return { - /** - * Pops the current checking context from the stack. - * @returns {void} - */ - function exitFunction() { - stack.pop(); - } + onCodePathStart(codePath, node) { + if (isCodePathWithLexicalThis(codePath, node)) { + return; + } - return { + if (codePath.origin === "program") { + const scope = sourceCode.getScope(node); + const features = context.languageOptions.parserOptions.ecmaFeatures || {}; - /* - * `this` is invalid only under strict mode. - * Modules is always strict mode. - */ - Program(node) { - const scope = context.getScope(), - features = context.parserOptions.ecmaFeatures || {}; + // `this` at the top level of scripts always refers to the global object + stack.push({ + init: true, + node, + valid: !( + node.sourceType === "module" || + (features.globalReturn && scope.childScopes[0].isStrict) + ) + }); + return; + } + + /* + * `init: false` means that `valid` isn't determined yet. + * Most functions don't use `this`, and the calculation for `valid` + * is relatively costly, so we'll calculate it lazily when the first + * `this` within the function is traversed. A special case are non-strict + * functions, because `this` refers to the global object and therefore is + * always valid, so we can set `init: true` right away. + */ stack.push({ - init: true, + init: !sourceCode.getScope(node).isStrict, node, - valid: !( - scope.isStrict || - node.sourceType === "module" || - (features.globalReturn && scope.childScopes[0].isStrict) - ) + valid: true }); }, - "Program:exit"() { + onCodePathEnd(codePath, node) { + if (isCodePathWithLexicalThis(codePath, node)) { + return; + } + stack.pop(); }, - FunctionDeclaration: enterFunction, - "FunctionDeclaration:exit": exitFunction, - FunctionExpression: enterFunction, - "FunctionExpression:exit": exitFunction, - // Reports if `this` of the current context is invalid. ThisExpression(node) { const current = stack.getCurrent(); diff --git a/node_modules/eslint/lib/rules/no-irregular-whitespace.js b/node_modules/eslint/lib/rules/no-irregular-whitespace.js index 15711c615..ab7ccac54 100644 --- a/node_modules/eslint/lib/rules/no-irregular-whitespace.js +++ b/node_modules/eslint/lib/rules/no-irregular-whitespace.js @@ -25,15 +25,15 @@ const LINE_BREAK = astUtils.createGlobalLinebreakMatcher(); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow irregular whitespace", - category: "Possible Errors", + description: "Disallow irregular whitespace", recommended: true, - url: "https://eslint.org/docs/rules/no-irregular-whitespace" + url: "https://eslint.org/docs/latest/rules/no-irregular-whitespace" }, schema: [ @@ -55,6 +55,10 @@ module.exports = { skipRegExps: { type: "boolean", default: false + }, + skipJSXText: { + type: "boolean", + default: false } }, additionalProperties: false @@ -77,8 +81,9 @@ module.exports = { const skipStrings = options.skipStrings !== false; const skipRegExps = !!options.skipRegExps; const skipTemplates = !!options.skipTemplates; + const skipJSXText = !!options.skipJSXText; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const commentNodes = sourceCode.getAllComments(); /** @@ -100,12 +105,12 @@ module.exports = { } /** - * Checks identifier or literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors + * Checks literal nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors * @param {ASTNode} node to check for matching errors. * @returns {void} * @private */ - function removeInvalidNodeErrorsInIdentifierOrLiteral(node) { + function removeInvalidNodeErrorsInLiteral(node) { const shouldCheckStrings = skipStrings && (typeof node.value === "string"); const shouldCheckRegExps = skipRegExps && Boolean(node.regex); @@ -144,6 +149,18 @@ module.exports = { } } + /** + * Checks JSX nodes for errors that we are choosing to ignore and calls the relevant methods to remove the errors + * @param {ASTNode} node to check for matching errors. + * @returns {void} + * @private + */ + function removeInvalidNodeErrorsInJSXText(node) { + if (ALL_IRREGULARS.test(node.raw)) { + removeWhitespaceError(node); + } + } + /** * Checks the program source for irregular whitespace * @param {ASTNode} node The program node @@ -237,9 +254,9 @@ module.exports = { checkForIrregularLineTerminators(node); }; - nodes.Identifier = removeInvalidNodeErrorsInIdentifierOrLiteral; - nodes.Literal = removeInvalidNodeErrorsInIdentifierOrLiteral; + nodes.Literal = removeInvalidNodeErrorsInLiteral; nodes.TemplateElement = skipTemplates ? removeInvalidNodeErrorsInTemplateLiteral : noop; + nodes.JSXText = skipJSXText ? removeInvalidNodeErrorsInJSXText : noop; nodes["Program:exit"] = function() { if (skipComments) { diff --git a/node_modules/eslint/lib/rules/no-iterator.js b/node_modules/eslint/lib/rules/no-iterator.js index 9ba1e7aef..dcd9683b4 100644 --- a/node_modules/eslint/lib/rules/no-iterator.js +++ b/node_modules/eslint/lib/rules/no-iterator.js @@ -15,15 +15,15 @@ const { getStaticPropertyName } = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of the `__iterator__` property", - category: "Best Practices", + description: "Disallow the use of the `__iterator__` property", recommended: false, - url: "https://eslint.org/docs/rules/no-iterator" + url: "https://eslint.org/docs/latest/rules/no-iterator" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-label-var.js b/node_modules/eslint/lib/rules/no-label-var.js index 570db0328..bf33cd157 100644 --- a/node_modules/eslint/lib/rules/no-label-var.js +++ b/node_modules/eslint/lib/rules/no-label-var.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow labels that share a name with a variable", - category: "Variables", + description: "Disallow labels that share a name with a variable", recommended: false, - url: "https://eslint.org/docs/rules/no-label-var" + url: "https://eslint.org/docs/latest/rules/no-label-var" }, schema: [], @@ -34,6 +34,7 @@ module.exports = { }, create(context) { + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -59,7 +60,7 @@ module.exports = { LabeledStatement(node) { // Fetch the innermost scope. - const scope = context.getScope(); + const scope = sourceCode.getScope(node); /* * Recursively find the identifier walking up the scope, starting diff --git a/node_modules/eslint/lib/rules/no-labels.js b/node_modules/eslint/lib/rules/no-labels.js index 85760d80d..d991a0a80 100644 --- a/node_modules/eslint/lib/rules/no-labels.js +++ b/node_modules/eslint/lib/rules/no-labels.js @@ -14,15 +14,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow labeled statements", - category: "Best Practices", + description: "Disallow labeled statements", recommended: false, - url: "https://eslint.org/docs/rules/no-labels" + url: "https://eslint.org/docs/latest/rules/no-labels" }, schema: [ @@ -98,7 +98,7 @@ module.exports = { info = info.upper; } - /* istanbul ignore next: syntax error */ + /* c8 ignore next */ return "other"; } diff --git a/node_modules/eslint/lib/rules/no-lone-blocks.js b/node_modules/eslint/lib/rules/no-lone-blocks.js index 290784b82..767eec2be 100644 --- a/node_modules/eslint/lib/rules/no-lone-blocks.js +++ b/node_modules/eslint/lib/rules/no-lone-blocks.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary nested blocks", - category: "Best Practices", + description: "Disallow unnecessary nested blocks", recommended: false, - url: "https://eslint.org/docs/rules/no-lone-blocks" + url: "https://eslint.org/docs/latest/rules/no-lone-blocks" }, schema: [], @@ -33,6 +33,7 @@ module.exports = { // A stack of lone blocks to be checked for block-level bindings const loneBlocks = []; let ruleDef; + const sourceCode = context.sourceCode; /** * Reports a node as invalid. @@ -40,7 +41,9 @@ module.exports = { * @returns {void} */ function report(node) { - const messageId = node.parent.type === "BlockStatement" ? "redundantNestedBlock" : "redundantBlock"; + const messageId = node.parent.type === "BlockStatement" || node.parent.type === "StaticBlock" + ? "redundantNestedBlock" + : "redundantBlock"; context.report({ node, @@ -55,6 +58,7 @@ module.exports = { */ function isLoneBlock(node) { return node.parent.type === "BlockStatement" || + node.parent.type === "StaticBlock" || node.parent.type === "Program" || // Don't report blocks in switch cases if the block is the only statement of the case. @@ -64,14 +68,15 @@ module.exports = { /** * Checks the enclosing block of the current node for block-level bindings, * and "marks it" as valid if any. + * @param {ASTNode} node The current node to check. * @returns {void} */ - function markLoneBlock() { + function markLoneBlock(node) { if (loneBlocks.length === 0) { return; } - const block = context.getAncestors().pop(); + const block = node.parent; if (loneBlocks[loneBlocks.length - 1] === block) { loneBlocks.pop(); @@ -88,7 +93,7 @@ module.exports = { }; // ES6: report blocks without block-level bindings, or that's only child of another block - if (context.parserOptions.ecmaVersion >= 6) { + if (context.languageOptions.ecmaVersion >= 2015) { ruleDef = { BlockStatement(node) { if (isLoneBlock(node)) { @@ -100,7 +105,10 @@ module.exports = { loneBlocks.pop(); report(node); } else if ( - node.parent.type === "BlockStatement" && + ( + node.parent.type === "BlockStatement" || + node.parent.type === "StaticBlock" + ) && node.parent.body.length === 1 ) { report(node); @@ -110,13 +118,13 @@ module.exports = { ruleDef.VariableDeclaration = function(node) { if (node.kind === "let" || node.kind === "const") { - markLoneBlock(); + markLoneBlock(node); } }; - ruleDef.FunctionDeclaration = function() { - if (context.getScope().isStrict) { - markLoneBlock(); + ruleDef.FunctionDeclaration = function(node) { + if (sourceCode.getScope(node).isStrict) { + markLoneBlock(node); } }; diff --git a/node_modules/eslint/lib/rules/no-lonely-if.js b/node_modules/eslint/lib/rules/no-lonely-if.js index 6552adc57..eefd2c688 100644 --- a/node_modules/eslint/lib/rules/no-lonely-if.js +++ b/node_modules/eslint/lib/rules/no-lonely-if.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `if` statements as the only statement in `else` blocks", - category: "Stylistic Issues", + description: "Disallow `if` statements as the only statement in `else` blocks", recommended: false, - url: "https://eslint.org/docs/rules/no-lonely-if" + url: "https://eslint.org/docs/latest/rules/no-lonely-if" }, schema: [], @@ -28,13 +28,12 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { IfStatement(node) { - const ancestors = context.getAncestors(), - parent = ancestors.pop(), - grandparent = ancestors.pop(); + const parent = node.parent, + grandparent = parent.parent; if (parent && parent.type === "BlockStatement" && parent.body.length === 1 && grandparent && diff --git a/node_modules/eslint/lib/rules/no-loop-func.js b/node_modules/eslint/lib/rules/no-loop-func.js index 13ebd3ee2..48312fbf5 100644 --- a/node_modules/eslint/lib/rules/no-loop-func.js +++ b/node_modules/eslint/lib/rules/no-loop-func.js @@ -125,7 +125,7 @@ function isSafe(loopNode, reference) { * The reference is every reference of the upper scope's variable we are * looking now. * - * It's safeafe if the reference matches one of the following condition. + * It's safe if the reference matches one of the following condition. * - is readonly. * - doesn't exist inside a local function and after the border. * @param {eslint-scope.Reference} upperRef A reference to check. @@ -148,15 +148,15 @@ function isSafe(loopNode, reference) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow function declarations that contain unsafe references inside loop statements", - category: "Best Practices", + description: "Disallow function declarations that contain unsafe references inside loop statements", recommended: false, - url: "https://eslint.org/docs/rules/no-loop-func" + url: "https://eslint.org/docs/latest/rules/no-loop-func" }, schema: [], @@ -168,13 +168,15 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Reports functions which match the following condition: * * - has a loop node in ancestors. * - has any references which refers to an unsafe variable. * @param {ASTNode} node The AST node to check. - * @returns {boolean} Whether or not the node is within a loop. + * @returns {void} */ function checkForLoops(node) { const loopNode = getContainingLoopNode(node); @@ -183,8 +185,8 @@ module.exports = { return; } - const references = context.getScope().through; - const unsafeRefs = references.filter(r => !isSafe(loopNode, r)).map(r => r.identifier.name); + const references = sourceCode.getScope(node).through; + const unsafeRefs = references.filter(r => r.resolved && !isSafe(loopNode, r)).map(r => r.identifier.name); if (unsafeRefs.length > 0) { context.report({ diff --git a/node_modules/eslint/lib/rules/no-loss-of-precision.js b/node_modules/eslint/lib/rules/no-loss-of-precision.js index 2d0c61842..b3635e3d5 100644 --- a/node_modules/eslint/lib/rules/no-loss-of-precision.js +++ b/node_modules/eslint/lib/rules/no-loss-of-precision.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow literal numbers that lose precision", - category: "Possible Errors", - recommended: false, - url: "https://eslint.org/docs/rules/no-loss-of-precision" + description: "Disallow literal numbers that lose precision", + recommended: true, + url: "https://eslint.org/docs/latest/rules/no-loss-of-precision" }, schema: [], messages: { @@ -83,7 +83,7 @@ module.exports = { * @returns {string} the numeric string with a decimal point in the proper place */ function addDecimalPointToNumber(stringNumber) { - return `${stringNumber.slice(0, 1)}.${stringNumber.slice(1)}`; + return `${stringNumber[0]}.${stringNumber.slice(1)}`; } /** @@ -92,7 +92,12 @@ module.exports = { * @returns {string} the stripped string */ function removeLeadingZeros(numberAsString) { - return numberAsString.replace(/^0*/u, ""); + for (let i = 0; i < numberAsString.length; i++) { + if (numberAsString[i] !== "0") { + return numberAsString.slice(i); + } + } + return numberAsString; } /** @@ -101,11 +106,16 @@ module.exports = { * @returns {string} the stripped string */ function removeTrailingZeros(numberAsString) { - return numberAsString.replace(/0*$/u, ""); + for (let i = numberAsString.length - 1; i >= 0; i--) { + if (numberAsString[i] !== "0") { + return numberAsString.slice(0, i + 1); + } + } + return numberAsString; } /** - * Converts an integer to to an object containing the integer's coefficient and order of magnitude + * Converts an integer to an object containing the integer's coefficient and order of magnitude * @param {string} stringInteger the string representation of the integer being converted * @returns {Object} the object containing the integer's coefficient and order of magnitude */ @@ -120,7 +130,7 @@ module.exports = { /** * - * Converts a float to to an object containing the floats's coefficient and order of magnitude + * Converts a float to an object containing the floats's coefficient and order of magnitude * @param {string} stringFloat the string representation of the float being converted * @returns {Object} the object containing the integer's coefficient and order of magnitude */ @@ -128,7 +138,7 @@ module.exports = { const trimmedFloat = removeLeadingZeros(stringFloat); if (trimmedFloat.startsWith(".")) { - const decimalDigits = trimmedFloat.split(".").pop(); + const decimalDigits = trimmedFloat.slice(1); const significantDigits = removeLeadingZeros(decimalDigits); return { @@ -144,7 +154,6 @@ module.exports = { }; } - /** * Converts a base ten number to proper scientific notation * @param {string} stringNumber the string representation of the base ten number to be converted @@ -160,7 +169,6 @@ module.exports = { : normalizedNumber.magnitude; return `${normalizedCoefficient}e${magnitude}`; - } /** diff --git a/node_modules/eslint/lib/rules/no-magic-numbers.js b/node_modules/eslint/lib/rules/no-magic-numbers.js index 510b3f9b2..f48a62d85 100644 --- a/node_modules/eslint/lib/rules/no-magic-numbers.js +++ b/node_modules/eslint/lib/rules/no-magic-numbers.js @@ -26,15 +26,15 @@ function normalizeIgnoreValue(x) { return x; } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow magic numbers", - category: "Best Practices", + description: "Disallow magic numbers", recommended: false, - url: "https://eslint.org/docs/rules/no-magic-numbers" + url: "https://eslint.org/docs/latest/rules/no-magic-numbers" }, schema: [{ @@ -65,6 +65,10 @@ module.exports = { ignoreDefaultValues: { type: "boolean", default: false + }, + ignoreClassFieldInitialValues: { + type: "boolean", + default: false } }, additionalProperties: false @@ -80,9 +84,10 @@ module.exports = { const config = context.options[0] || {}, detectObjects = !!config.detectObjects, enforceConst = !!config.enforceConst, - ignore = (config.ignore || []).map(normalizeIgnoreValue), + ignore = new Set((config.ignore || []).map(normalizeIgnoreValue)), ignoreArrayIndexes = !!config.ignoreArrayIndexes, - ignoreDefaultValues = !!config.ignoreDefaultValues; + ignoreDefaultValues = !!config.ignoreDefaultValues, + ignoreClassFieldInitialValues = !!config.ignoreClassFieldInitialValues; const okTypes = detectObjects ? [] : ["ObjectExpression", "Property", "AssignmentExpression"]; @@ -92,7 +97,7 @@ module.exports = { * @returns {boolean} true if the value is ignored */ function isIgnoredValue(value) { - return ignore.indexOf(value) !== -1; + return ignore.has(value); } /** @@ -106,6 +111,17 @@ module.exports = { return parent.type === "AssignmentPattern" && parent.right === fullNumberNode; } + /** + * Returns whether the number is the initial value of a class field. + * @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node + * @returns {boolean} true if the number is the initial value of a class field. + */ + function isClassFieldInitialValue(fullNumberNode) { + const parent = fullNumberNode.parent; + + return parent.type === "PropertyDefinition" && parent.value === fullNumberNode; + } + /** * Returns whether the given node is used as a radix within parseInt() or Number.parseInt() * @param {ASTNode} fullNumberNode `Literal` or `UnaryExpression` full number node @@ -194,6 +210,7 @@ module.exports = { if ( isIgnoredValue(value) || (ignoreDefaultValues && isDefaultValue(fullNumberNode)) || + (ignoreClassFieldInitialValues && isClassFieldInitialValue(fullNumberNode)) || isParseIntRadix(fullNumberNode) || isJSXNumber(fullNumberNode) || (ignoreArrayIndexes && isArrayIndex(fullNumberNode, value)) @@ -209,7 +226,7 @@ module.exports = { }); } } else if ( - okTypes.indexOf(parent.type) === -1 || + !okTypes.includes(parent.type) || (parent.type === "AssignmentExpression" && parent.left.type === "Identifier") ) { context.report({ diff --git a/node_modules/eslint/lib/rules/no-misleading-character-class.js b/node_modules/eslint/lib/rules/no-misleading-character-class.js index 3d004615c..20591df2c 100644 --- a/node_modules/eslint/lib/rules/no-misleading-character-class.js +++ b/node_modules/eslint/lib/rules/no-misleading-character-class.js @@ -3,38 +3,50 @@ */ "use strict"; -const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("eslint-utils"); -const { RegExpParser, visitRegExpAST } = require("regexpp"); +const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("@eslint-community/eslint-utils"); +const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp"); const { isCombiningCharacter, isEmojiModifier, isRegionalIndicatorSymbol, isSurrogatePair } = require("./utils/unicode"); +const astUtils = require("./utils/ast-utils.js"); +const { isValidWithUnicodeFlag } = require("./utils/regular-expressions"); //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ +/** + * @typedef {import('@eslint-community/regexpp').AST.Character} Character + * @typedef {import('@eslint-community/regexpp').AST.CharacterClassElement} CharacterClassElement + */ + /** * Iterate character sequences of a given nodes. * * CharacterClassRange syntax can steal a part of character sequence, * so this function reverts CharacterClassRange syntax and restore the sequence. - * @param {regexpp.AST.CharacterClassElement[]} nodes The node list to iterate character sequences. - * @returns {IterableIterator} The list of character sequences. + * @param {CharacterClassElement[]} nodes The node list to iterate character sequences. + * @returns {IterableIterator} The list of character sequences. */ function *iterateCharacterSequence(nodes) { + + /** @type {Character[]} */ let seq = []; for (const node of nodes) { switch (node.type) { case "Character": - seq.push(node.value); + seq.push(node); break; case "CharacterClassRange": - seq.push(node.min.value); + seq.push(node.min); yield seq; - seq = [node.max.value]; + seq = [node.max]; break; case "CharacterSet": + case "CharacterClass": // [[]] nesting character class + case "ClassStringDisjunction": // \q{...} + case "ExpressionCharacterClass": // [A--B] if (seq.length > 0) { yield seq; seq = []; @@ -50,32 +62,74 @@ function *iterateCharacterSequence(nodes) { } } + +/** + * Checks whether the given character node is a Unicode code point escape or not. + * @param {Character} char the character node to check. + * @returns {boolean} `true` if the character node is a Unicode code point escape. + */ +function isUnicodeCodePointEscape(char) { + return /^\\u\{[\da-f]+\}$/iu.test(char.raw); +} + +/** + * Each function returns `true` if it detects that kind of problem. + * @type {Record boolean>} + */ const hasCharacterSequence = { surrogatePairWithoutUFlag(chars) { - return chars.some((c, i) => i !== 0 && isSurrogatePair(chars[i - 1], c)); + return chars.some((c, i) => { + if (i === 0) { + return false; + } + const c1 = chars[i - 1]; + + return ( + isSurrogatePair(c1.value, c.value) && + !isUnicodeCodePointEscape(c1) && + !isUnicodeCodePointEscape(c) + ); + }); + }, + + surrogatePair(chars) { + return chars.some((c, i) => { + if (i === 0) { + return false; + } + const c1 = chars[i - 1]; + + return ( + isSurrogatePair(c1.value, c.value) && + ( + isUnicodeCodePointEscape(c1) || + isUnicodeCodePointEscape(c) + ) + ); + }); }, combiningClass(chars) { return chars.some((c, i) => ( i !== 0 && - isCombiningCharacter(c) && - !isCombiningCharacter(chars[i - 1]) + isCombiningCharacter(c.value) && + !isCombiningCharacter(chars[i - 1].value) )); }, emojiModifier(chars) { return chars.some((c, i) => ( i !== 0 && - isEmojiModifier(c) && - !isEmojiModifier(chars[i - 1]) + isEmojiModifier(c.value) && + !isEmojiModifier(chars[i - 1].value) )); }, regionalIndicatorSymbol(chars) { return chars.some((c, i) => ( i !== 0 && - isRegionalIndicatorSymbol(c) && - isRegionalIndicatorSymbol(chars[i - 1]) + isRegionalIndicatorSymbol(c.value) && + isRegionalIndicatorSymbol(chars[i - 1].value) )); }, @@ -85,9 +139,9 @@ const hasCharacterSequence = { return chars.some((c, i) => ( i !== 0 && i !== lastIndex && - c === 0x200d && - chars[i - 1] !== 0x200d && - chars[i + 1] !== 0x200d + c.value === 0x200d && + chars[i - 1].value !== 0x200d && + chars[i + 1].value !== 0x200d )); } }; @@ -98,28 +152,33 @@ const kinds = Object.keys(hasCharacterSequence); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow characters which are made with multiple code points in character class syntax", - category: "Possible Errors", + description: "Disallow characters which are made with multiple code points in character class syntax", recommended: true, - url: "https://eslint.org/docs/rules/no-misleading-character-class" + url: "https://eslint.org/docs/latest/rules/no-misleading-character-class" }, + hasSuggestions: true, + schema: [], messages: { surrogatePairWithoutUFlag: "Unexpected surrogate pair in character class. Use 'u' flag.", + surrogatePair: "Unexpected surrogate pair in character class.", combiningClass: "Unexpected combined character in character class.", emojiModifier: "Unexpected modified Emoji in character class.", regionalIndicatorSymbol: "Unexpected national flag in character class.", - zwj: "Unexpected joined character sequence in character class." + zwj: "Unexpected joined character sequence in character class.", + suggestUnicodeFlag: "Add unicode 'u' flag to regex." } }, create(context) { + const sourceCode = context.sourceCode; const parser = new RegExpParser(); /** @@ -127,17 +186,10 @@ module.exports = { * @param {Node} node The node to report. * @param {string} pattern The regular expression pattern to verify. * @param {string} flags The flags of the regular expression. + * @param {Function} unicodeFixer Fixer for missing "u" flag. * @returns {void} */ - function verify(node, pattern, flags) { - const has = { - surrogatePairWithoutUFlag: false, - combiningClass: false, - variationSelector: false, - emojiModifier: false, - regionalIndicatorSymbol: false, - zwj: false - }; + function verify(node, pattern, flags, unicodeFixer) { let patternNode; try { @@ -145,7 +197,10 @@ module.exports = { pattern, 0, pattern.length, - flags.includes("u") + { + unicode: flags.includes("u"), + unicodeSets: flags.includes("v") + } ); } catch { @@ -153,29 +208,50 @@ module.exports = { return; } + const foundKinds = new Set(); + visitRegExpAST(patternNode, { onCharacterClassEnter(ccNode) { for (const chars of iterateCharacterSequence(ccNode.elements)) { for (const kind of kinds) { - has[kind] = has[kind] || hasCharacterSequence[kind](chars); + if (hasCharacterSequence[kind](chars)) { + foundKinds.add(kind); + } } } } }); - for (const kind of kinds) { - if (has[kind]) { - context.report({ node, messageId: kind }); + for (const kind of foundKinds) { + let suggest; + + if (kind === "surrogatePairWithoutUFlag") { + suggest = [{ + messageId: "suggestUnicodeFlag", + fix: unicodeFixer + }]; } + + context.report({ + node, + messageId: kind, + suggest + }); } } return { "Literal[regex]"(node) { - verify(node, node.regex.pattern, node.regex.flags); + verify(node, node.regex.pattern, node.regex.flags, fixer => { + if (!isValidWithUnicodeFlag(context.languageOptions.ecmaVersion, node.regex.pattern)) { + return null; + } + + return fixer.insertTextAfter(node, "u"); + }); }, - "Program"() { - const scope = context.getScope(); + "Program"(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); /* @@ -183,15 +259,39 @@ module.exports = { * E.g., `new RegExp()`, `RegExp()`, `new window.RegExp()`, * `const {RegExp: a} = window; new a()`, etc... */ - for (const { node } of tracker.iterateGlobalReferences({ + for (const { node: refNode } of tracker.iterateGlobalReferences({ RegExp: { [CALL]: true, [CONSTRUCT]: true } })) { - const [patternNode, flagsNode] = node.arguments; + const [patternNode, flagsNode] = refNode.arguments; const pattern = getStringIfConstant(patternNode, scope); const flags = getStringIfConstant(flagsNode, scope); if (typeof pattern === "string") { - verify(node, pattern, flags || ""); + verify(refNode, pattern, flags || "", fixer => { + + if (!isValidWithUnicodeFlag(context.languageOptions.ecmaVersion, pattern)) { + return null; + } + + if (refNode.arguments.length === 1) { + const penultimateToken = sourceCode.getLastToken(refNode, { skip: 1 }); // skip closing parenthesis + + return fixer.insertTextAfter( + penultimateToken, + astUtils.isCommaToken(penultimateToken) + ? ' "u",' + : ', "u"' + ); + } + + if ((flagsNode.type === "Literal" && typeof flagsNode.value === "string") || flagsNode.type === "TemplateLiteral") { + const range = [flagsNode.range[0], flagsNode.range[1] - 1]; + + return fixer.insertTextAfterRange(range, "u"); + } + + return null; + }); } } } diff --git a/node_modules/eslint/lib/rules/no-mixed-operators.js b/node_modules/eslint/lib/rules/no-mixed-operators.js index 15eb20bed..6b6f7364a 100644 --- a/node_modules/eslint/lib/rules/no-mixed-operators.js +++ b/node_modules/eslint/lib/rules/no-mixed-operators.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to disallow mixed binary operators. * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -58,13 +59,13 @@ function normalizeOptions(options = {}) { /** * Checks whether any group which includes both given operator exists or not. - * @param {Array.} groups A list of groups to check. + * @param {Array} groups A list of groups to check. * @param {string} left An operator. * @param {string} right Another operator. * @returns {boolean} `true` if such group existed. */ function includesBothInAGroup(groups, left, right) { - return groups.some(group => group.indexOf(left) !== -1 && group.indexOf(right) !== -1); + return groups.some(group => group.includes(left) && group.includes(right)); } /** @@ -82,15 +83,17 @@ function getChildNode(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "disallow mixed binary operators", - category: "Stylistic Issues", + description: "Disallow mixed binary operators", recommended: false, - url: "https://eslint.org/docs/rules/no-mixed-operators" + url: "https://eslint.org/docs/latest/rules/no-mixed-operators" }, schema: [ @@ -117,12 +120,12 @@ module.exports = { ], messages: { - unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'." + unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations." } }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const options = normalizeOptions(context.options[0]); /** diff --git a/node_modules/eslint/lib/rules/no-mixed-requires.js b/node_modules/eslint/lib/rules/no-mixed-requires.js index a02de9104..9e7b80390 100644 --- a/node_modules/eslint/lib/rules/no-mixed-requires.js +++ b/node_modules/eslint/lib/rules/no-mixed-requires.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce grouped require statements for Node.JS * @author Raphael Pigulla + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -9,6 +10,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -18,10 +20,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow `require` calls to be mixed with regular variable declarations", - category: "Node.js and CommonJS", + description: "Disallow `require` calls to be mixed with regular variable declarations", recommended: false, - url: "https://eslint.org/docs/rules/no-mixed-requires" + url: "https://eslint.org/docs/latest/rules/no-mixed-requires" }, schema: [ @@ -159,7 +160,7 @@ module.exports = { return REQ_COMPUTED; } - if (BUILTIN_MODULES.indexOf(arg.value) !== -1) { + if (BUILTIN_MODULES.includes(arg.value)) { // "var fs = require('fs');" return REQ_CORE; diff --git a/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js b/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js index 287cbda03..7698b5da7 100644 --- a/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js +++ b/node_modules/eslint/lib/rules/no-mixed-spaces-and-tabs.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow mixed spaces and tabs for indentation * @author Jary Niebur + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -8,15 +9,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow mixed spaces and tabs for indentation", - category: "Stylistic Issues", + description: "Disallow mixed spaces and tabs for indentation", recommended: true, - url: "https://eslint.org/docs/rules/no-mixed-spaces-and-tabs" + url: "https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs" }, schema: [ @@ -31,7 +34,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let smartTabs; diff --git a/node_modules/eslint/lib/rules/no-multi-assign.js b/node_modules/eslint/lib/rules/no-multi-assign.js index ab6430c19..a7a50c194 100644 --- a/node_modules/eslint/lib/rules/no-multi-assign.js +++ b/node_modules/eslint/lib/rules/no-multi-assign.js @@ -10,18 +10,27 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow use of chained assignment expressions", - category: "Stylistic Issues", + description: "Disallow use of chained assignment expressions", recommended: false, - url: "https://eslint.org/docs/rules/no-multi-assign" + url: "https://eslint.org/docs/latest/rules/no-multi-assign" }, - schema: [], + schema: [{ + type: "object", + properties: { + ignoreNonDeclaration: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], messages: { unexpectedChain: "Unexpected chained assignment." @@ -33,15 +42,24 @@ module.exports = { //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- + const options = context.options[0] || { + ignoreNonDeclaration: false + }; + const selectors = [ + "VariableDeclarator > AssignmentExpression.init", + "PropertyDefinition > AssignmentExpression.value" + ]; + + if (!options.ignoreNonDeclaration) { + selectors.push("AssignmentExpression > AssignmentExpression.right"); + } return { - AssignmentExpression(node) { - if (["AssignmentExpression", "VariableDeclarator"].indexOf(node.parent.type) !== -1) { - context.report({ - node, - messageId: "unexpectedChain" - }); - } + [selectors](node) { + context.report({ + node, + messageId: "unexpectedChain" + }); } }; diff --git a/node_modules/eslint/lib/rules/no-multi-spaces.js b/node_modules/eslint/lib/rules/no-multi-spaces.js index d43ed7363..bc90ee5b5 100644 --- a/node_modules/eslint/lib/rules/no-multi-spaces.js +++ b/node_modules/eslint/lib/rules/no-multi-spaces.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow use of multiple spaces. * @author Nicholas C. Zakas + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow multiple spaces", - category: "Best Practices", + description: "Disallow multiple spaces", recommended: false, - url: "https://eslint.org/docs/rules/no-multi-spaces" + url: "https://eslint.org/docs/latest/rules/no-multi-spaces" }, fixable: "whitespace", @@ -52,11 +55,11 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const options = context.options[0] || {}; const ignoreEOLComments = options.ignoreEOLComments; const exceptions = Object.assign({ Property: true }, options.exceptions); - const hasExceptions = Object.keys(exceptions).filter(key => exceptions[key]).length > 0; + const hasExceptions = Object.keys(exceptions).some(key => exceptions[key]); /** * Formats value of given comment token for error message by truncating its length. diff --git a/node_modules/eslint/lib/rules/no-multi-str.js b/node_modules/eslint/lib/rules/no-multi-str.js index 7cf1ae367..8011729ec 100644 --- a/node_modules/eslint/lib/rules/no-multi-str.js +++ b/node_modules/eslint/lib/rules/no-multi-str.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow multiline strings", - category: "Best Practices", + description: "Disallow multiline strings", recommended: false, - url: "https://eslint.org/docs/rules/no-multi-str" + url: "https://eslint.org/docs/latest/rules/no-multi-str" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-multiple-empty-lines.js b/node_modules/eslint/lib/rules/no-multiple-empty-lines.js index 9cccef308..5d038ff05 100644 --- a/node_modules/eslint/lib/rules/no-multiple-empty-lines.js +++ b/node_modules/eslint/lib/rules/no-multiple-empty-lines.js @@ -2,6 +2,7 @@ * @fileoverview Disallows multiple blank lines. * implementation adapted from the no-trailing-spaces rule. * @author Greg Cochard + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow multiple empty lines", - category: "Stylistic Issues", + description: "Disallow multiple empty lines", recommended: false, - url: "https://eslint.org/docs/rules/no-multiple-empty-lines" + url: "https://eslint.org/docs/latest/rules/no-multiple-empty-lines" }, fixable: "whitespace", @@ -64,7 +67,7 @@ module.exports = { maxBOF = typeof context.options[0].maxBOF !== "undefined" ? context.options[0].maxBOF : max; } - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; // Swallow the final newline, as some editors add it automatically and we don't want it to cause an issue const allLines = sourceCode.lines[sourceCode.lines.length - 1] === "" ? sourceCode.lines.slice(0, -1) : sourceCode.lines; diff --git a/node_modules/eslint/lib/rules/no-native-reassign.js b/node_modules/eslint/lib/rules/no-native-reassign.js index 833e3b7ce..e3fed4451 100644 --- a/node_modules/eslint/lib/rules/no-native-reassign.js +++ b/node_modules/eslint/lib/rules/no-native-reassign.js @@ -10,15 +10,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow assignments to native objects or read-only global variables", - category: "Best Practices", + description: "Disallow assignments to native objects or read-only global variables", recommended: false, - url: "https://eslint.org/docs/rules/no-native-reassign" + url: "https://eslint.org/docs/latest/rules/no-native-reassign" }, deprecated: true, @@ -47,6 +47,7 @@ module.exports = { create(context) { const config = context.options[0]; const exceptions = (config && config.exceptions) || []; + const sourceCode = context.sourceCode; /** * Reports write references. @@ -81,14 +82,14 @@ module.exports = { * @returns {void} */ function checkVariable(variable) { - if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) { + if (variable.writeable === false && !exceptions.includes(variable.name)) { variable.references.forEach(checkReference); } } return { - Program() { - const globalScope = context.getScope(); + Program(node) { + const globalScope = sourceCode.getScope(node); globalScope.variables.forEach(checkVariable); } diff --git a/node_modules/eslint/lib/rules/no-negated-condition.js b/node_modules/eslint/lib/rules/no-negated-condition.js index 8a9eba881..3cb759049 100644 --- a/node_modules/eslint/lib/rules/no-negated-condition.js +++ b/node_modules/eslint/lib/rules/no-negated-condition.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow negated conditions", - category: "Stylistic Issues", + description: "Disallow negated conditions", recommended: false, - url: "https://eslint.org/docs/rules/no-negated-condition" + url: "https://eslint.org/docs/latest/rules/no-negated-condition" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-negated-in-lhs.js b/node_modules/eslint/lib/rules/no-negated-in-lhs.js index 1229cedd1..7a50be7f2 100644 --- a/node_modules/eslint/lib/rules/no-negated-in-lhs.js +++ b/node_modules/eslint/lib/rules/no-negated-in-lhs.js @@ -10,15 +10,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow negating the left operand in `in` expressions", - category: "Possible Errors", + description: "Disallow negating the left operand in `in` expressions", recommended: false, - url: "https://eslint.org/docs/rules/no-negated-in-lhs" + url: "https://eslint.org/docs/latest/rules/no-negated-in-lhs" }, replacedBy: ["no-unsafe-negation"], diff --git a/node_modules/eslint/lib/rules/no-nested-ternary.js b/node_modules/eslint/lib/rules/no-nested-ternary.js index 383bb2388..faf80416c 100644 --- a/node_modules/eslint/lib/rules/no-nested-ternary.js +++ b/node_modules/eslint/lib/rules/no-nested-ternary.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow nested ternary expressions", - category: "Stylistic Issues", + description: "Disallow nested ternary expressions", recommended: false, - url: "https://eslint.org/docs/rules/no-nested-ternary" + url: "https://eslint.org/docs/latest/rules/no-nested-ternary" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-new-func.js b/node_modules/eslint/lib/rules/no-new-func.js index 9af4e31ca..d58b2d715 100644 --- a/node_modules/eslint/lib/rules/no-new-func.js +++ b/node_modules/eslint/lib/rules/no-new-func.js @@ -5,19 +5,31 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const callMethods = new Set(["apply", "bind", "call"]); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `new` operators with the `Function` object", - category: "Best Practices", + description: "Disallow `new` operators with the `Function` object", recommended: false, - url: "https://eslint.org/docs/rules/no-new-func" + url: "https://eslint.org/docs/latest/rules/no-new-func" }, schema: [], @@ -28,24 +40,41 @@ module.exports = { }, create(context) { + const sourceCode = context.sourceCode; return { - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); const variable = globalScope.set.get("Function"); if (variable && variable.defs.length === 0) { variable.references.forEach(ref => { - const node = ref.identifier; - const { parent } = node; - - if ( - parent && - (parent.type === "NewExpression" || parent.type === "CallExpression") && - node === parent.callee - ) { + const idNode = ref.identifier; + const { parent } = idNode; + let evalNode; + + if (parent) { + if (idNode === parent.callee && ( + parent.type === "NewExpression" || + parent.type === "CallExpression" + )) { + evalNode = parent; + } else if ( + parent.type === "MemberExpression" && + idNode === parent.object && + callMethods.has(astUtils.getStaticPropertyName(parent)) + ) { + const maybeCallee = parent.parent.type === "ChainExpression" ? parent.parent : parent; + + if (maybeCallee.parent.type === "CallExpression" && maybeCallee.parent.callee === maybeCallee) { + evalNode = maybeCallee.parent; + } + } + } + + if (evalNode) { context.report({ - node: parent, + node: evalNode, messageId: "noFunctionConstructor" }); } diff --git a/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js b/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js new file mode 100644 index 000000000..ee70d281d --- /dev/null +++ b/node_modules/eslint/lib/rules/no-new-native-nonconstructor.js @@ -0,0 +1,66 @@ +/** + * @fileoverview Rule to disallow use of the new operator with global non-constructor functions + * @author Sosuke Suzuki + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const nonConstructorGlobalFunctionNames = ["Symbol", "BigInt"]; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "problem", + + docs: { + description: "Disallow `new` operators with global non-constructor functions", + recommended: false, + url: "https://eslint.org/docs/latest/rules/no-new-native-nonconstructor" + }, + + schema: [], + + messages: { + noNewNonconstructor: "`{{name}}` cannot be called as a constructor." + } + }, + + create(context) { + + const sourceCode = context.sourceCode; + + return { + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); + + for (const nonConstructorName of nonConstructorGlobalFunctionNames) { + const variable = globalScope.set.get(nonConstructorName); + + if (variable && variable.defs.length === 0) { + variable.references.forEach(ref => { + const idNode = ref.identifier; + const parent = idNode.parent; + + if (parent && parent.type === "NewExpression" && parent.callee === idNode) { + context.report({ + node: idNode, + messageId: "noNewNonconstructor", + data: { name: nonConstructorName } + }); + } + }); + } + } + } + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-new-object.js b/node_modules/eslint/lib/rules/no-new-object.js index e9f915db5..06275f471 100644 --- a/node_modules/eslint/lib/rules/no-new-object.js +++ b/node_modules/eslint/lib/rules/no-new-object.js @@ -1,6 +1,7 @@ /** * @fileoverview A rule to disallow calls to the Object constructor * @author Matt DuVall + * @deprecated in ESLint v8.50.0 */ "use strict"; @@ -15,29 +16,38 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `Object` constructors", - category: "Stylistic Issues", + description: "Disallow `Object` constructors", recommended: false, - url: "https://eslint.org/docs/rules/no-new-object" + url: "https://eslint.org/docs/latest/rules/no-new-object" }, + deprecated: true, + + replacedBy: [ + "no-object-constructor" + ], + schema: [], messages: { - preferLiteral: "The object literal notation {} is preferrable." + preferLiteral: "The object literal notation {} is preferable." } }, create(context) { + + const sourceCode = context.sourceCode; + return { NewExpression(node) { const variable = astUtils.getVariableByName( - context.getScope(), + sourceCode.getScope(node), node.callee.name ); diff --git a/node_modules/eslint/lib/rules/no-new-require.js b/node_modules/eslint/lib/rules/no-new-require.js index 063f783e7..6abfc17c8 100644 --- a/node_modules/eslint/lib/rules/no-new-require.js +++ b/node_modules/eslint/lib/rules/no-new-require.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to disallow use of new operator with the `require` function * @author Wil Moore III + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -9,6 +10,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -18,10 +20,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow `new` operators with calls to `require`", - category: "Node.js and CommonJS", + description: "Disallow `new` operators with calls to `require`", recommended: false, - url: "https://eslint.org/docs/rules/no-new-require" + url: "https://eslint.org/docs/latest/rules/no-new-require" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-new-symbol.js b/node_modules/eslint/lib/rules/no-new-symbol.js index aeb509c0d..998302202 100644 --- a/node_modules/eslint/lib/rules/no-new-symbol.js +++ b/node_modules/eslint/lib/rules/no-new-symbol.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow `new` operators with the `Symbol` object", - category: "ECMAScript 6", + description: "Disallow `new` operators with the `Symbol` object", recommended: true, - url: "https://eslint.org/docs/rules/no-new-symbol" + url: "https://eslint.org/docs/latest/rules/no-new-symbol" }, schema: [], @@ -29,19 +29,21 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + return { - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); const variable = globalScope.set.get("Symbol"); if (variable && variable.defs.length === 0) { variable.references.forEach(ref => { - const node = ref.identifier; - const parent = node.parent; + const idNode = ref.identifier; + const parent = idNode.parent; - if (parent && parent.type === "NewExpression" && parent.callee === node) { + if (parent && parent.type === "NewExpression" && parent.callee === idNode) { context.report({ - node, + node: idNode, messageId: "noNewSymbol" }); } diff --git a/node_modules/eslint/lib/rules/no-new-wrappers.js b/node_modules/eslint/lib/rules/no-new-wrappers.js index d276c48d2..5050a98a0 100644 --- a/node_modules/eslint/lib/rules/no-new-wrappers.js +++ b/node_modules/eslint/lib/rules/no-new-wrappers.js @@ -5,19 +5,25 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { getVariableByName } = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `new` operators with the `String`, `Number`, and `Boolean` objects", - category: "Best Practices", + description: "Disallow `new` operators with the `String`, `Number`, and `Boolean` objects", recommended: false, - url: "https://eslint.org/docs/rules/no-new-wrappers" + url: "https://eslint.org/docs/latest/rules/no-new-wrappers" }, schema: [], @@ -28,18 +34,24 @@ module.exports = { }, create(context) { + const { sourceCode } = context; return { NewExpression(node) { const wrapperObjects = ["String", "Number", "Boolean"]; - - if (wrapperObjects.indexOf(node.callee.name) > -1) { - context.report({ - node, - messageId: "noConstructor", - data: { fn: node.callee.name } - }); + const { name } = node.callee; + + if (wrapperObjects.includes(name)) { + const variable = getVariableByName(sourceCode.getScope(node), name); + + if (variable && variable.identifiers.length === 0) { + context.report({ + node, + messageId: "noConstructor", + data: { fn: name } + }); + } } } }; diff --git a/node_modules/eslint/lib/rules/no-new.js b/node_modules/eslint/lib/rules/no-new.js index aa8a4e268..9e20bad7b 100644 --- a/node_modules/eslint/lib/rules/no-new.js +++ b/node_modules/eslint/lib/rules/no-new.js @@ -10,15 +10,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `new` operators outside of assignments or comparisons", - category: "Best Practices", + description: "Disallow `new` operators outside of assignments or comparisons", recommended: false, - url: "https://eslint.org/docs/rules/no-new" + url: "https://eslint.org/docs/latest/rules/no-new" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js b/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js index a4b46d959..5939390fd 100644 --- a/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js +++ b/node_modules/eslint/lib/rules/no-nonoctal-decimal-escape.js @@ -24,18 +24,19 @@ function getUnicodeEscape(character) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `\\8` and `\\9` escape sequences in string literals", - category: "Best Practices", - recommended: false, - url: "https://eslint.org/docs/rules/no-nonoctal-decimal-escape", - suggestion: true + description: "Disallow `\\8` and `\\9` escape sequences in string literals", + recommended: true, + url: "https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape" }, + hasSuggestions: true, + schema: [], messages: { @@ -48,7 +49,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Creates a new Suggestion object. diff --git a/node_modules/eslint/lib/rules/no-obj-calls.js b/node_modules/eslint/lib/rules/no-obj-calls.js index 6eb200c9b..ee767ea2f 100644 --- a/node_modules/eslint/lib/rules/no-obj-calls.js +++ b/node_modules/eslint/lib/rules/no-obj-calls.js @@ -9,14 +9,14 @@ // Requirements //------------------------------------------------------------------------------ -const { CALL, CONSTRUCT, ReferenceTracker } = require("eslint-utils"); +const { CALL, CONSTRUCT, ReferenceTracker } = require("@eslint-community/eslint-utils"); const getPropertyName = require("./utils/ast-utils").getStaticPropertyName; //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ -const nonCallableGlobals = ["Atomics", "JSON", "Math", "Reflect"]; +const nonCallableGlobals = ["Atomics", "JSON", "Math", "Reflect", "Intl"]; /** * Returns the name of the node to report @@ -37,15 +37,15 @@ function getReportNodeName(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow calling global object properties as functions", - category: "Possible Errors", + description: "Disallow calling global object properties as functions", recommended: true, - url: "https://eslint.org/docs/rules/no-obj-calls" + url: "https://eslint.org/docs/latest/rules/no-obj-calls" }, schema: [], @@ -58,9 +58,11 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); const traceMap = {}; @@ -71,12 +73,12 @@ module.exports = { }; } - for (const { node, path } of tracker.iterateGlobalReferences(traceMap)) { - const name = getReportNodeName(node.callee); + for (const { node: refNode, path } of tracker.iterateGlobalReferences(traceMap)) { + const name = getReportNodeName(refNode.callee); const ref = path[0]; const messageId = name === ref ? "unexpectedCall" : "unexpectedRefCall"; - context.report({ node, messageId, data: { name, ref } }); + context.report({ node: refNode, messageId, data: { name, ref } }); } } }; diff --git a/node_modules/eslint/lib/rules/no-object-constructor.js b/node_modules/eslint/lib/rules/no-object-constructor.js new file mode 100644 index 000000000..8875ec212 --- /dev/null +++ b/node_modules/eslint/lib/rules/no-object-constructor.js @@ -0,0 +1,117 @@ +/** + * @fileoverview Rule to disallow calls to the `Object` constructor without an argument + * @author Francesco Trotta + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { + getVariableByName, + isArrowToken, + isStartOfExpressionStatement, + needsPrecedingSemicolon +} = require("./utils/ast-utils"); + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "suggestion", + + docs: { + description: "Disallow calls to the `Object` constructor without an argument", + recommended: false, + url: "https://eslint.org/docs/latest/rules/no-object-constructor" + }, + + hasSuggestions: true, + + schema: [], + + messages: { + preferLiteral: "The object literal notation {} is preferable.", + useLiteral: "Replace with '{{replacement}}'.", + useLiteralAfterSemicolon: "Replace with '{{replacement}}', add preceding semicolon." + } + }, + + create(context) { + + const sourceCode = context.sourceCode; + + /** + * Determines whether or not an object literal that replaces a specified node needs to be enclosed in parentheses. + * @param {ASTNode} node The node to be replaced. + * @returns {boolean} Whether or not parentheses around the object literal are required. + */ + function needsParentheses(node) { + if (isStartOfExpressionStatement(node)) { + return true; + } + + const prevToken = sourceCode.getTokenBefore(node); + + if (prevToken && isArrowToken(prevToken)) { + return true; + } + + return false; + } + + /** + * Reports on nodes where the `Object` constructor is called without arguments. + * @param {ASTNode} node The node to evaluate. + * @returns {void} + */ + function check(node) { + if (node.callee.type !== "Identifier" || node.callee.name !== "Object" || node.arguments.length) { + return; + } + + const variable = getVariableByName(sourceCode.getScope(node), "Object"); + + if (variable && variable.identifiers.length === 0) { + let replacement; + let fixText; + let messageId = "useLiteral"; + + if (needsParentheses(node)) { + replacement = "({})"; + if (needsPrecedingSemicolon(sourceCode, node)) { + fixText = ";({})"; + messageId = "useLiteralAfterSemicolon"; + } else { + fixText = "({})"; + } + } else { + replacement = fixText = "{}"; + } + + context.report({ + node, + messageId: "preferLiteral", + suggest: [ + { + messageId, + data: { replacement }, + fix: fixer => fixer.replaceText(node, fixText) + } + ] + }); + } + } + + return { + CallExpression: check, + NewExpression: check + }; + + } +}; diff --git a/node_modules/eslint/lib/rules/no-octal-escape.js b/node_modules/eslint/lib/rules/no-octal-escape.js index 5b4c7b2eb..6924d5419 100644 --- a/node_modules/eslint/lib/rules/no-octal-escape.js +++ b/node_modules/eslint/lib/rules/no-octal-escape.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow octal escape sequences in string literals", - category: "Best Practices", + description: "Disallow octal escape sequences in string literals", recommended: false, - url: "https://eslint.org/docs/rules/no-octal-escape" + url: "https://eslint.org/docs/latest/rules/no-octal-escape" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-octal.js b/node_modules/eslint/lib/rules/no-octal.js index e9940befa..dc027696a 100644 --- a/node_modules/eslint/lib/rules/no-octal.js +++ b/node_modules/eslint/lib/rules/no-octal.js @@ -9,21 +9,21 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow octal literals", - category: "Best Practices", + description: "Disallow octal literals", recommended: true, - url: "https://eslint.org/docs/rules/no-octal" + url: "https://eslint.org/docs/latest/rules/no-octal" }, schema: [], messages: { - noOcatal: "Octal literals should not be used." + noOctal: "Octal literals should not be used." } }, @@ -35,7 +35,7 @@ module.exports = { if (typeof node.value === "number" && /^0[0-9]/u.test(node.raw)) { context.report({ node, - messageId: "noOcatal" + messageId: "noOctal" }); } } diff --git a/node_modules/eslint/lib/rules/no-param-reassign.js b/node_modules/eslint/lib/rules/no-param-reassign.js index 6874af44f..607cafd38 100644 --- a/node_modules/eslint/lib/rules/no-param-reassign.js +++ b/node_modules/eslint/lib/rules/no-param-reassign.js @@ -10,15 +10,15 @@ const stopNodePattern = /(?:Statement|Declaration|Function(?:Expression)?|Program)$/u; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow reassigning `function` parameters", - category: "Best Practices", + description: "Disallow reassigning `function` parameters", recommended: false, - url: "https://eslint.org/docs/rules/no-param-reassign" + url: "https://eslint.org/docs/latest/rules/no-param-reassign" }, schema: [ @@ -70,6 +70,7 @@ module.exports = { const props = context.options[0] && context.options[0].props; const ignoredPropertyAssignmentsFor = context.options[0] && context.options[0].ignorePropertyModificationsFor || []; const ignoredPropertyAssignmentsForRegex = context.options[0] && context.options[0].ignorePropertyModificationsForRegex || []; + const sourceCode = context.sourceCode; /** * Checks whether or not the reference modifies properties of its variable. @@ -214,7 +215,7 @@ module.exports = { * @returns {void} */ function checkForFunction(node) { - context.getDeclaredVariables(node).forEach(checkVariable); + sourceCode.getDeclaredVariables(node).forEach(checkVariable); } return { diff --git a/node_modules/eslint/lib/rules/no-path-concat.js b/node_modules/eslint/lib/rules/no-path-concat.js index fc1f894f8..2e4a3a21c 100644 --- a/node_modules/eslint/lib/rules/no-path-concat.js +++ b/node_modules/eslint/lib/rules/no-path-concat.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow string concatenation when using __dirname and __filename * @author Nicholas C. Zakas + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -8,6 +9,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -17,10 +19,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow string concatenation with `__dirname` and `__filename`", - category: "Node.js and CommonJS", + description: "Disallow string concatenation with `__dirname` and `__filename`", recommended: false, - url: "https://eslint.org/docs/rules/no-path-concat" + url: "https://eslint.org/docs/latest/rules/no-path-concat" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-plusplus.js b/node_modules/eslint/lib/rules/no-plusplus.js index 84d6c3e1f..22a6fd013 100644 --- a/node_modules/eslint/lib/rules/no-plusplus.js +++ b/node_modules/eslint/lib/rules/no-plusplus.js @@ -45,15 +45,15 @@ function isForLoopAfterthought(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the unary operators `++` and `--`", - category: "Stylistic Issues", + description: "Disallow the unary operators `++` and `--`", recommended: false, - url: "https://eslint.org/docs/rules/no-plusplus" + url: "https://eslint.org/docs/latest/rules/no-plusplus" }, schema: [ diff --git a/node_modules/eslint/lib/rules/no-process-env.js b/node_modules/eslint/lib/rules/no-process-env.js index 49d173490..8dac648ff 100644 --- a/node_modules/eslint/lib/rules/no-process-env.js +++ b/node_modules/eslint/lib/rules/no-process-env.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow the use of process.env() * @author Vignesh Anand + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -8,6 +9,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -17,10 +19,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow the use of `process.env`", - category: "Node.js and CommonJS", + description: "Disallow the use of `process.env`", recommended: false, - url: "https://eslint.org/docs/rules/no-process-env" + url: "https://eslint.org/docs/latest/rules/no-process-env" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-process-exit.js b/node_modules/eslint/lib/rules/no-process-exit.js index 77c9cfd7c..fa398a72e 100644 --- a/node_modules/eslint/lib/rules/no-process-exit.js +++ b/node_modules/eslint/lib/rules/no-process-exit.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow the use of process.exit() * @author Nicholas C. Zakas + * @deprecated in ESLint v7.0.0 */ "use strict"; @@ -8,6 +9,7 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -17,10 +19,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow the use of `process.exit()`", - category: "Node.js and CommonJS", + description: "Disallow the use of `process.exit()`", recommended: false, - url: "https://eslint.org/docs/rules/no-process-exit" + url: "https://eslint.org/docs/latest/rules/no-process-exit" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-promise-executor-return.js b/node_modules/eslint/lib/rules/no-promise-executor-return.js index 32ee6e151..b27e44072 100644 --- a/node_modules/eslint/lib/rules/no-promise-executor-return.js +++ b/node_modules/eslint/lib/rules/no-promise-executor-return.js @@ -9,7 +9,8 @@ // Requirements //------------------------------------------------------------------------------ -const { findVariable } = require("eslint-utils"); +const { findVariable } = require("@eslint-community/eslint-utils"); +const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Helpers @@ -59,51 +60,170 @@ function isPromiseExecutor(node, scope) { isGlobalReference(parent.callee, getOuterScope(scope)); } +/** + * Checks if the given node is a void expression. + * @param {ASTNode} node The node to check. + * @returns {boolean} - `true` if the node is a void expression + */ +function expressionIsVoid(node) { + return node.type === "UnaryExpression" && node.operator === "void"; +} + +/** + * Fixes the linting error by prepending "void " to the given node + * @param {Object} sourceCode context given by context.sourceCode + * @param {ASTNode} node The node to fix. + * @param {Object} fixer The fixer object provided by ESLint. + * @returns {Array} - An array of fix objects to apply to the node. + */ +function voidPrependFixer(sourceCode, node, fixer) { + + const requiresParens = + + // prepending `void ` will fail if the node has a lower precedence than void + astUtils.getPrecedence(node) < astUtils.getPrecedence({ type: "UnaryExpression", operator: "void" }) && + + // check if there are parentheses around the node to avoid redundant parentheses + !astUtils.isParenthesised(sourceCode, node); + + // avoid parentheses issues + const returnOrArrowToken = sourceCode.getTokenBefore( + node, + node.parent.type === "ArrowFunctionExpression" + ? astUtils.isArrowToken + + // isReturnToken + : token => token.type === "Keyword" && token.value === "return" + ); + + const firstToken = sourceCode.getTokenAfter(returnOrArrowToken); + + const prependSpace = + + // is return token, as => allows void to be adjacent + returnOrArrowToken.value === "return" && + + // If two tokens (return and "(") are adjacent + returnOrArrowToken.range[1] === firstToken.range[0]; + + return [ + fixer.insertTextBefore(firstToken, `${prependSpace ? " " : ""}void ${requiresParens ? "(" : ""}`), + fixer.insertTextAfter(node, requiresParens ? ")" : "") + ]; +} + +/** + * Fixes the linting error by `wrapping {}` around the given node's body. + * @param {Object} sourceCode context given by context.sourceCode + * @param {ASTNode} node The node to fix. + * @param {Object} fixer The fixer object provided by ESLint. + * @returns {Array} - An array of fix objects to apply to the node. + */ +function curlyWrapFixer(sourceCode, node, fixer) { + + // https://github.com/eslint/eslint/pull/17282#issuecomment-1592795923 + const arrowToken = sourceCode.getTokenBefore(node.body, astUtils.isArrowToken); + const firstToken = sourceCode.getTokenAfter(arrowToken); + const lastToken = sourceCode.getLastToken(node); + + return [ + fixer.insertTextBefore(firstToken, "{"), + fixer.insertTextAfter(lastToken, "}") + ]; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow returning values from Promise executor functions", - category: "Possible Errors", + description: "Disallow returning values from Promise executor functions", recommended: false, - url: "https://eslint.org/docs/rules/no-promise-executor-return" + url: "https://eslint.org/docs/latest/rules/no-promise-executor-return" }, - schema: [], + hasSuggestions: true, + + schema: [{ + type: "object", + properties: { + allowVoid: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], messages: { - returnsValue: "Return values from promise executor functions cannot be read." + returnsValue: "Return values from promise executor functions cannot be read.", + + // arrow and function suggestions + prependVoid: "Prepend `void` to the expression.", + + // only arrow suggestions + wrapBraces: "Wrap the expression in `{}`." } }, create(context) { let funcInfo = null; - - /** - * Reports the given node. - * @param {ASTNode} node Node to report. - * @returns {void} - */ - function report(node) { - context.report({ node, messageId: "returnsValue" }); - } + const sourceCode = context.sourceCode; + const { + allowVoid = false + } = context.options[0] || {}; return { onCodePathStart(_, node) { funcInfo = { upper: funcInfo, - shouldCheck: functionTypesToCheck.has(node.type) && isPromiseExecutor(node, context.getScope()) + shouldCheck: + functionTypesToCheck.has(node.type) && + isPromiseExecutor(node, sourceCode.getScope(node)) }; - if (funcInfo.shouldCheck && node.type === "ArrowFunctionExpression" && node.expression) { - report(node.body); + if (// Is a Promise executor + funcInfo.shouldCheck && + node.type === "ArrowFunctionExpression" && + node.expression && + + // Except void + !(allowVoid && expressionIsVoid(node.body)) + ) { + const suggest = []; + + // prevent useless refactors + if (allowVoid) { + suggest.push({ + messageId: "prependVoid", + fix(fixer) { + return voidPrependFixer(sourceCode, node.body, fixer); + } + }); + } + + // Do not suggest wrapping an unnamed FunctionExpression in braces as that would be invalid syntax. + if (!(node.body.type === "FunctionExpression" && !node.body.id)) { + suggest.push({ + messageId: "wrapBraces", + fix(fixer) { + return curlyWrapFixer(sourceCode, node, fixer); + } + }); + } + + context.report({ + node: node.body, + messageId: "returnsValue", + suggest + }); } }, @@ -112,9 +232,31 @@ module.exports = { }, ReturnStatement(node) { - if (funcInfo.shouldCheck && node.argument) { - report(node); + if (!(funcInfo.shouldCheck && node.argument)) { + return; } + + // node is `return ` + if (!allowVoid) { + context.report({ node, messageId: "returnsValue" }); + return; + } + + if (expressionIsVoid(node.argument)) { + return; + } + + // allowVoid && !expressionIsVoid + context.report({ + node, + messageId: "returnsValue", + suggest: [{ + messageId: "prependVoid", + fix(fixer) { + return voidPrependFixer(sourceCode, node.argument, fixer); + } + }] + }); } }; } diff --git a/node_modules/eslint/lib/rules/no-proto.js b/node_modules/eslint/lib/rules/no-proto.js index 82ce02fa4..28320d5d5 100644 --- a/node_modules/eslint/lib/rules/no-proto.js +++ b/node_modules/eslint/lib/rules/no-proto.js @@ -15,15 +15,15 @@ const { getStaticPropertyName } = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of the `__proto__` property", - category: "Best Practices", + description: "Disallow the use of the `__proto__` property", recommended: false, - url: "https://eslint.org/docs/rules/no-proto" + url: "https://eslint.org/docs/latest/rules/no-proto" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-prototype-builtins.js b/node_modules/eslint/lib/rules/no-prototype-builtins.js index c5e4d4925..b61e58529 100644 --- a/node_modules/eslint/lib/rules/no-prototype-builtins.js +++ b/node_modules/eslint/lib/rules/no-prototype-builtins.js @@ -10,34 +10,68 @@ const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Returns true if the node or any of the objects + * to the left of it in the member/call chain is optional. + * + * e.g. `a?.b`, `a?.b.c`, `a?.()`, `a()?.()` + * @param {ASTNode} node The expression to check + * @returns {boolean} `true` if there is a short-circuiting optional `?.` + * in the same option chain to the left of this call or member expression, + * or the node itself is an optional call or member `?.`. + */ +function isAfterOptional(node) { + let leftNode; + + if (node.type === "MemberExpression") { + leftNode = node.object; + } else if (node.type === "CallExpression") { + leftNode = node.callee; + } else { + return false; + } + if (node.optional) { + return true; + } + return isAfterOptional(leftNode); +} + + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow calling some `Object.prototype` methods directly on objects", - category: "Possible Errors", + description: "Disallow calling some `Object.prototype` methods directly on objects", recommended: true, - url: "https://eslint.org/docs/rules/no-prototype-builtins" + url: "https://eslint.org/docs/latest/rules/no-prototype-builtins" }, + hasSuggestions: true, + schema: [], messages: { - prototypeBuildIn: "Do not access Object.prototype method '{{prop}}' from target object." + prototypeBuildIn: "Do not access Object.prototype method '{{prop}}' from target object.", + callObjectPrototype: "Call Object.prototype.{{prop}} explicitly." } }, create(context) { - const DISALLOWED_PROPS = [ + const DISALLOWED_PROPS = new Set([ "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable" - ]; + ]); /** * Reports if a disallowed property is used in a CallExpression @@ -54,12 +88,66 @@ module.exports = { const propName = astUtils.getStaticPropertyName(callee); - if (propName !== null && DISALLOWED_PROPS.indexOf(propName) > -1) { + if (propName !== null && DISALLOWED_PROPS.has(propName)) { context.report({ messageId: "prototypeBuildIn", loc: callee.property.loc, data: { prop: propName }, - node + node, + suggest: [ + { + messageId: "callObjectPrototype", + data: { prop: propName }, + fix(fixer) { + const sourceCode = context.sourceCode; + + /* + * A call after an optional chain (e.g. a?.b.hasOwnProperty(c)) + * must be fixed manually because the call can be short-circuited + */ + if (isAfterOptional(node)) { + return null; + } + + /* + * A call on a ChainExpression (e.g. (a?.hasOwnProperty)(c)) will trigger + * no-unsafe-optional-chaining which should be fixed before this suggestion + */ + if (node.callee.type === "ChainExpression") { + return null; + } + + const objectVariable = astUtils.getVariableByName(sourceCode.getScope(node), "Object"); + + /* + * We can't use Object if the global Object was shadowed, + * or Object does not exist in the global scope for some reason + */ + if (!objectVariable || objectVariable.scope.type !== "global" || objectVariable.defs.length > 0) { + return null; + } + + let objectText = sourceCode.getText(callee.object); + + if (astUtils.getPrecedence(callee.object) <= astUtils.getPrecedence({ type: "SequenceExpression" })) { + objectText = `(${objectText})`; + } + + const openParenToken = sourceCode.getTokenAfter( + node.callee, + astUtils.isOpeningParenToken + ); + const isEmptyParameters = node.arguments.length === 0; + const delim = isEmptyParameters ? "" : ", "; + const fixes = [ + fixer.replaceText(callee, `Object.prototype.${propName}.call`), + fixer.insertTextAfter(openParenToken, objectText + delim) + ]; + + return fixes; + } + } + ] }); } } diff --git a/node_modules/eslint/lib/rules/no-redeclare.js b/node_modules/eslint/lib/rules/no-redeclare.js index 6ddb21c9e..8a4877e8a 100644 --- a/node_modules/eslint/lib/rules/no-redeclare.js +++ b/node_modules/eslint/lib/rules/no-redeclare.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow variable redeclaration", - category: "Best Practices", + description: "Disallow variable redeclaration", recommended: true, - url: "https://eslint.org/docs/rules/no-redeclare" + url: "https://eslint.org/docs/latest/rules/no-redeclare" }, messages: { @@ -50,7 +50,7 @@ module.exports = { context.options[0].builtinGlobals ) }; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Iterate declarations of a given variable. @@ -129,7 +129,7 @@ module.exports = { * @private */ function checkForBlock(node) { - const scope = context.getScope(); + const scope = sourceCode.getScope(node); /* * In ES5, some node type such as `BlockStatement` doesn't have that scope. @@ -141,8 +141,8 @@ module.exports = { } return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); findVariablesInScope(scope); @@ -162,6 +162,8 @@ module.exports = { FunctionExpression: checkForBlock, ArrowFunctionExpression: checkForBlock, + StaticBlock: checkForBlock, + BlockStatement: checkForBlock, ForStatement: checkForBlock, ForInStatement: checkForBlock, diff --git a/node_modules/eslint/lib/rules/no-regex-spaces.js b/node_modules/eslint/lib/rules/no-regex-spaces.js index e6d4c9efb..cb2501072 100644 --- a/node_modules/eslint/lib/rules/no-regex-spaces.js +++ b/node_modules/eslint/lib/rules/no-regex-spaces.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const regexpp = require("regexpp"); +const regexpp = require("@eslint-community/regexpp"); //------------------------------------------------------------------------------ // Helpers @@ -33,15 +33,15 @@ function isString(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow multiple spaces in regular expressions", - category: "Possible Errors", + description: "Disallow multiple spaces in regular expressions", recommended: true, - url: "https://eslint.org/docs/rules/no-regex-spaces" + url: "https://eslint.org/docs/latest/rules/no-regex-spaces" }, schema: [], @@ -54,6 +54,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Validate regular expression * @param {ASTNode} nodeToReport Node to report. @@ -75,7 +77,7 @@ module.exports = { let regExpAST; try { - regExpAST = regExpParser.parsePattern(pattern, 0, pattern.length, flags.includes("u")); + regExpAST = regExpParser.parsePattern(pattern, 0, pattern.length, { unicode: flags.includes("u"), unicodeSets: flags.includes("v") }); } catch { // Ignore regular expressions with syntax errors @@ -149,17 +151,32 @@ module.exports = { * @private */ function checkFunction(node) { - const scope = context.getScope(); + const scope = sourceCode.getScope(node); const regExpVar = astUtils.getVariableByName(scope, "RegExp"); const shadowed = regExpVar && regExpVar.defs.length > 0; const patternNode = node.arguments[0]; - const flagsNode = node.arguments[1]; if (node.callee.type === "Identifier" && node.callee.name === "RegExp" && isString(patternNode) && !shadowed) { const pattern = patternNode.value; const rawPattern = patternNode.raw.slice(1, -1); const rawPatternStartRange = patternNode.range[0] + 1; - const flags = isString(flagsNode) ? flagsNode.value : ""; + let flags; + + if (node.arguments.length < 2) { + + // It has no flags. + flags = ""; + } else { + const flagsNode = node.arguments[1]; + + if (isString(flagsNode)) { + flags = flagsNode.value; + } else { + + // The flags cannot be determined. + return; + } + } checkRegex( node, diff --git a/node_modules/eslint/lib/rules/no-restricted-exports.js b/node_modules/eslint/lib/rules/no-restricted-exports.js index f0df0ffae..a1d54b085 100644 --- a/node_modules/eslint/lib/rules/no-restricted-exports.js +++ b/node_modules/eslint/lib/rules/no-restricted-exports.js @@ -5,51 +5,109 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow specified names in exports", - category: "ECMAScript 6", + description: "Disallow specified names in exports", recommended: false, - url: "https://eslint.org/docs/rules/no-restricted-exports" + url: "https://eslint.org/docs/latest/rules/no-restricted-exports" }, schema: [{ - type: "object", - properties: { - restrictedNamedExports: { - type: "array", - items: { - type: "string" + anyOf: [ + { + type: "object", + properties: { + restrictedNamedExports: { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + } + }, + additionalProperties: false + }, + { + type: "object", + properties: { + restrictedNamedExports: { + type: "array", + items: { + type: "string", + pattern: "^(?!default$)" + }, + uniqueItems: true + }, + restrictDefaultExports: { + type: "object", + properties: { + + // Allow/Disallow `export default foo; export default 42; export default function foo() {}` format + direct: { + type: "boolean" + }, + + // Allow/Disallow `export { foo as default };` declarations + named: { + type: "boolean" + }, + + // Allow/Disallow `export { default } from "mod"; export { default as default } from "mod";` declarations + defaultFrom: { + type: "boolean" + }, + + // Allow/Disallow `export { foo as default } from "mod";` declarations + namedFrom: { + type: "boolean" + }, + + // Allow/Disallow `export * as default from "mod"`; declarations + namespaceFrom: { + type: "boolean" + } + }, + additionalProperties: false + } }, - uniqueItems: true + additionalProperties: false } - }, - additionalProperties: false + ] }], messages: { - restrictedNamed: "'{{name}}' is restricted from being used as an exported name." + restrictedNamed: "'{{name}}' is restricted from being used as an exported name.", + restrictedDefault: "Exporting 'default' is restricted." } }, create(context) { const restrictedNames = new Set(context.options[0] && context.options[0].restrictedNamedExports); + const restrictDefaultExports = context.options[0] && context.options[0].restrictDefaultExports; + const sourceCode = context.sourceCode; /** - * Checks and reports given exported identifier. - * @param {ASTNode} node exported `Identifier` node to check. + * Checks and reports given exported name. + * @param {ASTNode} node exported `Identifier` or string `Literal` node to check. * @returns {void} */ function checkExportedName(node) { - const name = node.name; + const name = astUtils.getModuleExportName(node); if (restrictedNames.has(name)) { context.report({ @@ -57,6 +115,42 @@ module.exports = { messageId: "restrictedNamed", data: { name } }); + return; + } + + if (name === "default") { + if (node.parent.type === "ExportAllDeclaration") { + if (restrictDefaultExports && restrictDefaultExports.namespaceFrom) { + context.report({ + node, + messageId: "restrictedDefault" + }); + } + + } else { // ExportSpecifier + const isSourceSpecified = !!node.parent.parent.source; + const specifierLocalName = astUtils.getModuleExportName(node.parent.local); + + if (!isSourceSpecified && restrictDefaultExports && restrictDefaultExports.named) { + context.report({ + node, + messageId: "restrictedDefault" + }); + return; + } + + if (isSourceSpecified && restrictDefaultExports) { + if ( + (specifierLocalName === "default" && restrictDefaultExports.defaultFrom) || + (specifierLocalName !== "default" && restrictDefaultExports.namedFrom) + ) { + context.report({ + node, + messageId: "restrictedDefault" + }); + } + } + } } } @@ -67,6 +161,15 @@ module.exports = { } }, + ExportDefaultDeclaration(node) { + if (restrictDefaultExports && restrictDefaultExports.direct) { + context.report({ + node, + messageId: "restrictedDefault" + }); + } + }, + ExportNamedDeclaration(node) { const declaration = node.declaration; @@ -74,7 +177,7 @@ module.exports = { if (declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") { checkExportedName(declaration.id); } else if (declaration.type === "VariableDeclaration") { - context.getDeclaredVariables(declaration) + sourceCode.getDeclaredVariables(declaration) .map(v => v.defs.find(d => d.parent === declaration)) .map(d => d.name) // Identifier nodes .forEach(checkExportedName); diff --git a/node_modules/eslint/lib/rules/no-restricted-globals.js b/node_modules/eslint/lib/rules/no-restricted-globals.js index 2c932a730..919a8ee0a 100644 --- a/node_modules/eslint/lib/rules/no-restricted-globals.js +++ b/node_modules/eslint/lib/rules/no-restricted-globals.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow specified global variables", - category: "Variables", + description: "Disallow specified global variables", recommended: false, - url: "https://eslint.org/docs/rules/no-restricted-globals" + url: "https://eslint.org/docs/latest/rules/no-restricted-globals" }, schema: { @@ -43,13 +43,15 @@ module.exports = { messages: { defaultMessage: "Unexpected use of '{{name}}'.", - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period customMessage: "Unexpected use of '{{name}}'. {{customMessage}}" } }, create(context) { + const sourceCode = context.sourceCode; + // If no globals are restricted, we don't need to do anything if (context.options.length === 0) { return {}; @@ -99,8 +101,8 @@ module.exports = { } return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); // Report variables declared elsewhere (ex: variables defined as "global" by eslint) scope.variables.forEach(variable => { diff --git a/node_modules/eslint/lib/rules/no-restricted-imports.js b/node_modules/eslint/lib/rules/no-restricted-imports.js index c205dad8b..eb59f4c23 100644 --- a/node_modules/eslint/lib/rules/no-restricted-imports.js +++ b/node_modules/eslint/lib/rules/no-restricted-imports.js @@ -4,18 +4,18 @@ */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ const ignore = require("ignore"); -const arrayOfStrings = { - type: "array", - items: { type: "string" }, - uniqueItems: true -}; - const arrayOfStringsOrObjects = { type: "array", items: { @@ -44,30 +44,93 @@ const arrayOfStringsOrObjects = { uniqueItems: true }; +const arrayOfStringsOrObjectPatterns = { + anyOf: [ + { + type: "array", + items: { + type: "string" + }, + uniqueItems: true + }, + { + type: "array", + items: { + type: "object", + properties: { + importNames: { + type: "array", + items: { + type: "string" + }, + minItems: 1, + uniqueItems: true + }, + group: { + type: "array", + items: { + type: "string" + }, + minItems: 1, + uniqueItems: true + }, + importNamePattern: { + type: "string" + }, + message: { + type: "string", + minLength: 1 + }, + caseSensitive: { + type: "boolean" + } + }, + additionalProperties: false, + required: ["group"] + }, + uniqueItems: true + } + ] +}; + +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow specified modules when loaded by `import`", - category: "ECMAScript 6", + description: "Disallow specified modules when loaded by `import`", recommended: false, - url: "https://eslint.org/docs/rules/no-restricted-imports" + url: "https://eslint.org/docs/latest/rules/no-restricted-imports" }, messages: { path: "'{{importSource}}' import is restricted from being used.", - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period pathWithCustomMessage: "'{{importSource}}' import is restricted from being used. {{customMessage}}", patterns: "'{{importSource}}' import is restricted from being used by a pattern.", + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period + patternWithCustomMessage: "'{{importSource}}' import is restricted from being used by a pattern. {{customMessage}}", + + patternAndImportName: "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern.", + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period + patternAndImportNameWithCustomMessage: "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}", + + patternAndEverything: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.", + + patternAndEverythingWithRegexImportName: "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.", + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period + patternAndEverythingWithCustomMessage: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}", + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period + patternAndEverythingWithRegexImportNameAndCustomMessage: "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}", everything: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.", - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period everythingWithCustomMessage: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted. {{customMessage}}", importName: "'{{importName}}' import from '{{importSource}}' is restricted.", - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period importNameWithCustomMessage: "'{{importName}}' import from '{{importSource}}' is restricted. {{customMessage}}" }, @@ -80,7 +143,7 @@ module.exports = { type: "object", properties: { paths: arrayOfStringsOrObjects, - patterns: arrayOfStrings + patterns: arrayOfStringsOrObjectPatterns }, additionalProperties: false }], @@ -91,20 +154,13 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const options = Array.isArray(context.options) ? context.options : []; const isPathAndPatternsObject = typeof options[0] === "object" && (Object.prototype.hasOwnProperty.call(options[0], "paths") || Object.prototype.hasOwnProperty.call(options[0], "patterns")); const restrictedPaths = (isPathAndPatternsObject ? options[0].paths : context.options) || []; - const restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || []; - - // if no imports are restricted we don"t need to check - if (Object.keys(restrictedPaths).length === 0 && restrictedPatterns.length === 0) { - return {}; - } - const restrictedPathMessages = restrictedPaths.reduce((memo, importSource) => { if (typeof importSource === "string") { memo[importSource] = { message: null }; @@ -117,7 +173,26 @@ module.exports = { return memo; }, {}); - const restrictedPatternsMatcher = ignore().add(restrictedPatterns); + // Handle patterns too, either as strings or groups + let restrictedPatterns = (isPathAndPatternsObject ? options[0].patterns : []) || []; + + // standardize to array of objects if we have an array of strings + if (restrictedPatterns.length > 0 && typeof restrictedPatterns[0] === "string") { + restrictedPatterns = [{ group: restrictedPatterns }]; + } + + // relative paths are supported for this rule + const restrictedPatternGroups = restrictedPatterns.map(({ group, message, caseSensitive, importNames, importNamePattern }) => ({ + matcher: ignore({ allowRelativePaths: true, ignorecase: !caseSensitive }).add(group), + customMessage: message, + importNames, + importNamePattern + })); + + // if no imports are restricted we don't need to check + if (Object.keys(restrictedPaths).length === 0 && restrictedPatternGroups.length === 0) { + return {}; + } /** * Report a restricted path. @@ -184,17 +259,82 @@ module.exports = { /** * Report a restricted path specifically for patterns. * @param {node} node representing the restricted path reference + * @param {Object} group contains an Ignore instance for paths, the customMessage to show on failure, + * and any restricted import names that have been specified in the config + * @param {Map} importNames Map of import names that are being imported * @returns {void} * @private */ - function reportPathForPatterns(node) { + function reportPathForPatterns(node, group, importNames) { const importSource = node.source.value.trim(); - context.report({ - node, - messageId: "patterns", - data: { - importSource + const customMessage = group.customMessage; + const restrictedImportNames = group.importNames; + const restrictedImportNamePattern = group.importNamePattern ? new RegExp(group.importNamePattern, "u") : null; + + /* + * If we are not restricting to any specific import names and just the pattern itself, + * report the error and move on + */ + if (!restrictedImportNames && !restrictedImportNamePattern) { + context.report({ + node, + messageId: customMessage ? "patternWithCustomMessage" : "patterns", + data: { + importSource, + customMessage + } + }); + return; + } + + importNames.forEach((specifiers, importName) => { + if (importName === "*") { + const [specifier] = specifiers; + + if (restrictedImportNames) { + context.report({ + node, + messageId: customMessage ? "patternAndEverythingWithCustomMessage" : "patternAndEverything", + loc: specifier.loc, + data: { + importSource, + importNames: restrictedImportNames, + customMessage + } + }); + } else { + context.report({ + node, + messageId: customMessage ? "patternAndEverythingWithRegexImportNameAndCustomMessage" : "patternAndEverythingWithRegexImportName", + loc: specifier.loc, + data: { + importSource, + importNames: restrictedImportNamePattern, + customMessage + } + }); + } + + return; + } + + if ( + (restrictedImportNames && restrictedImportNames.includes(importName)) || + (restrictedImportNamePattern && restrictedImportNamePattern.test(importName)) + ) { + specifiers.forEach(specifier => { + context.report({ + node, + messageId: customMessage ? "patternAndImportNameWithCustomMessage" : "patternAndImportName", + loc: specifier.loc, + data: { + importSource, + customMessage, + importName + } + }); + }); } }); } @@ -202,11 +342,12 @@ module.exports = { /** * Check if the given importSource is restricted by a pattern. * @param {string} importSource path of the import + * @param {Object} group contains a Ignore instance for paths, and the customMessage to show if it fails * @returns {boolean} whether the variable is a restricted pattern or not * @private */ - function isRestrictedPattern(importSource) { - return restrictedPatterns.length > 0 && restrictedPatternsMatcher.ignores(importSource); + function isRestrictedPattern(importSource, group) { + return group.matcher.ignores(importSource); } /** @@ -233,12 +374,12 @@ module.exports = { } else if (specifier.type === "ImportNamespaceSpecifier") { name = "*"; } else if (specifier.imported) { - name = specifier.imported.name; + name = astUtils.getModuleExportName(specifier.imported); } else if (specifier.local) { - name = specifier.local.name; + name = astUtils.getModuleExportName(specifier.local); } - if (name) { + if (typeof name === "string") { if (importNames.has(name)) { importNames.get(name).push(specifierData); } else { @@ -249,10 +390,11 @@ module.exports = { } checkRestrictedPathAndReport(importSource, importNames, node); - - if (isRestrictedPattern(importSource)) { - reportPathForPatterns(node); - } + restrictedPatternGroups.forEach(group => { + if (isRestrictedPattern(importSource, group)) { + reportPathForPatterns(node, group, importNames); + } + }); } return { diff --git a/node_modules/eslint/lib/rules/no-restricted-modules.js b/node_modules/eslint/lib/rules/no-restricted-modules.js index d0b8a78a5..4a9b0a4c0 100644 --- a/node_modules/eslint/lib/rules/no-restricted-modules.js +++ b/node_modules/eslint/lib/rules/no-restricted-modules.js @@ -1,9 +1,16 @@ /** * @fileoverview Restrict usage of specified node modules. * @author Christian Schulz + * @deprecated in ESLint v7.0.0 */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -38,6 +45,7 @@ const arrayOfStringsOrObjects = { uniqueItems: true }; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -47,10 +55,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow specified modules when loaded by `require`", - category: "Node.js and CommonJS", + description: "Disallow specified modules when loaded by `require`", recommended: false, - url: "https://eslint.org/docs/rules/no-restricted-modules" + url: "https://eslint.org/docs/latest/rules/no-restricted-modules" }, schema: { @@ -73,7 +80,7 @@ module.exports = { messages: { defaultMessage: "'{{name}}' module is restricted from being used.", - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period customMessage: "'{{name}}' module is restricted from being used. {{customMessage}}", patternMessage: "'{{name}}' module is restricted from being used by a pattern." } @@ -97,12 +104,13 @@ module.exports = { return memo; }, {}); - // if no imports are restricted we don"t need to check + // if no imports are restricted we don't need to check if (Object.keys(restrictedPaths).length === 0 && restrictedPatterns.length === 0) { return {}; } - const ig = ignore().add(restrictedPatterns); + // relative paths are supported for this rule + const ig = ignore({ allowRelativePaths: true }).add(restrictedPatterns); /** @@ -114,15 +122,6 @@ module.exports = { return node && node.type === "Literal" && typeof node.value === "string"; } - /** - * Function to check if a node is a static string template literal. - * @param {ASTNode} node The node to check. - * @returns {boolean} If the node is a string template literal. - */ - function isStaticTemplateLiteral(node) { - return node && node.type === "TemplateLiteral" && node.expressions.length === 0; - } - /** * Function to check if a node is a require call. * @param {ASTNode} node The node to check. @@ -142,7 +141,7 @@ module.exports = { return node.value.trim(); } - if (isStaticTemplateLiteral(node)) { + if (astUtils.isStaticTemplateLiteral(node)) { return node.quasis[0].value.cooked.trim(); } diff --git a/node_modules/eslint/lib/rules/no-restricted-properties.js b/node_modules/eslint/lib/rules/no-restricted-properties.js index 7ab83995a..acd178ae5 100644 --- a/node_modules/eslint/lib/rules/no-restricted-properties.js +++ b/node_modules/eslint/lib/rules/no-restricted-properties.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow certain properties on certain objects", - category: "Best Practices", + description: "Disallow certain properties on certain objects", recommended: false, - url: "https://eslint.org/docs/rules/no-restricted-properties" + url: "https://eslint.org/docs/latest/rules/no-restricted-properties" }, schema: { @@ -64,9 +64,9 @@ module.exports = { }, messages: { - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period restrictedObjectProperty: "'{{objectName}}.{{propertyName}}' is restricted from being used.{{message}}", - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period restrictedProperty: "'{{propertyName}}' is restricted from being used.{{message}}" } }, @@ -142,40 +142,27 @@ module.exports = { } } - /** - * Checks property accesses in a destructuring assignment expression, e.g. `var foo; ({foo} = bar);` - * @param {ASTNode} node An AssignmentExpression or AssignmentPattern node - * @returns {undefined} - */ - function checkDestructuringAssignment(node) { - if (node.right.type === "Identifier") { - const objectName = node.right.name; - - if (node.left.type === "ObjectPattern") { - node.left.properties.forEach(property => { - checkPropertyAccess(node.left, objectName, astUtils.getStaticPropertyName(property)); - }); - } - } - } - return { MemberExpression(node) { checkPropertyAccess(node, node.object && node.object.name, astUtils.getStaticPropertyName(node)); }, - VariableDeclarator(node) { - if (node.init && node.init.type === "Identifier") { - const objectName = node.init.name; - - if (node.id.type === "ObjectPattern") { - node.id.properties.forEach(property => { - checkPropertyAccess(node.id, objectName, astUtils.getStaticPropertyName(property)); - }); + ObjectPattern(node) { + let objectName = null; + + if (node.parent.type === "VariableDeclarator") { + if (node.parent.init && node.parent.init.type === "Identifier") { + objectName = node.parent.init.name; + } + } else if (node.parent.type === "AssignmentExpression" || node.parent.type === "AssignmentPattern") { + if (node.parent.right.type === "Identifier") { + objectName = node.parent.right.name; } } - }, - AssignmentExpression: checkDestructuringAssignment, - AssignmentPattern: checkDestructuringAssignment + + node.properties.forEach(property => { + checkPropertyAccess(node, objectName, astUtils.getStaticPropertyName(property)); + }); + } }; } }; diff --git a/node_modules/eslint/lib/rules/no-restricted-syntax.js b/node_modules/eslint/lib/rules/no-restricted-syntax.js index 9572603a8..930882c33 100644 --- a/node_modules/eslint/lib/rules/no-restricted-syntax.js +++ b/node_modules/eslint/lib/rules/no-restricted-syntax.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow specified syntax", - category: "Stylistic Issues", + description: "Disallow specified syntax", recommended: false, - url: "https://eslint.org/docs/rules/no-restricted-syntax" + url: "https://eslint.org/docs/latest/rules/no-restricted-syntax" }, schema: { @@ -42,7 +42,7 @@ module.exports = { }, messages: { - // eslint-disable-next-line eslint-plugin/report-message-format + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period restrictedSyntax: "{{message}}" } }, diff --git a/node_modules/eslint/lib/rules/no-return-assign.js b/node_modules/eslint/lib/rules/no-return-assign.js index 4b57d42eb..73caf0e6b 100644 --- a/node_modules/eslint/lib/rules/no-return-assign.js +++ b/node_modules/eslint/lib/rules/no-return-assign.js @@ -20,15 +20,15 @@ const SENTINEL_TYPE = /^(?:[a-zA-Z]+?Statement|ArrowFunctionExpression|FunctionE // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow assignment operators in `return` statements", - category: "Best Practices", + description: "Disallow assignment operators in `return` statements", recommended: false, - url: "https://eslint.org/docs/rules/no-return-assign" + url: "https://eslint.org/docs/latest/rules/no-return-assign" }, schema: [ @@ -45,7 +45,7 @@ module.exports = { create(context) { const always = (context.options[0] || "except-parens") !== "except-parens"; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { AssignmentExpression(node) { diff --git a/node_modules/eslint/lib/rules/no-return-await.js b/node_modules/eslint/lib/rules/no-return-await.js index d1d898268..77abda0ca 100644 --- a/node_modules/eslint/lib/rules/no-return-await.js +++ b/node_modules/eslint/lib/rules/no-return-await.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallows unnecessary `return await` * @author Jordan Harband + * @deprecated in ESLint v8.46.0 */ "use strict"; @@ -10,25 +11,31 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + hasSuggestions: true, type: "suggestion", docs: { - description: "disallow unnecessary `return await`", - category: "Best Practices", + description: "Disallow unnecessary `return await`", recommended: false, - url: "https://eslint.org/docs/rules/no-return-await" + url: "https://eslint.org/docs/latest/rules/no-return-await" }, fixable: null, + deprecated: true, + + replacedBy: [], + schema: [ ], messages: { + removeAwait: "Remove redundant `await`.", redundantUseOfAwait: "Redundant use of `await` on a return value." } }, @@ -42,9 +49,34 @@ module.exports = { */ function reportUnnecessaryAwait(node) { context.report({ - node: context.getSourceCode().getFirstToken(node), + node: context.sourceCode.getFirstToken(node), loc: node.loc, - messageId: "redundantUseOfAwait" + messageId: "redundantUseOfAwait", + suggest: [ + { + messageId: "removeAwait", + fix(fixer) { + const sourceCode = context.sourceCode; + const [awaitToken, tokenAfterAwait] = sourceCode.getFirstTokens(node, 2); + + const areAwaitAndAwaitedExpressionOnTheSameLine = awaitToken.loc.start.line === tokenAfterAwait.loc.start.line; + + if (!areAwaitAndAwaitedExpressionOnTheSameLine) { + return null; + } + + const [startOfAwait, endOfAwait] = awaitToken.range; + + const characterAfterAwait = sourceCode.text[endOfAwait]; + const trimLength = characterAfterAwait === " " ? 1 : 0; + + const range = [startOfAwait, endOfAwait + trimLength]; + + return fixer.removeRange(range); + } + } + ] + }); } diff --git a/node_modules/eslint/lib/rules/no-script-url.js b/node_modules/eslint/lib/rules/no-script-url.js index 0c8205244..1d16bde3c 100644 --- a/node_modules/eslint/lib/rules/no-script-url.js +++ b/node_modules/eslint/lib/rules/no-script-url.js @@ -2,8 +2,7 @@ * @fileoverview Rule to flag when using javascript: urls * @author Ilya Volodin */ -/* jshint scripturl: true */ -/* eslint no-script-url: 0 */ +/* eslint no-script-url: 0 -- Code is checking to report such URLs */ "use strict"; @@ -13,15 +12,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `javascript:` urls", - category: "Best Practices", + description: "Disallow `javascript:` urls", recommended: false, - url: "https://eslint.org/docs/rules/no-script-url" + url: "https://eslint.org/docs/latest/rules/no-script-url" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-self-assign.js b/node_modules/eslint/lib/rules/no-self-assign.js index 705be324c..33ac8fb50 100644 --- a/node_modules/eslint/lib/rules/no-self-assign.js +++ b/node_modules/eslint/lib/rules/no-self-assign.js @@ -124,15 +124,15 @@ function eachSelfAssignment(left, right, props, report) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow assignments where both sides are exactly the same", - category: "Best Practices", + description: "Disallow assignments where both sides are exactly the same", recommended: true, - url: "https://eslint.org/docs/rules/no-self-assign" + url: "https://eslint.org/docs/latest/rules/no-self-assign" }, schema: [ @@ -154,7 +154,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const [{ props = true } = {}] = context.options; /** @@ -174,7 +174,7 @@ module.exports = { return { AssignmentExpression(node) { - if (node.operator === "=") { + if (["=", "&&=", "||=", "??="].includes(node.operator)) { eachSelfAssignment(node.left, node.right, props, report); } } diff --git a/node_modules/eslint/lib/rules/no-self-compare.js b/node_modules/eslint/lib/rules/no-self-compare.js index 79b6ac7ea..3b076eba8 100644 --- a/node_modules/eslint/lib/rules/no-self-compare.js +++ b/node_modules/eslint/lib/rules/no-self-compare.js @@ -10,15 +10,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow comparisons where both sides are exactly the same", - category: "Best Practices", + description: "Disallow comparisons where both sides are exactly the same", recommended: false, - url: "https://eslint.org/docs/rules/no-self-compare" + url: "https://eslint.org/docs/latest/rules/no-self-compare" }, schema: [], @@ -29,7 +29,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Determines whether two nodes are composed of the same tokens. diff --git a/node_modules/eslint/lib/rules/no-sequences.js b/node_modules/eslint/lib/rules/no-sequences.js index fe516975f..cd21fc784 100644 --- a/node_modules/eslint/lib/rules/no-sequences.js +++ b/node_modules/eslint/lib/rules/no-sequences.js @@ -23,15 +23,15 @@ const DEFAULT_OPTIONS = { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow comma operators", - category: "Best Practices", + description: "Disallow comma operators", recommended: false, - url: "https://eslint.org/docs/rules/no-sequences" + url: "https://eslint.org/docs/latest/rules/no-sequences" }, schema: [{ @@ -51,7 +51,7 @@ module.exports = { create(context) { const options = Object.assign({}, DEFAULT_OPTIONS, context.options[0]); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Parts of the grammar that are required to have parens. diff --git a/node_modules/eslint/lib/rules/no-setter-return.js b/node_modules/eslint/lib/rules/no-setter-return.js index 9c79240dd..a5abaaa7e 100644 --- a/node_modules/eslint/lib/rules/no-setter-return.js +++ b/node_modules/eslint/lib/rules/no-setter-return.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { findVariable } = require("eslint-utils"); +const { findVariable } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Helpers @@ -93,6 +93,7 @@ function isSetter(node, scope) { const parent = node.parent; if ( + (parent.type === "Property" || parent.type === "MethodDefinition") && parent.kind === "set" && parent.value === node ) { @@ -135,15 +136,15 @@ function getOuterScope(scope) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow returning values from setters", - category: "Possible Errors", + description: "Disallow returning values from setters", recommended: true, - url: "https://eslint.org/docs/rules/no-setter-return" + url: "https://eslint.org/docs/latest/rules/no-setter-return" }, schema: [], @@ -155,6 +156,7 @@ module.exports = { create(context) { let funcInfo = null; + const sourceCode = context.sourceCode; /** * Creates and pushes to the stack a function info object for the given function node. @@ -162,7 +164,7 @@ module.exports = { * @returns {void} */ function enterFunction(node) { - const outerScope = getOuterScope(context.getScope()); + const outerScope = getOuterScope(sourceCode.getScope(node)); funcInfo = { upper: funcInfo, diff --git a/node_modules/eslint/lib/rules/no-shadow-restricted-names.js b/node_modules/eslint/lib/rules/no-shadow-restricted-names.js index 9647e9a1b..29560fffc 100644 --- a/node_modules/eslint/lib/rules/no-shadow-restricted-names.js +++ b/node_modules/eslint/lib/rules/no-shadow-restricted-names.js @@ -21,15 +21,15 @@ function safelyShadowsUndefined(variable) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow identifiers from shadowing restricted names", - category: "Variables", + description: "Disallow identifiers from shadowing restricted names", recommended: true, - url: "https://eslint.org/docs/rules/no-shadow-restricted-names" + url: "https://eslint.org/docs/latest/rules/no-shadow-restricted-names" }, schema: [], @@ -43,10 +43,11 @@ module.exports = { const RESTRICTED = new Set(["undefined", "NaN", "Infinity", "arguments", "eval"]); + const sourceCode = context.sourceCode; return { "VariableDeclaration, :function, CatchClause"(node) { - for (const variable of context.getDeclaredVariables(node)) { + for (const variable of sourceCode.getDeclaredVariables(node)) { if (variable.defs.length > 0 && RESTRICTED.has(variable.name) && !safelyShadowsUndefined(variable)) { context.report({ node: variable.defs[0].name, diff --git a/node_modules/eslint/lib/rules/no-shadow.js b/node_modules/eslint/lib/rules/no-shadow.js index a0b1db50c..3e4d99822 100644 --- a/node_modules/eslint/lib/rules/no-shadow.js +++ b/node_modules/eslint/lib/rules/no-shadow.js @@ -11,19 +11,28 @@ const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const FUNC_EXPR_NODE_TYPES = new Set(["ArrowFunctionExpression", "FunctionExpression"]); +const CALL_EXPR_NODE_TYPE = new Set(["CallExpression"]); +const FOR_IN_OF_TYPE = /^For(?:In|Of)Statement$/u; +const SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/u; + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow variable declarations from shadowing variables declared in the outer scope", - category: "Variables", + description: "Disallow variable declarations from shadowing variables declared in the outer scope", recommended: false, - url: "https://eslint.org/docs/rules/no-shadow" + url: "https://eslint.org/docs/latest/rules/no-shadow" }, schema: [ @@ -37,7 +46,8 @@ module.exports = { items: { type: "string" } - } + }, + ignoreOnInitialization: { type: "boolean", default: false } }, additionalProperties: false } @@ -54,16 +64,117 @@ module.exports = { const options = { builtinGlobals: context.options[0] && context.options[0].builtinGlobals, hoist: (context.options[0] && context.options[0].hoist) || "functions", - allow: (context.options[0] && context.options[0].allow) || [] + allow: (context.options[0] && context.options[0].allow) || [], + ignoreOnInitialization: context.options[0] && context.options[0].ignoreOnInitialization }; + const sourceCode = context.sourceCode; + + /** + * Checks whether or not a given location is inside of the range of a given node. + * @param {ASTNode} node An node to check. + * @param {number} location A location to check. + * @returns {boolean} `true` if the location is inside of the range of the node. + */ + function isInRange(node, location) { + return node && node.range[0] <= location && location <= node.range[1]; + } + + /** + * Searches from the current node through its ancestry to find a matching node. + * @param {ASTNode} node a node to get. + * @param {(node: ASTNode) => boolean} match a callback that checks whether or not the node verifies its condition or not. + * @returns {ASTNode|null} the matching node. + */ + function findSelfOrAncestor(node, match) { + let currentNode = node; + + while (currentNode && !match(currentNode)) { + currentNode = currentNode.parent; + } + return currentNode; + } + + /** + * Finds function's outer scope. + * @param {Scope} scope Function's own scope. + * @returns {Scope} Function's outer scope. + */ + function getOuterScope(scope) { + const upper = scope.upper; + + if (upper.type === "function-expression-name") { + return upper.upper; + } + return upper; + } + + /** + * Checks if a variable and a shadowedVariable have the same init pattern ancestor. + * @param {Object} variable a variable to check. + * @param {Object} shadowedVariable a shadowedVariable to check. + * @returns {boolean} Whether or not the variable and the shadowedVariable have the same init pattern ancestor. + */ + function isInitPatternNode(variable, shadowedVariable) { + const outerDef = shadowedVariable.defs[0]; + + if (!outerDef) { + return false; + } + + const { variableScope } = variable.scope; + + + if (!(FUNC_EXPR_NODE_TYPES.has(variableScope.block.type) && getOuterScope(variableScope) === shadowedVariable.scope)) { + return false; + } + + const fun = variableScope.block; + const { parent } = fun; + + const callExpression = findSelfOrAncestor( + parent, + node => CALL_EXPR_NODE_TYPE.has(node.type) + ); + + if (!callExpression) { + return false; + } + + let node = outerDef.name; + const location = callExpression.range[1]; + + while (node) { + if (node.type === "VariableDeclarator") { + if (isInRange(node.init, location)) { + return true; + } + if (FOR_IN_OF_TYPE.test(node.parent.parent.type) && + isInRange(node.parent.parent.right, location) + ) { + return true; + } + break; + } else if (node.type === "AssignmentPattern") { + if (isInRange(node.right, location)) { + return true; + } + } else if (SENTINEL_TYPE.test(node.type)) { + break; + } + + node = node.parent; + } + + return false; + } /** * Check if variable name is allowed. - * @param {ASTNode} variable The variable to check. + * @param {ASTNode} variable The variable to check. * @returns {boolean} Whether or not the variable name is allowed. */ function isAllowed(variable) { - return options.allow.indexOf(variable.name) !== -1; + return options.allow.includes(variable.name); } /** @@ -99,11 +210,11 @@ module.exports = { return ( outer && - inner && - outer[0] < inner[0] && - inner[1] < outer[1] && - ((innerDef.type === "FunctionName" && innerDef.node.type === "FunctionExpression") || innerDef.node.type === "ClassExpression") && - outerScope === innerScope.upper + inner && + outer[0] < inner[0] && + inner[1] < outer[1] && + ((innerDef.type === "FunctionName" && innerDef.node.type === "FunctionExpression") || innerDef.node.type === "ClassExpression") && + outerScope === innerScope.upper ); } @@ -154,11 +265,11 @@ module.exports = { return ( inner && - outer && - inner[1] < outer[0] && + outer && + inner[1] < outer[0] && - // Excepts FunctionDeclaration if is {"hoist":"function"}. - (options.hoist !== "functions" || !outerDef || outerDef.node.type !== "FunctionDeclaration") + // Excepts FunctionDeclaration if is {"hoist":"function"}. + (options.hoist !== "functions" || !outerDef || outerDef.node.type !== "FunctionDeclaration") ); } @@ -175,8 +286,8 @@ module.exports = { // Skips "arguments" or variables of a class name in the class scope of ClassDeclaration. if (variable.identifiers.length === 0 || - isDuplicatedClassNameVariable(variable) || - isAllowed(variable) + isDuplicatedClassNameVariable(variable) || + isAllowed(variable) ) { continue; } @@ -185,9 +296,10 @@ module.exports = { const shadowed = astUtils.getVariableByName(scope.upper, variable.name); if (shadowed && - (shadowed.identifiers.length > 0 || (options.builtinGlobals && "writeable" in shadowed)) && - !isOnInitializer(variable, shadowed) && - !(options.hoist !== "all" && isInTdz(variable, shadowed)) + (shadowed.identifiers.length > 0 || (options.builtinGlobals && "writeable" in shadowed)) && + !isOnInitializer(variable, shadowed) && + !(options.ignoreOnInitialization && isInitPatternNode(variable, shadowed)) && + !(options.hoist !== "all" && isInTdz(variable, shadowed)) ) { const location = getDeclaredLocation(shadowed); const messageId = location.global ? "noShadowGlobal" : "noShadow"; @@ -207,8 +319,8 @@ module.exports = { } return { - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); const stack = globalScope.childScopes.slice(); while (stack.length) { diff --git a/node_modules/eslint/lib/rules/no-spaced-func.js b/node_modules/eslint/lib/rules/no-spaced-func.js index 961bc681f..d79c18440 100644 --- a/node_modules/eslint/lib/rules/no-spaced-func.js +++ b/node_modules/eslint/lib/rules/no-spaced-func.js @@ -10,15 +10,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "disallow spacing between function identifiers and their applications (deprecated)", - category: "Stylistic Issues", + description: "Disallow spacing between function identifiers and their applications (deprecated)", recommended: false, - url: "https://eslint.org/docs/rules/no-spaced-func" + url: "https://eslint.org/docs/latest/rules/no-spaced-func" }, deprecated: true, @@ -35,7 +35,7 @@ module.exports = { create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Check if open space is present in a function name diff --git a/node_modules/eslint/lib/rules/no-sparse-arrays.js b/node_modules/eslint/lib/rules/no-sparse-arrays.js index e8407c3fa..c65b0ab2c 100644 --- a/node_modules/eslint/lib/rules/no-sparse-arrays.js +++ b/node_modules/eslint/lib/rules/no-sparse-arrays.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow sparse arrays", - category: "Possible Errors", + description: "Disallow sparse arrays", recommended: true, - url: "https://eslint.org/docs/rules/no-sparse-arrays" + url: "https://eslint.org/docs/latest/rules/no-sparse-arrays" }, schema: [], @@ -37,7 +37,7 @@ module.exports = { ArrayExpression(node) { - const emptySpot = node.elements.indexOf(null) > -1; + const emptySpot = node.elements.includes(null); if (emptySpot) { context.report({ node, messageId: "unexpectedSparseArray" }); diff --git a/node_modules/eslint/lib/rules/no-sync.js b/node_modules/eslint/lib/rules/no-sync.js index 06424e0b3..8f79a36b4 100644 --- a/node_modules/eslint/lib/rules/no-sync.js +++ b/node_modules/eslint/lib/rules/no-sync.js @@ -1,16 +1,16 @@ /** * @fileoverview Rule to check for properties whose identifier ends with the string Sync * @author Matt DuVall + * @deprecated in ESLint v7.0.0 */ -/* jshint node:true */ - "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { deprecated: true, @@ -20,10 +20,9 @@ module.exports = { type: "suggestion", docs: { - description: "disallow synchronous methods", - category: "Node.js and CommonJS", + description: "Disallow synchronous methods", recommended: false, - url: "https://eslint.org/docs/rules/no-sync" + url: "https://eslint.org/docs/latest/rules/no-sync" }, schema: [ diff --git a/node_modules/eslint/lib/rules/no-tabs.js b/node_modules/eslint/lib/rules/no-tabs.js index ca7be2616..8581e19af 100644 --- a/node_modules/eslint/lib/rules/no-tabs.js +++ b/node_modules/eslint/lib/rules/no-tabs.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to check for tabs inside a file * @author Gyandeep Singh + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -16,15 +17,17 @@ const anyNonWhitespaceRegex = /\S/u; // Public Interface //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow all tabs", - category: "Stylistic Issues", + description: "Disallow all tabs", recommended: false, - url: "https://eslint.org/docs/rules/no-tabs" + url: "https://eslint.org/docs/latest/rules/no-tabs" }, schema: [{ type: "object", @@ -43,7 +46,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const allowIndentationTabs = context.options && context.options[0] && context.options[0].allowIndentationTabs; return { diff --git a/node_modules/eslint/lib/rules/no-template-curly-in-string.js b/node_modules/eslint/lib/rules/no-template-curly-in-string.js index 539cd5be5..92b4c1c86 100644 --- a/node_modules/eslint/lib/rules/no-template-curly-in-string.js +++ b/node_modules/eslint/lib/rules/no-template-curly-in-string.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow template literal placeholder syntax in regular strings", - category: "Possible Errors", + description: "Disallow template literal placeholder syntax in regular strings", recommended: false, - url: "https://eslint.org/docs/rules/no-template-curly-in-string" + url: "https://eslint.org/docs/latest/rules/no-template-curly-in-string" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-ternary.js b/node_modules/eslint/lib/rules/no-ternary.js index b3ced8605..4d43c7e02 100644 --- a/node_modules/eslint/lib/rules/no-ternary.js +++ b/node_modules/eslint/lib/rules/no-ternary.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow ternary operators", - category: "Stylistic Issues", + description: "Disallow ternary operators", recommended: false, - url: "https://eslint.org/docs/rules/no-ternary" + url: "https://eslint.org/docs/latest/rules/no-ternary" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-this-before-super.js b/node_modules/eslint/lib/rules/no-this-before-super.js index 5bfba66fc..f96d8ace8 100644 --- a/node_modules/eslint/lib/rules/no-this-before-super.js +++ b/node_modules/eslint/lib/rules/no-this-before-super.js @@ -34,15 +34,15 @@ function isConstructorFunction(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow `this`/`super` before calling `super()` in constructors", - category: "ECMAScript 6", + description: "Disallow `this`/`super` before calling `super()` in constructors", recommended: true, - url: "https://eslint.org/docs/rules/no-this-before-super" + url: "https://eslint.org/docs/latest/rules/no-this-before-super" }, schema: [], @@ -90,6 +90,21 @@ module.exports = { return Boolean(funcInfo && funcInfo.isConstructor && funcInfo.hasExtends); } + /** + * Determines if every segment in a set has been called. + * @param {Set} segments The segments to search. + * @returns {boolean} True if every segment has been called; false otherwise. + */ + function isEverySegmentCalled(segments) { + for (const segment of segments) { + if (!isCalled(segment)) { + return false; + } + } + + return true; + } + /** * Checks whether or not this is before `super()` is called. * @returns {boolean} `true` if this is before `super()` is called. @@ -97,7 +112,7 @@ module.exports = { function isBeforeCallOfSuper() { return ( isInConstructorOfDerivedClass() && - !funcInfo.codePath.currentSegments.every(isCalled) + !isEverySegmentCalled(funcInfo.currentSegments) ); } @@ -108,11 +123,9 @@ module.exports = { * @returns {void} */ function setInvalid(node) { - const segments = funcInfo.codePath.currentSegments; - - for (let i = 0; i < segments.length; ++i) { - const segment = segments[i]; + const segments = funcInfo.currentSegments; + for (const segment of segments) { if (segment.reachable) { segInfoMap[segment.id].invalidNodes.push(node); } @@ -124,11 +137,9 @@ module.exports = { * @returns {void} */ function setSuperCalled() { - const segments = funcInfo.codePath.currentSegments; - - for (let i = 0; i < segments.length; ++i) { - const segment = segments[i]; + const segments = funcInfo.currentSegments; + for (const segment of segments) { if (segment.reachable) { segInfoMap[segment.id].superCalled = true; } @@ -156,14 +167,16 @@ module.exports = { classNode.superClass && !astUtils.isNullOrUndefined(classNode.superClass) ), - codePath + codePath, + currentSegments: new Set() }; } else { funcInfo = { upper: funcInfo, isConstructor: false, hasExtends: false, - codePath + codePath, + currentSegments: new Set() }; } }, @@ -211,6 +224,8 @@ module.exports = { * @returns {void} */ onCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + if (!isInConstructorOfDerivedClass()) { return; } @@ -225,6 +240,18 @@ module.exports = { }; }, + onUnreachableCodePathSegmentStart(segment) { + funcInfo.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + + onCodePathSegmentEnd(segment) { + funcInfo.currentSegments.delete(segment); + }, + /** * Update information of the code path segment when a code path was * looped. diff --git a/node_modules/eslint/lib/rules/no-throw-literal.js b/node_modules/eslint/lib/rules/no-throw-literal.js index 29fb3718b..07a0df62d 100644 --- a/node_modules/eslint/lib/rules/no-throw-literal.js +++ b/node_modules/eslint/lib/rules/no-throw-literal.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow throwing literals as exceptions", - category: "Best Practices", + description: "Disallow throwing literals as exceptions", recommended: false, - url: "https://eslint.org/docs/rules/no-throw-literal" + url: "https://eslint.org/docs/latest/rules/no-throw-literal" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-trailing-spaces.js b/node_modules/eslint/lib/rules/no-trailing-spaces.js index 98ae62c89..eede46c86 100644 --- a/node_modules/eslint/lib/rules/no-trailing-spaces.js +++ b/node_modules/eslint/lib/rules/no-trailing-spaces.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallow trailing spaces at the end of lines. * @author Nodeca Team + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow trailing whitespace at the end of lines", - category: "Stylistic Issues", + description: "Disallow trailing whitespace at the end of lines", recommended: false, - url: "https://eslint.org/docs/rules/no-trailing-spaces" + url: "https://eslint.org/docs/latest/rules/no-trailing-spaces" }, fixable: "whitespace", @@ -50,7 +53,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const BLANK_CLASS = "[ \t\u00a0\u2000-\u200b\u3000]", SKIP_BLANK = `^${BLANK_CLASS}*$`, diff --git a/node_modules/eslint/lib/rules/no-undef-init.js b/node_modules/eslint/lib/rules/no-undef-init.js index 5c240fef7..be19d6f95 100644 --- a/node_modules/eslint/lib/rules/no-undef-init.js +++ b/node_modules/eslint/lib/rules/no-undef-init.js @@ -11,15 +11,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow initializing variables to `undefined`", - category: "Variables", + description: "Disallow initializing variables to `undefined`", recommended: false, - url: "https://eslint.org/docs/rules/no-undef-init" + url: "https://eslint.org/docs/latest/rules/no-undef-init" }, schema: [], @@ -32,14 +32,14 @@ module.exports = { create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { VariableDeclarator(node) { const name = sourceCode.getText(node.id), init = node.init && node.init.name, - scope = context.getScope(), + scope = sourceCode.getScope(node), undefinedVar = astUtils.getVariableByName(scope, "undefined"), shadowed = undefinedVar && undefinedVar.defs.length > 0, lastToken = sourceCode.getLastToken(node); diff --git a/node_modules/eslint/lib/rules/no-undef.js b/node_modules/eslint/lib/rules/no-undef.js index 6b5140819..fe470286c 100644 --- a/node_modules/eslint/lib/rules/no-undef.js +++ b/node_modules/eslint/lib/rules/no-undef.js @@ -23,15 +23,15 @@ function hasTypeOfOperator(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow the use of undeclared variables unless mentioned in `/*global */` comments", - category: "Variables", + description: "Disallow the use of undeclared variables unless mentioned in `/*global */` comments", recommended: true, - url: "https://eslint.org/docs/rules/no-undef" + url: "https://eslint.org/docs/latest/rules/no-undef" }, schema: [ @@ -54,10 +54,11 @@ module.exports = { create(context) { const options = context.options[0]; const considerTypeOf = options && options.typeof === true || false; + const sourceCode = context.sourceCode; return { - "Program:exit"(/* node */) { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); globalScope.through.forEach(ref => { const identifier = ref.identifier; diff --git a/node_modules/eslint/lib/rules/no-undefined.js b/node_modules/eslint/lib/rules/no-undefined.js index a075d903e..8f47ca1b0 100644 --- a/node_modules/eslint/lib/rules/no-undefined.js +++ b/node_modules/eslint/lib/rules/no-undefined.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `undefined` as an identifier", - category: "Variables", + description: "Disallow the use of `undefined` as an identifier", recommended: false, - url: "https://eslint.org/docs/rules/no-undefined" + url: "https://eslint.org/docs/latest/rules/no-undefined" }, schema: [], @@ -28,6 +28,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Report an invalid "undefined" identifier node. * @param {ASTNode} node The node to report. @@ -66,8 +68,8 @@ module.exports = { } return { - "Program:exit"() { - const globalScope = context.getScope(); + "Program:exit"(node) { + const globalScope = sourceCode.getScope(node); const stack = [globalScope]; diff --git a/node_modules/eslint/lib/rules/no-underscore-dangle.js b/node_modules/eslint/lib/rules/no-underscore-dangle.js index 87d2336fa..a0e05c6c1 100644 --- a/node_modules/eslint/lib/rules/no-underscore-dangle.js +++ b/node_modules/eslint/lib/rules/no-underscore-dangle.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow dangling underscores in identifiers", - category: "Stylistic Issues", + description: "Disallow dangling underscores in identifiers", recommended: false, - url: "https://eslint.org/docs/rules/no-underscore-dangle" + url: "https://eslint.org/docs/latest/rules/no-underscore-dangle" }, schema: [ @@ -49,6 +49,18 @@ module.exports = { allowFunctionParams: { type: "boolean", default: true + }, + enforceInClassFields: { + type: "boolean", + default: false + }, + allowInArrayDestructuring: { + type: "boolean", + default: true + }, + allowInObjectDestructuring: { + type: "boolean", + default: true } }, additionalProperties: false @@ -68,7 +80,11 @@ module.exports = { const allowAfterSuper = typeof options.allowAfterSuper !== "undefined" ? options.allowAfterSuper : false; const allowAfterThisConstructor = typeof options.allowAfterThisConstructor !== "undefined" ? options.allowAfterThisConstructor : false; const enforceInMethodNames = typeof options.enforceInMethodNames !== "undefined" ? options.enforceInMethodNames : false; + const enforceInClassFields = typeof options.enforceInClassFields !== "undefined" ? options.enforceInClassFields : false; const allowFunctionParams = typeof options.allowFunctionParams !== "undefined" ? options.allowFunctionParams : true; + const allowInArrayDestructuring = typeof options.allowInArrayDestructuring !== "undefined" ? options.allowInArrayDestructuring : true; + const allowInObjectDestructuring = typeof options.allowInObjectDestructuring !== "undefined" ? options.allowInObjectDestructuring : true; + const sourceCode = context.sourceCode; //------------------------------------------------------------------------- // Helpers @@ -81,7 +97,7 @@ module.exports = { * @private */ function isAllowed(identifier) { - return ALLOWED_VARIABLES.some(ident => ident === identifier); + return ALLOWED_VARIABLES.includes(identifier); } /** @@ -190,6 +206,7 @@ module.exports = { checkForDanglingUnderscoreInFunctionParameters(node); } + /** * Check if variable expression has a dangling underscore * @param {ASTNode} node node to evaluate @@ -197,18 +214,32 @@ module.exports = { * @private */ function checkForDanglingUnderscoreInVariableExpression(node) { - const identifier = node.id.name; + sourceCode.getDeclaredVariables(node).forEach(variable => { + const definition = variable.defs.find(def => def.node === node); + const identifierNode = definition.name; + const identifier = identifierNode.name; + let parent = identifierNode.parent; - if (typeof identifier !== "undefined" && hasDanglingUnderscore(identifier) && - !isSpecialCaseIdentifierInVariableExpression(identifier) && !isAllowed(identifier)) { - context.report({ - node, - messageId: "unexpectedUnderscore", - data: { - identifier - } - }); - } + while (!["VariableDeclarator", "ArrayPattern", "ObjectPattern"].includes(parent.type)) { + parent = parent.parent; + } + + if ( + hasDanglingUnderscore(identifier) && + !isSpecialCaseIdentifierInVariableExpression(identifier) && + !isAllowed(identifier) && + !(allowInArrayDestructuring && parent.type === "ArrayPattern") && + !(allowInObjectDestructuring && parent.type === "ObjectPattern") + ) { + context.report({ + node, + messageId: "unexpectedUnderscore", + data: { + identifier + } + }); + } + }); } /** @@ -253,7 +284,33 @@ module.exports = { node, messageId: "unexpectedUnderscore", data: { - identifier + identifier: node.key.type === "PrivateIdentifier" + ? `#${identifier}` + : identifier + } + }); + } + } + + /** + * Check if a class field has a dangling underscore + * @param {ASTNode} node node to evaluate + * @returns {void} + * @private + */ + function checkForDanglingUnderscoreInClassField(node) { + const identifier = node.key.name; + + if (typeof identifier !== "undefined" && hasDanglingUnderscore(identifier) && + enforceInClassFields && + !isAllowed(identifier)) { + context.report({ + node, + messageId: "unexpectedUnderscore", + data: { + identifier: node.key.type === "PrivateIdentifier" + ? `#${identifier}` + : identifier } }); } @@ -268,6 +325,7 @@ module.exports = { VariableDeclarator: checkForDanglingUnderscoreInVariableExpression, MemberExpression: checkForDanglingUnderscoreInMemberExpression, MethodDefinition: checkForDanglingUnderscoreInMethod, + PropertyDefinition: checkForDanglingUnderscoreInClassField, Property: checkForDanglingUnderscoreInMethod, FunctionExpression: checkForDanglingUnderscoreInFunction, ArrowFunctionExpression: checkForDanglingUnderscoreInFunction diff --git a/node_modules/eslint/lib/rules/no-unexpected-multiline.js b/node_modules/eslint/lib/rules/no-unexpected-multiline.js index 7af3fe670..810c08b01 100644 --- a/node_modules/eslint/lib/rules/no-unexpected-multiline.js +++ b/node_modules/eslint/lib/rules/no-unexpected-multiline.js @@ -14,15 +14,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow confusing multiline expressions", - category: "Possible Errors", + description: "Disallow confusing multiline expressions", recommended: true, - url: "https://eslint.org/docs/rules/no-unexpected-multiline" + url: "https://eslint.org/docs/latest/rules/no-unexpected-multiline" }, schema: [], @@ -38,7 +38,7 @@ module.exports = { const REGEX_FLAG_MATCHER = /^[gimsuy]+$/u; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Check to see if there is a newline between the node and the following open bracket diff --git a/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js b/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js index 7031a4dd8..768a15573 100644 --- a/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js +++ b/node_modules/eslint/lib/rules/no-unmodified-loop-condition.js @@ -156,15 +156,15 @@ function updateModifiedFlag(conditions, modifiers) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow unmodified loop conditions", - category: "Best Practices", + description: "Disallow unmodified loop conditions", recommended: false, - url: "https://eslint.org/docs/rules/no-unmodified-loop-condition" + url: "https://eslint.org/docs/latest/rules/no-unmodified-loop-condition" }, schema: [], @@ -175,7 +175,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let groupMap = null; /** @@ -340,8 +340,8 @@ module.exports = { } return { - "Program:exit"() { - const queue = [context.getScope()]; + "Program:exit"(node) { + const queue = [sourceCode.getScope(node)]; groupMap = new Map(); diff --git a/node_modules/eslint/lib/rules/no-unneeded-ternary.js b/node_modules/eslint/lib/rules/no-unneeded-ternary.js index 06c615f38..ab1bdc59c 100644 --- a/node_modules/eslint/lib/rules/no-unneeded-ternary.js +++ b/node_modules/eslint/lib/rules/no-unneeded-ternary.js @@ -23,15 +23,15 @@ const OR_PRECEDENCE = astUtils.getPrecedence({ type: "LogicalExpression", operat // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow ternary operators when simpler alternatives exist", - category: "Stylistic Issues", + description: "Disallow ternary operators when simpler alternatives exist", recommended: false, - url: "https://eslint.org/docs/rules/no-unneeded-ternary" + url: "https://eslint.org/docs/latest/rules/no-unneeded-ternary" }, schema: [ @@ -58,7 +58,7 @@ module.exports = { create(context) { const options = context.options[0] || {}; const defaultAssignment = options.defaultAssignment !== false; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Test if the node is a boolean literal @@ -144,7 +144,7 @@ module.exports = { context.report({ node, messageId: "unnecessaryConditionalAssignment", - fix: fixer => { + fix(fixer) { const shouldParenthesizeAlternate = ( astUtils.getPrecedence(node.alternate) < OR_PRECEDENCE || diff --git a/node_modules/eslint/lib/rules/no-unreachable-loop.js b/node_modules/eslint/lib/rules/no-unreachable-loop.js index 868a6ff98..577d39ac7 100644 --- a/node_modules/eslint/lib/rules/no-unreachable-loop.js +++ b/node_modules/eslint/lib/rules/no-unreachable-loop.js @@ -11,6 +11,22 @@ const allLoopTypes = ["WhileStatement", "DoWhileStatement", "ForStatement", "ForInStatement", "ForOfStatement"]; +/** + * Checks all segments in a set and returns true if any are reachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if any segment is reachable; false otherwise. + */ +function isAnySegmentReachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return true; + } + } + + return false; +} + /** * Determines whether the given node is the first node in the code path to which a loop statement * 'loops' for the next iteration. @@ -53,15 +69,15 @@ function getDifference(arrA, arrB) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow loops with a body that allows only one iteration", - category: "Possible Errors", + description: "Disallow loops with a body that allows only one iteration", recommended: false, - url: "https://eslint.org/docs/rules/no-unreachable-loop" + url: "https://eslint.org/docs/latest/rules/no-unreachable-loop" }, schema: [{ @@ -90,29 +106,36 @@ module.exports = { loopsByTargetSegments = new Map(), loopsToReport = new Set(); - let currentCodePath = null; + const codePathSegments = []; + let currentCodePathSegments = new Set(); return { - onCodePathStart(codePath) { - currentCodePath = codePath; + + onCodePathStart() { + codePathSegments.push(currentCodePathSegments); + currentCodePathSegments = new Set(); }, onCodePathEnd() { - currentCodePath = currentCodePath.upper; + currentCodePathSegments = codePathSegments.pop(); }, - [loopSelector](node) { + onUnreachableCodePathSegmentStart(segment) { + currentCodePathSegments.add(segment); + }, - /** - * Ignore unreachable loop statements to avoid unnecessary complexity in the implementation, or false positives otherwise. - * For unreachable segments, the code path analysis does not raise events required for this implementation. - */ - if (currentCodePath.currentSegments.some(segment => segment.reachable)) { - loopsToReport.add(node); - } + onUnreachableCodePathSegmentEnd(segment) { + currentCodePathSegments.delete(segment); + }, + + onCodePathSegmentEnd(segment) { + currentCodePathSegments.delete(segment); }, onCodePathSegmentStart(segment, node) { + + currentCodePathSegments.add(segment); + if (isLoopingTarget(node)) { const loop = node.parent; @@ -140,6 +163,18 @@ module.exports = { } }, + [loopSelector](node) { + + /** + * Ignore unreachable loop statements to avoid unnecessary complexity in the implementation, or false positives otherwise. + * For unreachable segments, the code path analysis does not raise events required for this implementation. + */ + if (isAnySegmentReachable(currentCodePathSegments)) { + loopsToReport.add(node); + } + }, + + "Program:exit"() { loopsToReport.forEach( node => context.report({ node, messageId: "invalid" }) diff --git a/node_modules/eslint/lib/rules/no-unreachable.js b/node_modules/eslint/lib/rules/no-unreachable.js index 415631a6f..0cf750e42 100644 --- a/node_modules/eslint/lib/rules/no-unreachable.js +++ b/node_modules/eslint/lib/rules/no-unreachable.js @@ -8,6 +8,12 @@ // Helpers //------------------------------------------------------------------------------ +/** + * @typedef {Object} ConstructorInfo + * @property {ConstructorInfo | null} upper Info about the constructor that encloses this constructor. + * @property {boolean} hasSuperCall The flag about having `super()` expressions. + */ + /** * Checks whether or not a given variable declarator has the initializer. * @param {ASTNode} node A VariableDeclarator node to check. @@ -18,12 +24,19 @@ function isInitialized(node) { } /** - * Checks whether or not a given code path segment is unreachable. - * @param {CodePathSegment} segment A CodePathSegment to check. - * @returns {boolean} `true` if the segment is unreachable. + * Checks all segments in a set and returns true if all are unreachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if all segments are unreachable; false otherwise. */ -function isUnreachable(segment) { - return !segment.reachable; +function areAllSegmentsUnreachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return false; + } + } + + return true; } /** @@ -99,15 +112,15 @@ class ConsecutiveRange { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", - category: "Possible Errors", + description: "Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements", recommended: true, - url: "https://eslint.org/docs/rules/no-unreachable" + url: "https://eslint.org/docs/latest/rules/no-unreachable" }, schema: [], @@ -118,9 +131,18 @@ module.exports = { }, create(context) { - let currentCodePath = null; - const range = new ConsecutiveRange(context.getSourceCode()); + /** @type {ConstructorInfo | null} */ + let constructorInfo = null; + + /** @type {ConsecutiveRange} */ + const range = new ConsecutiveRange(context.sourceCode); + + /** @type {Array>} */ + const codePathSegments = []; + + /** @type {Set} */ + let currentCodePathSegments = new Set(); /** * Reports a given node if it's unreachable. @@ -130,7 +152,7 @@ module.exports = { function reportIfUnreachable(node) { let nextNode = null; - if (node && currentCodePath.currentSegments.every(isUnreachable)) { + if (node && (node.type === "PropertyDefinition" || areAllSegmentsUnreachable(currentCodePathSegments))) { // Store this statement to distinguish consecutive statements. if (range.isEmpty) { @@ -171,12 +193,29 @@ module.exports = { return { // Manages the current code path. - onCodePathStart(codePath) { - currentCodePath = codePath; + onCodePathStart() { + codePathSegments.push(currentCodePathSegments); + currentCodePathSegments = new Set(); }, onCodePathEnd() { - currentCodePath = currentCodePath.upper; + currentCodePathSegments = codePathSegments.pop(); + }, + + onUnreachableCodePathSegmentStart(segment) { + currentCodePathSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + currentCodePathSegments.delete(segment); + }, + + onCodePathSegmentEnd(segment) { + currentCodePathSegments.delete(segment); + }, + + onCodePathSegmentStart(segment) { + currentCodePathSegments.add(segment); }, // Registers for all statement nodes (excludes FunctionDeclaration). @@ -212,6 +251,42 @@ module.exports = { "Program:exit"() { reportIfUnreachable(); + }, + + /* + * Instance fields defined in a subclass are never created if the constructor of the subclass + * doesn't call `super()`, so their definitions are unreachable code. + */ + "MethodDefinition[kind='constructor']"() { + constructorInfo = { + upper: constructorInfo, + hasSuperCall: false + }; + }, + "MethodDefinition[kind='constructor']:exit"(node) { + const { hasSuperCall } = constructorInfo; + + constructorInfo = constructorInfo.upper; + + // skip typescript constructors without the body + if (!node.value.body) { + return; + } + + const classDefinition = node.parent.parent; + + if (classDefinition.superClass && !hasSuperCall) { + for (const element of classDefinition.body.body) { + if (element.type === "PropertyDefinition" && !element.static) { + reportIfUnreachable(element); + } + } + } + }, + "CallExpression > Super.callee"() { + if (constructorInfo) { + constructorInfo.hasSuperCall = true; + } } }; } diff --git a/node_modules/eslint/lib/rules/no-unsafe-finally.js b/node_modules/eslint/lib/rules/no-unsafe-finally.js index 11bf06e87..ebd24328f 100644 --- a/node_modules/eslint/lib/rules/no-unsafe-finally.js +++ b/node_modules/eslint/lib/rules/no-unsafe-finally.js @@ -18,15 +18,15 @@ const SENTINEL_NODE_TYPE_CONTINUE = /^(?:Program|(?:Function|Class)(?:Declaratio // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow control flow statements in `finally` blocks", - category: "Possible Errors", + description: "Disallow control flow statements in `finally` blocks", recommended: true, - url: "https://eslint.org/docs/rules/no-unsafe-finally" + url: "https://eslint.org/docs/latest/rules/no-unsafe-finally" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-unsafe-negation.js b/node_modules/eslint/lib/rules/no-unsafe-negation.js index a9c2ee74f..cabd7e2cc 100644 --- a/node_modules/eslint/lib/rules/no-unsafe-negation.js +++ b/node_modules/eslint/lib/rules/no-unsafe-negation.js @@ -46,18 +46,19 @@ function isNegation(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow negating the left operand of relational operators", - category: "Possible Errors", + description: "Disallow negating the left operand of relational operators", recommended: true, - url: "https://eslint.org/docs/rules/no-unsafe-negation", - suggestion: true + url: "https://eslint.org/docs/latest/rules/no-unsafe-negation" }, + hasSuggestions: true, + schema: [ { type: "object", @@ -81,7 +82,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const options = context.options[0] || {}; const enforceForOrderingRelations = options.enforceForOrderingRelations === true; diff --git a/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js b/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js index 2eafc1ad8..fe2bead85 100644 --- a/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js +++ b/node_modules/eslint/lib/rules/no-unsafe-optional-chaining.js @@ -18,15 +18,15 @@ function isDestructuringPattern(node) { return node.type === "ObjectPattern" || node.type === "ArrayPattern"; } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow use of optional chaining in contexts where the `undefined` value is not allowed", - category: "Possible Errors", - recommended: false, - url: "https://eslint.org/docs/rules/no-unsafe-optional-chaining" + description: "Disallow use of optional chaining in contexts where the `undefined` value is not allowed", + recommended: true, + url: "https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining" }, schema: [{ type: "object", diff --git a/node_modules/eslint/lib/rules/no-unused-expressions.js b/node_modules/eslint/lib/rules/no-unused-expressions.js index 58c9b3341..46bb7baac 100644 --- a/node_modules/eslint/lib/rules/no-unused-expressions.js +++ b/node_modules/eslint/lib/rules/no-unused-expressions.js @@ -4,6 +4,8 @@ */ "use strict"; +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -24,15 +26,15 @@ function alwaysFalse() { return false; } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unused expressions", - category: "Best Practices", + description: "Disallow unused expressions", recommended: false, - url: "https://eslint.org/docs/rules/no-unused-expressions" + url: "https://eslint.org/docs/latest/rules/no-unused-expressions" }, schema: [ @@ -72,8 +74,8 @@ module.exports = { allowTaggedTemplates = config.allowTaggedTemplates || false, enforceForJSX = config.enforceForJSX || false; - // eslint-disable-next-line jsdoc/require-description /** + * Has AST suggesting a directive. * @param {ASTNode} node any node * @returns {boolean} whether the given node structurally represents a directive */ @@ -82,8 +84,8 @@ module.exports = { node.expression.type === "Literal" && typeof node.expression.value === "string"; } - // eslint-disable-next-line jsdoc/require-description /** + * Gets the leading sequence of members in a list that pass the predicate. * @param {Function} predicate ([a] -> Boolean) the function used to make the determination * @param {a[]} list the input list * @returns {a[]} the leading sequence of members in the given list that pass the given predicate @@ -97,8 +99,8 @@ module.exports = { return list.slice(); } - // eslint-disable-next-line jsdoc/require-description /** + * Gets leading directives nodes in a Node body. * @param {ASTNode} node a Program or BlockStatement node * @returns {ASTNode[]} the leading sequence of directive nodes in the given node's body */ @@ -106,19 +108,20 @@ module.exports = { return takeWhile(looksLikeDirective, node.body); } - // eslint-disable-next-line jsdoc/require-description /** + * Detect if a Node is a directive. * @param {ASTNode} node any node - * @param {ASTNode[]} ancestors the given node's ancestors * @returns {boolean} whether the given node is considered a directive in its current position */ - function isDirective(node, ancestors) { - const parent = ancestors[ancestors.length - 1], - grandparent = ancestors[ancestors.length - 2]; - - return (parent.type === "Program" || parent.type === "BlockStatement" && - (/Function/u.test(grandparent.type))) && - directives(parent).indexOf(node) >= 0; + function isDirective(node) { + + /** + * https://tc39.es/ecma262/#directive-prologue + * + * Only `FunctionBody`, `ScriptBody` and `ModuleBody` can have directive prologue. + * Class static blocks do not have directive prologue. + */ + return astUtils.isTopLevelExpressionStatement(node) && directives(node.parent).includes(node); } /** @@ -174,7 +177,7 @@ module.exports = { return { ExpressionStatement(node) { - if (Checker.isDisallowed(node.expression) && !isDirective(node, context.getAncestors())) { + if (Checker.isDisallowed(node.expression) && !isDirective(node)) { context.report({ node, messageId: "unusedExpression" }); } } diff --git a/node_modules/eslint/lib/rules/no-unused-labels.js b/node_modules/eslint/lib/rules/no-unused-labels.js index b33fcb786..be06b324c 100644 --- a/node_modules/eslint/lib/rules/no-unused-labels.js +++ b/node_modules/eslint/lib/rules/no-unused-labels.js @@ -5,19 +5,25 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unused labels", - category: "Best Practices", + description: "Disallow unused labels", recommended: true, - url: "https://eslint.org/docs/rules/no-unused-labels" + url: "https://eslint.org/docs/latest/rules/no-unused-labels" }, schema: [], @@ -30,7 +36,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let scopeInfo = null; /** @@ -46,6 +52,45 @@ module.exports = { }; } + /** + * Checks if a `LabeledStatement` node is fixable. + * For a node to be fixable, there must be no comments between the label and the body. + * Furthermore, is must be possible to remove the label without turning the body statement into a + * directive after other fixes are applied. + * @param {ASTNode} node The node to evaluate. + * @returns {boolean} Whether or not the node is fixable. + */ + function isFixable(node) { + + /* + * Only perform a fix if there are no comments between the label and the body. This will be the case + * when there is exactly one token/comment (the ":") between the label and the body. + */ + if (sourceCode.getTokenAfter(node.label, { includeComments: true }) !== + sourceCode.getTokenBefore(node.body, { includeComments: true })) { + return false; + } + + // Looking for the node's deepest ancestor which is not a `LabeledStatement`. + let ancestor = node.parent; + + while (ancestor.type === "LabeledStatement") { + ancestor = ancestor.parent; + } + + if (ancestor.type === "Program" || + (ancestor.type === "BlockStatement" && astUtils.isFunction(ancestor.parent))) { + const { body } = node; + + if (body.type === "ExpressionStatement" && + ((body.expression.type === "Literal" && typeof body.expression.value === "string") || + astUtils.isStaticTemplateLiteral(body.expression))) { + return false; // potential directive + } + } + return true; + } + /** * Removes the top of the stack. * At the same time, this reports the label if it's never used. @@ -58,19 +103,7 @@ module.exports = { node: node.label, messageId: "unused", data: node.label, - fix(fixer) { - - /* - * Only perform a fix if there are no comments between the label and the body. This will be the case - * when there is exactly one token/comment (the ":") between the label and the body. - */ - if (sourceCode.getTokenAfter(node.label, { includeComments: true }) === - sourceCode.getTokenBefore(node.body, { includeComments: true })) { - return fixer.removeRange([node.range[0], node.body.range[0]]); - } - - return null; - } + fix: isFixable(node) ? fixer => fixer.removeRange([node.range[0], node.body.range[0]]) : null }); } diff --git a/node_modules/eslint/lib/rules/no-unused-private-class-members.js b/node_modules/eslint/lib/rules/no-unused-private-class-members.js new file mode 100644 index 000000000..037be7d3e --- /dev/null +++ b/node_modules/eslint/lib/rules/no-unused-private-class-members.js @@ -0,0 +1,195 @@ +/** + * @fileoverview Rule to flag declared but unused private class members + * @author Tim van der Lippe + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "problem", + + docs: { + description: "Disallow unused private class members", + recommended: false, + url: "https://eslint.org/docs/latest/rules/no-unused-private-class-members" + }, + + schema: [], + + messages: { + unusedPrivateClassMember: "'{{classMemberName}}' is defined but never used." + } + }, + + create(context) { + const trackedClasses = []; + + /** + * Check whether the current node is in a write only assignment. + * @param {ASTNode} privateIdentifierNode Node referring to a private identifier + * @returns {boolean} Whether the node is in a write only assignment + * @private + */ + function isWriteOnlyAssignment(privateIdentifierNode) { + const parentStatement = privateIdentifierNode.parent.parent; + const isAssignmentExpression = parentStatement.type === "AssignmentExpression"; + + if (!isAssignmentExpression && + parentStatement.type !== "ForInStatement" && + parentStatement.type !== "ForOfStatement" && + parentStatement.type !== "AssignmentPattern") { + return false; + } + + // It is a write-only usage, since we still allow usages on the right for reads + if (parentStatement.left !== privateIdentifierNode.parent) { + return false; + } + + // For any other operator (such as '+=') we still consider it a read operation + if (isAssignmentExpression && parentStatement.operator !== "=") { + + /* + * However, if the read operation is "discarded" in an empty statement, then + * we consider it write only. + */ + return parentStatement.parent.type === "ExpressionStatement"; + } + + return true; + } + + //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + return { + + // Collect all declared members up front and assume they are all unused + ClassBody(classBodyNode) { + const privateMembers = new Map(); + + trackedClasses.unshift(privateMembers); + for (const bodyMember of classBodyNode.body) { + if (bodyMember.type === "PropertyDefinition" || bodyMember.type === "MethodDefinition") { + if (bodyMember.key.type === "PrivateIdentifier") { + privateMembers.set(bodyMember.key.name, { + declaredNode: bodyMember, + isAccessor: bodyMember.type === "MethodDefinition" && + (bodyMember.kind === "set" || bodyMember.kind === "get") + }); + } + } + } + }, + + /* + * Process all usages of the private identifier and remove a member from + * `declaredAndUnusedPrivateMembers` if we deem it used. + */ + PrivateIdentifier(privateIdentifierNode) { + const classBody = trackedClasses.find(classProperties => classProperties.has(privateIdentifierNode.name)); + + // Can't happen, as it is a parser to have a missing class body, but let's code defensively here. + if (!classBody) { + return; + } + + // In case any other usage was already detected, we can short circuit the logic here. + const memberDefinition = classBody.get(privateIdentifierNode.name); + + if (memberDefinition.isUsed) { + return; + } + + // The definition of the class member itself + if (privateIdentifierNode.parent.type === "PropertyDefinition" || + privateIdentifierNode.parent.type === "MethodDefinition") { + return; + } + + /* + * Any usage of an accessor is considered a read, as the getter/setter can have + * side-effects in its definition. + */ + if (memberDefinition.isAccessor) { + memberDefinition.isUsed = true; + return; + } + + // Any assignments to this member, except for assignments that also read + if (isWriteOnlyAssignment(privateIdentifierNode)) { + return; + } + + const wrappingExpressionType = privateIdentifierNode.parent.parent.type; + const parentOfWrappingExpressionType = privateIdentifierNode.parent.parent.parent.type; + + // A statement which only increments (`this.#x++;`) + if (wrappingExpressionType === "UpdateExpression" && + parentOfWrappingExpressionType === "ExpressionStatement") { + return; + } + + /* + * ({ x: this.#usedInDestructuring } = bar); + * + * But should treat the following as a read: + * ({ [this.#x]: a } = foo); + */ + if (wrappingExpressionType === "Property" && + parentOfWrappingExpressionType === "ObjectPattern" && + privateIdentifierNode.parent.parent.value === privateIdentifierNode.parent) { + return; + } + + // [...this.#unusedInRestPattern] = bar; + if (wrappingExpressionType === "RestElement") { + return; + } + + // [this.#unusedInAssignmentPattern] = bar; + if (wrappingExpressionType === "ArrayPattern") { + return; + } + + /* + * We can't delete the memberDefinition, as we need to keep track of which member we are marking as used. + * In the case of nested classes, we only mark the first member we encounter as used. If you were to delete + * the member, then any subsequent usage could incorrectly mark the member of an encapsulating parent class + * as used, which is incorrect. + */ + memberDefinition.isUsed = true; + }, + + /* + * Post-process the class members and report any remaining members. + * Since private members can only be accessed in the current class context, + * we can safely assume that all usages are within the current class body. + */ + "ClassBody:exit"() { + const unusedPrivateMembers = trackedClasses.shift(); + + for (const [classMemberName, { declaredNode, isUsed }] of unusedPrivateMembers.entries()) { + if (isUsed) { + continue; + } + context.report({ + node: declaredNode, + loc: declaredNode.key.loc, + messageId: "unusedPrivateClassMember", + data: { + classMemberName: `#${classMemberName}` + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/no-unused-vars.js b/node_modules/eslint/lib/rules/no-unused-vars.js index 4dc6dc2ba..f29e678d6 100644 --- a/node_modules/eslint/lib/rules/no-unused-vars.js +++ b/node_modules/eslint/lib/rules/no-unused-vars.js @@ -27,15 +27,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow unused variables", - category: "Variables", + description: "Disallow unused variables", recommended: true, - url: "https://eslint.org/docs/rules/no-unused-vars" + url: "https://eslint.org/docs/latest/rules/no-unused-vars" }, schema: [ @@ -67,6 +67,9 @@ module.exports = { }, caughtErrorsIgnorePattern: { type: "string" + }, + destructuredArrayIgnorePattern: { + type: "string" } }, additionalProperties: false @@ -81,7 +84,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const REST_PROPERTY_TYPE = /^(?:RestElement|(?:Experimental)?RestProperty)$/u; @@ -114,6 +117,10 @@ module.exports = { if (firstOption.caughtErrorsIgnorePattern) { config.caughtErrorsIgnorePattern = new RegExp(firstOption.caughtErrorsIgnorePattern, "u"); } + + if (firstOption.destructuredArrayIgnorePattern) { + config.destructuredArrayIgnorePattern = new RegExp(firstOption.destructuredArrayIgnorePattern, "u"); + } } } @@ -155,7 +162,14 @@ module.exports = { * @returns {UnusedVarMessageData} The message data to be used with this unused variable. */ function getAssignedMessageData(unusedVar) { - const additional = config.varsIgnorePattern ? `. Allowed unused vars must match ${config.varsIgnorePattern.toString()}` : ""; + const def = unusedVar.defs[0]; + let additional = ""; + + if (config.destructuredArrayIgnorePattern && def && def.name.parent.type === "ArrayPattern") { + additional = `. Allowed unused elements of array destructuring patterns must match ${config.destructuredArrayIgnorePattern.toString()}`; + } else if (config.varsIgnorePattern) { + additional = `. Allowed unused vars must match ${config.varsIgnorePattern.toString()}`; + } return { varName: unusedVar.name, @@ -196,6 +210,17 @@ module.exports = { } + /** + * Checks whether a node is a sibling of the rest property or not. + * @param {ASTNode} node a node to check + * @returns {boolean} True if the node is a sibling of the rest property, otherwise false. + */ + function hasRestSibling(node) { + return node.type === "Property" && + node.parent.type === "ObjectPattern" && + REST_PROPERTY_TYPE.test(node.parent.properties[node.parent.properties.length - 1].type); + } + /** * Determines if a variable has a sibling rest property * @param {Variable} variable eslint-scope variable object. @@ -204,16 +229,10 @@ module.exports = { */ function hasRestSpreadSibling(variable) { if (config.ignoreRestSiblings) { - return variable.defs.some(def => { - const propertyNode = def.name.parent; - const patternNode = propertyNode.parent; - - return ( - propertyNode.type === "Property" && - patternNode.type === "ObjectPattern" && - REST_PROPERTY_TYPE.test(patternNode.properties[patternNode.properties.length - 1].type) - ); - }); + const hasRestSiblingDefinition = variable.defs.some(def => hasRestSibling(def.name.parent)); + const hasRestSiblingReference = variable.references.some(ref => hasRestSibling(ref.identifier.parent)); + + return hasRestSiblingDefinition || hasRestSiblingReference; } return false; @@ -240,7 +259,7 @@ module.exports = { let scope = ref.from; while (scope) { - if (nodes.indexOf(scope.block) >= 0) { + if (nodes.includes(scope.block)) { return true; } @@ -290,6 +309,31 @@ module.exports = { ); } + /** + * Checks whether a given node is unused expression or not. + * @param {ASTNode} node The node itself + * @returns {boolean} The node is an unused expression. + * @private + */ + function isUnusedExpression(node) { + const parent = node.parent; + + if (parent.type === "ExpressionStatement") { + return true; + } + + if (parent.type === "SequenceExpression") { + const isLastExpression = parent.expressions[parent.expressions.length - 1] === node; + + if (!isLastExpression) { + return true; + } + return isUnusedExpression(parent); + } + + return false; + } + /** * If a given reference is left-hand side of an assignment, this gets * the right-hand side node of the assignment. @@ -308,7 +352,6 @@ module.exports = { function getRhsNode(ref, prevRhsNode) { const id = ref.identifier; const parent = id.parent; - const grandparent = parent.parent; const refScope = ref.from.variableScope; const varScope = ref.resolved.scope.variableScope; const canBeUsedLater = refScope !== varScope || astUtils.isInLoop(id); @@ -322,7 +365,7 @@ module.exports = { } if (parent.type === "AssignmentExpression" && - grandparent.type === "ExpressionStatement" && + isUnusedExpression(parent) && id === parent.left && !canBeUsedLater ) { @@ -415,33 +458,39 @@ module.exports = { function isReadForItself(ref, rhsNode) { const id = ref.identifier; const parent = id.parent; - const grandparent = parent.parent; return ref.isRead() && ( // self update. e.g. `a += 1`, `a++` - (// in RHS of an assignment for itself. e.g. `a = a + 1` - (( + ( + ( parent.type === "AssignmentExpression" && - grandparent.type === "ExpressionStatement" && - parent.left === id + parent.left === id && + isUnusedExpression(parent) && + !astUtils.isLogicalAssignmentOperator(parent.operator) ) || + ( + parent.type === "UpdateExpression" && + isUnusedExpression(parent) + ) + ) || + + // in RHS of an assignment for itself. e.g. `a = a + 1` ( - parent.type === "UpdateExpression" && - grandparent.type === "ExpressionStatement" - ) || rhsNode && - isInside(id, rhsNode) && - !isInsideOfStorableFunction(id, rhsNode))) + rhsNode && + isInside(id, rhsNode) && + !isInsideOfStorableFunction(id, rhsNode) + ) ); } /** - * Determine if an identifier is used either in for-in loops. + * Determine if an identifier is used either in for-in or for-of loops. * @param {Reference} ref The reference to check. * @returns {boolean} whether reference is used in the for-in loops * @private */ - function isForInRef(ref) { + function isForInOfRef(ref) { let target = ref.identifier.parent; @@ -450,7 +499,7 @@ module.exports = { target = target.parent.parent; } - if (target.type !== "ForInStatement") { + if (target.type !== "ForInStatement" && target.type !== "ForOfStatement") { return false; } @@ -483,7 +532,7 @@ module.exports = { let rhsNode = null; return variable.references.some(ref => { - if (isForInRef(ref)) { + if (isForInOfRef(ref)) { return true; } @@ -507,7 +556,7 @@ module.exports = { */ function isAfterLastUsedArg(variable) { const def = variable.defs[0]; - const params = context.getDeclaredVariables(def.node); + const params = sourceCode.getDeclaredVariables(def.node); const posteriorParams = params.slice(params.indexOf(variable) + 1); // If any used parameters occur after this parameter, do not report. @@ -550,6 +599,19 @@ module.exports = { if (def) { const type = def.type; + const refUsedInArrayPatterns = variable.references.some(ref => ref.identifier.parent.type === "ArrayPattern"); + + // skip elements of array destructuring patterns + if ( + ( + def.name.parent.type === "ArrayPattern" || + refUsedInArrayPatterns + ) && + config.destructuredArrayIgnorePattern && + config.destructuredArrayIgnorePattern.test(def.name.name) + ) { + continue; + } // skip catch variables if (type === "CatchClause") { @@ -612,17 +674,25 @@ module.exports = { return { "Program:exit"(programNode) { - const unusedVars = collectUnusedVariables(context.getScope(), []); + const unusedVars = collectUnusedVariables(sourceCode.getScope(programNode), []); for (let i = 0, l = unusedVars.length; i < l; ++i) { const unusedVar = unusedVars[i]; // Report the first declaration. if (unusedVar.defs.length > 0) { + + // report last write reference, https://github.com/eslint/eslint/issues/14324 + const writeReferences = unusedVar.references.filter(ref => ref.isWrite() && ref.from.variableScope === unusedVar.scope.variableScope); + + let referenceToReport; + + if (writeReferences.length > 0) { + referenceToReport = writeReferences[writeReferences.length - 1]; + } + context.report({ - node: unusedVar.references.length ? unusedVar.references[ - unusedVar.references.length - 1 - ].identifier : unusedVar.identifiers[0], + node: referenceToReport ? referenceToReport.identifier : unusedVar.identifiers[0], messageId: "unusedVar", data: unusedVar.references.some(ref => ref.isWrite()) ? getAssignedMessageData(unusedVar) diff --git a/node_modules/eslint/lib/rules/no-use-before-define.js b/node_modules/eslint/lib/rules/no-use-before-define.js index c7300567e..9d6b04340 100644 --- a/node_modules/eslint/lib/rules/no-use-before-define.js +++ b/node_modules/eslint/lib/rules/no-use-before-define.js @@ -21,6 +21,7 @@ function parseOptions(options) { let functions = true; let classes = true; let variables = true; + let allowNamedExports = false; if (typeof options === "string") { functions = (options !== "nofunc"); @@ -28,58 +29,120 @@ function parseOptions(options) { functions = options.functions !== false; classes = options.classes !== false; variables = options.variables !== false; + allowNamedExports = !!options.allowNamedExports; } - return { functions, classes, variables }; + return { functions, classes, variables, allowNamedExports }; } /** - * Checks whether or not a given variable is a function declaration. - * @param {eslint-scope.Variable} variable A variable to check. - * @returns {boolean} `true` if the variable is a function declaration. + * Checks whether or not a given location is inside of the range of a given node. + * @param {ASTNode} node An node to check. + * @param {number} location A location to check. + * @returns {boolean} `true` if the location is inside of the range of the node. */ -function isFunction(variable) { - return variable.defs[0].type === "FunctionName"; +function isInRange(node, location) { + return node && node.range[0] <= location && location <= node.range[1]; } /** - * Checks whether or not a given variable is a class declaration in an upper function scope. - * @param {eslint-scope.Variable} variable A variable to check. - * @param {eslint-scope.Reference} reference A reference to check. - * @returns {boolean} `true` if the variable is a class declaration. + * Checks whether or not a given location is inside of the range of a class static initializer. + * Static initializers are static blocks and initializers of static fields. + * @param {ASTNode} node `ClassBody` node to check static initializers. + * @param {number} location A location to check. + * @returns {boolean} `true` if the location is inside of a class static initializer. */ -function isOuterClass(variable, reference) { - return ( - variable.defs[0].type === "ClassName" && - variable.scope.variableScope !== reference.from.variableScope - ); +function isInClassStaticInitializerRange(node, location) { + return node.body.some(classMember => ( + ( + classMember.type === "StaticBlock" && + isInRange(classMember, location) + ) || + ( + classMember.type === "PropertyDefinition" && + classMember.static && + classMember.value && + isInRange(classMember.value, location) + ) + )); } /** - * Checks whether or not a given variable is a variable declaration in an upper function scope. - * @param {eslint-scope.Variable} variable A variable to check. - * @param {eslint-scope.Reference} reference A reference to check. - * @returns {boolean} `true` if the variable is a variable declaration. + * Checks whether a given scope is the scope of a class static initializer. + * Static initializers are static blocks and initializers of static fields. + * @param {eslint-scope.Scope} scope A scope to check. + * @returns {boolean} `true` if the scope is a class static initializer scope. */ -function isOuterVariable(variable, reference) { - return ( - variable.defs[0].type === "Variable" && - variable.scope.variableScope !== reference.from.variableScope - ); +function isClassStaticInitializerScope(scope) { + if (scope.type === "class-static-block") { + return true; + } + + if (scope.type === "class-field-initializer") { + + // `scope.block` is PropertyDefinition#value node + const propertyDefinition = scope.block.parent; + + return propertyDefinition.static; + } + + return false; } /** - * Checks whether or not a given location is inside of the range of a given node. - * @param {ASTNode} node An node to check. - * @param {number} location A location to check. - * @returns {boolean} `true` if the location is inside of the range of the node. + * Checks whether a given reference is evaluated in an execution context + * that isn't the one where the variable it refers to is defined. + * Execution contexts are: + * - top-level + * - functions + * - class field initializers (implicit functions) + * - class static blocks (implicit functions) + * Static class field initializers and class static blocks are automatically run during the class definition evaluation, + * and therefore we'll consider them as a part of the parent execution context. + * Example: + * + * const x = 1; + * + * x; // returns `false` + * () => x; // returns `true` + * + * class C { + * field = x; // returns `true` + * static field = x; // returns `false` + * + * method() { + * x; // returns `true` + * } + * + * static method() { + * x; // returns `true` + * } + * + * static { + * x; // returns `false` + * } + * } + * @param {eslint-scope.Reference} reference A reference to check. + * @returns {boolean} `true` if the reference is from a separate execution context. */ -function isInRange(node, location) { - return node && node.range[0] <= location && location <= node.range[1]; +function isFromSeparateExecutionContext(reference) { + const variable = reference.resolved; + let scope = reference.from; + + // Scope#variableScope represents execution context + while (variable.scope.variableScope !== scope.variableScope) { + if (isClassStaticInitializerScope(scope.variableScope)) { + scope = scope.variableScope.upper; + } else { + return true; + } + } + + return false; } /** - * Checks whether or not a given reference is inside of the initializers of a given variable. + * Checks whether or not a given reference is evaluated during the initialization of its variable. * * This returns `true` in the following cases: * @@ -88,17 +151,45 @@ function isInRange(node, location) { * var {a = a} = obj * for (var a in a) {} * for (var a of a) {} - * @param {Variable} variable A variable to check. + * var C = class { [C]; }; + * var C = class { static foo = C; }; + * var C = class { static { foo = C; } }; + * class C extends C {} + * class C extends (class { static foo = C; }) {} + * class C { [C]; } * @param {Reference} reference A reference to check. - * @returns {boolean} `true` if the reference is inside of the initializers. + * @returns {boolean} `true` if the reference is evaluated during the initialization. */ -function isInInitializer(variable, reference) { - if (variable.scope !== reference.from) { +function isEvaluatedDuringInitialization(reference) { + if (isFromSeparateExecutionContext(reference)) { + + /* + * Even if the reference appears in the initializer, it isn't evaluated during the initialization. + * For example, `const x = () => x;` is valid. + */ return false; } - let node = variable.identifiers[0].parent; const location = reference.identifier.range[1]; + const definition = reference.resolved.defs[0]; + + if (definition.type === "ClassName") { + + // `ClassDeclaration` or `ClassExpression` + const classDefinition = definition.node; + + return ( + isInRange(classDefinition, location) && + + /* + * Class binding is initialized before running static initializers. + * For example, `class C { static foo = C; static { bar = C; } }` is valid. + */ + !isInClassStaticInitializerRange(classDefinition.body, location) + ); + } + + let node = definition.name.parent; while (node) { if (node.type === "VariableDeclarator") { @@ -129,15 +220,15 @@ function isInInitializer(variable, reference) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow the use of variables before they are defined", - category: "Variables", + description: "Disallow the use of variables before they are defined", recommended: false, - url: "https://eslint.org/docs/rules/no-use-before-define" + url: "https://eslint.org/docs/latest/rules/no-use-before-define" }, schema: [ @@ -151,7 +242,8 @@ module.exports = { properties: { functions: { type: "boolean" }, classes: { type: "boolean" }, - variables: { type: "boolean" } + variables: { type: "boolean" }, + allowNamedExports: { type: "boolean" } }, additionalProperties: false } @@ -166,67 +258,90 @@ module.exports = { create(context) { const options = parseOptions(context.options[0]); + const sourceCode = context.sourceCode; /** - * Determines whether a given use-before-define case should be reported according to the options. - * @param {eslint-scope.Variable} variable The variable that gets used before being defined - * @param {eslint-scope.Reference} reference The reference to the variable - * @returns {boolean} `true` if the usage should be reported + * Determines whether a given reference should be checked. + * + * Returns `false` if the reference is: + * - initialization's (e.g., `let a = 1`). + * - referring to an undefined variable (i.e., if it's an unresolved reference). + * - referring to a variable that is defined, but not in the given source code + * (e.g., global environment variable or `arguments` in functions). + * - allowed by options. + * @param {eslint-scope.Reference} reference The reference + * @returns {boolean} `true` if the reference should be checked */ - function isForbidden(variable, reference) { - if (isFunction(variable)) { - return options.functions; + function shouldCheck(reference) { + if (reference.init) { + return false; } - if (isOuterClass(variable, reference)) { - return options.classes; + + const { identifier } = reference; + + if ( + options.allowNamedExports && + identifier.parent.type === "ExportSpecifier" && + identifier.parent.local === identifier + ) { + return false; + } + + const variable = reference.resolved; + + if (!variable || variable.defs.length === 0) { + return false; + } + + const definitionType = variable.defs[0].type; + + if (!options.functions && definitionType === "FunctionName") { + return false; } - if (isOuterVariable(variable, reference)) { - return options.variables; + + if ( + ( + !options.variables && definitionType === "Variable" || + !options.classes && definitionType === "ClassName" + ) && + + // don't skip checking the reference if it's in the same execution context, because of TDZ + isFromSeparateExecutionContext(reference) + ) { + return false; } + return true; } /** - * Finds and validates all variables in a given scope. - * @param {Scope} scope The scope object. + * Finds and validates all references in a given scope and its child scopes. + * @param {eslint-scope.Scope} scope The scope object. * @returns {void} - * @private */ - function findVariablesInScope(scope) { - scope.references.forEach(reference => { + function checkReferencesInScope(scope) { + scope.references.filter(shouldCheck).forEach(reference => { const variable = reference.resolved; + const definitionIdentifier = variable.defs[0].name; - /* - * Skips when the reference is: - * - initialization's. - * - referring to an undefined variable. - * - referring to a global environment variable (there're no identifiers). - * - located preceded by the variable (except in initializers). - * - allowed by options. - */ - if (reference.init || - !variable || - variable.identifiers.length === 0 || - (variable.identifiers[0].range[1] < reference.identifier.range[1] && !isInInitializer(variable, reference)) || - !isForbidden(variable, reference) + if ( + reference.identifier.range[1] < definitionIdentifier.range[1] || + isEvaluatedDuringInitialization(reference) ) { - return; + context.report({ + node: reference.identifier, + messageId: "usedBeforeDefined", + data: reference.identifier + }); } - - // Reports. - context.report({ - node: reference.identifier, - messageId: "usedBeforeDefined", - data: reference.identifier - }); }); - scope.childScopes.forEach(findVariablesInScope); + scope.childScopes.forEach(checkReferencesInScope); } return { - Program() { - findVariablesInScope(context.getScope()); + Program(node) { + checkReferencesInScope(sourceCode.getScope(node)); } }; } diff --git a/node_modules/eslint/lib/rules/no-useless-backreference.js b/node_modules/eslint/lib/rules/no-useless-backreference.js index 958e3d5dd..7ca43c8b2 100644 --- a/node_modules/eslint/lib/rules/no-useless-backreference.js +++ b/node_modules/eslint/lib/rules/no-useless-backreference.js @@ -9,9 +9,8 @@ // Requirements //------------------------------------------------------------------------------ -const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("eslint-utils"); -const { RegExpParser, visitRegExpAST } = require("regexpp"); -const lodash = require("lodash"); +const { CALL, CONSTRUCT, ReferenceTracker, getStringIfConstant } = require("@eslint-community/eslint-utils"); +const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp"); //------------------------------------------------------------------------------ // Helpers @@ -59,15 +58,15 @@ function isNegativeLookaround(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow useless backreferences in regular expressions", - category: "Possible Errors", - recommended: false, - url: "https://eslint.org/docs/rules/no-useless-backreference" + description: "Disallow useless backreferences in regular expressions", + recommended: true, + url: "https://eslint.org/docs/latest/rules/no-useless-backreference" }, schema: [], @@ -83,6 +82,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Checks and reports useless backreferences in the given regular expression. * @param {ASTNode} node Node that represents regular expression. A regex literal or RegExp constructor call. @@ -94,7 +95,7 @@ module.exports = { let regExpAST; try { - regExpAST = parser.parsePattern(pattern, 0, pattern.length, flags.includes("u")); + regExpAST = parser.parsePattern(pattern, 0, pattern.length, { unicode: flags.includes("u"), unicodeSets: flags.includes("v") }); } catch { // Ignore regular expressions with syntax errors @@ -137,7 +138,7 @@ module.exports = { // the opposite of the previous when the regex is matching backward in a lookbehind context. messageId = "backward"; - } else if (lodash.last(groupCut).type === "Alternative") { + } else if (groupCut[groupCut.length - 1].type === "Alternative") { // group's and bref's ancestor nodes below the lowest common ancestor are sibling alternatives => they're disjunctive. messageId = "disjunctive"; @@ -168,8 +169,8 @@ module.exports = { checkRegex(node, pattern, flags); }, - Program() { - const scope = context.getScope(), + Program(node) { + const scope = sourceCode.getScope(node), tracker = new ReferenceTracker(scope), traceMap = { RegExp: { @@ -178,13 +179,13 @@ module.exports = { } }; - for (const { node } of tracker.iterateGlobalReferences(traceMap)) { - const [patternNode, flagsNode] = node.arguments, + for (const { node: refNode } of tracker.iterateGlobalReferences(traceMap)) { + const [patternNode, flagsNode] = refNode.arguments, pattern = getStringIfConstant(patternNode, scope), flags = getStringIfConstant(flagsNode, scope); if (typeof pattern === "string") { - checkRegex(node, pattern, flags || ""); + checkRegex(refNode, pattern, flags || ""); } } } diff --git a/node_modules/eslint/lib/rules/no-useless-call.js b/node_modules/eslint/lib/rules/no-useless-call.js index b1382a2fa..dea2b47a4 100644 --- a/node_modules/eslint/lib/rules/no-useless-call.js +++ b/node_modules/eslint/lib/rules/no-useless-call.js @@ -49,15 +49,15 @@ function isValidThisArg(expectedThis, thisArg, sourceCode) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary calls to `.call()` and `.apply()`", - category: "Best Practices", + description: "Disallow unnecessary calls to `.call()` and `.apply()`", recommended: false, - url: "https://eslint.org/docs/rules/no-useless-call" + url: "https://eslint.org/docs/latest/rules/no-useless-call" }, schema: [], @@ -68,7 +68,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { CallExpression(node) { diff --git a/node_modules/eslint/lib/rules/no-useless-catch.js b/node_modules/eslint/lib/rules/no-useless-catch.js index f303c2729..e02013db6 100644 --- a/node_modules/eslint/lib/rules/no-useless-catch.js +++ b/node_modules/eslint/lib/rules/no-useless-catch.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary `catch` clauses", - category: "Best Practices", + description: "Disallow unnecessary `catch` clauses", recommended: true, - url: "https://eslint.org/docs/rules/no-useless-catch" + url: "https://eslint.org/docs/latest/rules/no-useless-catch" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-useless-computed-key.js b/node_modules/eslint/lib/rules/no-useless-computed-key.js index e0505a318..f2d9f3341 100644 --- a/node_modules/eslint/lib/rules/no-useless-computed-key.js +++ b/node_modules/eslint/lib/rules/no-useless-computed-key.js @@ -8,22 +8,92 @@ // Requirements //------------------------------------------------------------------------------ -const lodash = require("lodash"); const astUtils = require("./utils/ast-utils"); +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Determines whether the computed key syntax is unnecessarily used for the given node. + * In particular, it determines whether removing the square brackets and using the content between them + * directly as the key (e.g. ['foo'] -> 'foo') would produce valid syntax and preserve the same behavior. + * Valid non-computed keys are only: identifiers, number literals and string literals. + * Only literals can preserve the same behavior, with a few exceptions for specific node types: + * Property + * - { ["__proto__"]: foo } defines a property named "__proto__" + * { "__proto__": foo } defines object's prototype + * PropertyDefinition + * - class C { ["constructor"]; } defines an instance field named "constructor" + * class C { "constructor"; } produces a parsing error + * - class C { static ["constructor"]; } defines a static field named "constructor" + * class C { static "constructor"; } produces a parsing error + * - class C { static ["prototype"]; } produces a runtime error (doesn't break the whole script) + * class C { static "prototype"; } produces a parsing error (breaks the whole script) + * MethodDefinition + * - class C { ["constructor"]() {} } defines a prototype method named "constructor" + * class C { "constructor"() {} } defines the constructor + * - class C { static ["prototype"]() {} } produces a runtime error (doesn't break the whole script) + * class C { static "prototype"() {} } produces a parsing error (breaks the whole script) + * @param {ASTNode} node The node to check. It can be `Property`, `PropertyDefinition` or `MethodDefinition`. + * @throws {Error} (Unreachable.) + * @returns {void} `true` if the node has useless computed key. + */ +function hasUselessComputedKey(node) { + if (!node.computed) { + return false; + } + + const { key } = node; + + if (key.type !== "Literal") { + return false; + } + + const { value } = key; + + if (typeof value !== "number" && typeof value !== "string") { + return false; + } + + switch (node.type) { + case "Property": + return value !== "__proto__"; + + case "PropertyDefinition": + if (node.static) { + return value !== "constructor" && value !== "prototype"; + } + + return value !== "constructor"; + + case "MethodDefinition": + if (node.static) { + return value !== "prototype"; + } + + return value !== "constructor"; + + /* c8 ignore next */ + default: + throw new Error(`Unexpected node type: ${node.type}`); + } + +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary computed property keys in objects and classes", - category: "ECMAScript 6", + description: "Disallow unnecessary computed property keys in objects and classes", recommended: false, - url: "https://eslint.org/docs/rules/no-useless-computed-key" + url: "https://eslint.org/docs/latest/rules/no-useless-computed-key" }, schema: [{ @@ -43,7 +113,7 @@ module.exports = { } }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const enforceForClassMembers = context.options[0] && context.options[0].enforceForClassMembers; /** @@ -52,22 +122,9 @@ module.exports = { * @returns {void} */ function check(node) { - if (!node.computed) { - return; - } + if (hasUselessComputedKey(node)) { + const { key } = node; - const key = node.key, - nodeType = typeof key.value; - - let allowedKey; - - if (node.type === "MethodDefinition") { - allowedKey = node.static ? "prototype" : "constructor"; - } else { - allowedKey = "__proto__"; - } - - if (key.type === "Literal" && (nodeType === "string" || nodeType === "number") && key.value !== allowedKey) { context.report({ node, messageId: "unnecessarilyComputedProperty", @@ -95,9 +152,17 @@ module.exports = { } } + /** + * A no-op function to act as placeholder for checking a node when the `enforceForClassMembers` option is `false`. + * @returns {void} + * @private + */ + function noop() {} + return { Property: check, - MethodDefinition: enforceForClassMembers ? check : lodash.noop + MethodDefinition: enforceForClassMembers ? check : noop, + PropertyDefinition: enforceForClassMembers ? check : noop }; } }; diff --git a/node_modules/eslint/lib/rules/no-useless-concat.js b/node_modules/eslint/lib/rules/no-useless-concat.js index cfc60c8fb..c566c62be 100644 --- a/node_modules/eslint/lib/rules/no-useless-concat.js +++ b/node_modules/eslint/lib/rules/no-useless-concat.js @@ -64,15 +64,15 @@ function getRight(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary concatenation of literals or template literals", - category: "Best Practices", + description: "Disallow unnecessary concatenation of literals or template literals", recommended: false, - url: "https://eslint.org/docs/rules/no-useless-concat" + url: "https://eslint.org/docs/latest/rules/no-useless-concat" }, schema: [], @@ -83,7 +83,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { BinaryExpression(node) { diff --git a/node_modules/eslint/lib/rules/no-useless-constructor.js b/node_modules/eslint/lib/rules/no-useless-constructor.js index baabe7ec8..2b9c18e51 100644 --- a/node_modules/eslint/lib/rules/no-useless-constructor.js +++ b/node_modules/eslint/lib/rules/no-useless-constructor.js @@ -132,15 +132,15 @@ function isRedundantSuperCall(body, ctorParams) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary constructors", - category: "ECMAScript 6", + description: "Disallow unnecessary constructors", recommended: false, - url: "https://eslint.org/docs/rules/no-useless-constructor" + url: "https://eslint.org/docs/latest/rules/no-useless-constructor" }, schema: [], diff --git a/node_modules/eslint/lib/rules/no-useless-escape.js b/node_modules/eslint/lib/rules/no-useless-escape.js index 512c93a8b..0e0f6f09f 100644 --- a/node_modules/eslint/lib/rules/no-useless-escape.js +++ b/node_modules/eslint/lib/rules/no-useless-escape.js @@ -6,7 +6,12 @@ "use strict"; const astUtils = require("./utils/ast-utils"); +const { RegExpParser, visitRegExpAST } = require("@eslint-community/regexpp"); +/** + * @typedef {import('@eslint-community/regexpp').AST.CharacterClass} CharacterClass + * @typedef {import('@eslint-community/regexpp').AST.ExpressionCharacterClass} ExpressionCharacterClass + */ //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -28,70 +33,35 @@ const VALID_STRING_ESCAPES = union(new Set("\\nrvtbfux"), astUtils.LINEBREAKS); const REGEX_GENERAL_ESCAPES = new Set("\\bcdDfnpPrsStvwWxu0123456789]"); const REGEX_NON_CHARCLASS_ESCAPES = union(REGEX_GENERAL_ESCAPES, new Set("^/.$*+?[{}|()Bk")); -/** - * Parses a regular expression into a list of characters with character class info. - * @param {string} regExpText The raw text used to create the regular expression - * @returns {Object[]} A list of characters, each with info on escaping and whether they're in a character class. - * @example - * - * parseRegExp('a\\b[cd-]') - * - * returns: - * [ - * {text: 'a', index: 0, escaped: false, inCharClass: false, startsCharClass: false, endsCharClass: false}, - * {text: 'b', index: 2, escaped: true, inCharClass: false, startsCharClass: false, endsCharClass: false}, - * {text: 'c', index: 4, escaped: false, inCharClass: true, startsCharClass: true, endsCharClass: false}, - * {text: 'd', index: 5, escaped: false, inCharClass: true, startsCharClass: false, endsCharClass: false}, - * {text: '-', index: 6, escaped: false, inCharClass: true, startsCharClass: false, endsCharClass: false} - * ] +/* + * Set of characters that require escaping in character classes in `unicodeSets` mode. + * ( ) [ ] { } / - \ | are ClassSetSyntaxCharacter */ -function parseRegExp(regExpText) { - const charList = []; +const REGEX_CLASSSET_CHARACTER_ESCAPES = union(REGEX_GENERAL_ESCAPES, new Set("q/[{}|()-")); - regExpText.split("").reduce((state, char, index) => { - if (!state.escapeNextChar) { - if (char === "\\") { - return Object.assign(state, { escapeNextChar: true }); - } - if (char === "[" && !state.inCharClass) { - return Object.assign(state, { inCharClass: true, startingCharClass: true }); - } - if (char === "]" && state.inCharClass) { - if (charList.length && charList[charList.length - 1].inCharClass) { - charList[charList.length - 1].endsCharClass = true; - } - return Object.assign(state, { inCharClass: false, startingCharClass: false }); - } - } - charList.push({ - text: char, - index, - escaped: state.escapeNextChar, - inCharClass: state.inCharClass, - startsCharClass: state.startingCharClass, - endsCharClass: false - }); - return Object.assign(state, { escapeNextChar: false, startingCharClass: false }); - }, { escapeNextChar: false, inCharClass: false, startingCharClass: false }); - - return charList; -} +/* + * A single character set of ClassSetReservedDoublePunctuator. + * && !! ## $$ %% ** ++ ,, .. :: ;; << == >> ?? @@ ^^ `` ~~ are ClassSetReservedDoublePunctuator + */ +const REGEX_CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR = new Set("!#$%&*+,.:;<=>?@^`~"); +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow unnecessary escape characters", - category: "Best Practices", + description: "Disallow unnecessary escape characters", recommended: true, - url: "https://eslint.org/docs/rules/no-useless-escape", - suggestion: true + url: "https://eslint.org/docs/latest/rules/no-useless-escape" }, + hasSuggestions: true, + messages: { unnecessaryEscape: "Unnecessary escape character: \\{{character}}.", removeEscape: "Remove the `\\`. This maintains the current functionality.", + removeEscapeDoNotKeepSemantics: "Remove the `\\` if it was inserted by mistake.", escapeBackslash: "Replace the `\\` with `\\\\` to include the actual backslash character." }, @@ -99,16 +69,18 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; + const parser = new RegExpParser(); /** * Reports a node * @param {ASTNode} node The node to report * @param {number} startOffset The backslash's offset from the start of the node * @param {string} character The uselessly escaped character (not including the backslash) + * @param {boolean} [disableEscapeBackslashSuggest] `true` if escapeBackslash suggestion should be turned off. * @returns {void} */ - function report(node, startOffset, character) { + function report(node, startOffset, character, disableEscapeBackslashSuggest) { const rangeStart = node.range[0] + startOffset; const range = [rangeStart, rangeStart + 1]; const start = sourceCode.getLocFromIndex(rangeStart); @@ -123,17 +95,24 @@ module.exports = { data: { character }, suggest: [ { - messageId: "removeEscape", + + // Removing unnecessary `\` characters in a directive is not guaranteed to maintain functionality. + messageId: astUtils.isDirective(node.parent) + ? "removeEscapeDoNotKeepSemantics" : "removeEscape", fix(fixer) { return fixer.removeRange(range); } }, - { - messageId: "escapeBackslash", - fix(fixer) { - return fixer.insertTextBeforeRange(range, "\\"); - } - } + ...disableEscapeBackslashSuggest + ? [] + : [ + { + messageId: "escapeBackslash", + fix(fixer) { + return fixer.insertTextBeforeRange(range, "\\"); + } + } + ] ] }); } @@ -176,6 +155,133 @@ module.exports = { } } + /** + * Checks if the escape character in given regexp is unnecessary. + * @private + * @param {ASTNode} node node to validate. + * @returns {void} + */ + function validateRegExp(node) { + const { pattern, flags } = node.regex; + let patternNode; + const unicode = flags.includes("u"); + const unicodeSets = flags.includes("v"); + + try { + patternNode = parser.parsePattern(pattern, 0, pattern.length, { unicode, unicodeSets }); + } catch { + + // Ignore regular expressions with syntax errors + return; + } + + /** @type {(CharacterClass | ExpressionCharacterClass)[]} */ + const characterClassStack = []; + + visitRegExpAST(patternNode, { + onCharacterClassEnter: characterClassNode => characterClassStack.unshift(characterClassNode), + onCharacterClassLeave: () => characterClassStack.shift(), + onExpressionCharacterClassEnter: characterClassNode => characterClassStack.unshift(characterClassNode), + onExpressionCharacterClassLeave: () => characterClassStack.shift(), + onCharacterEnter(characterNode) { + if (!characterNode.raw.startsWith("\\")) { + + // It's not an escaped character. + return; + } + + const escapedChar = characterNode.raw.slice(1); + + if (escapedChar !== String.fromCodePoint(characterNode.value)) { + + // It's a valid escape. + return; + } + let allowedEscapes; + + if (characterClassStack.length) { + allowedEscapes = unicodeSets ? REGEX_CLASSSET_CHARACTER_ESCAPES : REGEX_GENERAL_ESCAPES; + } else { + allowedEscapes = REGEX_NON_CHARCLASS_ESCAPES; + } + if (allowedEscapes.has(escapedChar)) { + return; + } + + const reportedIndex = characterNode.start + 1; + let disableEscapeBackslashSuggest = false; + + if (characterClassStack.length) { + const characterClassNode = characterClassStack[0]; + + if (escapedChar === "^") { + + /* + * The '^' character is also a special case; it must always be escaped outside of character classes, but + * it only needs to be escaped in character classes if it's at the beginning of the character class. To + * account for this, consider it to be a valid escape character outside of character classes, and filter + * out '^' characters that appear at the start of a character class. + */ + if (characterClassNode.start + 1 === characterNode.start) { + + return; + } + } + if (!unicodeSets) { + if (escapedChar === "-") { + + /* + * The '-' character is a special case, because it's only valid to escape it if it's in a character + * class, and is not at either edge of the character class. To account for this, don't consider '-' + * characters to be valid in general, and filter out '-' characters that appear in the middle of a + * character class. + */ + if (characterClassNode.start + 1 !== characterNode.start && characterNode.end !== characterClassNode.end - 1) { + + return; + } + } + } else { // unicodeSets mode + if (REGEX_CLASS_SET_RESERVED_DOUBLE_PUNCTUATOR.has(escapedChar)) { + + // Escaping is valid if it is a ClassSetReservedDoublePunctuator. + if (pattern[characterNode.end] === escapedChar) { + return; + } + if (pattern[characterNode.start - 1] === escapedChar) { + if (escapedChar !== "^") { + return; + } + + // If the previous character is a `negate` caret(`^`), escape to caret is unnecessary. + + if (!characterClassNode.negate) { + return; + } + const negateCaretIndex = characterClassNode.start + 1; + + if (negateCaretIndex < characterNode.start - 1) { + return; + } + } + } + + if (characterNode.parent.type === "ClassIntersection" || characterNode.parent.type === "ClassSubtraction") { + disableEscapeBackslashSuggest = true; + } + } + } + + report( + node, + reportedIndex, + escapedChar, + disableEscapeBackslashSuggest + ); + } + }); + } + /** * Checks if a node has an escape. * @param {ASTNode} node node to check. @@ -214,32 +320,7 @@ module.exports = { validateString(node, match); } } else if (node.regex) { - parseRegExp(node.regex.pattern) - - /* - * The '-' character is a special case, because it's only valid to escape it if it's in a character - * class, and is not at either edge of the character class. To account for this, don't consider '-' - * characters to be valid in general, and filter out '-' characters that appear in the middle of a - * character class. - */ - .filter(charInfo => !(charInfo.text === "-" && charInfo.inCharClass && !charInfo.startsCharClass && !charInfo.endsCharClass)) - - /* - * The '^' character is also a special case; it must always be escaped outside of character classes, but - * it only needs to be escaped in character classes if it's at the beginning of the character class. To - * account for this, consider it to be a valid escape character outside of character classes, and filter - * out '^' characters that appear at the start of a character class. - */ - .filter(charInfo => !(charInfo.text === "^" && charInfo.startsCharClass)) - - // Filter out characters that aren't escaped. - .filter(charInfo => charInfo.escaped) - - // Filter out characters that are valid to escape, based on their position in the regular expression. - .filter(charInfo => !(charInfo.inCharClass ? REGEX_GENERAL_ESCAPES : REGEX_NON_CHARCLASS_ESCAPES).has(charInfo.text)) - - // Report all the remaining characters. - .forEach(charInfo => report(node, charInfo.index, charInfo.text)); + validateRegExp(node); } } diff --git a/node_modules/eslint/lib/rules/no-useless-rename.js b/node_modules/eslint/lib/rules/no-useless-rename.js index a7cec025d..0c818fb2c 100644 --- a/node_modules/eslint/lib/rules/no-useless-rename.js +++ b/node_modules/eslint/lib/rules/no-useless-rename.js @@ -15,15 +15,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow renaming import, export, and destructured assignments to the same name", - category: "ECMAScript 6", + description: "Disallow renaming import, export, and destructured assignments to the same name", recommended: false, - url: "https://eslint.org/docs/rules/no-useless-rename" + url: "https://eslint.org/docs/latest/rules/no-useless-rename" }, fixable: "code", @@ -46,7 +46,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(), + const sourceCode = context.sourceCode, options = context.options[0] || {}, ignoreDestructuring = options.ignoreDestructuring === true, ignoreImport = options.ignoreImport === true, @@ -132,8 +132,10 @@ module.exports = { return; } - if (node.imported.name === node.local.name && - node.imported.range[0] !== node.local.range[0]) { + if ( + node.imported.range[0] !== node.local.range[0] && + astUtils.getModuleExportName(node.imported) === node.local.name + ) { reportError(node, node.imported, "Import"); } } @@ -148,8 +150,10 @@ module.exports = { return; } - if (node.local.name === node.exported.name && - node.local.range[0] !== node.exported.range[0]) { + if ( + node.local.range[0] !== node.exported.range[0] && + astUtils.getModuleExportName(node.local) === astUtils.getModuleExportName(node.exported) + ) { reportError(node, node.local, "Export"); } diff --git a/node_modules/eslint/lib/rules/no-useless-return.js b/node_modules/eslint/lib/rules/no-useless-return.js index 111cb2101..81d610510 100644 --- a/node_modules/eslint/lib/rules/no-useless-return.js +++ b/node_modules/eslint/lib/rules/no-useless-return.js @@ -57,19 +57,35 @@ function isInFinally(node) { return false; } +/** + * Checks all segments in a set and returns true if any are reachable. + * @param {Set} segments The segments to check. + * @returns {boolean} True if any segment is reachable; false otherwise. + */ +function isAnySegmentReachable(segments) { + + for (const segment of segments) { + if (segment.reachable) { + return true; + } + } + + return false; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow redundant return statements", - category: "Best Practices", + description: "Disallow redundant return statements", recommended: false, - url: "https://eslint.org/docs/rules/no-useless-return" + url: "https://eslint.org/docs/latest/rules/no-useless-return" }, fixable: "code", @@ -82,8 +98,7 @@ module.exports = { create(context) { const segmentInfoMap = new WeakMap(); - const usedUnreachableSegments = new WeakSet(); - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let scopeInfo = null; /** @@ -152,24 +167,44 @@ module.exports = { * This behavior would simulate code paths for the case that the return * statement does not exist. * @param {CodePathSegment} segment The segment to get return statements. + * @param {Set} usedUnreachableSegments A set of segments that have already been traversed in this call. * @returns {void} */ - function markReturnStatementsOnSegmentAsUsed(segment) { + function markReturnStatementsOnSegmentAsUsed(segment, usedUnreachableSegments) { if (!segment.reachable) { usedUnreachableSegments.add(segment); segment.allPrevSegments .filter(isReturned) .filter(prevSegment => !usedUnreachableSegments.has(prevSegment)) - .forEach(markReturnStatementsOnSegmentAsUsed); + .forEach(prevSegment => markReturnStatementsOnSegmentAsUsed(prevSegment, usedUnreachableSegments)); return; } const info = segmentInfoMap.get(segment); - for (const node of info.uselessReturns) { + info.uselessReturns = info.uselessReturns.filter(node => { + if (scopeInfo.traversedTryBlockStatements && scopeInfo.traversedTryBlockStatements.length > 0) { + const returnInitialRange = node.range[0]; + const returnFinalRange = node.range[1]; + + const areBlocksInRange = scopeInfo.traversedTryBlockStatements.some(tryBlockStatement => { + const blockInitialRange = tryBlockStatement.range[0]; + const blockFinalRange = tryBlockStatement.range[1]; + + return ( + returnInitialRange >= blockInitialRange && + returnFinalRange <= blockFinalRange + ); + }); + + if (areBlocksInRange) { + return true; + } + } + remove(scopeInfo.uselessReturns, node); - } - info.uselessReturns = []; + return false; + }); } /** @@ -186,9 +221,8 @@ module.exports = { */ function markReturnStatementsOnCurrentSegmentsAsUsed() { scopeInfo - .codePath .currentSegments - .forEach(markReturnStatementsOnSegmentAsUsed); + .forEach(segment => markReturnStatementsOnSegmentAsUsed(segment, new Set())); } //---------------------------------------------------------------------- @@ -197,12 +231,14 @@ module.exports = { return { - // Makes and pushs a new scope information. + // Makes and pushes a new scope information. onCodePathStart(codePath) { scopeInfo = { upper: scopeInfo, uselessReturns: [], - codePath + traversedTryBlockStatements: [], + codePath, + currentSegments: new Set() }; }, @@ -239,6 +275,9 @@ module.exports = { * NOTE: This event is notified for only reachable segments. */ onCodePathSegmentStart(segment) { + + scopeInfo.currentSegments.add(segment); + const info = { uselessReturns: getUselessReturns([], segment.allPrevSegments), returned: false @@ -248,6 +287,18 @@ module.exports = { segmentInfoMap.set(segment, info); }, + onUnreachableCodePathSegmentStart(segment) { + scopeInfo.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + scopeInfo.currentSegments.delete(segment); + }, + + onCodePathSegmentEnd(segment) { + scopeInfo.currentSegments.delete(segment); + }, + // Adds ReturnStatement node to check whether it's useless or not. ReturnStatement(node) { if (node.argument) { @@ -259,12 +310,12 @@ module.exports = { isInFinally(node) || // Ignore `return` statements in unreachable places (https://github.com/eslint/eslint/issues/11647). - !scopeInfo.codePath.currentSegments.some(s => s.reachable) + !isAnySegmentReachable(scopeInfo.currentSegments) ) { return; } - for (const segment of scopeInfo.codePath.currentSegments) { + for (const segment of scopeInfo.currentSegments) { const info = segmentInfoMap.get(segment); if (info) { @@ -275,6 +326,14 @@ module.exports = { scopeInfo.uselessReturns.push(node); }, + "TryStatement > BlockStatement.block:exit"(node) { + scopeInfo.traversedTryBlockStatements.push(node); + }, + + "TryStatement:exit"() { + scopeInfo.traversedTryBlockStatements.pop(); + }, + /* * Registers for all statement nodes except FunctionDeclaration, BlockStatement, BreakStatement. * Removes return statements of the current segments from the useless return statement list. diff --git a/node_modules/eslint/lib/rules/no-var.js b/node_modules/eslint/lib/rules/no-var.js index f2cb96b1f..d45a91a1d 100644 --- a/node_modules/eslint/lib/rules/no-var.js +++ b/node_modules/eslint/lib/rules/no-var.js @@ -90,7 +90,7 @@ function getScopeNode(node) { } } - /* istanbul ignore next : unreachable */ + /* c8 ignore next */ return null; } @@ -159,7 +159,7 @@ function hasReferenceInTDZ(node) { return !reference.init && ( start < idStart || (defaultValue !== null && start >= defaultStart && end <= defaultEnd) || - (start >= initStart && end <= initEnd) + (!astUtils.isFunction(node) && start >= initStart && end <= initEnd) ); }); }; @@ -179,15 +179,15 @@ function hasNameDisallowedForLetDeclarations(variable) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `let` or `const` instead of `var`", - category: "ECMAScript 6", + description: "Require `let` or `const` instead of `var`", recommended: false, - url: "https://eslint.org/docs/rules/no-var" + url: "https://eslint.org/docs/latest/rules/no-var" }, schema: [], @@ -199,7 +199,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Checks whether the variables which are defined by the given declarator node have their references in TDZ. @@ -210,7 +210,7 @@ module.exports = { if (!declarator.init) { return false; } - const variables = context.getDeclaredVariables(declarator); + const variables = sourceCode.getDeclaredVariables(declarator); return variables.some(hasReferenceInTDZ(declarator.init)); } @@ -268,7 +268,7 @@ module.exports = { * @returns {boolean} `true` if it can fix the node. */ function canFix(node) { - const variables = context.getDeclaredVariables(node); + const variables = sourceCode.getDeclaredVariables(node); const scopeNode = getScopeNode(node); if (node.parent.type === "SwitchCase" || diff --git a/node_modules/eslint/lib/rules/no-void.js b/node_modules/eslint/lib/rules/no-void.js index 99c837855..9546d7a62 100644 --- a/node_modules/eslint/lib/rules/no-void.js +++ b/node_modules/eslint/lib/rules/no-void.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `void` operators", - category: "Best Practices", + description: "Disallow `void` operators", recommended: false, - url: "https://eslint.org/docs/rules/no-void" + url: "https://eslint.org/docs/latest/rules/no-void" }, messages: { diff --git a/node_modules/eslint/lib/rules/no-warning-comments.js b/node_modules/eslint/lib/rules/no-warning-comments.js index 0691a31f7..c415bee7a 100644 --- a/node_modules/eslint/lib/rules/no-warning-comments.js +++ b/node_modules/eslint/lib/rules/no-warning-comments.js @@ -5,7 +5,7 @@ "use strict"; -const { escapeRegExp } = require("lodash"); +const escapeRegExp = require("escape-string-regexp"); const astUtils = require("./utils/ast-utils"); const CHAR_LIMIT = 40; @@ -14,15 +14,15 @@ const CHAR_LIMIT = 40; // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow specified warning terms in comments", - category: "Best Practices", + description: "Disallow specified warning terms in comments", recommended: false, - url: "https://eslint.org/docs/rules/no-warning-comments" + url: "https://eslint.org/docs/latest/rules/no-warning-comments" }, schema: [ @@ -37,6 +37,15 @@ module.exports = { }, location: { enum: ["start", "anywhere"] + }, + decoration: { + type: "array", + items: { + type: "string", + pattern: "^\\S$" + }, + minItems: 1, + uniqueItems: true } }, additionalProperties: false @@ -49,10 +58,11 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(), + const sourceCode = context.sourceCode, configuration = context.options[0] || {}, warningTerms = configuration.terms || ["todo", "fixme", "xxx"], location = configuration.location || "start", + decoration = [...configuration.decoration || []].join(""), selfConfigRegEx = /\bno-warning-comments\b/u; /** @@ -64,59 +74,54 @@ module.exports = { */ function convertToRegExp(term) { const escaped = escapeRegExp(term); - const wordBoundary = "\\b"; - const eitherOrWordBoundary = `|${wordBoundary}`; - let prefix; + const escapedDecoration = escapeRegExp(decoration); /* - * If the term ends in a word character (a-z0-9_), ensure a word - * boundary at the end, so that substrings do not get falsely - * matched. eg "todo" in a string such as "mastodon". - * If the term ends in a non-word character, then \b won't match on - * the boundary to the next non-word character, which would likely - * be a space. For example `/\bFIX!\b/.test('FIX! blah') === false`. - * In these cases, use no bounding match. Same applies for the - * prefix, handled below. + * When matching at the start, ignore leading whitespace, and + * there's no need to worry about word boundaries. + * + * These expressions for the prefix and suffix are designed as follows: + * ^ handles any terms at the beginning of a comment. + * e.g. terms ["TODO"] matches `//TODO something` + * $ handles any terms at the end of a comment + * e.g. terms ["TODO"] matches `// something TODO` + * \b handles terms preceded/followed by word boundary + * e.g. terms: ["!FIX", "FIX!"] matches `// FIX!something` or `// something!FIX` + * terms: ["FIX"] matches `// FIX!` or `// !FIX`, but not `// fixed or affix` + * + * For location start: + * [\s]* handles optional leading spaces + * e.g. terms ["TODO"] matches `// TODO something` + * [\s\*]* (where "\*" is the escaped string of decoration) + * handles optional leading spaces or decoration characters (for "start" location only) + * e.g. terms ["TODO"] matches `/**** TODO something ... ` */ - const suffix = /\w$/u.test(term) ? "\\b" : ""; + const wordBoundary = "\\b"; - if (location === "start") { + let prefix = ""; - /* - * When matching at the start, ignore leading whitespace, and - * there's no need to worry about word boundaries. - */ - prefix = "^\\s*"; + if (location === "start") { + prefix = `^[\\s${escapedDecoration}]*`; } else if (/^\w/u.test(term)) { prefix = wordBoundary; - } else { - prefix = ""; } - if (location === "start") { - - /* - * For location "start" the regex should be - * ^\s*TERM\b. This checks the word boundary - * at the beginning of the comment. - */ - return new RegExp(prefix + escaped + suffix, "iu"); - } + const suffix = /\w$/u.test(term) ? wordBoundary : ""; + const flags = "iu"; // Case-insensitive with Unicode case folding. /* - * For location "anywhere" the regex should be - * \bTERM\b|\bTERM\b, this checks the entire comment - * for the term. + * For location "start", the typical regex is: + * /^[\s]*ESCAPED_TERM\b/iu. + * Or if decoration characters are specified (e.g. "*"), then any of + * those characters may appear in any order at the start: + * /^[\s\*]*ESCAPED_TERM\b/iu. + * + * For location "anywhere" the typical regex is + * /\bESCAPED_TERM\b/iu + * + * If it starts or ends with non-word character, the prefix and suffix are empty, respectively. */ - return new RegExp( - prefix + - escaped + - suffix + - eitherOrWordBoundary + - term + - wordBoundary, - "iu" - ); + return new RegExp(`${prefix}${escaped}${suffix}`, flags); } const warningRegExps = warningTerms.map(convertToRegExp); diff --git a/node_modules/eslint/lib/rules/no-whitespace-before-property.js b/node_modules/eslint/lib/rules/no-whitespace-before-property.js index 226f873c5..94a166e6a 100644 --- a/node_modules/eslint/lib/rules/no-whitespace-before-property.js +++ b/node_modules/eslint/lib/rules/no-whitespace-before-property.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to disallow whitespace before properties * @author Kai Cataldo + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "disallow whitespace before properties", - category: "Stylistic Issues", + description: "Disallow whitespace before properties", recommended: false, - url: "https://eslint.org/docs/rules/no-whitespace-before-property" + url: "https://eslint.org/docs/latest/rules/no-whitespace-before-property" }, fixable: "whitespace", @@ -34,7 +37,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers diff --git a/node_modules/eslint/lib/rules/no-with.js b/node_modules/eslint/lib/rules/no-with.js index d3e52e02f..0fb2c4519 100644 --- a/node_modules/eslint/lib/rules/no-with.js +++ b/node_modules/eslint/lib/rules/no-with.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `with` statements", - category: "Best Practices", + description: "Disallow `with` statements", recommended: true, - url: "https://eslint.org/docs/rules/no-with" + url: "https://eslint.org/docs/latest/rules/no-with" }, schema: [], diff --git a/node_modules/eslint/lib/rules/nonblock-statement-body-position.js b/node_modules/eslint/lib/rules/nonblock-statement-body-position.js index 34e6eeac3..811b32b08 100644 --- a/node_modules/eslint/lib/rules/nonblock-statement-body-position.js +++ b/node_modules/eslint/lib/rules/nonblock-statement-body-position.js @@ -1,6 +1,7 @@ /** * @fileoverview enforce the location of single-line statements * @author Teddy Katz + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,15 +11,17 @@ const POSITION_SCHEMA = { enum: ["beside", "below", "any"] }; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce the location of single-line statements", - category: "Stylistic Issues", + description: "Enforce the location of single-line statements", recommended: false, - url: "https://eslint.org/docs/rules/nonblock-statement-body-position" + url: "https://eslint.org/docs/latest/rules/nonblock-statement-body-position" }, fixable: "whitespace", @@ -49,7 +52,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //---------------------------------------------------------------------- // Helpers diff --git a/node_modules/eslint/lib/rules/object-curly-newline.js b/node_modules/eslint/lib/rules/object-curly-newline.js index 9b64a1b5c..176694b6a 100644 --- a/node_modules/eslint/lib/rules/object-curly-newline.js +++ b/node_modules/eslint/lib/rules/object-curly-newline.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to require or disallow line breaks inside braces. * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,7 +11,6 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const lodash = require("lodash"); //------------------------------------------------------------------------------ // Helpers @@ -69,6 +69,24 @@ function normalizeOptionValue(value) { return { multiline, minProperties, consistent }; } +/** + * Checks if a value is an object. + * @param {any} value The value to check + * @returns {boolean} `true` if the value is an object, otherwise `false` + */ +function isObject(value) { + return typeof value === "object" && value !== null; +} + +/** + * Checks if an option is a node-specific option + * @param {any} option The option to check + * @returns {boolean} `true` if the option is node-specific, otherwise `false` + */ +function isNodeSpecificOption(option) { + return isObject(option) || typeof option === "string"; +} + /** * Normalizes a given option value. * @param {string|Object|undefined} options An option value to parse. @@ -80,9 +98,7 @@ function normalizeOptionValue(value) { * }} Normalized option object. */ function normalizeOptions(options) { - const isNodeSpecificOption = lodash.overSome([lodash.isPlainObject, lodash.isString]); - - if (lodash.isPlainObject(options) && Object.values(options).some(isNodeSpecificOption)) { + if (isObject(options) && Object.values(options).some(isNodeSpecificOption)) { return { ObjectExpression: normalizeOptionValue(options.ObjectExpression), ObjectPattern: normalizeOptionValue(options.ObjectPattern), @@ -129,15 +145,17 @@ function areLineBreaksRequired(node, options, first, last) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent line breaks after opening and before closing braces", - category: "Stylistic Issues", + description: "Enforce consistent line breaks after opening and before closing braces", recommended: false, - url: "https://eslint.org/docs/rules/object-curly-newline" + url: "https://eslint.org/docs/latest/rules/object-curly-newline" }, fixable: "whitespace", @@ -170,7 +188,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const normalizedOptions = normalizeOptions(context.options[0]); /** diff --git a/node_modules/eslint/lib/rules/object-curly-spacing.js b/node_modules/eslint/lib/rules/object-curly-spacing.js index c0044f503..4463bcd5a 100644 --- a/node_modules/eslint/lib/rules/object-curly-spacing.js +++ b/node_modules/eslint/lib/rules/object-curly-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallows or enforces spaces inside of object literals. * @author Jamund Ferguson + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,15 +11,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing inside braces", - category: "Stylistic Issues", + description: "Enforce consistent spacing inside braces", recommended: false, - url: "https://eslint.org/docs/rules/object-curly-spacing" + url: "https://eslint.org/docs/latest/rules/object-curly-spacing" }, fixable: "whitespace", @@ -51,7 +54,7 @@ module.exports = { create(context) { const spaced = context.options[0] === "always", - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; /** * Determines whether an option is set, relative to the spacing option. @@ -81,7 +84,7 @@ module.exports = { * @returns {void} */ function reportNoBeginningSpace(node, token) { - const nextToken = context.getSourceCode().getTokenAfter(token, { includeComments: true }); + const nextToken = context.sourceCode.getTokenAfter(token, { includeComments: true }); context.report({ node, @@ -103,7 +106,7 @@ module.exports = { * @returns {void} */ function reportNoEndingSpace(node, token) { - const previousToken = context.getSourceCode().getTokenBefore(token, { includeComments: true }); + const previousToken = context.sourceCode.getTokenBefore(token, { includeComments: true }); context.report({ node, diff --git a/node_modules/eslint/lib/rules/object-property-newline.js b/node_modules/eslint/lib/rules/object-property-newline.js index 0c7f80028..6ffa06421 100644 --- a/node_modules/eslint/lib/rules/object-property-newline.js +++ b/node_modules/eslint/lib/rules/object-property-newline.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce placing object properties on separate lines. * @author Vitor Balocco + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce placing object properties on separate lines", - category: "Stylistic Issues", + description: "Enforce placing object properties on separate lines", recommended: false, - url: "https://eslint.org/docs/rules/object-property-newline" + url: "https://eslint.org/docs/latest/rules/object-property-newline" }, schema: [ @@ -53,7 +56,7 @@ module.exports = { ? "propertiesOnNewlineAll" : "propertiesOnNewline"; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { ObjectExpression(node) { diff --git a/node_modules/eslint/lib/rules/object-shorthand.js b/node_modules/eslint/lib/rules/object-shorthand.js index 3999ff8b9..e4cb3a445 100644 --- a/node_modules/eslint/lib/rules/object-shorthand.js +++ b/node_modules/eslint/lib/rules/object-shorthand.js @@ -22,15 +22,15 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require or disallow method and property shorthand syntax for object literals", - category: "ECMAScript 6", + description: "Require or disallow method and property shorthand syntax for object literals", recommended: false, - url: "https://eslint.org/docs/rules/object-shorthand" + url: "https://eslint.org/docs/latest/rules/object-shorthand" }, fixable: "code", @@ -78,6 +78,9 @@ module.exports = { ignoreConstructors: { type: "boolean" }, + methodsIgnorePattern: { + type: "string" + }, avoidQuotes: { type: "boolean" }, @@ -115,9 +118,12 @@ module.exports = { const PARAMS = context.options[1] || {}; const IGNORE_CONSTRUCTORS = PARAMS.ignoreConstructors; + const METHODS_IGNORE_PATTERN = PARAMS.methodsIgnorePattern + ? new RegExp(PARAMS.methodsIgnorePattern, "u") + : null; const AVOID_QUOTES = PARAMS.avoidQuotes; const AVOID_EXPLICIT_RETURN_ARROWS = !!PARAMS.avoidExplicitReturnArrows; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -149,7 +155,6 @@ module.exports = { * @param {ASTNode} property Property AST node * @returns {boolean} True if the property can have a shorthand form * @private - * */ function canHaveShorthand(property) { return (property.kind !== "set" && property.kind !== "get" && property.type !== "SpreadElement" && property.type !== "SpreadProperty" && property.type !== "ExperimentalSpreadProperty"); @@ -157,7 +162,7 @@ module.exports = { /** * Checks whether a node is a string literal. - * @param {ASTNode} node Any AST node. + * @param {ASTNode} node Any AST node. * @returns {boolean} `true` if it is a string literal. */ function isStringLiteral(node) { @@ -169,7 +174,6 @@ module.exports = { * @param {ASTNode} property Property AST node * @returns {boolean} True if the property is considered shorthand, false if not. * @private - * */ function isShorthand(property) { @@ -182,7 +186,6 @@ module.exports = { * @param {ASTNode} property Property AST node * @returns {boolean} True if the key and value are named equally, false if not. * @private - * */ function isRedundant(property) { const value = property.value; @@ -199,10 +202,9 @@ module.exports = { /** * Ensures that an object's properties are consistently shorthand, or not shorthand at all. - * @param {ASTNode} node Property AST node - * @param {boolean} checkRedundancy Whether to check longform redundancy + * @param {ASTNode} node Property AST node + * @param {boolean} checkRedundancy Whether to check longform redundancy * @returns {void} - * */ function checkConsistency(node, checkRedundancy) { @@ -352,11 +354,12 @@ module.exports = { /** * Enters a function. This creates a new lexical identifier scope, so a new Set of arrow functions is pushed onto the stack. * Also, this marks all `arguments` identifiers so that they can be detected later. + * @param {ASTNode} node The node representing the function. * @returns {void} */ - function enterFunction() { + function enterFunction(node) { lexicalScopeStack.unshift(new Set()); - context.getScope().variables.filter(variable => variable.name === "arguments").forEach(variable => { + sourceCode.getScope(node).variables.filter(variable => variable.name === "arguments").forEach(variable => { variable.references.map(ref => ref.identifier).forEach(identifier => argumentsIdentifiers.add(identifier)); }); } @@ -461,6 +464,15 @@ module.exports = { if (IGNORE_CONSTRUCTORS && node.key.type === "Identifier" && isConstructor(node.key.name)) { return; } + + if (METHODS_IGNORE_PATTERN) { + const propertyName = astUtils.getStaticPropertyName(node); + + if (propertyName !== null && METHODS_IGNORE_PATTERN.test(propertyName)) { + return; + } + } + if (AVOID_QUOTES && isStringLiteral(node.key)) { return; } diff --git a/node_modules/eslint/lib/rules/one-var-declaration-per-line.js b/node_modules/eslint/lib/rules/one-var-declaration-per-line.js index db4674760..340eac169 100644 --- a/node_modules/eslint/lib/rules/one-var-declaration-per-line.js +++ b/node_modules/eslint/lib/rules/one-var-declaration-per-line.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to check multiple var declarations per line * @author Alberto Rodríguez + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -8,15 +9,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "require or disallow newlines around variable declarations", - category: "Stylistic Issues", + description: "Require or disallow newlines around variable declarations", recommended: false, - url: "https://eslint.org/docs/rules/one-var-declaration-per-line" + url: "https://eslint.org/docs/latest/rules/one-var-declaration-per-line" }, schema: [ diff --git a/node_modules/eslint/lib/rules/one-var.js b/node_modules/eslint/lib/rules/one-var.js index e3df8320f..abb1525b1 100644 --- a/node_modules/eslint/lib/rules/one-var.js +++ b/node_modules/eslint/lib/rules/one-var.js @@ -28,15 +28,15 @@ function isInStatementList(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce variables to be declared either together or separately in functions", - category: "Stylistic Issues", + description: "Enforce variables to be declared either together or separately in functions", recommended: false, - url: "https://eslint.org/docs/rules/one-var" + url: "https://eslint.org/docs/latest/rules/one-var" }, fixable: "code", @@ -121,7 +121,7 @@ module.exports = { } } - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -209,7 +209,7 @@ module.exports = { /** * Determines the current scope (function or block) - * @param {string} statementType node.kind, one of: "var", "let", or "const" + * @param {string} statementType node.kind, one of: "var", "let", or "const" * @returns {Object} The scope associated with statementType */ function getCurrentScope(statementType) { @@ -542,6 +542,8 @@ module.exports = { FunctionDeclaration: startFunction, FunctionExpression: startFunction, ArrowFunctionExpression: startFunction, + StaticBlock: startFunction, // StaticBlock creates a new scope for `var` variables + BlockStatement: startBlock, ForStatement: startBlock, ForInStatement: startBlock, @@ -553,10 +555,12 @@ module.exports = { "ForInStatement:exit": endBlock, "SwitchStatement:exit": endBlock, "BlockStatement:exit": endBlock, + "Program:exit": endFunction, "FunctionDeclaration:exit": endFunction, "FunctionExpression:exit": endFunction, - "ArrowFunctionExpression:exit": endFunction + "ArrowFunctionExpression:exit": endFunction, + "StaticBlock:exit": endFunction }; } diff --git a/node_modules/eslint/lib/rules/operator-assignment.js b/node_modules/eslint/lib/rules/operator-assignment.js index fdb088492..f71d73be7 100644 --- a/node_modules/eslint/lib/rules/operator-assignment.js +++ b/node_modules/eslint/lib/rules/operator-assignment.js @@ -17,23 +17,23 @@ const astUtils = require("./utils/ast-utils"); /** * Checks whether an operator is commutative and has an operator assignment * shorthand form. - * @param {string} operator Operator to check. - * @returns {boolean} True if the operator is commutative and has a + * @param {string} operator Operator to check. + * @returns {boolean} True if the operator is commutative and has a * shorthand form. */ function isCommutativeOperatorWithShorthand(operator) { - return ["*", "&", "^", "|"].indexOf(operator) >= 0; + return ["*", "&", "^", "|"].includes(operator); } /** * Checks whether an operator is not commutative and has an operator assignment * shorthand form. - * @param {string} operator Operator to check. - * @returns {boolean} True if the operator is not commutative and has + * @param {string} operator Operator to check. + * @returns {boolean} True if the operator is not commutative and has * a shorthand form. */ function isNonCommutativeOperatorWithShorthand(operator) { - return ["+", "-", "/", "%", "<<", ">>", ">>>", "**"].indexOf(operator) >= 0; + return ["+", "-", "/", "%", "<<", ">>", ">>>", "**"].includes(operator); } //------------------------------------------------------------------------------ @@ -57,15 +57,15 @@ function canBeFixed(node) { ); } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require or disallow assignment operator shorthand where possible", - category: "Stylistic Issues", + description: "Require or disallow assignment operator shorthand where possible", recommended: false, - url: "https://eslint.org/docs/rules/operator-assignment" + url: "https://eslint.org/docs/latest/rules/operator-assignment" }, schema: [ @@ -76,14 +76,14 @@ module.exports = { fixable: "code", messages: { - replaced: "Assignment can be replaced with operator assignment.", - unexpected: "Unexpected operator assignment shorthand." + replaced: "Assignment (=) can be replaced with operator assignment ({{operator}}).", + unexpected: "Unexpected operator assignment ({{operator}}) shorthand." } }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Returns the operator token of an AssignmentExpression or BinaryExpression @@ -96,7 +96,7 @@ module.exports = { /** * Ensures that an assignment uses the shorthand form where possible. - * @param {ASTNode} node An AssignmentExpression node. + * @param {ASTNode} node An AssignmentExpression node. * @returns {void} */ function verify(node) { @@ -109,10 +109,13 @@ module.exports = { const operator = expr.operator; if (isCommutativeOperatorWithShorthand(operator) || isNonCommutativeOperatorWithShorthand(operator)) { + const replacementOperator = `${operator}=`; + if (astUtils.isSameReference(left, expr.left, true)) { context.report({ node, messageId: "replaced", + data: { operator: replacementOperator }, fix(fixer) { if (canBeFixed(left) && canBeFixed(expr.left)) { const equalsToken = getOperatorToken(node); @@ -125,7 +128,7 @@ module.exports = { return null; } - return fixer.replaceText(node, `${leftText}${expr.operator}=${rightText}`); + return fixer.replaceText(node, `${leftText}${replacementOperator}${rightText}`); } return null; } @@ -139,7 +142,8 @@ module.exports = { */ context.report({ node, - messageId: "replaced" + messageId: "replaced", + data: { operator: replacementOperator } }); } } @@ -147,7 +151,7 @@ module.exports = { /** * Warns if an assignment expression uses operator assignment shorthand. - * @param {ASTNode} node An AssignmentExpression node. + * @param {ASTNode} node An AssignmentExpression node. * @returns {void} */ function prohibit(node) { @@ -155,6 +159,7 @@ module.exports = { context.report({ node, messageId: "unexpected", + data: { operator: node.operator }, fix(fixer) { if (canBeFixed(node.left)) { const firstToken = sourceCode.getFirstToken(node); diff --git a/node_modules/eslint/lib/rules/operator-linebreak.js b/node_modules/eslint/lib/rules/operator-linebreak.js index 18da5c55b..3065e66be 100644 --- a/node_modules/eslint/lib/rules/operator-linebreak.js +++ b/node_modules/eslint/lib/rules/operator-linebreak.js @@ -1,6 +1,7 @@ /** * @fileoverview Operator linebreak - enforces operator linebreak style of two types: after and before * @author Benoît Zugmeyer + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent linebreak style for operators", - category: "Stylistic Issues", + description: "Enforce consistent linebreak style for operators", recommended: false, - url: "https://eslint.org/docs/rules/operator-linebreak" + url: "https://eslint.org/docs/latest/rules/operator-linebreak" }, schema: [ @@ -69,7 +72,7 @@ module.exports = { styleOverrides[":"] = "before"; } - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -136,23 +139,21 @@ module.exports = { /** * Checks the operator placement * @param {ASTNode} node The node to check - * @param {ASTNode} leftSide The node that comes before the operator in `node` + * @param {ASTNode} rightSide The node that comes after the operator in `node` + * @param {string} operator The operator * @private * @returns {void} */ - function validateNode(node, leftSide) { + function validateNode(node, rightSide, operator) { /* - * When the left part of a binary expression is a single expression wrapped in - * parentheses (ex: `(a) + b`), leftToken will be the last token of the expression - * and operatorToken will be the closing parenthesis. - * The leftToken should be the last closing parenthesis, and the operatorToken - * should be the token right after that. + * Find the operator token by searching from the right side, because between the left side and the operator + * there could be additional tokens from type annotations. Search specifically for the token which + * value equals the operator, in order to skip possible opening parentheses before the right side node. */ - const operatorToken = sourceCode.getTokenAfter(leftSide, astUtils.isNotClosingParenToken); + const operatorToken = sourceCode.getTokenBefore(rightSide, token => token.value === operator); const leftToken = sourceCode.getTokenBefore(operatorToken); const rightToken = sourceCode.getTokenAfter(operatorToken); - const operator = operatorToken.value; const operatorStyleOverride = styleOverrides[operator]; const style = operatorStyleOverride || globalStyle; const fix = getFixer(operatorToken, style); @@ -222,7 +223,7 @@ module.exports = { * @returns {void} */ function validateBinaryExpression(node) { - validateNode(node, node.left); + validateNode(node, node.right, node.operator); } //-------------------------------------------------------------------------- @@ -235,12 +236,17 @@ module.exports = { AssignmentExpression: validateBinaryExpression, VariableDeclarator(node) { if (node.init) { - validateNode(node, node.id); + validateNode(node, node.init, "="); + } + }, + PropertyDefinition(node) { + if (node.value) { + validateNode(node, node.value, "="); } }, ConditionalExpression(node) { - validateNode(node, node.test); - validateNode(node, node.consequent); + validateNode(node, node.consequent, "?"); + validateNode(node, node.alternate, ":"); } }; } diff --git a/node_modules/eslint/lib/rules/padded-blocks.js b/node_modules/eslint/lib/rules/padded-blocks.js index f8b5bd977..ec4756ba7 100644 --- a/node_modules/eslint/lib/rules/padded-blocks.js +++ b/node_modules/eslint/lib/rules/padded-blocks.js @@ -1,6 +1,7 @@ /** * @fileoverview A rule to ensure blank lines within blocks. * @author Mathias Schreck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow padding within blocks", - category: "Stylistic Issues", + description: "Require or disallow padding within blocks", recommended: false, - url: "https://eslint.org/docs/rules/padded-blocks" + url: "https://eslint.org/docs/latest/rules/padded-blocks" }, fixable: "whitespace", @@ -96,7 +99,7 @@ module.exports = { options.allowSingleLineBlocks = exceptOptions.allowSingleLineBlocks === true; } - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Gets the open brace token from a given node. @@ -107,6 +110,12 @@ module.exports = { if (node.type === "SwitchStatement") { return sourceCode.getTokenBefore(node.cases[0]); } + + if (node.type === "StaticBlock") { + return sourceCode.getFirstToken(node, { skip: 1 }); // skip the `static` token + } + + // `BlockStatement` or `ClassBody` return sourceCode.getFirstToken(node); } @@ -167,18 +176,20 @@ module.exports = { /** * Checks if a node should be padded, according to the rule config. * @param {ASTNode} node The AST node to check. + * @throws {Error} (Unreachable) * @returns {boolean} True if the node should be padded, false otherwise. */ function requirePaddingFor(node) { switch (node.type) { case "BlockStatement": + case "StaticBlock": return options.blocks; case "SwitchStatement": return options.switches; case "ClassBody": return options.classes; - /* istanbul ignore next */ + /* c8 ignore next */ default: throw new Error("unreachable"); } @@ -282,6 +293,7 @@ module.exports = { } checkPadding(node); }; + rule.StaticBlock = rule.BlockStatement; } if (Object.prototype.hasOwnProperty.call(options, "classes")) { diff --git a/node_modules/eslint/lib/rules/padding-line-between-statements.js b/node_modules/eslint/lib/rules/padding-line-between-statements.js index c97b9956b..084651b6d 100644 --- a/node_modules/eslint/lib/rules/padding-line-between-statements.js +++ b/node_modules/eslint/lib/rules/padding-line-between-statements.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to require or disallow newlines between statements * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -130,49 +131,6 @@ function isBlockLikeStatement(sourceCode, node) { ); } -/** - * Check whether the given node is a directive or not. - * @param {ASTNode} node The node to check. - * @param {SourceCode} sourceCode The source code object to get tokens. - * @returns {boolean} `true` if the node is a directive. - */ -function isDirective(node, sourceCode) { - return ( - node.type === "ExpressionStatement" && - ( - node.parent.type === "Program" || - ( - node.parent.type === "BlockStatement" && - astUtils.isFunction(node.parent.parent) - ) - ) && - node.expression.type === "Literal" && - typeof node.expression.value === "string" && - !astUtils.isParenthesised(sourceCode, node.expression) - ); -} - -/** - * Check whether the given node is a part of directive prologue or not. - * @param {ASTNode} node The node to check. - * @param {SourceCode} sourceCode The source code object to get tokens. - * @returns {boolean} `true` if the node is a part of directive prologue. - */ -function isDirectivePrologue(node, sourceCode) { - if (isDirective(node, sourceCode)) { - for (const sibling of node.parent.body) { - if (sibling === node) { - break; - } - if (!isDirective(sibling, sourceCode)) { - return false; - } - } - return true; - } - return false; -} - /** * Gets the actual last token. * @@ -253,7 +211,7 @@ function verifyForNever(context, _, nextNode, paddingLines) { const nextToken = paddingLines[0][1]; const start = prevToken.range[1]; const end = nextToken.range[0]; - const text = context.getSourceCode().text + const text = context.sourceCode.text .slice(start, end) .replace(PADDING_LINE_SEQUENCE, replacerToRemovePaddingLines); @@ -284,7 +242,7 @@ function verifyForAlways(context, prevNode, nextNode, paddingLines) { node: nextNode, messageId: "expectedBlankLine", fix(fixer) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let prevToken = getActualLastToken(sourceCode, prevNode); const nextToken = sourceCode.getFirstTokenBetween( prevToken, @@ -366,12 +324,10 @@ const StatementTypes = { CJS_IMPORT.test(sourceCode.getText(node.declarations[0].init)) }, directive: { - test: isDirectivePrologue + test: astUtils.isDirective }, expression: { - test: (node, sourceCode) => - node.type === "ExpressionStatement" && - !isDirectivePrologue(node, sourceCode) + test: node => node.type === "ExpressionStatement" && !astUtils.isDirective(node) }, iife: { test: isIIFEStatement @@ -382,10 +338,10 @@ const StatementTypes = { isBlockLikeStatement(sourceCode, node) }, "multiline-expression": { - test: (node, sourceCode) => + test: node => node.loc.start.line !== node.loc.end.line && node.type === "ExpressionStatement" && - !isDirectivePrologue(node, sourceCode) + !astUtils.isDirective(node) }, "multiline-const": newMultilineKeywordTester("const"), @@ -425,15 +381,17 @@ const StatementTypes = { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow padding lines between statements", - category: "Stylistic Issues", + description: "Require or disallow padding lines between statements", recommended: false, - url: "https://eslint.org/docs/rules/padding-line-between-statements" + url: "https://eslint.org/docs/latest/rules/padding-line-between-statements" }, fixable: "whitespace", @@ -450,8 +408,7 @@ module.exports = { type: "array", items: { enum: Object.keys(StatementTypes) }, minItems: 1, - uniqueItems: true, - additionalItems: false + uniqueItems: true } ] } @@ -466,8 +423,7 @@ module.exports = { }, additionalProperties: false, required: ["blankLine", "prev", "next"] - }, - additionalItems: false + } }, messages: { @@ -477,7 +433,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const configureList = context.options || []; let scopeInfo = null; @@ -619,9 +575,11 @@ module.exports = { Program: enterScope, BlockStatement: enterScope, SwitchStatement: enterScope, + StaticBlock: enterScope, "Program:exit": exitScope, "BlockStatement:exit": exitScope, "SwitchStatement:exit": exitScope, + "StaticBlock:exit": exitScope, ":statement": verify, diff --git a/node_modules/eslint/lib/rules/prefer-arrow-callback.js b/node_modules/eslint/lib/rules/prefer-arrow-callback.js index ee5cfe3c8..d22e508be 100644 --- a/node_modules/eslint/lib/rules/prefer-arrow-callback.js +++ b/node_modules/eslint/lib/rules/prefer-arrow-callback.js @@ -53,13 +53,14 @@ function getVariableOfArguments(scope) { } } - /* istanbul ignore next */ + /* c8 ignore next */ return null; } /** * Checks whether or not a given node is a callback. * @param {ASTNode} node A node to check. + * @throws {Error} (Unreachable.) * @returns {Object} * {boolean} retv.isCallback - `true` if the node is a callback. * {boolean} retv.isLexicalThis - `true` if the node is with `.bind(this)`. @@ -125,7 +126,7 @@ function getCallbackInfo(node) { parent = parent.parent; } - /* istanbul ignore next */ + /* c8 ignore next */ throw new Error("unreachable"); } @@ -144,15 +145,15 @@ function hasDuplicateParams(paramsList) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require using arrow functions for callbacks", - category: "ECMAScript 6", + description: "Require using arrow functions for callbacks", recommended: false, - url: "https://eslint.org/docs/rules/prefer-arrow-callback" + url: "https://eslint.org/docs/latest/rules/prefer-arrow-callback" }, schema: [ @@ -184,7 +185,7 @@ module.exports = { const allowUnboundThis = options.allowUnboundThis !== false; // default to true const allowNamedFunctions = options.allowNamedFunctions; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /* * {Array<{this: boolean, super: boolean, meta: boolean}>} @@ -262,14 +263,14 @@ module.exports = { } // Skip recursive functions. - const nameVar = context.getDeclaredVariables(node)[0]; + const nameVar = sourceCode.getDeclaredVariables(node)[0]; if (isFunctionName(nameVar) && nameVar.references.length > 0) { return; } // Skip if it's using arguments. - const variable = getVariableOfArguments(context.getScope()); + const variable = getVariableOfArguments(sourceCode.getScope(node)); if (variable && variable.references.length > 0) { return; @@ -295,7 +296,7 @@ module.exports = { * If the callback function has duplicates in its list of parameters (possible in sloppy mode), * don't replace it with an arrow function, because this is a SyntaxError with arrow functions. */ - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } // Remove `.bind(this)` if exists. @@ -307,7 +308,7 @@ module.exports = { * E.g. `(foo || function(){}).bind(this)` */ if (memberNode.type !== "MemberExpression") { - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } const callNode = memberNode.parent; @@ -320,12 +321,12 @@ module.exports = { * ^^^^^^^^^^^^ */ if (astUtils.isParenthesised(sourceCode, memberNode)) { - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } // If comments exist in the `.bind(this)`, don't remove those. if (sourceCode.commentsExistBetween(firstTokenToRemove, lastTokenToRemove)) { - return; // eslint-disable-line eslint-plugin/fixer-return -- false positive + return; } yield fixer.removeRange([firstTokenToRemove.range[0], lastTokenToRemove.range[1]]); @@ -334,6 +335,7 @@ module.exports = { // Convert the function expression to an arrow function. const functionToken = sourceCode.getFirstToken(node, node.async ? 1 : 0); const leftParenToken = sourceCode.getTokenAfter(functionToken, astUtils.isOpeningParenToken); + const tokenBeforeBody = sourceCode.getTokenBefore(node.body); if (sourceCode.commentsExistBetween(functionToken, leftParenToken)) { @@ -347,7 +349,7 @@ module.exports = { // Remove extra tokens and spaces. yield fixer.removeRange([functionToken.range[0], leftParenToken.range[0]]); } - yield fixer.insertTextBefore(node.body, "=> "); + yield fixer.insertTextAfter(tokenBeforeBody, " =>"); // Get the node that will become the new arrow function. let replacedNode = callbackInfo.isLexicalThis ? node.parent.parent : node; diff --git a/node_modules/eslint/lib/rules/prefer-const.js b/node_modules/eslint/lib/rules/prefer-const.js index f6e79e71c..b43975e9b 100644 --- a/node_modules/eslint/lib/rules/prefer-const.js +++ b/node_modules/eslint/lib/rules/prefer-const.js @@ -17,7 +17,7 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ const PATTERN_TYPE = /^(?:.+?Pattern|RestElement|SpreadProperty|ExperimentalRestProperty|Property)$/u; -const DECLARATION_HOST_TYPE = /^(?:Program|BlockStatement|SwitchCase)$/u; +const DECLARATION_HOST_TYPE = /^(?:Program|BlockStatement|StaticBlock|SwitchCase)$/u; const DESTRUCTURING_HOST_TYPE = /^(?:VariableDeclarator|AssignmentExpression)$/u; /** @@ -60,7 +60,7 @@ function canBecomeVariableDeclaration(identifier) { */ function isOuterVariableInDestructing(name, initScope) { - if (initScope.through.find(ref => ref.resolved && ref.resolved.name === name)) { + if (initScope.through.some(ref => ref.resolved && ref.resolved.name === name)) { return true; } @@ -326,15 +326,15 @@ function findUp(node, type, shouldStop) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `const` declarations for variables that are never reassigned after declared", - category: "ECMAScript 6", + description: "Require `const` declarations for variables that are never reassigned after declared", recommended: false, - url: "https://eslint.org/docs/rules/prefer-const" + url: "https://eslint.org/docs/latest/rules/prefer-const" }, fixable: "code", @@ -356,7 +356,7 @@ module.exports = { create(context) { const options = context.options[0] || {}; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const shouldMatchAnyDestructuredVariable = options.destructuring !== "all"; const ignoreReadBeforeAssign = options.ignoreReadBeforeAssign === true; const variables = []; @@ -446,7 +446,19 @@ module.exports = { reportCount += nodesToReport.length; - shouldFix = shouldFix && (reportCount === varDeclParent.declarations.length); + let totalDeclarationsCount = 0; + + varDeclParent.declarations.forEach(declaration => { + if (declaration.id.type === "ObjectPattern") { + totalDeclarationsCount += declaration.id.properties.length; + } else if (declaration.id.type === "ArrayPattern") { + totalDeclarationsCount += declaration.id.elements.length; + } else { + totalDeclarationsCount += 1; + } + }); + + shouldFix = shouldFix && (reportCount === totalDeclarationsCount); } } @@ -481,7 +493,7 @@ module.exports = { VariableDeclaration(node) { if (node.kind === "let" && !isInitOfForStatement(node)) { - variables.push(...context.getDeclaredVariables(node)); + variables.push(...sourceCode.getDeclaredVariables(node)); } } }; diff --git a/node_modules/eslint/lib/rules/prefer-destructuring.js b/node_modules/eslint/lib/rules/prefer-destructuring.js index f82bb75c1..c6075c55b 100644 --- a/node_modules/eslint/lib/rules/prefer-destructuring.js +++ b/node_modules/eslint/lib/rules/prefer-destructuring.js @@ -20,15 +20,15 @@ const PRECEDENCE_OF_ASSIGNMENT_EXPR = astUtils.getPrecedence({ type: "Assignment // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require destructuring from arrays and/or objects", - category: "ECMAScript 6", + description: "Require destructuring from arrays and/or objects", recommended: false, - url: "https://eslint.org/docs/rules/prefer-destructuring" + url: "https://eslint.org/docs/latest/rules/prefer-destructuring" }, fixable: "code", @@ -119,8 +119,8 @@ module.exports = { // Helpers //-------------------------------------------------------------------------- - // eslint-disable-next-line jsdoc/require-description /** + * Checks if destructuring type should be checked. * @param {string} nodeType "AssignmentExpression" or "VariableDeclarator" * @param {string} destructuringType "array" or "object" * @returns {boolean} `true` if the destructuring type should be checked for the given node @@ -190,7 +190,7 @@ module.exports = { */ function fixIntoObjectDestructuring(fixer, node) { const rightNode = node.init; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; // Don't fix if that would remove any comments. Only comments inside `rightNode.object` can be preserved. if (sourceCode.getCommentsInside(node).length > sourceCode.getCommentsInside(rightNode.object).length) { @@ -221,7 +221,11 @@ module.exports = { * @returns {void} */ function performCheck(leftNode, rightNode, reportNode) { - if (rightNode.type !== "MemberExpression" || rightNode.object.type === "Super") { + if ( + rightNode.type !== "MemberExpression" || + rightNode.object.type === "Super" || + rightNode.property.type === "PrivateIdentifier" + ) { return; } diff --git a/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js b/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js index 6121af889..6d807f9cf 100644 --- a/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js +++ b/node_modules/eslint/lib/rules/prefer-exponentiation-operator.js @@ -10,7 +10,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { CALL, ReferenceTracker } = require("eslint-utils"); +const { CALL, ReferenceTracker } = require("@eslint-community/eslint-utils"); //------------------------------------------------------------------------------ // Helpers @@ -55,11 +55,12 @@ function doesExponentNeedParens(exponent) { function doesExponentiationExpressionNeedParens(node, sourceCode) { const parent = node.parent.type === "ChainExpression" ? node.parent.parent : node.parent; + const parentPrecedence = astUtils.getPrecedence(parent); const needsParens = ( parent.type === "ClassDeclaration" || ( parent.type.endsWith("Expression") && - astUtils.getPrecedence(parent) >= PRECEDENCE_OF_EXPONENTIATION_EXPR && + (parentPrecedence === -1 || parentPrecedence >= PRECEDENCE_OF_EXPONENTIATION_EXPR) && !(parent.type === "BinaryExpression" && parent.operator === "**" && parent.right === node) && !((parent.type === "CallExpression" || parent.type === "NewExpression") && parent.arguments.includes(node)) && !(parent.type === "MemberExpression" && parent.computed && parent.property === node) && @@ -84,15 +85,15 @@ function parenthesizeIfShould(text, shouldParenthesize) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow the use of `Math.pow` in favor of the `**` operator", - category: "Stylistic Issues", + description: "Disallow the use of `Math.pow` in favor of the `**` operator", recommended: false, - url: "https://eslint.org/docs/rules/prefer-exponentiation-operator" + url: "https://eslint.org/docs/latest/rules/prefer-exponentiation-operator" }, schema: [], @@ -104,7 +105,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Reports the given node. @@ -172,8 +173,8 @@ module.exports = { } return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); const trackMap = { Math: { @@ -181,8 +182,8 @@ module.exports = { } }; - for (const { node } of tracker.iterateGlobalReferences(trackMap)) { - report(node); + for (const { node: refNode } of tracker.iterateGlobalReferences(trackMap)) { + report(refNode); } } }; diff --git a/node_modules/eslint/lib/rules/prefer-named-capture-group.js b/node_modules/eslint/lib/rules/prefer-named-capture-group.js index 7d0aa3f9d..a82ee1f78 100644 --- a/node_modules/eslint/lib/rules/prefer-named-capture-group.js +++ b/node_modules/eslint/lib/rules/prefer-named-capture-group.js @@ -14,8 +14,8 @@ const { CONSTRUCT, ReferenceTracker, getStringIfConstant -} = require("eslint-utils"); -const regexpp = require("regexpp"); +} = require("@eslint-community/eslint-utils"); +const regexpp = require("@eslint-community/regexpp"); //------------------------------------------------------------------------------ // Helpers @@ -23,42 +23,106 @@ const regexpp = require("regexpp"); const parser = new regexpp.RegExpParser(); +/** + * Creates fixer suggestions for the regex, if statically determinable. + * @param {number} groupStart Starting index of the regex group. + * @param {string} pattern The regular expression pattern to be checked. + * @param {string} rawText Source text of the regexNode. + * @param {ASTNode} regexNode AST node which contains the regular expression. + * @returns {Array} Fixer suggestions for the regex, if statically determinable. + */ +function suggestIfPossible(groupStart, pattern, rawText, regexNode) { + switch (regexNode.type) { + case "Literal": + if (typeof regexNode.value === "string" && rawText.includes("\\")) { + return null; + } + break; + case "TemplateLiteral": + if (regexNode.expressions.length || rawText.slice(1, -1) !== pattern) { + return null; + } + break; + default: + return null; + } + + const start = regexNode.range[0] + groupStart + 2; + + return [ + { + fix(fixer) { + const existingTemps = pattern.match(/temp\d+/gu) || []; + const highestTempCount = existingTemps.reduce( + (previous, next) => + Math.max(previous, Number(next.slice("temp".length))), + 0 + ); + + return fixer.insertTextBeforeRange( + [start, start], + `?` + ); + }, + messageId: "addGroupName" + }, + { + fix(fixer) { + return fixer.insertTextBeforeRange( + [start, start], + "?:" + ); + }, + messageId: "addNonCapture" + } + ]; +} + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce using named capture group in regular expression", - category: "Best Practices", + description: "Enforce using named capture group in regular expression", recommended: false, - url: "https://eslint.org/docs/rules/prefer-named-capture-group" + url: "https://eslint.org/docs/latest/rules/prefer-named-capture-group" }, + hasSuggestions: true, + schema: [], messages: { + addGroupName: "Add name to capture group.", + addNonCapture: "Convert group to non-capturing.", required: "Capture group '{{group}}' should be converted to a named or non-capturing group." } }, create(context) { + const sourceCode = context.sourceCode; /** * Function to check regular expression. - * @param {string} pattern The regular expression pattern to be check. - * @param {ASTNode} node AST node which contains regular expression. - * @param {boolean} uFlag Flag indicates whether unicode mode is enabled or not. + * @param {string} pattern The regular expression pattern to be checked. + * @param {ASTNode} node AST node which contains the regular expression or a call/new expression. + * @param {ASTNode} regexNode AST node which contains the regular expression. + * @param {string|null} flags The regular expression flags to be checked. * @returns {void} */ - function checkRegex(pattern, node, uFlag) { + function checkRegex(pattern, node, regexNode, flags) { let ast; try { - ast = parser.parsePattern(pattern, 0, pattern.length, uFlag); + ast = parser.parsePattern(pattern, 0, pattern.length, { + unicode: Boolean(flags && flags.includes("u")), + unicodeSets: Boolean(flags && flags.includes("v")) + }); } catch { // ignore regex syntax errors @@ -68,12 +132,16 @@ module.exports = { regexpp.visitRegExpAST(ast, { onCapturingGroupEnter(group) { if (!group.name) { + const rawText = sourceCode.getText(regexNode); + const suggest = suggestIfPossible(group.start, pattern, rawText, regexNode); + context.report({ node, messageId: "required", data: { group: group.raw - } + }, + suggest }); } } @@ -83,11 +151,11 @@ module.exports = { return { Literal(node) { if (node.regex) { - checkRegex(node.regex.pattern, node, node.regex.flags.includes("u")); + checkRegex(node.regex.pattern, node, node, node.regex.flags); } }, - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); const traceMap = { RegExp: { @@ -96,12 +164,12 @@ module.exports = { } }; - for (const { node } of tracker.iterateGlobalReferences(traceMap)) { - const regex = getStringIfConstant(node.arguments[0]); - const flags = getStringIfConstant(node.arguments[1]); + for (const { node: refNode } of tracker.iterateGlobalReferences(traceMap)) { + const regex = getStringIfConstant(refNode.arguments[0]); + const flags = getStringIfConstant(refNode.arguments[1]); if (regex) { - checkRegex(regex, node, flags && flags.includes("u")); + checkRegex(regex, refNode, refNode.arguments[0], flags); } } } diff --git a/node_modules/eslint/lib/rules/prefer-numeric-literals.js b/node_modules/eslint/lib/rules/prefer-numeric-literals.js index cc82e6653..118d6dce4 100644 --- a/node_modules/eslint/lib/rules/prefer-numeric-literals.js +++ b/node_modules/eslint/lib/rules/prefer-numeric-literals.js @@ -39,15 +39,15 @@ function isParseInt(calleeNode) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", - category: "ECMAScript 6", + description: "Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals", recommended: false, - url: "https://eslint.org/docs/rules/prefer-numeric-literals" + url: "https://eslint.org/docs/latest/rules/prefer-numeric-literals" }, schema: [], @@ -60,7 +60,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //---------------------------------------------------------------------- // Public diff --git a/node_modules/eslint/lib/rules/prefer-object-has-own.js b/node_modules/eslint/lib/rules/prefer-object-has-own.js new file mode 100644 index 000000000..97ea64fa6 --- /dev/null +++ b/node_modules/eslint/lib/rules/prefer-object-has-own.js @@ -0,0 +1,114 @@ +/** + * @fileoverview Prefers Object.hasOwn() instead of Object.prototype.hasOwnProperty.call() + * @author Nitin Kumar + * @author Gautam Arora + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +/** + * Checks if the given node is considered to be an access to a property of `Object.prototype`. + * @param {ASTNode} node `MemberExpression` node to evaluate. + * @returns {boolean} `true` if `node.object` is `Object`, `Object.prototype`, or `{}` (empty 'ObjectExpression' node). + */ +function hasLeftHandObject(node) { + + /* + * ({}).hasOwnProperty.call(obj, prop) - `true` + * ({ foo }.hasOwnProperty.call(obj, prop)) - `false`, object literal should be empty + */ + if (node.object.type === "ObjectExpression" && node.object.properties.length === 0) { + return true; + } + + const objectNodeToCheck = node.object.type === "MemberExpression" && astUtils.getStaticPropertyName(node.object) === "prototype" ? node.object.object : node.object; + + if (objectNodeToCheck.type === "Identifier" && objectNodeToCheck.name === "Object") { + return true; + } + + return false; +} + +//------------------------------------------------------------------------------ +// Rule Definition +//------------------------------------------------------------------------------ + +/** @type {import('../shared/types').Rule} */ +module.exports = { + meta: { + type: "suggestion", + docs: { + description: + "Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`", + recommended: false, + url: "https://eslint.org/docs/latest/rules/prefer-object-has-own" + }, + schema: [], + messages: { + useHasOwn: "Use 'Object.hasOwn()' instead of 'Object.prototype.hasOwnProperty.call()'." + }, + fixable: "code" + }, + create(context) { + + const sourceCode = context.sourceCode; + + return { + CallExpression(node) { + if (!(node.callee.type === "MemberExpression" && node.callee.object.type === "MemberExpression")) { + return; + } + + const calleePropertyName = astUtils.getStaticPropertyName(node.callee); + const objectPropertyName = astUtils.getStaticPropertyName(node.callee.object); + const isObject = hasLeftHandObject(node.callee.object); + + // check `Object` scope + const scope = sourceCode.getScope(node); + const variable = astUtils.getVariableByName(scope, "Object"); + + if ( + calleePropertyName === "call" && + objectPropertyName === "hasOwnProperty" && + isObject && + variable && variable.scope.type === "global" + ) { + context.report({ + node, + messageId: "useHasOwn", + fix(fixer) { + + if (sourceCode.getCommentsInside(node.callee).length > 0) { + return null; + } + + const tokenJustBeforeNode = sourceCode.getTokenBefore(node.callee, { includeComments: true }); + + // for https://github.com/eslint/eslint/pull/15346#issuecomment-991417335 + if ( + tokenJustBeforeNode && + tokenJustBeforeNode.range[1] === node.callee.range[0] && + !astUtils.canTokensBeAdjacent(tokenJustBeforeNode, "Object.hasOwn") + ) { + return fixer.replaceText(node.callee, " Object.hasOwn"); + } + + return fixer.replaceText(node.callee, "Object.hasOwn"); + } + }); + } + } + }; + } +}; diff --git a/node_modules/eslint/lib/rules/prefer-object-spread.js b/node_modules/eslint/lib/rules/prefer-object-spread.js index ab252c73a..60b0c3175 100644 --- a/node_modules/eslint/lib/rules/prefer-object-spread.js +++ b/node_modules/eslint/lib/rules/prefer-object-spread.js @@ -1,12 +1,11 @@ /** * @fileoverview Prefers object spread property over Object.assign * @author Sharmila Jesupaul - * See LICENSE file in root directory for full license. */ "use strict"; -const { CALL, ReferenceTracker } = require("eslint-utils"); +const { CALL, ReferenceTracker } = require("@eslint-community/eslint-utils"); const { isCommaToken, isOpeningParenToken, @@ -240,16 +239,16 @@ function defineFixer(node, sourceCode) { }; } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { description: - "disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.", - category: "Stylistic Issues", + "Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead", recommended: false, - url: "https://eslint.org/docs/rules/prefer-object-spread" + url: "https://eslint.org/docs/latest/rules/prefer-object-spread" }, schema: [], @@ -262,11 +261,11 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); const trackMap = { Object: { @@ -275,22 +274,22 @@ module.exports = { }; // Iterate all calls of `Object.assign` (only of the global variable `Object`). - for (const { node } of tracker.iterateGlobalReferences(trackMap)) { + for (const { node: refNode } of tracker.iterateGlobalReferences(trackMap)) { if ( - node.arguments.length >= 1 && - node.arguments[0].type === "ObjectExpression" && - !hasArraySpread(node) && + refNode.arguments.length >= 1 && + refNode.arguments[0].type === "ObjectExpression" && + !hasArraySpread(refNode) && !( - node.arguments.length > 1 && - hasArgumentsWithAccessors(node) + refNode.arguments.length > 1 && + hasArgumentsWithAccessors(refNode) ) ) { - const messageId = node.arguments.length === 1 + const messageId = refNode.arguments.length === 1 ? "useLiteralMessage" : "useSpreadMessage"; - const fix = defineFixer(node, sourceCode); + const fix = defineFixer(refNode, sourceCode); - context.report({ node, messageId, fix }); + context.report({ node: refNode, messageId, fix }); } } } diff --git a/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js b/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js index ec16e4455..e990265e9 100644 --- a/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js +++ b/node_modules/eslint/lib/rules/prefer-promise-reject-errors.js @@ -10,15 +10,15 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require using Error objects as Promise rejection reasons", - category: "Best Practices", + description: "Require using Error objects as Promise rejection reasons", recommended: false, - url: "https://eslint.org/docs/rules/prefer-promise-reject-errors" + url: "https://eslint.org/docs/latest/rules/prefer-promise-reject-errors" }, fixable: null, @@ -41,6 +41,7 @@ module.exports = { create(context) { const ALLOW_EMPTY_REJECT = context.options.length && context.options[0].allowEmptyReject; + const sourceCode = context.sourceCode; //---------------------------------------------------------------------- // Helpers @@ -100,7 +101,7 @@ module.exports = { node.arguments.length && astUtils.isFunction(node.arguments[0]) && node.arguments[0].params.length > 1 && node.arguments[0].params[1].type === "Identifier" ) { - context.getDeclaredVariables(node.arguments[0]) + sourceCode.getDeclaredVariables(node.arguments[0]) /* * Find the first variable that matches the second parameter's name. diff --git a/node_modules/eslint/lib/rules/prefer-reflect.js b/node_modules/eslint/lib/rules/prefer-reflect.js index 156d61251..d579b486b 100644 --- a/node_modules/eslint/lib/rules/prefer-reflect.js +++ b/node_modules/eslint/lib/rules/prefer-reflect.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `Reflect` methods where applicable", - category: "ECMAScript 6", + description: "Require `Reflect` methods where applicable", recommended: false, - url: "https://eslint.org/docs/rules/prefer-reflect" + url: "https://eslint.org/docs/latest/rules/prefer-reflect" }, deprecated: true, @@ -106,7 +106,7 @@ module.exports = { const methodName = (node.callee.property || {}).name; const isReflectCall = (node.callee.object || {}).name === "Reflect"; const hasReflectSubstitute = Object.prototype.hasOwnProperty.call(reflectSubstitutes, methodName); - const userConfiguredException = exceptions.indexOf(methodName) !== -1; + const userConfiguredException = exceptions.includes(methodName); if (hasReflectSubstitute && !isReflectCall && !userConfiguredException) { report(node, existingNames[methodName], reflectSubstitutes[methodName]); @@ -115,7 +115,7 @@ module.exports = { UnaryExpression(node) { const isDeleteOperator = node.operator === "delete"; const targetsIdentifier = node.argument.type === "Identifier"; - const userConfiguredException = exceptions.indexOf("delete") !== -1; + const userConfiguredException = exceptions.includes("delete"); if (isDeleteOperator && !targetsIdentifier && !userConfiguredException) { report(node, "the delete keyword", "Reflect.deleteProperty"); diff --git a/node_modules/eslint/lib/rules/prefer-regex-literals.js b/node_modules/eslint/lib/rules/prefer-regex-literals.js index 9e8ce0235..ffaaeac3f 100644 --- a/node_modules/eslint/lib/rules/prefer-regex-literals.js +++ b/node_modules/eslint/lib/rules/prefer-regex-literals.js @@ -10,7 +10,10 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const { CALL, CONSTRUCT, ReferenceTracker, findVariable } = require("eslint-utils"); +const { CALL, CONSTRUCT, ReferenceTracker, findVariable } = require("@eslint-community/eslint-utils"); +const { RegExpValidator, visitRegExpAST, RegExpParser } = require("@eslint-community/regexpp"); +const { canTokensBeAdjacent } = require("./utils/ast-utils"); +const { REGEXPP_LATEST_ECMA_VERSION } = require("./utils/regular-expressions"); //------------------------------------------------------------------------------ // Helpers @@ -34,31 +37,89 @@ function isRegexLiteral(node) { return node.type === "Literal" && Object.prototype.hasOwnProperty.call(node, "regex"); } -/** - * Determines whether the given node is a template literal without expressions. - * @param {ASTNode} node Node to check. - * @returns {boolean} True if the node is a template literal without expressions. - */ -function isStaticTemplateLiteral(node) { - return node.type === "TemplateLiteral" && node.expressions.length === 0; -} +const validPrecedingTokens = new Set([ + "(", + ";", + "[", + ",", + "=", + "+", + "*", + "-", + "?", + "~", + "%", + "**", + "!", + "typeof", + "instanceof", + "&&", + "||", + "??", + "return", + "...", + "delete", + "void", + "in", + "<", + ">", + "<=", + ">=", + "==", + "===", + "!=", + "!==", + "<<", + ">>", + ">>>", + "&", + "|", + "^", + ":", + "{", + "=>", + "*=", + "<<=", + ">>=", + ">>>=", + "^=", + "|=", + "&=", + "??=", + "||=", + "&&=", + "**=", + "+=", + "-=", + "/=", + "%=", + "/", + "do", + "break", + "continue", + "debugger", + "case", + "throw" +]); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow use of the `RegExp` constructor in favor of regular expression literals", - category: "Best Practices", + description: "Disallow use of the `RegExp` constructor in favor of regular expression literals", recommended: false, - url: "https://eslint.org/docs/rules/prefer-regex-literals" + url: "https://eslint.org/docs/latest/rules/prefer-regex-literals" }, + hasSuggestions: true, + schema: [ { type: "object", @@ -74,6 +135,9 @@ module.exports = { messages: { unexpectedRegExp: "Use a regular expression literal instead of the 'RegExp' constructor.", + replaceWithLiteral: "Replace with an equivalent regular expression literal.", + replaceWithLiteralAndFlags: "Replace with an equivalent regular expression literal with flags '{{ flags }}'.", + replaceWithIntendedLiteralAndFlags: "Replace with a regular expression literal with flags '{{ flags }}'.", unexpectedRedundantRegExp: "Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor.", unexpectedRedundantRegExpWithFlags: "Use regular expression literal with flags instead of the 'RegExp' constructor." } @@ -81,6 +145,7 @@ module.exports = { create(context) { const [{ disallowRedundantWrapping = false } = {}] = context.options; + const sourceCode = context.sourceCode; /** * Determines whether the given identifier node is a reference to a global variable. @@ -88,7 +153,7 @@ module.exports = { * @returns {boolean} True if the identifier is a reference to a global variable. */ function isGlobalReference(node) { - const scope = context.getScope(); + const scope = sourceCode.getScope(node); const variable = findVariable(scope, node); return variable !== null && variable.scope.type === "global" && variable.defs.length === 0; @@ -104,7 +169,28 @@ module.exports = { return node.type === "TaggedTemplateExpression" && astUtils.isSpecificMemberAccess(node.tag, "String", "raw") && isGlobalReference(astUtils.skipChainExpression(node.tag).object) && - isStaticTemplateLiteral(node.quasi); + astUtils.isStaticTemplateLiteral(node.quasi); + } + + /** + * Gets the value of a string + * @param {ASTNode} node The node to get the string of. + * @returns {string|null} The value of the node. + */ + function getStringValue(node) { + if (isStringLiteral(node)) { + return node.value; + } + + if (astUtils.isStaticTemplateLiteral(node)) { + return node.quasis[0].value.cooked; + } + + if (isStringRawTaggedStaticTemplateLiteral(node)) { + return node.quasi.quasis[0].value.raw; + } + + return null; } /** @@ -114,7 +200,7 @@ module.exports = { */ function isStaticString(node) { return isStringLiteral(node) || - isStaticTemplateLiteral(node) || + astUtils.isStaticTemplateLiteral(node) || isStringRawTaggedStaticTemplateLiteral(node); } @@ -152,9 +238,138 @@ module.exports = { return false; } + /** + * Returns a ecmaVersion compatible for regexpp. + * @param {number} ecmaVersion The ecmaVersion to convert. + * @returns {import("@eslint-community/regexpp/ecma-versions").EcmaVersion} The resulting ecmaVersion compatible for regexpp. + */ + function getRegexppEcmaVersion(ecmaVersion) { + if (ecmaVersion <= 5) { + return 5; + } + return Math.min(ecmaVersion, REGEXPP_LATEST_ECMA_VERSION); + } + + const regexppEcmaVersion = getRegexppEcmaVersion(context.languageOptions.ecmaVersion); + + /** + * Makes a character escaped or else returns null. + * @param {string} character The character to escape. + * @returns {string} The resulting escaped character. + */ + function resolveEscapes(character) { + switch (character) { + case "\n": + case "\\\n": + return "\\n"; + + case "\r": + case "\\\r": + return "\\r"; + + case "\t": + case "\\\t": + return "\\t"; + + case "\v": + case "\\\v": + return "\\v"; + + case "\f": + case "\\\f": + return "\\f"; + + case "/": + return "\\/"; + + default: + return null; + } + } + + /** + * Checks whether the given regex and flags are valid for the ecma version or not. + * @param {string} pattern The regex pattern to check. + * @param {string | undefined} flags The regex flags to check. + * @returns {boolean} True if the given regex pattern and flags are valid for the ecma version. + */ + function isValidRegexForEcmaVersion(pattern, flags) { + const validator = new RegExpValidator({ ecmaVersion: regexppEcmaVersion }); + + try { + validator.validatePattern(pattern, 0, pattern.length, { + unicode: flags ? flags.includes("u") : false, + unicodeSets: flags ? flags.includes("v") : false + }); + if (flags) { + validator.validateFlags(flags); + } + return true; + } catch { + return false; + } + } + + /** + * Checks whether two given regex flags contain the same flags or not. + * @param {string} flagsA The regex flags. + * @param {string} flagsB The regex flags. + * @returns {boolean} True if two regex flags contain same flags. + */ + function areFlagsEqual(flagsA, flagsB) { + return [...flagsA].sort().join("") === [...flagsB].sort().join(""); + } + + + /** + * Merges two regex flags. + * @param {string} flagsA The regex flags. + * @param {string} flagsB The regex flags. + * @returns {string} The merged regex flags. + */ + function mergeRegexFlags(flagsA, flagsB) { + const flagsSet = new Set([ + ...flagsA, + ...flagsB + ]); + + return [...flagsSet].join(""); + } + + /** + * Checks whether a give node can be fixed to the given regex pattern and flags. + * @param {ASTNode} node The node to check. + * @param {string} pattern The regex pattern to check. + * @param {string} flags The regex flags + * @returns {boolean} True if a node can be fixed to the given regex pattern and flags. + */ + function canFixTo(node, pattern, flags) { + const tokenBefore = sourceCode.getTokenBefore(node); + + return sourceCode.getCommentsInside(node).length === 0 && + (!tokenBefore || validPrecedingTokens.has(tokenBefore.value)) && + isValidRegexForEcmaVersion(pattern, flags); + } + + /** + * Returns a safe output code considering the before and after tokens. + * @param {ASTNode} node The regex node. + * @param {string} newRegExpValue The new regex expression value. + * @returns {string} The output code. + */ + function getSafeOutput(node, newRegExpValue) { + const tokenBefore = sourceCode.getTokenBefore(node); + const tokenAfter = sourceCode.getTokenAfter(node); + + return (tokenBefore && !canTokensBeAdjacent(tokenBefore, newRegExpValue) && tokenBefore.range[1] === node.range[0] ? " " : "") + + newRegExpValue + + (tokenAfter && !canTokensBeAdjacent(newRegExpValue, tokenAfter) && node.range[1] === tokenAfter.range[0] ? " " : ""); + + } + return { - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); const traceMap = { RegExp: { @@ -163,15 +378,127 @@ module.exports = { } }; - for (const { node } of tracker.iterateGlobalReferences(traceMap)) { - if (disallowRedundantWrapping && isUnnecessarilyWrappedRegexLiteral(node)) { - if (node.arguments.length === 2) { - context.report({ node, messageId: "unexpectedRedundantRegExpWithFlags" }); + for (const { node: refNode } of tracker.iterateGlobalReferences(traceMap)) { + if (disallowRedundantWrapping && isUnnecessarilyWrappedRegexLiteral(refNode)) { + const regexNode = refNode.arguments[0]; + + if (refNode.arguments.length === 2) { + const suggests = []; + + const argFlags = getStringValue(refNode.arguments[1]) || ""; + + if (canFixTo(refNode, regexNode.regex.pattern, argFlags)) { + suggests.push({ + messageId: "replaceWithLiteralAndFlags", + pattern: regexNode.regex.pattern, + flags: argFlags + }); + } + + const literalFlags = regexNode.regex.flags || ""; + const mergedFlags = mergeRegexFlags(literalFlags, argFlags); + + if ( + !areFlagsEqual(mergedFlags, argFlags) && + canFixTo(refNode, regexNode.regex.pattern, mergedFlags) + ) { + suggests.push({ + messageId: "replaceWithIntendedLiteralAndFlags", + pattern: regexNode.regex.pattern, + flags: mergedFlags + }); + } + + context.report({ + node: refNode, + messageId: "unexpectedRedundantRegExpWithFlags", + suggest: suggests.map(({ flags, pattern, messageId }) => ({ + messageId, + data: { + flags + }, + fix(fixer) { + return fixer.replaceText(refNode, getSafeOutput(refNode, `/${pattern}/${flags}`)); + } + })) + }); } else { - context.report({ node, messageId: "unexpectedRedundantRegExp" }); + const outputs = []; + + if (canFixTo(refNode, regexNode.regex.pattern, regexNode.regex.flags)) { + outputs.push(sourceCode.getText(regexNode)); + } + + + context.report({ + node: refNode, + messageId: "unexpectedRedundantRegExp", + suggest: outputs.map(output => ({ + messageId: "replaceWithLiteral", + fix(fixer) { + return fixer.replaceText( + refNode, + getSafeOutput(refNode, output) + ); + } + })) + }); + } + } else if (hasOnlyStaticStringArguments(refNode)) { + let regexContent = getStringValue(refNode.arguments[0]); + let noFix = false; + let flags; + + if (refNode.arguments[1]) { + flags = getStringValue(refNode.arguments[1]); + } + + if (!canFixTo(refNode, regexContent, flags)) { + noFix = true; } - } else if (hasOnlyStaticStringArguments(node)) { - context.report({ node, messageId: "unexpectedRegExp" }); + + if (!/^[-a-zA-Z0-9\\[\](){} \t\r\n\v\f!@#$%^&*+^_=/~`.> token.value === "+"); const textBeforePlus = getTextBetween(currentNode.left, plusSign); const textAfterPlus = getTextBetween(plusSign, currentNode.right); diff --git a/node_modules/eslint/lib/rules/quote-props.js b/node_modules/eslint/lib/rules/quote-props.js index fab7bdc9c..fe26eed77 100644 --- a/node_modules/eslint/lib/rules/quote-props.js +++ b/node_modules/eslint/lib/rules/quote-props.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag non-quoted property names in object literals. * @author Mathias Bynens + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -16,15 +17,17 @@ const keywords = require("./utils/keywords"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "require quotes around object literal property names", - category: "Stylistic Issues", + description: "Require quotes around object literal property names", recommended: false, - url: "https://eslint.org/docs/rules/quote-props" + url: "https://eslint.org/docs/latest/rules/quote-props" }, schema: { @@ -86,29 +89,29 @@ module.exports = { CHECK_UNNECESSARY = !context.options[1] || context.options[1].unnecessary !== false, NUMBERS = context.options[1] && context.options[1].numbers, - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; /** * Checks whether a certain string constitutes an ES3 token - * @param {string} tokenStr The string to be checked. + * @param {string} tokenStr The string to be checked. * @returns {boolean} `true` if it is an ES3 token. */ function isKeyword(tokenStr) { - return keywords.indexOf(tokenStr) >= 0; + return keywords.includes(tokenStr); } /** * Checks if an espree-tokenized key has redundant quotes (i.e. whether quotes are unnecessary) - * @param {string} rawKey The raw key value from the source - * @param {espreeTokens} tokens The espree-tokenized node key - * @param {boolean} [skipNumberLiterals=false] Indicates whether number literals should be checked + * @param {string} rawKey The raw key value from the source + * @param {espreeTokens} tokens The espree-tokenized node key + * @param {boolean} [skipNumberLiterals=false] Indicates whether number literals should be checked * @returns {boolean} Whether or not a key has redundant quotes. * @private */ function areQuotesRedundant(rawKey, tokens, skipNumberLiterals) { return tokens.length === 1 && tokens[0].start === 0 && tokens[0].end === rawKey.length && - (["Identifier", "Keyword", "Null", "Boolean"].indexOf(tokens[0].type) >= 0 || + (["Identifier", "Keyword", "Null", "Boolean"].includes(tokens[0].type) || (tokens[0].type === "Numeric" && !skipNumberLiterals && String(+tokens[0].value) === tokens[0].value)); } @@ -139,7 +142,7 @@ module.exports = { /** * Ensures that a property's key is quoted only when necessary - * @param {ASTNode} node Property AST node + * @param {ASTNode} node Property AST node * @returns {void} */ function checkUnnecessaryQuotes(node) { @@ -195,7 +198,7 @@ module.exports = { /** * Ensures that a property's key is quoted - * @param {ASTNode} node Property AST node + * @param {ASTNode} node Property AST node * @returns {void} */ function checkOmittedQuotes(node) { @@ -213,8 +216,8 @@ module.exports = { /** * Ensures that an object's keys are consistently quoted, optionally checks for redundancy of quotes - * @param {ASTNode} node Property AST node - * @param {boolean} checkQuotesRedundancy Whether to check quotes' redundancy + * @param {ASTNode} node Property AST node + * @param {boolean} checkQuotesRedundancy Whether to check quotes' redundancy * @returns {void} */ function checkConsistency(node, checkQuotesRedundancy) { diff --git a/node_modules/eslint/lib/rules/quotes.js b/node_modules/eslint/lib/rules/quotes.js index da7e12749..17d97dd69 100644 --- a/node_modules/eslint/lib/rules/quotes.js +++ b/node_modules/eslint/lib/rules/quotes.js @@ -1,6 +1,7 @@ /** * @fileoverview A rule to choose between single and double quote marks * @author Matt DuVall , Brandon Payton + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -74,15 +75,17 @@ const AVOID_ESCAPE = "avoid-escape"; // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce the consistent use of either backticks, double, or single quotes", - category: "Stylistic Issues", + description: "Enforce the consistent use of either backticks, double, or single quotes", recommended: false, - url: "https://eslint.org/docs/rules/quotes" + url: "https://eslint.org/docs/latest/rules/quotes" }, fixable: "code", @@ -123,7 +126,7 @@ module.exports = { settings = QUOTE_SETTINGS[quoteOption || "double"], options = context.options[1], allowTemplateLiterals = options && options.allowTemplateLiterals === true, - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; let avoidEscape = options && options.avoidEscape === true; // deprecated @@ -157,7 +160,8 @@ module.exports = { /** * Checks whether or not a given node is a directive. - * The directive is a `ExpressionStatement` which has only a string literal. + * The directive is a `ExpressionStatement` which has only a string literal not surrounded by + * parentheses. * @param {ASTNode} node A node to check. * @returns {boolean} Whether or not the node is a directive. * @private @@ -166,23 +170,23 @@ module.exports = { return ( node.type === "ExpressionStatement" && node.expression.type === "Literal" && - typeof node.expression.value === "string" + typeof node.expression.value === "string" && + !astUtils.isParenthesised(sourceCode, node.expression) ); } /** - * Checks whether or not a given node is a part of directive prologues. - * See also: http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive + * Checks whether a specified node is either part of, or immediately follows a (possibly empty) directive prologue. + * @see {@link http://www.ecma-international.org/ecma-262/6.0/#sec-directive-prologues-and-the-use-strict-directive} * @param {ASTNode} node A node to check. - * @returns {boolean} Whether or not the node is a part of directive prologues. + * @returns {boolean} Whether a specified node is either part of, or immediately follows a (possibly empty) directive prologue. * @private */ - function isPartOfDirectivePrologue(node) { - const block = node.parent.parent; - - if (block.type !== "Program" && (block.type !== "BlockStatement" || !astUtils.isFunction(block.parent))) { + function isExpressionInOrJustAfterDirectivePrologue(node) { + if (!astUtils.isTopLevelExpressionStatement(node.parent)) { return false; } + const block = node.parent.parent; // Check the node is at a prologue. for (let i = 0; i < block.body.length; ++i) { @@ -212,19 +216,31 @@ module.exports = { // Directive Prologues. case "ExpressionStatement": - return isPartOfDirectivePrologue(node); + return !astUtils.isParenthesised(sourceCode, node) && isExpressionInOrJustAfterDirectivePrologue(node); // LiteralPropertyName. case "Property": + case "PropertyDefinition": case "MethodDefinition": return parent.key === node && !parent.computed; // ModuleSpecifier. case "ImportDeclaration": case "ExportNamedDeclaration": - case "ExportAllDeclaration": return parent.source === node; + // ModuleExportName or ModuleSpecifier. + case "ExportAllDeclaration": + return parent.exported === node || parent.source === node; + + // ModuleExportName. + case "ImportSpecifier": + return parent.imported === node; + + // ModuleExportName. + case "ExportSpecifier": + return parent.local === node || parent.exported === node; + // Others don't allow. default: return false; @@ -271,7 +287,7 @@ module.exports = { astUtils.isSurroundedBy(rawVal, settings.quote); if (!isValid && avoidEscape) { - isValid = astUtils.isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.indexOf(settings.quote) >= 0; + isValid = astUtils.isSurroundedBy(rawVal, settings.alternateQuote) && rawVal.includes(settings.quote); } if (!isValid) { @@ -316,12 +332,11 @@ module.exports = { description: settings.description }, fix(fixer) { - if (isPartOfDirectivePrologue(node)) { + if (astUtils.isTopLevelExpressionStatement(node.parent) && !astUtils.isParenthesised(sourceCode, node)) { /* - * TemplateLiterals in a directive prologue aren't actually directives, but if they're - * in the directive prologue, then fixing them might turn them into directives and change - * the behavior of the code. + * TemplateLiterals aren't actually directives, but fixing them might turn + * them into directives and change the behavior of the code. */ return null; } diff --git a/node_modules/eslint/lib/rules/radix.js b/node_modules/eslint/lib/rules/radix.js index e32256623..7df97d986 100644 --- a/node_modules/eslint/lib/rules/radix.js +++ b/node_modules/eslint/lib/rules/radix.js @@ -74,17 +74,19 @@ function isDefaultRadix(radix) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce the consistent use of the radix argument when using `parseInt()`", - category: "Best Practices", + description: "Enforce the consistent use of the radix argument when using `parseInt()`", recommended: false, - url: "https://eslint.org/docs/rules/radix" + url: "https://eslint.org/docs/latest/rules/radix" }, + hasSuggestions: true, + schema: [ { enum: ["always", "as-needed"] @@ -95,12 +97,14 @@ module.exports = { missingParameters: "Missing parameters.", redundantRadix: "Redundant radix parameter.", missingRadix: "Missing radix parameter.", - invalidRadix: "Invalid radix parameter, must be an integer between 2 and 36." + invalidRadix: "Invalid radix parameter, must be an integer between 2 and 36.", + addRadixParameter10: "Add radix parameter `10` for parsing decimal numbers." } }, create(context) { const mode = context.options[0] || MODE_ALWAYS; + const sourceCode = context.sourceCode; /** * Checks the arguments of a given CallExpression node and reports it if it @@ -123,7 +127,20 @@ module.exports = { if (mode === MODE_ALWAYS) { context.report({ node, - messageId: "missingRadix" + messageId: "missingRadix", + suggest: [ + { + messageId: "addRadixParameter10", + fix(fixer) { + const tokens = sourceCode.getTokens(node); + const lastToken = tokens[tokens.length - 1]; // Parenthesis. + const secondToLastToken = tokens[tokens.length - 2]; // May or may not be a comma. + const hasTrailingComma = secondToLastToken.type === "Punctuator" && secondToLastToken.value === ","; + + return fixer.insertTextBefore(lastToken, hasTrailingComma ? " 10," : ", 10"); + } + } + ] }); } break; @@ -145,18 +162,18 @@ module.exports = { } return { - "Program:exit"() { - const scope = context.getScope(); + "Program:exit"(node) { + const scope = sourceCode.getScope(node); let variable; // Check `parseInt()` variable = astUtils.getVariableByName(scope, "parseInt"); if (variable && !isShadowed(variable)) { variable.references.forEach(reference => { - const node = reference.identifier; + const idNode = reference.identifier; - if (astUtils.isCallee(node)) { - checkArguments(node.parent); + if (astUtils.isCallee(idNode)) { + checkArguments(idNode.parent); } }); } @@ -165,12 +182,12 @@ module.exports = { variable = astUtils.getVariableByName(scope, "Number"); if (variable && !isShadowed(variable)) { variable.references.forEach(reference => { - const node = reference.identifier.parent; - const maybeCallee = node.parent.type === "ChainExpression" - ? node.parent - : node; + const parentNode = reference.identifier.parent; + const maybeCallee = parentNode.parent.type === "ChainExpression" + ? parentNode.parent + : parentNode; - if (isParseIntMethod(node) && astUtils.isCallee(maybeCallee)) { + if (isParseIntMethod(parentNode) && astUtils.isCallee(maybeCallee)) { checkArguments(maybeCallee.parent); } }); diff --git a/node_modules/eslint/lib/rules/require-atomic-updates.js b/node_modules/eslint/lib/rules/require-atomic-updates.js index c552f1bd8..7e397ceb1 100644 --- a/node_modules/eslint/lib/rules/require-atomic-updates.js +++ b/node_modules/eslint/lib/rules/require-atomic-updates.js @@ -13,6 +13,10 @@ */ function createReferenceMap(scope, outReferenceMap = new Map()) { for (const reference of scope.references) { + if (reference.resolved === null) { + continue; + } + outReferenceMap.set(reference.identifier, reference); } for (const childScope of scope.childScopes) { @@ -75,6 +79,9 @@ function isLocalVariableWithoutEscape(variable, isMemberAccess) { reference.from.variableScope === functionScope); } +/** + * Represents segment information. + */ class SegmentInfo { constructor() { this.info = new WeakMap(); @@ -86,42 +93,42 @@ class SegmentInfo { * @returns {void} */ initialize(segment) { - const outdatedReadVariableNames = new Set(); - const freshReadVariableNames = new Set(); + const outdatedReadVariables = new Set(); + const freshReadVariables = new Set(); for (const prevSegment of segment.prevSegments) { const info = this.info.get(prevSegment); if (info) { - info.outdatedReadVariableNames.forEach(Set.prototype.add, outdatedReadVariableNames); - info.freshReadVariableNames.forEach(Set.prototype.add, freshReadVariableNames); + info.outdatedReadVariables.forEach(Set.prototype.add, outdatedReadVariables); + info.freshReadVariables.forEach(Set.prototype.add, freshReadVariables); } } - this.info.set(segment, { outdatedReadVariableNames, freshReadVariableNames }); + this.info.set(segment, { outdatedReadVariables, freshReadVariables }); } /** * Mark a given variable as read on given segments. * @param {PathSegment[]} segments The segments that it read the variable on. - * @param {string} variableName The variable name to be read. + * @param {Variable} variable The variable to be read. * @returns {void} */ - markAsRead(segments, variableName) { + markAsRead(segments, variable) { for (const segment of segments) { const info = this.info.get(segment); if (info) { - info.freshReadVariableNames.add(variableName); + info.freshReadVariables.add(variable); // If a variable is freshly read again, then it's no more out-dated. - info.outdatedReadVariableNames.delete(variableName); + info.outdatedReadVariables.delete(variable); } } } /** - * Move `freshReadVariableNames` to `outdatedReadVariableNames`. + * Move `freshReadVariables` to `outdatedReadVariables`. * @param {PathSegment[]} segments The segments to process. * @returns {void} */ @@ -130,8 +137,8 @@ class SegmentInfo { const info = this.info.get(segment); if (info) { - info.freshReadVariableNames.forEach(Set.prototype.add, info.outdatedReadVariableNames); - info.freshReadVariableNames.clear(); + info.freshReadVariables.forEach(Set.prototype.add, info.outdatedReadVariables); + info.freshReadVariables.clear(); } } } @@ -139,14 +146,14 @@ class SegmentInfo { /** * Check if a given variable is outdated on the current segments. * @param {PathSegment[]} segments The current segments. - * @param {string} variableName The variable name to check. + * @param {Variable} variable The variable to check. * @returns {boolean} `true` if the variable is outdated on the segments. */ - isOutdated(segments, variableName) { + isOutdated(segments, variable) { for (const segment of segments) { const info = this.info.get(segment); - if (info && info.outdatedReadVariableNames.has(variableName)) { + if (info && info.outdatedReadVariables.has(variable)) { return true; } } @@ -158,34 +165,47 @@ class SegmentInfo { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "disallow assignments that can lead to race conditions due to usage of `await` or `yield`", - category: "Possible Errors", + description: "Disallow assignments that can lead to race conditions due to usage of `await` or `yield`", recommended: false, - url: "https://eslint.org/docs/rules/require-atomic-updates" + url: "https://eslint.org/docs/latest/rules/require-atomic-updates" }, fixable: null, - schema: [], + + schema: [{ + type: "object", + properties: { + allowProperties: { + type: "boolean", + default: false + } + }, + additionalProperties: false + }], messages: { - nonAtomicUpdate: "Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`." + nonAtomicUpdate: "Possible race condition: `{{value}}` might be reassigned based on an outdated value of `{{value}}`.", + nonAtomicObjectUpdate: "Possible race condition: `{{value}}` might be assigned based on an outdated state of `{{object}}`." } }, create(context) { - const sourceCode = context.getSourceCode(); + const allowProperties = !!context.options[0] && context.options[0].allowProperties; + + const sourceCode = context.sourceCode; const assignmentReferences = new Map(); const segmentInfo = new SegmentInfo(); let stack = null; return { - onCodePathStart(codePath) { - const scope = context.getScope(); + onCodePathStart(codePath, node) { + const scope = sourceCode.getScope(node); const shouldVerify = scope.type === "function" && (scope.block.async || scope.block.generator); @@ -193,7 +213,8 @@ module.exports = { stack = { upper: stack, codePath, - referenceMap: shouldVerify ? createReferenceMap(scope) : null + referenceMap: shouldVerify ? createReferenceMap(scope) : null, + currentSegments: new Set() }; }, onCodePathEnd() { @@ -203,25 +224,38 @@ module.exports = { // Initialize the segment information. onCodePathSegmentStart(segment) { segmentInfo.initialize(segment); + stack.currentSegments.add(segment); }, + onUnreachableCodePathSegmentStart(segment) { + stack.currentSegments.add(segment); + }, + + onUnreachableCodePathSegmentEnd(segment) { + stack.currentSegments.delete(segment); + }, + + onCodePathSegmentEnd(segment) { + stack.currentSegments.delete(segment); + }, + + // Handle references to prepare verification. Identifier(node) { - const { codePath, referenceMap } = stack; + const { referenceMap } = stack; const reference = referenceMap && referenceMap.get(node); // Ignore if this is not a valid variable reference. if (!reference) { return; } - const name = reference.identifier.name; const variable = reference.resolved; const writeExpr = getWriteExpr(reference); const isMemberAccess = reference.identifier.parent.type === "MemberExpression"; // Add a fresh read variable. if (reference.isRead() && !(writeExpr && writeExpr.parent.operator === "=")) { - segmentInfo.markAsRead(codePath.currentSegments, name); + segmentInfo.markAsRead(stack.currentSegments, variable); } /* @@ -245,19 +279,18 @@ module.exports = { /* * Verify assignments. - * If the reference exists in `outdatedReadVariableNames` list, report it. + * If the reference exists in `outdatedReadVariables` list, report it. */ ":expression:exit"(node) { - const { codePath, referenceMap } = stack; // referenceMap exists if this is in a resumable function scope. - if (!referenceMap) { + if (!stack.referenceMap) { return; } // Mark the read variables on this code path as outdated. if (node.type === "AwaitExpression" || node.type === "YieldExpression") { - segmentInfo.makeOutdated(codePath.currentSegments); + segmentInfo.makeOutdated(stack.currentSegments); } // Verify. @@ -267,16 +300,28 @@ module.exports = { assignmentReferences.delete(node); for (const reference of references) { - const name = reference.identifier.name; - - if (segmentInfo.isOutdated(codePath.currentSegments, name)) { - context.report({ - node: node.parent, - messageId: "nonAtomicUpdate", - data: { - value: sourceCode.getText(node.parent.left) - } - }); + const variable = reference.resolved; + + if (segmentInfo.isOutdated(stack.currentSegments, variable)) { + if (node.parent.left === reference.identifier) { + context.report({ + node: node.parent, + messageId: "nonAtomicUpdate", + data: { + value: variable.name + } + }); + } else if (!allowProperties) { + context.report({ + node: node.parent, + messageId: "nonAtomicObjectUpdate", + data: { + value: sourceCode.getText(node.parent.left), + object: variable.name + } + }); + } + } } } diff --git a/node_modules/eslint/lib/rules/require-await.js b/node_modules/eslint/lib/rules/require-await.js index 9b5acc78c..952dde543 100644 --- a/node_modules/eslint/lib/rules/require-await.js +++ b/node_modules/eslint/lib/rules/require-await.js @@ -28,15 +28,15 @@ function capitalizeFirstLetter(text) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "disallow async functions which have no `await` expression", - category: "Best Practices", + description: "Disallow async functions which have no `await` expression", recommended: false, - url: "https://eslint.org/docs/rules/require-await" + url: "https://eslint.org/docs/latest/rules/require-await" }, schema: [], @@ -47,7 +47,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; let scopeInfo = null; /** diff --git a/node_modules/eslint/lib/rules/require-jsdoc.js b/node_modules/eslint/lib/rules/require-jsdoc.js index e581b2bee..b6fedf228 100644 --- a/node_modules/eslint/lib/rules/require-jsdoc.js +++ b/node_modules/eslint/lib/rules/require-jsdoc.js @@ -1,18 +1,19 @@ /** * @fileoverview Rule to check for jsdoc presence. * @author Gyandeep Singh + * @deprecated in ESLint v5.10.0 */ "use strict"; +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require JSDoc comments", - category: "Stylistic Issues", + description: "Require JSDoc comments", recommended: false, - url: "https://eslint.org/docs/rules/require-jsdoc" + url: "https://eslint.org/docs/latest/rules/require-jsdoc" }, schema: [ @@ -60,7 +61,7 @@ module.exports = { }, create(context) { - const source = context.getSourceCode(); + const source = context.sourceCode; const DEFAULT_OPTIONS = { FunctionDeclaration: true, MethodDefinition: false, diff --git a/node_modules/eslint/lib/rules/require-unicode-regexp.js b/node_modules/eslint/lib/rules/require-unicode-regexp.js index 880405e9a..dd687f8d7 100644 --- a/node_modules/eslint/lib/rules/require-unicode-regexp.js +++ b/node_modules/eslint/lib/rules/require-unicode-regexp.js @@ -14,24 +14,29 @@ const { CONSTRUCT, ReferenceTracker, getStringIfConstant -} = require("eslint-utils"); +} = require("@eslint-community/eslint-utils"); +const astUtils = require("./utils/ast-utils.js"); +const { isValidWithUnicodeFlag } = require("./utils/regular-expressions"); //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce the use of `u` flag on RegExp", - category: "Best Practices", + description: "Enforce the use of `u` or `v` flag on RegExp", recommended: false, - url: "https://eslint.org/docs/rules/require-unicode-regexp" + url: "https://eslint.org/docs/latest/rules/require-unicode-regexp" }, + hasSuggestions: true, + messages: { + addUFlag: "Add the 'u' flag.", requireUFlag: "Use the 'u' flag." }, @@ -39,28 +44,83 @@ module.exports = { }, create(context) { + + const sourceCode = context.sourceCode; + return { "Literal[regex]"(node) { const flags = node.regex.flags || ""; - if (!flags.includes("u")) { - context.report({ node, messageId: "requireUFlag" }); + if (!flags.includes("u") && !flags.includes("v")) { + context.report({ + messageId: "requireUFlag", + node, + suggest: isValidWithUnicodeFlag(context.languageOptions.ecmaVersion, node.regex.pattern) + ? [ + { + fix(fixer) { + return fixer.insertTextAfter(node, "u"); + }, + messageId: "addUFlag" + } + ] + : null + }); } }, - Program() { - const scope = context.getScope(); + Program(node) { + const scope = sourceCode.getScope(node); const tracker = new ReferenceTracker(scope); const trackMap = { RegExp: { [CALL]: true, [CONSTRUCT]: true } }; - for (const { node } of tracker.iterateGlobalReferences(trackMap)) { - const flagsNode = node.arguments[1]; + for (const { node: refNode } of tracker.iterateGlobalReferences(trackMap)) { + const [patternNode, flagsNode] = refNode.arguments; + + if (patternNode && patternNode.type === "SpreadElement") { + continue; + } + const pattern = getStringIfConstant(patternNode, scope); const flags = getStringIfConstant(flagsNode, scope); - if (!flagsNode || (typeof flags === "string" && !flags.includes("u"))) { - context.report({ node, messageId: "requireUFlag" }); + if (!flagsNode || (typeof flags === "string" && !flags.includes("u") && !flags.includes("v"))) { + context.report({ + messageId: "requireUFlag", + node: refNode, + suggest: typeof pattern === "string" && isValidWithUnicodeFlag(context.languageOptions.ecmaVersion, pattern) + ? [ + { + fix(fixer) { + if (flagsNode) { + if ((flagsNode.type === "Literal" && typeof flagsNode.value === "string") || flagsNode.type === "TemplateLiteral") { + const flagsNodeText = sourceCode.getText(flagsNode); + + return fixer.replaceText(flagsNode, [ + flagsNodeText.slice(0, flagsNodeText.length - 1), + flagsNodeText.slice(flagsNodeText.length - 1) + ].join("u")); + } + + // We intentionally don't suggest concatenating + "u" to non-literals + return null; + } + + const penultimateToken = sourceCode.getLastToken(refNode, { skip: 1 }); // skip closing parenthesis + + return fixer.insertTextAfter( + penultimateToken, + astUtils.isCommaToken(penultimateToken) + ? ' "u",' + : ', "u"' + ); + }, + messageId: "addUFlag" + } + ] + : null + }); } } } diff --git a/node_modules/eslint/lib/rules/require-yield.js b/node_modules/eslint/lib/rules/require-yield.js index af2344dfa..f801af0ab 100644 --- a/node_modules/eslint/lib/rules/require-yield.js +++ b/node_modules/eslint/lib/rules/require-yield.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require generator functions to contain `yield`", - category: "ECMAScript 6", + description: "Require generator functions to contain `yield`", recommended: true, - url: "https://eslint.org/docs/rules/require-yield" + url: "https://eslint.org/docs/latest/rules/require-yield" }, schema: [], @@ -68,7 +68,6 @@ module.exports = { // Increases the count of `yield` keyword. YieldExpression() { - /* istanbul ignore else */ if (stack.length > 0) { stack[stack.length - 1] += 1; } diff --git a/node_modules/eslint/lib/rules/rest-spread-spacing.js b/node_modules/eslint/lib/rules/rest-spread-spacing.js index 8cb9814f0..287e56f01 100644 --- a/node_modules/eslint/lib/rules/rest-spread-spacing.js +++ b/node_modules/eslint/lib/rules/rest-spread-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Enforce spacing between rest and spread operators and their expressions. * @author Kai Cataldo + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce spacing between rest and spread operators and their expressions", - category: "ECMAScript 6", + description: "Enforce spacing between rest and spread operators and their expressions", recommended: false, - url: "https://eslint.org/docs/rules/rest-spread-spacing" + url: "https://eslint.org/docs/latest/rules/rest-spread-spacing" }, fixable: "whitespace", @@ -35,7 +38,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(), + const sourceCode = context.sourceCode, alwaysSpace = context.options[0] === "always"; //-------------------------------------------------------------------------- diff --git a/node_modules/eslint/lib/rules/semi-spacing.js b/node_modules/eslint/lib/rules/semi-spacing.js index 5c546f290..35a49d2c2 100644 --- a/node_modules/eslint/lib/rules/semi-spacing.js +++ b/node_modules/eslint/lib/rules/semi-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Validates spacing before and after semicolon * @author Mathias Schreck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -11,15 +12,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before and after semicolons", - category: "Stylistic Issues", + description: "Enforce consistent spacing before and after semicolons", recommended: false, - url: "https://eslint.org/docs/rules/semi-spacing" + url: "https://eslint.org/docs/latest/rules/semi-spacing" }, fixable: "whitespace", @@ -52,7 +55,7 @@ module.exports = { create(context) { const config = context.options[0], - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; let requireSpaceBefore = false, requireSpaceAfter = true; @@ -238,7 +241,8 @@ module.exports = { if (node.test) { checkSemicolonSpacing(sourceCode.getTokenAfter(node.test), node); } - } + }, + PropertyDefinition: checkNode }; } }; diff --git a/node_modules/eslint/lib/rules/semi-style.js b/node_modules/eslint/lib/rules/semi-style.js index 0c9bec4c8..caf2224df 100644 --- a/node_modules/eslint/lib/rules/semi-style.js +++ b/node_modules/eslint/lib/rules/semi-style.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce location of semicolons. * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,19 +16,18 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ -const SELECTOR = `:matches(${ - [ - "BreakStatement", "ContinueStatement", "DebuggerStatement", - "DoWhileStatement", "ExportAllDeclaration", - "ExportDefaultDeclaration", "ExportNamedDeclaration", - "ExpressionStatement", "ImportDeclaration", "ReturnStatement", - "ThrowStatement", "VariableDeclaration" - ].join(",") -})`; +const SELECTOR = [ + "BreakStatement", "ContinueStatement", "DebuggerStatement", + "DoWhileStatement", "ExportAllDeclaration", + "ExportDefaultDeclaration", "ExportNamedDeclaration", + "ExpressionStatement", "ImportDeclaration", "ReturnStatement", + "ThrowStatement", "VariableDeclaration", "PropertyDefinition" +].join(","); /** * Get the child node list of a given node. - * This returns `Program#body`, `BlockStatement#body`, or `SwitchCase#consequent`. + * This returns `BlockStatement#body`, `StaticBlock#body`, `Program#body`, + * `ClassBody#body`, or `SwitchCase#consequent`. * This is used to check whether a node is the first/last child. * @param {Node} node A node to get child node list. * @returns {Node[]|null} The child node list. @@ -35,7 +35,12 @@ const SELECTOR = `:matches(${ function getChildren(node) { const t = node.type; - if (t === "BlockStatement" || t === "Program") { + if ( + t === "BlockStatement" || + t === "StaticBlock" || + t === "Program" || + t === "ClassBody" + ) { return node.body; } if (t === "SwitchCase") { @@ -63,15 +68,17 @@ function isLastChild(node) { return nodeList !== null && nodeList[nodeList.length - 1] === node; // before `}` or etc. } +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce location of semicolons", - category: "Stylistic Issues", + description: "Enforce location of semicolons", recommended: false, - url: "https://eslint.org/docs/rules/semi-style" + url: "https://eslint.org/docs/latest/rules/semi-style" }, schema: [{ enum: ["last", "first"] }], @@ -83,7 +90,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const option = context.options[0] || "last"; /** diff --git a/node_modules/eslint/lib/rules/semi.js b/node_modules/eslint/lib/rules/semi.js index d2f067042..01586b849 100644 --- a/node_modules/eslint/lib/rules/semi.js +++ b/node_modules/eslint/lib/rules/semi.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag missing semicolons. * @author Nicholas C. Zakas + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow semicolons instead of ASI", - category: "Stylistic Issues", + description: "Require or disallow semicolons instead of ASI", recommended: false, - url: "https://eslint.org/docs/rules/semi" + url: "https://eslint.org/docs/latest/rules/semi" }, fixable: "code", @@ -58,7 +61,8 @@ module.exports = { { type: "object", properties: { - omitLastInOneLineBlock: { type: "boolean" } + omitLastInOneLineBlock: { type: "boolean" }, + omitLastInOneLineClassBody: { type: "boolean" } }, additionalProperties: false } @@ -78,11 +82,14 @@ module.exports = { create(context) { const OPT_OUT_PATTERN = /^[-[(/+`]/u; // One of [(/+-` + const unsafeClassFieldNames = new Set(["get", "set", "static"]); + const unsafeClassFieldFollowers = new Set(["*", "in", "instanceof"]); const options = context.options[1]; const never = context.options[0] === "never"; const exceptOneLine = Boolean(options && options.omitLastInOneLineBlock); + const exceptOneLineClassBody = Boolean(options && options.omitLastInOneLineClassBody); const beforeStatementContinuationChars = options && options.beforeStatementContinuationChars || "any"; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers @@ -166,6 +173,55 @@ module.exports = { ); } + /** + * Checks if a given PropertyDefinition node followed by a semicolon + * can safely remove that semicolon. It is not to safe to remove if + * the class field name is "get", "set", or "static", or if + * followed by a generator method. + * @param {ASTNode} node The node to check. + * @returns {boolean} `true` if the node cannot have the semicolon + * removed. + */ + function maybeClassFieldAsiHazard(node) { + + if (node.type !== "PropertyDefinition") { + return false; + } + + /* + * Computed property names and non-identifiers are always safe + * as they can be distinguished from keywords easily. + */ + const needsNameCheck = !node.computed && node.key.type === "Identifier"; + + /* + * Certain names are problematic unless they also have a + * a way to distinguish between keywords and property + * names. + */ + if (needsNameCheck && unsafeClassFieldNames.has(node.key.name)) { + + /* + * Special case: If the field name is `static`, + * it is only valid if the field is marked as static, + * so "static static" is okay but "static" is not. + */ + const isStaticStatic = node.static && node.key.name === "static"; + + /* + * For other unsafe names, we only care if there is no + * initializer. No initializer = hazard. + */ + if (!isStaticStatic && !node.value) { + return true; + } + } + + const followingToken = sourceCode.getTokenAfter(node); + + return unsafeClassFieldFollowers.has(followingToken.value); + } + /** * Check whether a given node is on the same line with the next token. * @param {Node} node A statement node to check. @@ -233,10 +289,19 @@ module.exports = { if (isRedundantSemi(sourceCode.getLastToken(node))) { return true; // `;;` or `;}` } + if (maybeClassFieldAsiHazard(node)) { + return false; + } if (isOnSameLineWithNextToken(node)) { return false; // One liner. } - if (beforeStatementContinuationChars === "never" && !maybeAsiHazardAfter(node)) { + + // continuation characters should not apply to class fields + if ( + node.type !== "PropertyDefinition" && + beforeStatementContinuationChars === "never" && + !maybeAsiHazardAfter(node) + ) { return true; // ASI works. This statement doesn't connect to the next. } if (!maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) { @@ -247,22 +312,52 @@ module.exports = { } /** - * Checks a node to see if it's in a one-liner block statement. + * Checks a node to see if it's the last item in a one-liner block. + * Block is any `BlockStatement` or `StaticBlock` node. Block is a one-liner if its + * braces (and consequently everything between them) are on the same line. * @param {ASTNode} node The node to check. - * @returns {boolean} whether the node is in a one-liner block statement. + * @returns {boolean} whether the node is the last item in a one-liner block. */ - function isOneLinerBlock(node) { + function isLastInOneLinerBlock(node) { const parent = node.parent; const nextToken = sourceCode.getTokenAfter(node); if (!nextToken || nextToken.value !== "}") { return false; } - return ( - !!parent && - parent.type === "BlockStatement" && - parent.loc.start.line === parent.loc.end.line - ); + + if (parent.type === "BlockStatement") { + return parent.loc.start.line === parent.loc.end.line; + } + + if (parent.type === "StaticBlock") { + const openingBrace = sourceCode.getFirstToken(parent, { skip: 1 }); // skip the `static` token + + return openingBrace.loc.start.line === parent.loc.end.line; + } + + return false; + } + + /** + * Checks a node to see if it's the last item in a one-liner `ClassBody` node. + * ClassBody is a one-liner if its braces (and consequently everything between them) are on the same line. + * @param {ASTNode} node The node to check. + * @returns {boolean} whether the node is the last item in a one-liner ClassBody. + */ + function isLastInOneLinerClassBody(node) { + const parent = node.parent; + const nextToken = sourceCode.getTokenAfter(node); + + if (!nextToken || nextToken.value !== "}") { + return false; + } + + if (parent.type === "ClassBody") { + return parent.loc.start.line === parent.loc.end.line; + } + + return false; } /** @@ -276,15 +371,21 @@ module.exports = { if (never) { if (isSemi && canRemoveSemicolon(node)) { report(node, true); - } else if (!isSemi && beforeStatementContinuationChars === "always" && maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) { + } else if ( + !isSemi && beforeStatementContinuationChars === "always" && + node.type !== "PropertyDefinition" && + maybeAsiHazardBefore(sourceCode.getTokenAfter(node)) + ) { report(node); } } else { - const oneLinerBlock = (exceptOneLine && isOneLinerBlock(node)); + const oneLinerBlock = (exceptOneLine && isLastInOneLinerBlock(node)); + const oneLinerClassBody = (exceptOneLineClassBody && isLastInOneLinerClassBody(node)); + const oneLinerBlockOrClassBody = oneLinerBlock || oneLinerClassBody; - if (isSemi && oneLinerBlock) { + if (isSemi && oneLinerBlockOrClassBody) { report(node, true); - } else if (!isSemi && !oneLinerBlock) { + } else if (!isSemi && !oneLinerBlockOrClassBody) { report(node); } } @@ -329,7 +430,8 @@ module.exports = { if (!/(?:Class|Function)Declaration/u.test(node.declaration.type)) { checkForSemicolon(node); } - } + }, + PropertyDefinition: checkForSemicolon }; } diff --git a/node_modules/eslint/lib/rules/sort-imports.js b/node_modules/eslint/lib/rules/sort-imports.js index 4c3ddec76..04814ed6f 100644 --- a/node_modules/eslint/lib/rules/sort-imports.js +++ b/node_modules/eslint/lib/rules/sort-imports.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce sorted import declarations within modules", - category: "ECMAScript 6", + description: "Enforce sorted import declarations within modules", recommended: false, - url: "https://eslint.org/docs/rules/sort-imports" + url: "https://eslint.org/docs/latest/rules/sort-imports" }, schema: [ @@ -71,7 +71,7 @@ module.exports = { ignoreMemberSort = configuration.ignoreMemberSort || false, memberSyntaxSortOrder = configuration.memberSyntaxSortOrder || ["none", "all", "multiple", "single"], allowSeparatedGroups = configuration.allowSeparatedGroups || false, - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; let previousDeclaration = null; /** diff --git a/node_modules/eslint/lib/rules/sort-keys.js b/node_modules/eslint/lib/rules/sort-keys.js index 8a95ee25d..088b5890f 100644 --- a/node_modules/eslint/lib/rules/sort-keys.js +++ b/node_modules/eslint/lib/rules/sort-keys.js @@ -75,15 +75,15 @@ const isValidOrders = { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require object keys to be sorted", - category: "Stylistic Issues", + description: "Require object keys to be sorted", recommended: false, - url: "https://eslint.org/docs/rules/sort-keys" + url: "https://eslint.org/docs/latest/rules/sort-keys" }, schema: [ @@ -105,6 +105,10 @@ module.exports = { type: "integer", minimum: 2, default: 2 + }, + allowLineSeparatedGroups: { + type: "boolean", + default: false } }, additionalProperties: false @@ -124,17 +128,21 @@ module.exports = { const insensitive = options && options.caseSensitive === false; const natural = options && options.natural; const minKeys = options && options.minKeys; + const allowLineSeparatedGroups = options && options.allowLineSeparatedGroups || false; const isValidOrder = isValidOrders[ order + (insensitive ? "I" : "") + (natural ? "N" : "") ]; // The stack to save the previous property's name for each object literals. let stack = null; + const sourceCode = context.sourceCode; return { ObjectExpression(node) { stack = { upper: stack, + prevNode: null, + prevBlankLine: false, prevName: null, numKeys: node.properties.length }; @@ -159,10 +167,45 @@ module.exports = { const numKeys = stack.numKeys; const thisName = getPropertyName(node); + // Get tokens between current node and previous node + const tokens = stack.prevNode && sourceCode + .getTokensBetween(stack.prevNode, node, { includeComments: true }); + + let isBlankLineBetweenNodes = stack.prevBlankLine; + + if (tokens) { + + // check blank line between tokens + tokens.forEach((token, index) => { + const previousToken = tokens[index - 1]; + + if (previousToken && (token.loc.start.line - previousToken.loc.end.line > 1)) { + isBlankLineBetweenNodes = true; + } + }); + + // check blank line between the current node and the last token + if (!isBlankLineBetweenNodes && (node.loc.start.line - tokens[tokens.length - 1].loc.end.line > 1)) { + isBlankLineBetweenNodes = true; + } + + // check blank line between the first token and the previous node + if (!isBlankLineBetweenNodes && (tokens[0].loc.start.line - stack.prevNode.loc.end.line > 1)) { + isBlankLineBetweenNodes = true; + } + } + + stack.prevNode = node; + if (thisName !== null) { stack.prevName = thisName; } + if (allowLineSeparatedGroups && isBlankLineBetweenNodes) { + stack.prevBlankLine = thisName === null; + return; + } + if (prevName === null || thisName === null || numKeys < minKeys) { return; } diff --git a/node_modules/eslint/lib/rules/sort-vars.js b/node_modules/eslint/lib/rules/sort-vars.js index 7add2cf74..8fd723fd4 100644 --- a/node_modules/eslint/lib/rules/sort-vars.js +++ b/node_modules/eslint/lib/rules/sort-vars.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require variables within the same declaration block to be sorted", - category: "Stylistic Issues", + description: "Require variables within the same declaration block to be sorted", recommended: false, - url: "https://eslint.org/docs/rules/sort-vars" + url: "https://eslint.org/docs/latest/rules/sort-vars" }, schema: [ @@ -44,7 +44,7 @@ module.exports = { const configuration = context.options[0] || {}, ignoreCase = configuration.ignoreCase || false, - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; return { VariableDeclaration(node) { diff --git a/node_modules/eslint/lib/rules/space-before-blocks.js b/node_modules/eslint/lib/rules/space-before-blocks.js index 87ef9bfd8..a4a5449e1 100644 --- a/node_modules/eslint/lib/rules/space-before-blocks.js +++ b/node_modules/eslint/lib/rules/space-before-blocks.js @@ -1,6 +1,7 @@ /** * @fileoverview A rule to ensure whitespace before blocks. * @author Mathias Schreck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -34,15 +35,17 @@ function isFunctionBody(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before blocks", - category: "Stylistic Issues", + description: "Enforce consistent spacing before blocks", recommended: false, - url: "https://eslint.org/docs/rules/space-before-blocks" + url: "https://eslint.org/docs/latest/rules/space-before-blocks" }, fixable: "whitespace", @@ -80,7 +83,7 @@ module.exports = { create(context) { const config = context.options[0], - sourceCode = context.getSourceCode(); + sourceCode = context.sourceCode; let alwaysFunctions = true, alwaysKeywords = true, alwaysClasses = true, @@ -108,13 +111,25 @@ module.exports = { * Checks whether the spacing before the given block is already controlled by another rule: * - `arrow-spacing` checks spaces after `=>`. * - `keyword-spacing` checks spaces after keywords in certain contexts. + * - `switch-colon-spacing` checks spaces after `:` of switch cases. * @param {Token} precedingToken first token before the block. * @param {ASTNode|Token} node `BlockStatement` node or `{` token of a `SwitchStatement` node. * @returns {boolean} `true` if requiring or disallowing spaces before the given block could produce conflicts with other rules. */ function isConflicted(precedingToken, node) { - return astUtils.isArrowToken(precedingToken) || - astUtils.isKeywordToken(precedingToken) && !isFunctionBody(node); + return ( + astUtils.isArrowToken(precedingToken) || + ( + astUtils.isKeywordToken(precedingToken) && + !isFunctionBody(node) + ) || + ( + astUtils.isColonToken(precedingToken) && + node.parent && + node.parent.type === "SwitchCase" && + precedingToken === astUtils.getSwitchCaseColonToken(node.parent, sourceCode) + ) + ); } /** diff --git a/node_modules/eslint/lib/rules/space-before-function-paren.js b/node_modules/eslint/lib/rules/space-before-function-paren.js index 1021a110c..575a1597a 100644 --- a/node_modules/eslint/lib/rules/space-before-function-paren.js +++ b/node_modules/eslint/lib/rules/space-before-function-paren.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to validate spacing before function paren. * @author Mathias Schreck + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before `function` definition opening parenthesis", - category: "Stylistic Issues", + description: "Enforce consistent spacing before `function` definition opening parenthesis", recommended: false, - url: "https://eslint.org/docs/rules/space-before-function-paren" + url: "https://eslint.org/docs/latest/rules/space-before-function-paren" }, fixable: "whitespace", @@ -59,7 +62,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const baseConfig = typeof context.options[0] === "string" ? context.options[0] : "always"; const overrideConfig = typeof context.options[0] === "object" ? context.options[0] : {}; diff --git a/node_modules/eslint/lib/rules/space-in-parens.js b/node_modules/eslint/lib/rules/space-in-parens.js index b0a604d95..d15a64317 100644 --- a/node_modules/eslint/lib/rules/space-in-parens.js +++ b/node_modules/eslint/lib/rules/space-in-parens.js @@ -1,6 +1,7 @@ /** * @fileoverview Disallows or enforces spaces inside of parentheses. * @author Jonathan Rajavuori + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,15 +11,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing inside parentheses", - category: "Stylistic Issues", + description: "Enforce consistent spacing inside parentheses", recommended: false, - url: "https://eslint.org/docs/rules/space-in-parens" + url: "https://eslint.org/docs/latest/rules/space-in-parens" }, fixable: "whitespace", @@ -102,7 +105,7 @@ module.exports = { //-------------------------------------------------------------------------- // Helpers //-------------------------------------------------------------------------- - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Determines if a token is one of the exceptions for the opener paren diff --git a/node_modules/eslint/lib/rules/space-infix-ops.js b/node_modules/eslint/lib/rules/space-infix-ops.js index 3c550984f..400710194 100644 --- a/node_modules/eslint/lib/rules/space-infix-ops.js +++ b/node_modules/eslint/lib/rules/space-infix-ops.js @@ -1,22 +1,27 @@ /** * @fileoverview Require spaces around infix operators * @author Michael Ficarra + * @deprecated in ESLint v8.53.0 */ "use strict"; +const { isEqToken } = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require spacing around infix operators", - category: "Stylistic Issues", + description: "Require spacing around infix operators", recommended: false, - url: "https://eslint.org/docs/rules/space-infix-ops" + url: "https://eslint.org/docs/latest/rules/space-infix-ops" }, fixable: "whitespace", @@ -41,7 +46,7 @@ module.exports = { create(context) { const int32Hint = context.options[0] ? context.options[0].int32Hint === true : false; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Returns the first token which violates the rule @@ -164,7 +169,29 @@ module.exports = { BinaryExpression: checkBinary, LogicalExpression: checkBinary, ConditionalExpression: checkConditional, - VariableDeclarator: checkVar + VariableDeclarator: checkVar, + + PropertyDefinition(node) { + if (!node.value) { + return; + } + + /* + * Because of computed properties and type annotations, some + * tokens may exist between `node.key` and `=`. + * Therefore, find the `=` from the right. + */ + const operatorToken = sourceCode.getTokenBefore(node.value, isEqToken); + const leftToken = sourceCode.getTokenBefore(operatorToken); + const rightToken = sourceCode.getTokenAfter(operatorToken); + + if ( + !sourceCode.isSpaceBetweenTokens(leftToken, operatorToken) || + !sourceCode.isSpaceBetweenTokens(operatorToken, rightToken) + ) { + report(node, operatorToken); + } + } }; } diff --git a/node_modules/eslint/lib/rules/space-unary-ops.js b/node_modules/eslint/lib/rules/space-unary-ops.js index 57f6e7845..aed43e724 100644 --- a/node_modules/eslint/lib/rules/space-unary-ops.js +++ b/node_modules/eslint/lib/rules/space-unary-ops.js @@ -1,6 +1,7 @@ /** * @fileoverview This rule should require or disallow spaces before or after unary operations. * @author Marcin Kumorek + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -14,15 +15,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce consistent spacing before or after unary operators", - category: "Stylistic Issues", + description: "Enforce consistent spacing before or after unary operators", recommended: false, - url: "https://eslint.org/docs/rules/space-unary-ops" + url: "https://eslint.org/docs/latest/rules/space-unary-ops" }, fixable: "whitespace", @@ -62,7 +65,7 @@ module.exports = { create(context) { const options = context.options[0] || { words: true, nonwords: false }; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; //-------------------------------------------------------------------------- // Helpers diff --git a/node_modules/eslint/lib/rules/spaced-comment.js b/node_modules/eslint/lib/rules/spaced-comment.js index d3221f0ea..90ac7032d 100644 --- a/node_modules/eslint/lib/rules/spaced-comment.js +++ b/node_modules/eslint/lib/rules/spaced-comment.js @@ -1,10 +1,11 @@ /** * @fileoverview Source code for spaced-comments rule * @author Gyandeep Singh + * @deprecated in ESLint v8.53.0 */ "use strict"; -const lodash = require("lodash"); +const escapeRegExp = require("escape-string-regexp"); const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ @@ -17,7 +18,7 @@ const astUtils = require("./utils/ast-utils"); * @returns {string} An escaped string. */ function escape(s) { - return `(?:${lodash.escapeRegExp(s)})`; + return `(?:${escapeRegExp(s)})`; } /** @@ -39,7 +40,7 @@ function escapeAndRepeat(s) { function parseMarkersOption(markers) { // `*` is a marker for JSDoc comments. - if (markers.indexOf("*") === -1) { + if (!markers.includes("*")) { return markers.concat("*"); } @@ -146,15 +147,17 @@ function createNeverStylePattern(markers) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "suggestion", docs: { - description: "enforce consistent spacing after the `//` or `/*` in a comment", - category: "Stylistic Issues", + description: "Enforce consistent spacing after the `//` or `/*` in a comment", recommended: false, - url: "https://eslint.org/docs/rules/spaced-comment" + url: "https://eslint.org/docs/latest/rules/spaced-comment" }, fixable: "whitespace", @@ -235,7 +238,7 @@ module.exports = { create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; // Unless the first option is never, require a space const requireSpace = context.options[0] !== "never"; diff --git a/node_modules/eslint/lib/rules/strict.js b/node_modules/eslint/lib/rules/strict.js index b0d6cf917..f9dd7500b 100644 --- a/node_modules/eslint/lib/rules/strict.js +++ b/node_modules/eslint/lib/rules/strict.js @@ -63,15 +63,15 @@ function isSimpleParameterList(params) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require or disallow strict mode directives", - category: "Strict Mode", + description: "Require or disallow strict mode directives", recommended: false, - url: "https://eslint.org/docs/rules/strict" + url: "https://eslint.org/docs/latest/rules/strict" }, schema: [ @@ -105,7 +105,7 @@ module.exports = { if (ecmaFeatures.impliedStrict) { mode = "implied"; } else if (mode === "safe") { - mode = ecmaFeatures.globalReturn ? "global" : "function"; + mode = ecmaFeatures.globalReturn || context.languageOptions.sourceType === "commonjs" ? "global" : "function"; } /** diff --git a/node_modules/eslint/lib/rules/switch-colon-spacing.js b/node_modules/eslint/lib/rules/switch-colon-spacing.js index c90641573..3ea63ca0e 100644 --- a/node_modules/eslint/lib/rules/switch-colon-spacing.js +++ b/node_modules/eslint/lib/rules/switch-colon-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce spacing around colons of switch statements. * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "enforce spacing around colons of switch statements", - category: "Stylistic Issues", + description: "Enforce spacing around colons of switch statements", recommended: false, - url: "https://eslint.org/docs/rules/switch-colon-spacing" + url: "https://eslint.org/docs/latest/rules/switch-colon-spacing" }, schema: [ @@ -46,23 +49,11 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const options = context.options[0] || {}; const beforeSpacing = options.before === true; // false by default const afterSpacing = options.after !== false; // true by default - /** - * Get the colon token of the given SwitchCase node. - * @param {ASTNode} node The SwitchCase node to get. - * @returns {Token} The colon token of the node. - */ - function getColonToken(node) { - if (node.test) { - return sourceCode.getTokenAfter(node.test, astUtils.isColonToken); - } - return sourceCode.getFirstToken(node, 1); - } - /** * Check whether the spacing between the given 2 tokens is valid or not. * @param {Token} left The left token to check. @@ -115,7 +106,7 @@ module.exports = { return { SwitchCase(node) { - const colonToken = getColonToken(node); + const colonToken = astUtils.getSwitchCaseColonToken(node, sourceCode); const beforeToken = sourceCode.getTokenBefore(colonToken); const afterToken = sourceCode.getTokenAfter(colonToken); diff --git a/node_modules/eslint/lib/rules/symbol-description.js b/node_modules/eslint/lib/rules/symbol-description.js index 155cea4dc..4528f09cf 100644 --- a/node_modules/eslint/lib/rules/symbol-description.js +++ b/node_modules/eslint/lib/rules/symbol-description.js @@ -16,15 +16,15 @@ const astUtils = require("./utils/ast-utils"); //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require symbol descriptions", - category: "ECMAScript 6", + description: "Require symbol descriptions", recommended: false, - url: "https://eslint.org/docs/rules/symbol-description" + url: "https://eslint.org/docs/latest/rules/symbol-description" }, fixable: null, schema: [], @@ -35,6 +35,8 @@ module.exports = { create(context) { + const sourceCode = context.sourceCode; + /** * Reports if node does not conform the rule in case rule is set to * report missing description @@ -51,16 +53,16 @@ module.exports = { } return { - "Program:exit"() { - const scope = context.getScope(); + "Program:exit"(node) { + const scope = sourceCode.getScope(node); const variable = astUtils.getVariableByName(scope, "Symbol"); if (variable && variable.defs.length === 0) { variable.references.forEach(reference => { - const node = reference.identifier; + const idNode = reference.identifier; - if (astUtils.isCallee(node)) { - checkArgument(node.parent); + if (astUtils.isCallee(idNode)) { + checkArgument(idNode.parent); } }); } diff --git a/node_modules/eslint/lib/rules/template-curly-spacing.js b/node_modules/eslint/lib/rules/template-curly-spacing.js index 26043bc91..1f8cc34c1 100644 --- a/node_modules/eslint/lib/rules/template-curly-spacing.js +++ b/node_modules/eslint/lib/rules/template-curly-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to enforce spacing around embedded expressions of template strings * @author Toru Nagashima + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -15,15 +16,17 @@ const astUtils = require("./utils/ast-utils"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow spacing around embedded expressions of template strings", - category: "ECMAScript 6", + description: "Require or disallow spacing around embedded expressions of template strings", recommended: false, - url: "https://eslint.org/docs/rules/template-curly-spacing" + url: "https://eslint.org/docs/latest/rules/template-curly-spacing" }, fixable: "whitespace", @@ -40,7 +43,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const always = context.options[0] === "always"; /** diff --git a/node_modules/eslint/lib/rules/template-tag-spacing.js b/node_modules/eslint/lib/rules/template-tag-spacing.js index 16f586255..52e0bcf20 100644 --- a/node_modules/eslint/lib/rules/template-tag-spacing.js +++ b/node_modules/eslint/lib/rules/template-tag-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to check spacing between template tags and their literals * @author Jonathan Wilsson + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow spacing between template tags and their literals", - category: "Stylistic Issues", + description: "Require or disallow spacing between template tags and their literals", recommended: false, - url: "https://eslint.org/docs/rules/template-tag-spacing" + url: "https://eslint.org/docs/latest/rules/template-tag-spacing" }, fixable: "whitespace", @@ -33,7 +36,7 @@ module.exports = { create(context) { const never = context.options[0] !== "always"; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Check if a space is present between a template tag and its literal diff --git a/node_modules/eslint/lib/rules/unicode-bom.js b/node_modules/eslint/lib/rules/unicode-bom.js index 39642f851..09971d26e 100644 --- a/node_modules/eslint/lib/rules/unicode-bom.js +++ b/node_modules/eslint/lib/rules/unicode-bom.js @@ -8,15 +8,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "layout", docs: { - description: "require or disallow Unicode byte order mark (BOM)", - category: "Stylistic Issues", + description: "Require or disallow Unicode byte order mark (BOM)", recommended: false, - url: "https://eslint.org/docs/rules/unicode-bom" + url: "https://eslint.org/docs/latest/rules/unicode-bom" }, fixable: "whitespace", @@ -42,7 +42,7 @@ module.exports = { Program: function checkUnicodeBOM(node) { - const sourceCode = context.getSourceCode(), + const sourceCode = context.sourceCode, location = { column: 0, line: 1 }, requireBOM = context.options[0] || "never"; diff --git a/node_modules/eslint/lib/rules/use-isnan.js b/node_modules/eslint/lib/rules/use-isnan.js index 0c7e888c9..21dc39529 100644 --- a/node_modules/eslint/lib/rules/use-isnan.js +++ b/node_modules/eslint/lib/rules/use-isnan.js @@ -21,22 +21,25 @@ const astUtils = require("./utils/ast-utils"); * @returns {boolean} `true` if the node is 'NaN' identifier. */ function isNaNIdentifier(node) { - return Boolean(node) && node.type === "Identifier" && node.name === "NaN"; + return Boolean(node) && ( + astUtils.isSpecificId(node, "NaN") || + astUtils.isSpecificMemberAccess(node, "Number", "NaN") + ); } //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "require calls to `isNaN()` when checking for `NaN`", - category: "Possible Errors", + description: "Require calls to `isNaN()` when checking for `NaN`", recommended: true, - url: "https://eslint.org/docs/rules/use-isnan" + url: "https://eslint.org/docs/latest/rules/use-isnan" }, schema: [ diff --git a/node_modules/eslint/lib/rules/utils/ast-utils.js b/node_modules/eslint/lib/rules/utils/ast-utils.js index 679eebb4c..962bdde0a 100644 --- a/node_modules/eslint/lib/rules/utils/ast-utils.js +++ b/node_modules/eslint/lib/rules/utils/ast-utils.js @@ -9,9 +9,10 @@ // Requirements //------------------------------------------------------------------------------ +const { KEYS: eslintVisitorKeys } = require("eslint-visitor-keys"); const esutils = require("esutils"); const espree = require("espree"); -const lodash = require("lodash"); +const escapeRegExp = require("escape-string-regexp"); const { breakableTypePattern, createGlobalLinebreakMatcher, @@ -25,17 +26,18 @@ const { const anyFunctionPattern = /^(?:Function(?:Declaration|Expression)|ArrowFunctionExpression)$/u; const anyLoopPattern = /^(?:DoWhile|For|ForIn|ForOf|While)Statement$/u; +const arrayMethodWithThisArgPattern = /^(?:every|filter|find(?:Last)?(?:Index)?|flatMap|forEach|map|some)$/u; const arrayOrTypedArrayPattern = /Array$/u; -const arrayMethodPattern = /^(?:every|filter|find|findIndex|forEach|map|some)$/u; const bindOrCallOrApplyPattern = /^(?:bind|call|apply)$/u; const thisTagPattern = /^[\s*]*@this/mu; const COMMENTS_IGNORE_PATTERN = /^\s*(?:eslint|jshint\s+|jslint\s+|istanbul\s+|globals?\s+|exported\s+|jscs)/u; +const ESLINT_DIRECTIVE_PATTERN = /^(?:eslint[- ]|(?:globals?|exported) )/u; const LINEBREAKS = new Set(["\r\n", "\r", "\n", "\u2028", "\u2029"]); // A set of node types that can contain a list of statements -const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "SwitchCase"]); +const STATEMENT_LIST_PARENTS = new Set(["Program", "BlockStatement", "StaticBlock", "SwitchCase"]); const DECIMAL_INTEGER_PATTERN = /^(?:0|0[0-7]*[89]\d*|[1-9](?:_?\d)*)$/u; @@ -266,6 +268,7 @@ function getStaticPropertyName(node) { return getStaticPropertyName(node.expression); case "Property": + case "PropertyDefinition": case "MethodDefinition": prop = node.key; break; @@ -407,6 +410,7 @@ function isSameReference(left, right, disableStaticComputedKey = false) { return true; case "Identifier": + case "PrivateIdentifier": return left.name === right.name; case "Literal": return equalLiteralValue(left, right); @@ -463,12 +467,12 @@ function isArrayFromMethod(node) { } /** - * Checks whether or not a node is a method which has `thisArg`. + * Checks whether or not a node is a method which expects a function as a first argument, and `thisArg` as a second argument. * @param {ASTNode} node A node to check. - * @returns {boolean} Whether or not the node is a method which has `thisArg`. + * @returns {boolean} Whether or not the node is a method which expects a function as a first argument, and `thisArg` as a second argument. */ function isMethodWhichHasThisArg(node) { - return isSpecificMemberAccess(node, null, arrayMethodPattern); + return isSpecificMemberAccess(node, null, arrayMethodWithThisArgPattern); } /** @@ -516,6 +520,15 @@ function isParenthesised(sourceCode, node) { nextToken.value === ")" && nextToken.range[0] >= node.range[1]; } +/** + * Checks if the given token is a `=` token or not. + * @param {Token} token The token to check. + * @returns {boolean} `true` if the token is a `=` token. + */ +function isEqToken(token) { + return token.value === "=" && token.type === "Punctuator"; +} + /** * Checks if the given token is an arrow token or not. * @param {Token} token The token to check. @@ -649,6 +662,16 @@ function isKeywordToken(token) { * @returns {Token} `(` token. */ function getOpeningParenOfParams(node, sourceCode) { + + // If the node is an arrow function and doesn't have parens, this returns the identifier of the first param. + if (node.type === "ArrowFunctionExpression" && node.params.length === 1) { + const argToken = sourceCode.getFirstToken(node.params[0]); + const maybeParenToken = sourceCode.getTokenBefore(argToken); + + return isOpeningParenToken(maybeParenToken) ? maybeParenToken : argToken; + } + + // Otherwise, returns paren. return node.id ? sourceCode.getTokenAfter(node.id, isOpeningParenToken) : sourceCode.getFirstToken(node, isOpeningParenToken); @@ -735,6 +758,371 @@ function isLogicalAssignmentOperator(operator) { return LOGICAL_ASSIGNMENT_OPERATORS.has(operator); } +/** + * Get the colon token of the given SwitchCase node. + * @param {ASTNode} node The SwitchCase node to get. + * @param {SourceCode} sourceCode The source code object to get tokens. + * @returns {Token} The colon token of the node. + */ +function getSwitchCaseColonToken(node, sourceCode) { + if (node.test) { + return sourceCode.getTokenAfter(node.test, isColonToken); + } + return sourceCode.getFirstToken(node, 1); +} + +/** + * Gets ESM module export name represented by the given node. + * @param {ASTNode} node `Identifier` or string `Literal` node in a position + * that represents a module export name: + * - `ImportSpecifier#imported` + * - `ExportSpecifier#local` (if it is a re-export from another module) + * - `ExportSpecifier#exported` + * - `ExportAllDeclaration#exported` + * @returns {string} The module export name. + */ +function getModuleExportName(node) { + if (node.type === "Identifier") { + return node.name; + } + + // string literal + return node.value; +} + +/** + * Returns literal's value converted to the Boolean type + * @param {ASTNode} node any `Literal` node + * @returns {boolean | null} `true` when node is truthy, `false` when node is falsy, + * `null` when it cannot be determined. + */ +function getBooleanValue(node) { + if (node.value === null) { + + /* + * it might be a null literal or bigint/regex literal in unsupported environments . + * https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es5.md#regexpliteral + * https://github.com/estree/estree/blob/14df8a024956ea289bd55b9c2226a1d5b8a473ee/es2020.md#bigintliteral + */ + + if (node.raw === "null") { + return false; + } + + // regex is always truthy + if (typeof node.regex === "object") { + return true; + } + + return null; + } + + return !!node.value; +} + +/** + * Checks if a branch node of LogicalExpression short circuits the whole condition + * @param {ASTNode} node The branch of main condition which needs to be checked + * @param {string} operator The operator of the main LogicalExpression. + * @returns {boolean} true when condition short circuits whole condition + */ +function isLogicalIdentity(node, operator) { + switch (node.type) { + case "Literal": + return (operator === "||" && getBooleanValue(node) === true) || + (operator === "&&" && getBooleanValue(node) === false); + + case "UnaryExpression": + return (operator === "&&" && node.operator === "void"); + + case "LogicalExpression": + + /* + * handles `a && false || b` + * `false` is an identity element of `&&` but not `||` + */ + return operator === node.operator && + ( + isLogicalIdentity(node.left, operator) || + isLogicalIdentity(node.right, operator) + ); + + case "AssignmentExpression": + return ["||=", "&&="].includes(node.operator) && + operator === node.operator.slice(0, -1) && + isLogicalIdentity(node.right, operator); + + // no default + } + return false; +} + +/** + * Checks if an identifier is a reference to a global variable. + * @param {Scope} scope The scope in which the identifier is referenced. + * @param {ASTNode} node An identifier node to check. + * @returns {boolean} `true` if the identifier is a reference to a global variable. + */ +function isReferenceToGlobalVariable(scope, node) { + const reference = scope.references.find(ref => ref.identifier === node); + + return Boolean( + reference && + reference.resolved && + reference.resolved.scope.type === "global" && + reference.resolved.defs.length === 0 + ); +} + + +/** + * Checks if a node has a constant truthiness value. + * @param {Scope} scope Scope in which the node appears. + * @param {ASTNode} node The AST node to check. + * @param {boolean} inBooleanPosition `true` if checking the test of a + * condition. `false` in all other cases. When `false`, checks if -- for + * both string and number -- if coerced to that type, the value will + * be constant. + * @returns {boolean} true when node's truthiness is constant + * @private + */ +function isConstant(scope, node, inBooleanPosition) { + + // node.elements can return null values in the case of sparse arrays ex. [,] + if (!node) { + return true; + } + switch (node.type) { + case "Literal": + case "ArrowFunctionExpression": + case "FunctionExpression": + return true; + case "ClassExpression": + case "ObjectExpression": + + /** + * In theory objects like: + * + * `{toString: () => a}` + * `{valueOf: () => a}` + * + * Or a classes like: + * + * `class { static toString() { return a } }` + * `class { static valueOf() { return a } }` + * + * Are not constant verifiably when `inBooleanPosition` is + * false, but it's an edge case we've opted not to handle. + */ + return true; + case "TemplateLiteral": + return (inBooleanPosition && node.quasis.some(quasi => quasi.value.cooked.length)) || + node.expressions.every(exp => isConstant(scope, exp, false)); + + case "ArrayExpression": { + if (!inBooleanPosition) { + return node.elements.every(element => isConstant(scope, element, false)); + } + return true; + } + + case "UnaryExpression": + if ( + node.operator === "void" || + node.operator === "typeof" && inBooleanPosition + ) { + return true; + } + + if (node.operator === "!") { + return isConstant(scope, node.argument, true); + } + + return isConstant(scope, node.argument, false); + + case "BinaryExpression": + return isConstant(scope, node.left, false) && + isConstant(scope, node.right, false) && + node.operator !== "in"; + + case "LogicalExpression": { + const isLeftConstant = isConstant(scope, node.left, inBooleanPosition); + const isRightConstant = isConstant(scope, node.right, inBooleanPosition); + const isLeftShortCircuit = (isLeftConstant && isLogicalIdentity(node.left, node.operator)); + const isRightShortCircuit = (inBooleanPosition && isRightConstant && isLogicalIdentity(node.right, node.operator)); + + return (isLeftConstant && isRightConstant) || + isLeftShortCircuit || + isRightShortCircuit; + } + case "NewExpression": + return inBooleanPosition; + case "AssignmentExpression": + if (node.operator === "=") { + return isConstant(scope, node.right, inBooleanPosition); + } + + if (["||=", "&&="].includes(node.operator) && inBooleanPosition) { + return isLogicalIdentity(node.right, node.operator.slice(0, -1)); + } + + return false; + + case "SequenceExpression": + return isConstant(scope, node.expressions[node.expressions.length - 1], inBooleanPosition); + case "SpreadElement": + return isConstant(scope, node.argument, inBooleanPosition); + case "CallExpression": + if (node.callee.type === "Identifier" && node.callee.name === "Boolean") { + if (node.arguments.length === 0 || isConstant(scope, node.arguments[0], true)) { + return isReferenceToGlobalVariable(scope, node.callee); + } + } + return false; + case "Identifier": + return node.name === "undefined" && isReferenceToGlobalVariable(scope, node); + + // no default + } + return false; +} + +/** + * Checks whether a node is an ExpressionStatement at the top level of a file or function body. + * A top-level ExpressionStatement node is a directive if it contains a single unparenthesized + * string literal and if it occurs either as the first sibling or immediately after another + * directive. + * @param {ASTNode} node The node to check. + * @returns {boolean} Whether or not the node is an ExpressionStatement at the top level of a + * file or function body. + */ +function isTopLevelExpressionStatement(node) { + if (node.type !== "ExpressionStatement") { + return false; + } + const parent = node.parent; + + return parent.type === "Program" || (parent.type === "BlockStatement" && isFunction(parent.parent)); + +} + +/** + * Check whether the given node is a part of a directive prologue or not. + * @param {ASTNode} node The node to check. + * @returns {boolean} `true` if the node is a part of directive prologue. + */ +function isDirective(node) { + return node.type === "ExpressionStatement" && typeof node.directive === "string"; +} + +/** + * Tests if a node appears at the beginning of an ancestor ExpressionStatement node. + * @param {ASTNode} node The node to check. + * @returns {boolean} Whether the node appears at the beginning of an ancestor ExpressionStatement node. + */ +function isStartOfExpressionStatement(node) { + const start = node.range[0]; + let ancestor = node; + + while ((ancestor = ancestor.parent) && ancestor.range[0] === start) { + if (ancestor.type === "ExpressionStatement") { + return true; + } + } + return false; +} + +/** + * Determines whether an opening parenthesis `(`, bracket `[` or backtick ``` ` ``` needs to be preceded by a semicolon. + * This opening parenthesis or bracket should be at the start of an `ExpressionStatement` or at the start of the body of an `ArrowFunctionExpression`. + * @type {(sourceCode: SourceCode, node: ASTNode) => boolean} + * @param {SourceCode} sourceCode The source code object. + * @param {ASTNode} node A node at the position where an opening parenthesis or bracket will be inserted. + * @returns {boolean} Whether a semicolon is required before the opening parenthesis or braket. + */ +let needsPrecedingSemicolon; + +{ + const BREAK_OR_CONTINUE = new Set(["BreakStatement", "ContinueStatement"]); + + // Declaration types that must contain a string Literal node at the end. + const DECLARATIONS = new Set(["ExportAllDeclaration", "ExportNamedDeclaration", "ImportDeclaration"]); + + const IDENTIFIER_OR_KEYWORD = new Set(["Identifier", "Keyword"]); + + // Keywords that can immediately precede an ExpressionStatement node, mapped to the their node types. + const NODE_TYPES_BY_KEYWORD = { + __proto__: null, + break: "BreakStatement", + continue: "ContinueStatement", + debugger: "DebuggerStatement", + do: "DoWhileStatement", + else: "IfStatement", + return: "ReturnStatement", + yield: "YieldExpression" + }; + + /* + * Before an opening parenthesis, postfix `++` and `--` always trigger ASI; + * the tokens `:`, `;`, `{` and `=>` don't expect a semicolon, as that would count as an empty statement. + */ + const PUNCTUATORS = new Set([":", ";", "{", "=>", "++", "--"]); + + /* + * Statements that can contain an `ExpressionStatement` after a closing parenthesis. + * DoWhileStatement is an exception in that it always triggers ASI after the closing parenthesis. + */ + const STATEMENTS = new Set([ + "DoWhileStatement", + "ForInStatement", + "ForOfStatement", + "ForStatement", + "IfStatement", + "WhileStatement", + "WithStatement" + ]); + + needsPrecedingSemicolon = + function(sourceCode, node) { + const prevToken = sourceCode.getTokenBefore(node); + + if (!prevToken || prevToken.type === "Punctuator" && PUNCTUATORS.has(prevToken.value)) { + return false; + } + + const prevNode = sourceCode.getNodeByRangeIndex(prevToken.range[0]); + + if (isClosingParenToken(prevToken)) { + return !STATEMENTS.has(prevNode.type); + } + + if (isClosingBraceToken(prevToken)) { + return ( + prevNode.type === "BlockStatement" && prevNode.parent.type === "FunctionExpression" || + prevNode.type === "ClassBody" && prevNode.parent.type === "ClassExpression" || + prevNode.type === "ObjectExpression" + ); + } + + if (IDENTIFIER_OR_KEYWORD.has(prevToken.type)) { + if (BREAK_OR_CONTINUE.has(prevNode.parent.type)) { + return false; + } + + const keyword = prevToken.value; + const nodeType = NODE_TYPES_BY_KEYWORD[keyword]; + + return prevNode.type !== nodeType; + } + + if (prevToken.type === "String") { + return !DECLARATIONS.has(prevNode.parent.type); + } + + return true; + }; +} + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -794,6 +1182,7 @@ module.exports = { isOpeningBracketToken, isOpeningParenToken, isSemicolonToken, + isEqToken, /** * Checks whether or not a given node is a string literal. @@ -836,8 +1225,8 @@ module.exports = { /** * Validate that a string passed in is surrounded by the specified character - * @param {string} val The text to check. - * @param {string} character The character to see if it's surrounded by. + * @param {string} val The text to check. + * @param {string} character The character to see if it's surrounded by. * @returns {boolean} True if the text is surrounded by the character, false if not. * @private */ @@ -854,12 +1243,8 @@ module.exports = { const comment = node.value.trim(); return ( - node.type === "Line" && comment.indexOf("eslint-") === 0 || - node.type === "Block" && ( - comment.indexOf("global ") === 0 || - comment.indexOf("eslint ") === 0 || - comment.indexOf("eslint-") === 0 - ) + node.type === "Line" && comment.startsWith("eslint-") || + node.type === "Block" && ESLINT_DIRECTIVE_PATTERN.test(comment) ); }, @@ -902,6 +1287,8 @@ module.exports = { * * First, this checks the node: * + * - The given node is not in `PropertyDefinition#value` position. + * - The given node is not `StaticBlock`. * - The function name does not start with uppercase. It's a convention to capitalize the names * of constructor functions. This check is not performed if `capIsConstructor` is set to `false`. * - The function does not have a JSDoc comment that has a @this tag. @@ -916,13 +1303,29 @@ module.exports = { * - The location is not on an ES2015 class. * - Its `bind`/`call`/`apply` method is not called directly. * - The function is not a callback of array methods (such as `.forEach()`) if `thisArg` is given. - * @param {ASTNode} node A function node to check. + * @param {ASTNode} node A function node to check. It also can be an implicit function, like `StaticBlock` + * or any expression that is `PropertyDefinition#value` node. * @param {SourceCode} sourceCode A SourceCode instance to get comments. * @param {boolean} [capIsConstructor = true] `false` disables the assumption that functions which name starts * with an uppercase or are assigned to a variable which name starts with an uppercase are constructors. * @returns {boolean} The function node is the default `this` binding. */ isDefaultThisBinding(node, sourceCode, { capIsConstructor = true } = {}) { + + /* + * Class field initializers are implicit functions, but ESTree doesn't have the AST node of field initializers. + * Therefore, A expression node at `PropertyDefinition#value` is a function. + * In this case, `this` is always not default binding. + */ + if (node.parent.type === "PropertyDefinition" && node.parent.value === node) { + return false; + } + + // Class static blocks are implicit functions. In this case, `this` is always not default binding. + if (node.type === "StaticBlock") { + return false; + } + if ( (capIsConstructor && isES5Constructor(node)) || hasJSDocThisTag(node, sourceCode) @@ -983,8 +1386,10 @@ module.exports = { * class A { get foo() { ... } } * class A { set foo() { ... } } * class A { static foo() { ... } } + * class A { foo = function() { ... } } */ case "Property": + case "PropertyDefinition": case "MethodDefinition": return parent.value !== currentNode; @@ -1082,7 +1487,7 @@ module.exports = { } } - /* istanbul ignore next */ + /* c8 ignore next */ return true; }, @@ -1174,7 +1579,16 @@ module.exports = { return 19; default: - return 20; + if (node.type in eslintVisitorKeys) { + return 20; + } + + /* + * if the node is not a standard node that we know about, then assume it has the lowest precedence + * this will mean that rules will wrap unknown nodes in parentheses where applicable instead of + * unwrapping them and potentially changing the meaning of the code or introducing a syntax error. + */ + return -1; } }, @@ -1233,7 +1647,6 @@ module.exports = { return directives; }, - /** * Determines whether this node is a decimal integer literal. If a node is a decimal integer literal, a dot added * after the node will be parsed as a decimal point, rather than a property-access dot. @@ -1261,7 +1674,8 @@ module.exports = { * 5e1_000 // false * 5n // false * 1_000n // false - * '5' // false + * "5" // false + * */ isDecimalInteger(node) { return node.type === "Literal" && typeof node.value === "number" && @@ -1323,6 +1737,16 @@ module.exports = { * - `class A { static async foo() {} }` .... `static async method 'foo'` * - `class A { static get foo() {} }` ...... `static getter 'foo'` * - `class A { static set foo(a) {} }` ..... `static setter 'foo'` + * - `class A { foo = () => {}; }` .......... `method 'foo'` + * - `class A { foo = function() {}; }` ..... `method 'foo'` + * - `class A { foo = function bar() {}; }` . `method 'foo'` + * - `class A { static foo = () => {}; }` ... `static method 'foo'` + * - `class A { '#foo' = () => {}; }` ....... `method '#foo'` + * - `class A { #foo = () => {}; }` ......... `private method #foo` + * - `class A { static #foo = () => {}; }` .. `static private method #foo` + * - `class A { '#foo'() {} }` .............. `method '#foo'` + * - `class A { #foo() {} }` ................ `private method #foo` + * - `class A { static #foo() {} }` ......... `static private method #foo` * @param {ASTNode} node The function node to get. * @returns {string} The name and kind of the function node. */ @@ -1330,8 +1754,15 @@ module.exports = { const parent = node.parent; const tokens = []; - if (parent.type === "MethodDefinition" && parent.static) { - tokens.push("static"); + if (parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") { + + // The proposal uses `static` word consistently before visibility words: https://github.com/tc39/proposal-static-class-features + if (parent.static) { + tokens.push("static"); + } + if (!parent.computed && parent.key.type === "PrivateIdentifier") { + tokens.push("private"); + } } if (node.async) { tokens.push("async"); @@ -1340,9 +1771,7 @@ module.exports = { tokens.push("generator"); } - if (node.type === "ArrowFunctionExpression") { - tokens.push("arrow", "function"); - } else if (parent.type === "Property" || parent.type === "MethodDefinition") { + if (parent.type === "Property" || parent.type === "MethodDefinition") { if (parent.kind === "constructor") { return "constructor"; } @@ -1353,18 +1782,29 @@ module.exports = { } else { tokens.push("method"); } + } else if (parent.type === "PropertyDefinition") { + tokens.push("method"); } else { + if (node.type === "ArrowFunctionExpression") { + tokens.push("arrow"); + } tokens.push("function"); } - if (node.id) { - tokens.push(`'${node.id.name}'`); - } else { - const name = getStaticPropertyName(parent); + if (parent.type === "Property" || parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") { + if (!parent.computed && parent.key.type === "PrivateIdentifier") { + tokens.push(`#${parent.key.name}`); + } else { + const name = getStaticPropertyName(parent); - if (name !== null) { - tokens.push(`'${name}'`); + if (name !== null) { + tokens.push(`'${name}'`); + } else if (node.id) { + tokens.push(`'${node.id.name}'`); + } } + } else if (node.id) { + tokens.push(`'${node.id.name}'`); } return tokens.join(" "); @@ -1457,6 +1897,12 @@ module.exports = { * ^^^^^^^^^^^^^^ * - `class A { static set foo(a) {} }` * ^^^^^^^^^^^^^^ + * - `class A { foo = function() {} }` + * ^^^^^^^^^^^^^^ + * - `class A { static foo = function() {} }` + * ^^^^^^^^^^^^^^^^^^^^^ + * - `class A { foo = (a, b) => {} }` + * ^^^^^^ * @param {ASTNode} node The function node to get. * @param {SourceCode} sourceCode The source code object to get tokens. * @returns {string} The location of the function node for reporting. @@ -1466,14 +1912,14 @@ module.exports = { let start = null; let end = null; - if (node.type === "ArrowFunctionExpression") { + if (parent.type === "Property" || parent.type === "MethodDefinition" || parent.type === "PropertyDefinition") { + start = parent.loc.start; + end = getOpeningParenOfParams(node, sourceCode).loc.start; + } else if (node.type === "ArrowFunctionExpression") { const arrowToken = sourceCode.getTokenBefore(node.body, isArrowToken); start = arrowToken.loc.start; end = arrowToken.loc.end; - } else if (parent.type === "Property" || parent.type === "MethodDefinition") { - start = parent.loc.start; - end = getOpeningParenOfParams(node, sourceCode).loc.start; } else { start = node.loc.start; end = getOpeningParenOfParams(node, sourceCode).loc.start; @@ -1573,9 +2019,9 @@ module.exports = { return sourceCode.getText().slice(leftToken.range[0], rightToken.range[1]); }, - /* + /** * Determine if a node has a possibility to be an Error object - * @param {ASTNode} node ASTNode to check + * @param {ASTNode} node ASTNode to check * @returns {boolean} True if there is a chance it contains an Error obj */ couldBeError(node) { @@ -1677,7 +2123,7 @@ module.exports = { if (comments.length) { const lastComment = comments[comments.length - 1]; - if (lastComment.range[0] > leftToken.range[0]) { + if (!leftToken || lastComment.range[0] > leftToken.range[0]) { leftToken = lastComment; } } @@ -1685,7 +2131,13 @@ module.exports = { leftToken = leftValue; } - if (leftToken.type === "Shebang") { + /* + * If a hashbang comment was passed as a token object from SourceCode, + * its type will be "Shebang" because of the way ESLint itself handles hashbangs. + * If a hashbang comment was passed in a string and then tokenized in this function, + * its type will be "Hashbang" because of the way Espree tokenizes hashbangs. + */ + if (leftToken.type === "Shebang" || leftToken.type === "Hashbang") { return false; } @@ -1706,7 +2158,7 @@ module.exports = { if (comments.length) { const firstComment = comments[0]; - if (firstComment.range[0] < rightToken.range[0]) { + if (!rightToken || firstComment.range[0] < rightToken.range[0]) { rightToken = firstComment; } } @@ -1745,6 +2197,10 @@ module.exports = { return true; } + if (rightToken.type === "PrivateIdentifier") { + return true; + } + return false; }, @@ -1756,7 +2212,7 @@ module.exports = { * @returns {SourceLocation} The `loc` object. */ getNameLocationInGlobalDirectiveComment(sourceCode, comment, name) { - const namePattern = new RegExp(`[\\s,]${lodash.escapeRegExp(name)}(?:$|[\\s,:])`, "gu"); + const namePattern = new RegExp(`[\\s,]${escapeRegExp(name)}(?:$|[\\s,:])`, "gu"); // To ignore the first text "global". namePattern.lastIndex = comment.value.indexOf("global") + 6; @@ -1794,6 +2250,16 @@ module.exports = { return OCTAL_OR_NON_OCTAL_DECIMAL_ESCAPE_PATTERN.test(rawString); }, + /** + * Determines whether the given node is a template literal without expressions. + * @param {ASTNode} node Node to check. + * @returns {boolean} True if the node is a template literal without expressions. + */ + isStaticTemplateLiteral(node) { + return node.type === "TemplateLiteral" && node.expressions.length === 0; + }, + + isReferenceToGlobalVariable, isLogicalExpression, isCoalesceExpression, isMixedLogicalAndCoalesceExpressions, @@ -1805,5 +2271,12 @@ module.exports = { isSpecificMemberAccess, equalLiteralValue, isSameReference, - isLogicalAssignmentOperator + isLogicalAssignmentOperator, + getSwitchCaseColonToken, + getModuleExportName, + isConstant, + isTopLevelExpressionStatement, + isDirective, + isStartOfExpressionStatement, + needsPrecedingSemicolon }; diff --git a/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js b/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js index d426d85c5..7f116a268 100644 --- a/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js +++ b/node_modules/eslint/lib/rules/utils/lazy-loading-rule-map.js @@ -14,10 +14,10 @@ const debug = require("debug")("eslint:rules"); * const rules = new LazyLoadingRuleMap([ * ["eqeqeq", () => require("eqeqeq")], * ["semi", () => require("semi")], - * ["no-unused-vars", () => require("no-unused-vars")], - * ]) + * ["no-unused-vars", () => require("no-unused-vars")] + * ]); * - * rules.get("semi") // call `() => require("semi")` here. + * rules.get("semi"); // call `() => require("semi")` here. * * @extends {Map Rule>} */ diff --git a/node_modules/eslint/lib/rules/utils/regular-expressions.js b/node_modules/eslint/lib/rules/utils/regular-expressions.js new file mode 100644 index 000000000..12e544e37 --- /dev/null +++ b/node_modules/eslint/lib/rules/utils/regular-expressions.js @@ -0,0 +1,42 @@ +/** + * @fileoverview Common utils for regular expressions. + * @author Josh Goldberg + * @author Toru Nagashima + */ + +"use strict"; + +const { RegExpValidator } = require("@eslint-community/regexpp"); + +const REGEXPP_LATEST_ECMA_VERSION = 2024; + +/** + * Checks if the given regular expression pattern would be valid with the `u` flag. + * @param {number} ecmaVersion ECMAScript version to parse in. + * @param {string} pattern The regular expression pattern to verify. + * @returns {boolean} `true` if the pattern would be valid with the `u` flag. + * `false` if the pattern would be invalid with the `u` flag or the configured + * ecmaVersion doesn't support the `u` flag. + */ +function isValidWithUnicodeFlag(ecmaVersion, pattern) { + if (ecmaVersion <= 5) { // ecmaVersion <= 5 doesn't support the 'u' flag + return false; + } + + const validator = new RegExpValidator({ + ecmaVersion: Math.min(ecmaVersion, REGEXPP_LATEST_ECMA_VERSION) + }); + + try { + validator.validatePattern(pattern, void 0, void 0, { unicode: /* uFlag = */ true }); + } catch { + return false; + } + + return true; +} + +module.exports = { + isValidWithUnicodeFlag, + REGEXPP_LATEST_ECMA_VERSION +}; diff --git a/node_modules/eslint/lib/rules/valid-jsdoc.js b/node_modules/eslint/lib/rules/valid-jsdoc.js index 9ec6938e3..919975fe1 100644 --- a/node_modules/eslint/lib/rules/valid-jsdoc.js +++ b/node_modules/eslint/lib/rules/valid-jsdoc.js @@ -1,6 +1,7 @@ /** * @fileoverview Validates JSDoc comments are syntactically correct * @author Nicholas C. Zakas + * @deprecated in ESLint v5.10.0 */ "use strict"; @@ -14,15 +15,15 @@ const doctrine = require("doctrine"); // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "enforce valid JSDoc comments", - category: "Possible Errors", + description: "Enforce valid JSDoc comments", recommended: false, - url: "https://eslint.org/docs/rules/valid-jsdoc" + url: "https://eslint.org/docs/latest/rules/valid-jsdoc" }, schema: [ @@ -95,7 +96,7 @@ module.exports = { const options = context.options[0] || {}, prefer = options.prefer || {}, - sourceCode = context.getSourceCode(), + sourceCode = context.sourceCode, // these both default to true, so you have to explicitly make them false requireReturn = options.requireReturn !== false, @@ -404,7 +405,7 @@ module.exports = { loc: getAbsoluteRange(jsdocNode, param), data: { name: param.name } }); - } else if (param.name.indexOf(".") === -1) { + } else if (!param.name.includes(".")) { paramTagsByName[param.name] = param; } }); diff --git a/node_modules/eslint/lib/rules/valid-typeof.js b/node_modules/eslint/lib/rules/valid-typeof.js index a0f20f74d..3818dafea 100644 --- a/node_modules/eslint/lib/rules/valid-typeof.js +++ b/node_modules/eslint/lib/rules/valid-typeof.js @@ -4,21 +4,29 @@ */ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const astUtils = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "problem", docs: { - description: "enforce comparing `typeof` expressions against valid strings", - category: "Possible Errors", + description: "Enforce comparing `typeof` expressions against valid strings", recommended: true, - url: "https://eslint.org/docs/rules/valid-typeof" + url: "https://eslint.org/docs/latest/rules/valid-typeof" }, + hasSuggestions: true, + schema: [ { type: "object", @@ -33,17 +41,33 @@ module.exports = { ], messages: { invalidValue: "Invalid typeof comparison value.", - notString: "Typeof comparisons should be to string literals." + notString: "Typeof comparisons should be to string literals.", + suggestString: 'Use `"{{type}}"` instead of `{{type}}`.' } }, create(context) { - const VALID_TYPES = ["symbol", "undefined", "object", "boolean", "number", "string", "function", "bigint"], - OPERATORS = ["==", "===", "!=", "!=="]; - + const VALID_TYPES = new Set(["symbol", "undefined", "object", "boolean", "number", "string", "function", "bigint"]), + OPERATORS = new Set(["==", "===", "!=", "!=="]); + const sourceCode = context.sourceCode; const requireStringLiterals = context.options[0] && context.options[0].requireStringLiterals; + let globalScope; + + /** + * Checks whether the given node represents a reference to a global variable that is not declared in the source code. + * These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables. + * @param {ASTNode} node `Identifier` node to check. + * @returns {boolean} `true` if the node is a reference to a global variable. + */ + function isReferenceToGlobalVariable(node) { + const variable = globalScope.set.get(node.name); + + return variable && variable.defs.length === 0 && + variable.references.some(ref => ref.identifier === node); + } + /** * Determines whether a node is a typeof expression. * @param {ASTNode} node The node @@ -59,19 +83,37 @@ module.exports = { return { + Program(node) { + globalScope = sourceCode.getScope(node); + }, + UnaryExpression(node) { if (isTypeofExpression(node)) { - const parent = context.getAncestors().pop(); + const { parent } = node; - if (parent.type === "BinaryExpression" && OPERATORS.indexOf(parent.operator) !== -1) { + if (parent.type === "BinaryExpression" && OPERATORS.has(parent.operator)) { const sibling = parent.left === node ? parent.right : parent.left; - if (sibling.type === "Literal" || sibling.type === "TemplateLiteral" && !sibling.expressions.length) { + if (sibling.type === "Literal" || astUtils.isStaticTemplateLiteral(sibling)) { const value = sibling.type === "Literal" ? sibling.value : sibling.quasis[0].value.cooked; - if (VALID_TYPES.indexOf(value) === -1) { + if (!VALID_TYPES.has(value)) { context.report({ node: sibling, messageId: "invalidValue" }); } + } else if (sibling.type === "Identifier" && sibling.name === "undefined" && isReferenceToGlobalVariable(sibling)) { + context.report({ + node: sibling, + messageId: requireStringLiterals ? "notString" : "invalidValue", + suggest: [ + { + messageId: "suggestString", + data: { type: "undefined" }, + fix(fixer) { + return fixer.replaceText(sibling, '"undefined"'); + } + } + ] + }); } else if (requireStringLiterals && !isTypeofExpression(sibling)) { context.report({ node: sibling, messageId: "notString" }); } diff --git a/node_modules/eslint/lib/rules/vars-on-top.js b/node_modules/eslint/lib/rules/vars-on-top.js index 28ddae442..81f5d62d0 100644 --- a/node_modules/eslint/lib/rules/vars-on-top.js +++ b/node_modules/eslint/lib/rules/vars-on-top.js @@ -9,15 +9,15 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: "require `var` declarations be placed at the top of their containing scope", - category: "Best Practices", + description: "Require `var` declarations be placed at the top of their containing scope", recommended: false, - url: "https://eslint.org/docs/rules/vars-on-top" + url: "https://eslint.org/docs/latest/rules/vars-on-top" }, schema: [], @@ -32,8 +32,8 @@ module.exports = { // Helpers //-------------------------------------------------------------------------- - // eslint-disable-next-line jsdoc/require-description /** + * Has AST suggesting a directive. * @param {ASTNode} node any node * @returns {boolean} whether the given node structurally represents a directive */ @@ -78,10 +78,12 @@ module.exports = { const l = statements.length; let i = 0; - // skip over directives - for (; i < l; ++i) { - if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) { - break; + // Skip over directives and imports. Static blocks don't have either. + if (node.parent.type !== "StaticBlock") { + for (; i < l; ++i) { + if (!looksLikeDirective(statements[i]) && !looksLikeImport(statements[i])) { + break; + } } } @@ -112,16 +114,27 @@ module.exports = { /** * Checks whether variable is on top at functional block scope level * @param {ASTNode} node The node to check - * @param {ASTNode} parent Parent of the node - * @param {ASTNode} grandParent Parent of the node's parent * @returns {void} */ - function blockScopeVarCheck(node, parent, grandParent) { - if (!(/Function/u.test(grandParent.type) && - parent.type === "BlockStatement" && - isVarOnTop(node, parent.body))) { - context.report({ node, messageId: "top" }); + function blockScopeVarCheck(node) { + const { parent } = node; + + if ( + parent.type === "BlockStatement" && + /Function/u.test(parent.parent.type) && + isVarOnTop(node, parent.body) + ) { + return; } + + if ( + parent.type === "StaticBlock" && + isVarOnTop(node, parent.body) + ) { + return; + } + + context.report({ node, messageId: "top" }); } //-------------------------------------------------------------------------- @@ -135,7 +148,7 @@ module.exports = { } else if (node.parent.type === "Program") { globalVarCheck(node, node.parent); } else { - blockScopeVarCheck(node, node.parent, node.parent.parent); + blockScopeVarCheck(node); } } }; diff --git a/node_modules/eslint/lib/rules/wrap-iife.js b/node_modules/eslint/lib/rules/wrap-iife.js index 07e5b84a4..518071067 100644 --- a/node_modules/eslint/lib/rules/wrap-iife.js +++ b/node_modules/eslint/lib/rules/wrap-iife.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag when IIFE is not wrapped in parens * @author Ilya Volodin + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -10,7 +11,7 @@ //------------------------------------------------------------------------------ const astUtils = require("./utils/ast-utils"); -const eslintUtils = require("eslint-utils"); +const eslintUtils = require("@eslint-community/eslint-utils"); //---------------------------------------------------------------------- // Helpers @@ -37,15 +38,17 @@ function isCalleeOfNewExpression(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require parentheses around immediate `function` invocations", - category: "Best Practices", + description: "Require parentheses around immediate `function` invocations", recommended: false, - url: "https://eslint.org/docs/rules/wrap-iife" + url: "https://eslint.org/docs/latest/rules/wrap-iife" }, schema: [ @@ -77,7 +80,7 @@ module.exports = { const style = context.options[0] || "outside"; const includeFunctionPrototypeMethods = context.options[1] && context.options[1].functionPrototypeMethods; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Check if the node is wrapped in any (). All parens count: grouping parens and parens for constructs such as if() diff --git a/node_modules/eslint/lib/rules/wrap-regex.js b/node_modules/eslint/lib/rules/wrap-regex.js index 4ecbcecbb..9e2808d60 100644 --- a/node_modules/eslint/lib/rules/wrap-regex.js +++ b/node_modules/eslint/lib/rules/wrap-regex.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to flag when regex literals are not wrapped in parens * @author Matt DuVall + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require parenthesis around regex literals", - category: "Stylistic Issues", + description: "Require parenthesis around regex literals", recommended: false, - url: "https://eslint.org/docs/rules/wrap-regex" + url: "https://eslint.org/docs/latest/rules/wrap-regex" }, schema: [], @@ -29,7 +32,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; return { @@ -40,10 +43,9 @@ module.exports = { if (nodeType === "RegularExpression") { const beforeToken = sourceCode.getTokenBefore(node); const afterToken = sourceCode.getTokenAfter(node); - const ancestors = context.getAncestors(); - const grandparent = ancestors[ancestors.length - 1]; + const { parent } = node; - if (grandparent.type === "MemberExpression" && grandparent.object === node && + if (parent.type === "MemberExpression" && parent.object === node && !(beforeToken && beforeToken.value === "(" && afterToken && afterToken.value === ")")) { context.report({ node, diff --git a/node_modules/eslint/lib/rules/yield-star-spacing.js b/node_modules/eslint/lib/rules/yield-star-spacing.js index 20b8e9ea9..9a67b78d2 100644 --- a/node_modules/eslint/lib/rules/yield-star-spacing.js +++ b/node_modules/eslint/lib/rules/yield-star-spacing.js @@ -1,6 +1,7 @@ /** * @fileoverview Rule to check the spacing around the * in yield* expressions. * @author Bryan Smith + * @deprecated in ESLint v8.53.0 */ "use strict"; @@ -9,15 +10,17 @@ // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { + deprecated: true, + replacedBy: [], type: "layout", docs: { - description: "require or disallow spacing around the `*` in `yield*` expressions", - category: "ECMAScript 6", + description: "Require or disallow spacing around the `*` in `yield*` expressions", recommended: false, - url: "https://eslint.org/docs/rules/yield-star-spacing" + url: "https://eslint.org/docs/latest/rules/yield-star-spacing" }, fixable: "whitespace", @@ -48,7 +51,7 @@ module.exports = { }, create(context) { - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; const mode = (function(option) { if (!option || typeof option === "string") { diff --git a/node_modules/eslint/lib/rules/yoda.js b/node_modules/eslint/lib/rules/yoda.js index 2fca75711..af8f52518 100644 --- a/node_modules/eslint/lib/rules/yoda.js +++ b/node_modules/eslint/lib/rules/yoda.js @@ -39,7 +39,7 @@ function isEqualityOperator(operator) { * @returns {boolean} Whether the operator is used in range tests. */ function isRangeTestOperator(operator) { - return ["<", "<="].indexOf(operator) >= 0; + return ["<", "<="].includes(operator); } /** @@ -58,22 +58,13 @@ function isNegativeNumericLiteral(node) { ); } -/** - * Determines whether a node is a Template Literal which can be determined statically. - * @param {ASTNode} node Node to test - * @returns {boolean} True if the node is a Template Literal without expression. - */ -function isStaticTemplateLiteral(node) { - return node.type === "TemplateLiteral" && node.expressions.length === 0; -} - /** * Determines whether a non-Literal node should be treated as a single Literal node. * @param {ASTNode} node Node to test * @returns {boolean} True if the node should be treated as a single Literal node. */ function looksLikeLiteral(node) { - return isNegativeNumericLiteral(node) || isStaticTemplateLiteral(node); + return isNegativeNumericLiteral(node) || astUtils.isStaticTemplateLiteral(node); } /** @@ -100,7 +91,7 @@ function getNormalizedLiteral(node) { }; } - if (isStaticTemplateLiteral(node)) { + if (astUtils.isStaticTemplateLiteral(node)) { return { type: "Literal", value: node.quasis[0].value.cooked, @@ -115,15 +106,15 @@ function getNormalizedLiteral(node) { // Rule Definition //------------------------------------------------------------------------------ +/** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { - description: 'require or disallow "Yoda" conditions', - category: "Best Practices", + description: 'Require or disallow "Yoda" conditions', recommended: false, - url: "https://eslint.org/docs/rules/yoda" + url: "https://eslint.org/docs/latest/rules/yoda" }, schema: [ @@ -162,7 +153,7 @@ module.exports = { const onlyEquality = context.options[1] && context.options[1].onlyEquality; - const sourceCode = context.getSourceCode(); + const sourceCode = context.sourceCode; /** * Determines whether node represents a range test. @@ -343,7 +334,7 @@ module.exports = { ) && !(!isEqualityOperator(node.operator) && onlyEquality) && isComparisonOperator(node.operator) && - !(exceptRange && isRangeTest(context.getAncestors().pop())) + !(exceptRange && isRangeTest(node.parent)) ) { context.report({ node, diff --git a/node_modules/eslint/lib/shared/ajv.js b/node_modules/eslint/lib/shared/ajv.js index 3fb0fbdd3..f4f6a6218 100644 --- a/node_modules/eslint/lib/shared/ajv.js +++ b/node_modules/eslint/lib/shared/ajv.js @@ -27,7 +27,7 @@ module.exports = (additionalOptions = {}) => { }); ajv.addMetaSchema(metaSchema); - // eslint-disable-next-line no-underscore-dangle + // eslint-disable-next-line no-underscore-dangle -- Ajv's API ajv._opts.defaultMeta = metaSchema.id; return ajv; diff --git a/node_modules/eslint/lib/shared/config-validator.js b/node_modules/eslint/lib/shared/config-validator.js index 03b32f1c9..47353ac48 100644 --- a/node_modules/eslint/lib/shared/config-validator.js +++ b/node_modules/eslint/lib/shared/config-validator.js @@ -24,9 +24,13 @@ const util = require("util"), configSchema = require("../../conf/config-schema"), - BuiltInEnvironments = require("@eslint/eslintrc/conf/environments"), BuiltInRules = require("../rules"), - ConfigOps = require("@eslint/eslintrc/lib/shared/config-ops"), + { + Legacy: { + ConfigOps, + environments: BuiltInEnvironments + } + } = require("@eslint/eslintrc"), { emitDeprecationWarning } = require("./deprecation-warnings"); const ajv = require("./ajv")(); @@ -80,6 +84,7 @@ function getRuleOptionsSchema(rule) { /** * Validates a rule's severity and returns the severity value. Throws an error if the severity is invalid. * @param {options} options The given options for the rule. + * @throws {Error} Wrong severity value. * @returns {number|string} The rule's severity value */ function validateRuleSeverity(options) { @@ -98,6 +103,7 @@ function validateRuleSeverity(options) { * Validates the non-severity options passed to a rule, based on its schema. * @param {{create: Function}} rule The rule to validate * @param {Array} localOptions The options for the rule, excluding severity + * @throws {Error} Any rule validation errors. * @returns {void} */ function validateRuleSchema(rule, localOptions) { @@ -128,6 +134,7 @@ function validateRuleSchema(rule, localOptions) { * @param {Array|number} options The given options for the rule. * @param {string|null} source The name of the configuration source to report in any errors. If null or undefined, * no source is prepended to the message. + * @throws {Error} Upon any bad rule configuration. * @returns {void} */ function validateRuleOptions(rule, ruleId, options, source = null) { @@ -152,7 +159,7 @@ function validateRuleOptions(rule, ruleId, options, source = null) { * Validates an environment object * @param {Object} environment The environment config object to validate. * @param {string} source The name of the configuration source to report in any errors. - * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded environments. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded environments. * @returns {void} */ function validateEnvironment( @@ -181,7 +188,7 @@ function validateEnvironment( * Validates a rules config object * @param {Object} rulesConfig The rules config object to validate. * @param {string} source The name of the configuration source to report in any errors. - * @param {function(ruleId:string): Object} getAdditionalRule A map from strings to loaded rules + * @param {(ruleId:string) => Object} getAdditionalRule A map from strings to loaded rules * @returns {void} */ function validateRules( @@ -225,7 +232,8 @@ function validateGlobals(globalsConfig, source = null) { * Validate `processor` configuration. * @param {string|undefined} processorName The processor name. * @param {string} source The name of config file. - * @param {function(id:string): Processor} getProcessor The getter of defined processors. + * @param {(id:string) => Processor} getProcessor The getter of defined processors. + * @throws {Error} For invalid processor configuration. * @returns {void} */ function validateProcessor(processorName, source, getProcessor) { @@ -264,6 +272,7 @@ function formatErrors(errors) { * Validates the top level properties of the config object. * @param {Object} config The config object to validate. * @param {string} source The name of the configuration source to report in any errors. + * @throws {Error} For any config invalid per the schema. * @returns {void} */ function validateConfigSchema(config, source = null) { @@ -282,8 +291,8 @@ function validateConfigSchema(config, source = null) { * Validates an entire config object. * @param {Object} config The config object to validate. * @param {string} source The name of the configuration source to report in any errors. - * @param {function(ruleId:string): Object} [getAdditionalRule] A map from strings to loaded rules. - * @param {function(envId:string): Object} [getAdditionalEnv] A map from strings to loaded envs. + * @param {(ruleId:string) => Object} [getAdditionalRule] A map from strings to loaded rules. + * @param {(envId:string) => Object} [getAdditionalEnv] A map from strings to loaded envs. * @returns {void} */ function validate(config, source, getAdditionalRule, getAdditionalEnv) { diff --git a/node_modules/eslint/lib/shared/deprecation-warnings.js b/node_modules/eslint/lib/shared/deprecation-warnings.js index 1438eaa69..d09cafb07 100644 --- a/node_modules/eslint/lib/shared/deprecation-warnings.js +++ b/node_modules/eslint/lib/shared/deprecation-warnings.js @@ -9,7 +9,6 @@ //------------------------------------------------------------------------------ const path = require("path"); -const lodash = require("lodash"); //------------------------------------------------------------------------------ // Private @@ -18,16 +17,11 @@ const lodash = require("lodash"); // Definitions for deprecation warnings. const deprecationWarningMessages = { ESLINT_LEGACY_ECMAFEATURES: - "The 'ecmaFeatures' config file property is deprecated and has no effect.", - ESLINT_PERSONAL_CONFIG_LOAD: - "'~/.eslintrc.*' config files have been deprecated. " + - "Please use a config file per project or the '--config' option.", - ESLINT_PERSONAL_CONFIG_SUPPRESS: - "'~/.eslintrc.*' config files have been deprecated. " + - "Please remove it or add 'root:true' to the config files in your " + - "projects in order to avoid loading '~/.eslintrc.*' accidentally." + "The 'ecmaFeatures' config file property is deprecated and has no effect." }; +const sourceFileErrorCache = new Set(); + /** * Emits a deprecation warning containing a given filepath. A new deprecation warning is emitted * for each unique file path, but repeated invocations with the same file path have no effect. @@ -36,7 +30,15 @@ const deprecationWarningMessages = { * @param {string} errorCode The warning message to show. * @returns {void} */ -const emitDeprecationWarning = lodash.memoize((source, errorCode) => { +function emitDeprecationWarning(source, errorCode) { + const cacheKey = JSON.stringify({ source, errorCode }); + + if (sourceFileErrorCache.has(cacheKey)) { + return; + } + + sourceFileErrorCache.add(cacheKey); + const rel = path.relative(process.cwd(), source); const message = deprecationWarningMessages[errorCode]; @@ -45,7 +47,7 @@ const emitDeprecationWarning = lodash.memoize((source, errorCode) => { "DeprecationWarning", errorCode ); -}, (...args) => JSON.stringify(args)); +} //------------------------------------------------------------------------------ // Public Interface diff --git a/node_modules/eslint/lib/shared/directives.js b/node_modules/eslint/lib/shared/directives.js new file mode 100644 index 000000000..ff67b00a5 --- /dev/null +++ b/node_modules/eslint/lib/shared/directives.js @@ -0,0 +1,15 @@ +/** + * @fileoverview Common utils for directives. + * + * This file contains only shared items for directives. + * If you make a utility for rules, please see `../rules/utils/ast-utils.js`. + * + * @author gfyoung + */ +"use strict"; + +const directivesPattern = /^(eslint(?:-env|-enable|-disable(?:(?:-next)?-line)?)?|exported|globals?)(?:\s|$)/u; + +module.exports = { + directivesPattern +}; diff --git a/node_modules/eslint/lib/shared/logging.js b/node_modules/eslint/lib/shared/logging.js index 6aa1f5a1e..fd5e8a648 100644 --- a/node_modules/eslint/lib/shared/logging.js +++ b/node_modules/eslint/lib/shared/logging.js @@ -5,9 +5,9 @@ "use strict"; -/* eslint no-console: "off" */ +/* eslint no-console: "off" -- Logging util */ -/* istanbul ignore next */ +/* c8 ignore next */ module.exports = { /** diff --git a/node_modules/eslint/lib/shared/relative-module-resolver.js b/node_modules/eslint/lib/shared/relative-module-resolver.js index cd743f379..18a694983 100644 --- a/node_modules/eslint/lib/shared/relative-module-resolver.js +++ b/node_modules/eslint/lib/shared/relative-module-resolver.js @@ -17,14 +17,7 @@ "use strict"; -const Module = require("module"); - -/* - * `Module.createRequire` is added in v12.2.0. It supports URL as well. - * We only support the case where the argument is a filepath, not a URL. - */ -// eslint-disable-next-line node/no-unsupported-features/node-builtins, node/no-deprecated-api -const createRequire = Module.createRequire || Module.createRequireFromPath; +const { createRequire } = require("module"); module.exports = { @@ -33,6 +26,7 @@ module.exports = { * @param {string} moduleName The name of a Node module, or a path to a Node module. * @param {string} relativeToPath An absolute path indicating the module that `moduleName` should be resolved relative to. This must be * a file rather than a directory, but the file need not actually exist. + * @throws {Error} Any error from `module.createRequire` or its `resolve`. * @returns {string} The absolute path that would result from calling `require.resolve(moduleName)` in a file located at `relativeToPath` */ resolve(moduleName, relativeToPath) { diff --git a/node_modules/eslint/lib/shared/runtime-info.js b/node_modules/eslint/lib/shared/runtime-info.js index aa5eff756..b99ad1038 100644 --- a/node_modules/eslint/lib/shared/runtime-info.js +++ b/node_modules/eslint/lib/shared/runtime-info.js @@ -40,6 +40,7 @@ function environment() { * Synchronously executes a shell command and formats the result. * @param {string} cmd The command to execute. * @param {Array} args The arguments to be executed with the command. + * @throws {Error} As may be collected by `cross-spawn.sync`. * @returns {string} The version returned by the command. */ function execCommand(cmd, args) { @@ -73,6 +74,7 @@ function environment() { /** * Gets bin version. * @param {string} bin The bin to check. + * @throws {Error} As may be collected by `cross-spawn.sync`. * @returns {string} The normalized version returned by the command. */ function getBinVersion(bin) { @@ -90,11 +92,12 @@ function environment() { * Gets installed npm package version. * @param {string} pkg The package to check. * @param {boolean} global Whether to check globally or not. + * @throws {Error} As may be collected by `cross-spawn.sync`. * @returns {string} The normalized version returned by the command. */ function getNpmPackageVersion(pkg, { global = false } = {}) { const npmBinArgs = ["bin", "-g"]; - const npmLsArgs = ["ls", "--depth=0", "--json", "eslint"]; + const npmLsArgs = ["ls", "--depth=0", "--json", pkg]; if (global) { npmLsArgs.push("-g"); diff --git a/node_modules/eslint/lib/shared/severity.js b/node_modules/eslint/lib/shared/severity.js new file mode 100644 index 000000000..6b21469a9 --- /dev/null +++ b/node_modules/eslint/lib/shared/severity.js @@ -0,0 +1,49 @@ +/** + * @fileoverview Helpers for severity values (e.g. normalizing different types). + * @author Bryan Mishkin + */ + +"use strict"; + +/** + * Convert severity value of different types to a string. + * @param {string|number} severity severity value + * @throws error if severity is invalid + * @returns {string} severity string + */ +function normalizeSeverityToString(severity) { + if ([2, "2", "error"].includes(severity)) { + return "error"; + } + if ([1, "1", "warn"].includes(severity)) { + return "warn"; + } + if ([0, "0", "off"].includes(severity)) { + return "off"; + } + throw new Error(`Invalid severity value: ${severity}`); +} + +/** + * Convert severity value of different types to a number. + * @param {string|number} severity severity value + * @throws error if severity is invalid + * @returns {number} severity number + */ +function normalizeSeverityToNumber(severity) { + if ([2, "2", "error"].includes(severity)) { + return 2; + } + if ([1, "1", "warn"].includes(severity)) { + return 1; + } + if ([0, "0", "off"].includes(severity)) { + return 0; + } + throw new Error(`Invalid severity value: ${severity}`); +} + +module.exports = { + normalizeSeverityToString, + normalizeSeverityToNumber +}; diff --git a/node_modules/eslint/lib/shared/string-utils.js b/node_modules/eslint/lib/shared/string-utils.js new file mode 100644 index 000000000..ed0781e57 --- /dev/null +++ b/node_modules/eslint/lib/shared/string-utils.js @@ -0,0 +1,60 @@ +/** + * @fileoverview Utilities to operate on strings. + * @author Stephen Wade + */ + +"use strict"; + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const Graphemer = require("graphemer").default; + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +// eslint-disable-next-line no-control-regex -- intentionally including control characters +const ASCII_REGEX = /^[\u0000-\u007f]*$/u; + +/** @type {Graphemer | undefined} */ +let splitter; + +//------------------------------------------------------------------------------ +// Public Interface +//------------------------------------------------------------------------------ + +/** + * Converts the first letter of a string to uppercase. + * @param {string} string The string to operate on + * @returns {string} The converted string + */ +function upperCaseFirst(string) { + if (string.length <= 1) { + return string.toUpperCase(); + } + return string[0].toUpperCase() + string.slice(1); +} + +/** + * Counts graphemes in a given string. + * @param {string} value A string to count graphemes. + * @returns {number} The number of graphemes in `value`. + */ +function getGraphemeCount(value) { + if (ASCII_REGEX.test(value)) { + return value.length; + } + + if (!splitter) { + splitter = new Graphemer(); + } + + return splitter.countGraphemes(value); +} + +module.exports = { + upperCaseFirst, + getGraphemeCount +}; diff --git a/node_modules/eslint/lib/shared/traverser.js b/node_modules/eslint/lib/shared/traverser.js index 32f767795..38b4e2151 100644 --- a/node_modules/eslint/lib/shared/traverser.js +++ b/node_modules/eslint/lib/shared/traverser.js @@ -65,16 +65,16 @@ class Traverser { this._leave = null; } - // eslint-disable-next-line jsdoc/require-description /** + * Gives current node. * @returns {ASTNode} The current node. */ current() { return this._current; } - // eslint-disable-next-line jsdoc/require-description /** + * Gives a copy of the ancestor nodes. * @returns {ASTNode[]} The ancestor nodes. */ parents() { diff --git a/node_modules/eslint/lib/shared/types.js b/node_modules/eslint/lib/shared/types.js index c3b76e42d..e3a40bc98 100644 --- a/node_modules/eslint/lib/shared/types.js +++ b/node_modules/eslint/lib/shared/types.js @@ -21,8 +21,18 @@ module.exports = {}; /** * @typedef {Object} ParserOptions * @property {EcmaFeatures} [ecmaFeatures] The optional features. - * @property {3|5|6|7|8|9|10|11|12|2015|2016|2017|2018|2019|2020|2021} [ecmaVersion] The ECMAScript version (or revision number). + * @property {3|5|6|7|8|9|10|11|12|13|14|15|2015|2016|2017|2018|2019|2020|2021|2022|2023|2024} [ecmaVersion] The ECMAScript version (or revision number). * @property {"script"|"module"} [sourceType] The source code type. + * @property {boolean} [allowReserved] Allowing the use of reserved words as identifiers in ES3. + */ + +/** + * @typedef {Object} LanguageOptions + * @property {number|"latest"} [ecmaVersion] The ECMAScript version (or revision number). + * @property {Record} [globals] The global variable settings. + * @property {"script"|"module"|"commonjs"} [sourceType] The source code type. + * @property {string|Object} [parser] The parser to use. + * @property {Object} [parserOptions] The parser options to use. */ /** @@ -83,15 +93,34 @@ module.exports = {}; /** * @typedef {Object} LintMessage - * @property {number} column The 1-based column number. + * @property {number|undefined} column The 1-based column number. + * @property {number} [endColumn] The 1-based column number of the end location. + * @property {number} [endLine] The 1-based line number of the end location. + * @property {boolean} [fatal] If `true` then this is a fatal error. + * @property {{range:[number,number], text:string}} [fix] Information for autofix. + * @property {number|undefined} line The 1-based line number. + * @property {string} message The error message. + * @property {string} [messageId] The ID of the message in the rule's meta. + * @property {(string|null)} nodeType Type of node + * @property {string|null} ruleId The ID of the rule which makes this message. + * @property {0|1|2} severity The severity of this message. + * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. + */ + +/** + * @typedef {Object} SuppressedLintMessage + * @property {number|undefined} column The 1-based column number. * @property {number} [endColumn] The 1-based column number of the end location. * @property {number} [endLine] The 1-based line number of the end location. - * @property {boolean} fatal If `true` then this is a fatal error. + * @property {boolean} [fatal] If `true` then this is a fatal error. * @property {{range:[number,number], text:string}} [fix] Information for autofix. - * @property {number} line The 1-based line number. + * @property {number|undefined} line The 1-based line number. * @property {string} message The error message. + * @property {string} [messageId] The ID of the message in the rule's meta. + * @property {(string|null)} nodeType Type of node * @property {string|null} ruleId The ID of the rule which makes this message. * @property {0|1|2} severity The severity of this message. + * @property {Array<{kind: string, justification: string}>} suppressions The suppression info. * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. */ @@ -111,7 +140,6 @@ module.exports = {}; /** * @typedef {Object} RuleMetaDocs - * @property {string} category The category of the rule. * @property {string} description The description of the rule. * @property {boolean} recommended If `true` then the rule is included in `eslint:recommended` preset. * @property {string} url The URL of the rule documentation. @@ -122,6 +150,7 @@ module.exports = {}; * @property {boolean} [deprecated] If `true` then the rule has been deprecated. * @property {RuleMetaDocs} docs The document information of the rule. * @property {"code"|"whitespace"} [fixable] The autofix type. + * @property {boolean} [hasSuggestions] If `true` then the rule provides suggestions. * @property {Record} [messages] The messages the rule reports. * @property {string[]} [replacedBy] The IDs of the alternative rules. * @property {Array|Object} schema The option schema of the rule. @@ -148,3 +177,40 @@ module.exports = {}; * @property {string} ruleId The rule ID. * @property {string[]} replacedBy The rule IDs that replace this deprecated rule. */ + +/** + * A linting result. + * @typedef {Object} LintResult + * @property {string} filePath The path to the file that was linted. + * @property {LintMessage[]} messages All of the messages for the result. + * @property {SuppressedLintMessage[]} suppressedMessages All of the suppressed messages for the result. + * @property {number} errorCount Number of errors for the result. + * @property {number} fatalErrorCount Number of fatal errors for the result. + * @property {number} warningCount Number of warnings for the result. + * @property {number} fixableErrorCount Number of fixable errors for the result. + * @property {number} fixableWarningCount Number of fixable warnings for the result. + * @property {string} [source] The source code of the file that was linted. + * @property {string} [output] The source code of the file that was linted, with as many fixes applied as possible. + * @property {DeprecatedRuleInfo[]} usedDeprecatedRules The list of used deprecated rules. + */ + +/** + * Information provided when the maximum warning threshold is exceeded. + * @typedef {Object} MaxWarningsExceeded + * @property {number} maxWarnings Number of warnings to trigger nonzero exit code. + * @property {number} foundWarnings Number of warnings found while linting. + */ + +/** + * Metadata about results for formatters. + * @typedef {Object} ResultsMeta + * @property {MaxWarningsExceeded} [maxWarningsExceeded] Present if the maxWarnings threshold was exceeded. + */ + +/** + * A formatter function. + * @callback FormatterFunction + * @param {LintResult[]} results The list of linting results. + * @param {{cwd: string, maxWarningsExceeded?: MaxWarningsExceeded, rulesMeta: Record}} [context] A context object. + * @returns {string | Promise} Formatted text. + */ diff --git a/node_modules/eslint/lib/source-code/source-code.js b/node_modules/eslint/lib/source-code/source-code.js index 6b20495b6..236f6b5c6 100644 --- a/node_modules/eslint/lib/source-code/source-code.js +++ b/node_modules/eslint/lib/source-code/source-code.js @@ -9,16 +9,31 @@ //------------------------------------------------------------------------------ const - { isCommentToken } = require("eslint-utils"), + { isCommentToken } = require("@eslint-community/eslint-utils"), TokenStore = require("./token-store"), astUtils = require("../shared/ast-utils"), Traverser = require("../shared/traverser"), - lodash = require("lodash"); + globals = require("../../conf/globals"), + { + directivesPattern + } = require("../shared/directives"), + + /* eslint-disable-next-line n/no-restricted-require -- Too messy to figure out right now. */ + ConfigCommentParser = require("../linter/config-comment-parser"), + eslintScope = require("eslint-scope"); + +//------------------------------------------------------------------------------ +// Type Definitions +//------------------------------------------------------------------------------ + +/** @typedef {import("eslint-scope").Variable} Variable */ //------------------------------------------------------------------------------ // Private //------------------------------------------------------------------------------ +const commentParser = new ConfigCommentParser(); + /** * Validates that the given AST has the required information. * @param {ASTNode} ast The Program node of the AST to check. @@ -44,6 +59,29 @@ function validate(ast) { } } +/** + * Retrieves globals for the given ecmaVersion. + * @param {number} ecmaVersion The version to retrieve globals for. + * @returns {Object} The globals for the given ecmaVersion. + */ +function getGlobalsForEcmaVersion(ecmaVersion) { + + switch (ecmaVersion) { + case 3: + return globals.es3; + + case 5: + return globals.es5; + + default: + if (ecmaVersion < 2015) { + return globals[`es${ecmaVersion + 2009}`]; + } + + return globals[`es${ecmaVersion}`]; + } +} + /** * Check to see if its a ES6 export declaration. * @param {ASTNode} astNode An AST node. @@ -78,6 +116,36 @@ function sortedMerge(tokens, comments) { return result; } +/** + * Normalizes a value for a global in a config + * @param {(boolean|string|null)} configuredValue The value given for a global in configuration or in + * a global directive comment + * @returns {("readable"|"writeable"|"off")} The value normalized as a string + * @throws Error if global value is invalid + */ +function normalizeConfigGlobal(configuredValue) { + switch (configuredValue) { + case "off": + return "off"; + + case true: + case "true": + case "writeable": + case "writable": + return "writable"; + + case null: + case false: + case "false": + case "readable": + case "readonly": + return "readonly"; + + default: + throw new Error(`'${configuredValue}' is not a valid configuration for a global (use 'readonly', 'writable', or 'off')`); + } +} + /** * Determines if two nodes or tokens overlap. * @param {ASTNode|Token} first The first node or token to check. @@ -140,14 +208,110 @@ function isSpaceBetween(sourceCode, first, second, checkInsideOfJSXText) { return false; } +//----------------------------------------------------------------------------- +// Directive Comments +//----------------------------------------------------------------------------- + +/** + * Ensures that variables representing built-in properties of the Global Object, + * and any globals declared by special block comments, are present in the global + * scope. + * @param {Scope} globalScope The global scope. + * @param {Object|undefined} configGlobals The globals declared in configuration + * @param {Object|undefined} inlineGlobals The globals declared in the source code + * @returns {void} + */ +function addDeclaredGlobals(globalScope, configGlobals = {}, inlineGlobals = {}) { + + // Define configured global variables. + for (const id of new Set([...Object.keys(configGlobals), ...Object.keys(inlineGlobals)])) { + + /* + * `normalizeConfigGlobal` will throw an error if a configured global value is invalid. However, these errors would + * typically be caught when validating a config anyway (validity for inline global comments is checked separately). + */ + const configValue = configGlobals[id] === void 0 ? void 0 : normalizeConfigGlobal(configGlobals[id]); + const commentValue = inlineGlobals[id] && inlineGlobals[id].value; + const value = commentValue || configValue; + const sourceComments = inlineGlobals[id] && inlineGlobals[id].comments; + + if (value === "off") { + continue; + } + + let variable = globalScope.set.get(id); + + if (!variable) { + variable = new eslintScope.Variable(id, globalScope); + + globalScope.variables.push(variable); + globalScope.set.set(id, variable); + } + + variable.eslintImplicitGlobalSetting = configValue; + variable.eslintExplicitGlobal = sourceComments !== void 0; + variable.eslintExplicitGlobalComments = sourceComments; + variable.writeable = (value === "writable"); + } + + /* + * "through" contains all references which definitions cannot be found. + * Since we augment the global scope using configuration, we need to update + * references and remove the ones that were added by configuration. + */ + globalScope.through = globalScope.through.filter(reference => { + const name = reference.identifier.name; + const variable = globalScope.set.get(name); + + if (variable) { + + /* + * Links the variable and the reference. + * And this reference is removed from `Scope#through`. + */ + reference.resolved = variable; + variable.references.push(reference); + + return false; + } + + return true; + }); +} + +/** + * Sets the given variable names as exported so they won't be triggered by + * the `no-unused-vars` rule. + * @param {eslint.Scope} globalScope The global scope to define exports in. + * @param {Record} variables An object whose keys are the variable + * names to export. + * @returns {void} + */ +function markExportedVariables(globalScope, variables) { + + Object.keys(variables).forEach(name => { + const variable = globalScope.set.get(name); + + if (variable) { + variable.eslintUsed = true; + variable.eslintExported = true; + } + }); + +} + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ +const caches = Symbol("caches"); + +/** + * Represents parsed source code. + */ class SourceCode extends TokenStore { /** - * Represents parsed source code. * @param {string|Object} textOrConfig The source code text or config object. * @param {string} textOrConfig.text The source code text. * @param {ASTNode} textOrConfig.ast The Program node of the AST representing the code. This AST should be created from the text that BOM was stripped. @@ -174,22 +338,31 @@ class SourceCode extends TokenStore { validate(ast); super(ast.tokens, ast.comments); + /** + * General purpose caching for the class. + */ + this[caches] = new Map([ + ["scopes", new WeakMap()], + ["vars", new Map()], + ["configNodes", void 0] + ]); + /** * The flag to indicate that the source code has Unicode BOM. - * @type boolean + * @type {boolean} */ this.hasBOM = (text.charCodeAt(0) === 0xFEFF); /** * The original text source code. * BOM was stripped from this text. - * @type string + * @type {string} */ this.text = (this.hasBOM ? text.slice(1) : text); /** * The parsed AST for the source code. - * @type ASTNode + * @type {ASTNode} */ this.ast = ast; @@ -224,7 +397,7 @@ class SourceCode extends TokenStore { /** * The source code split into lines according to ECMA-262 specification. * This is done to avoid each rule needing to do so separately. - * @type string[] + * @type {string[]} */ this.lines = []; this.lineStartIndices = [0]; @@ -250,7 +423,7 @@ class SourceCode extends TokenStore { // Cache for comments found using getComments(). this._commentCache = new WeakMap(); - // don't allow modification of this object + // don't allow further modification of this object Object.freeze(this); Object.freeze(this.lines); } @@ -350,7 +523,7 @@ class SourceCode extends TokenStore { let currentToken = this.getTokenBefore(node, { includeComments: true }); while (currentToken && isCommentToken(currentToken)) { - if (node.parent && (currentToken.start < node.parent.start)) { + if (node.parent && node.parent.type !== "Program" && (currentToken.start < node.parent.start)) { break; } comments.leading.push(currentToken); @@ -362,7 +535,7 @@ class SourceCode extends TokenStore { currentToken = this.getTokenAfter(node, { includeComments: true }); while (currentToken && isCommentToken(currentToken)) { - if (node.parent && (currentToken.end > node.parent.end)) { + if (node.parent && node.parent.type !== "Program" && (currentToken.end > node.parent.end)) { break; } comments.trailing.push(currentToken); @@ -507,6 +680,7 @@ class SourceCode extends TokenStore { /** * Converts a source text index into a (line, column) pair. * @param {number} index The index of a character in a file + * @throws {TypeError} If non-numeric index or index out of range. * @returns {Object} A {line, column} location object with a 0-indexed column * @public */ @@ -531,10 +705,12 @@ class SourceCode extends TokenStore { } /* - * To figure out which line rangeIndex is on, determine the last index at which rangeIndex could - * be inserted into lineIndices to keep the list sorted. + * To figure out which line index is on, determine the last place at which index could + * be inserted into lineStartIndices to keep the list sorted. */ - const lineNumber = lodash.sortedLastIndex(this.lineStartIndices, index); + const lineNumber = index >= this.lineStartIndices[this.lineStartIndices.length - 1] + ? this.lineStartIndices.length + : this.lineStartIndices.findIndex(el => index < el); return { line: lineNumber, column: index - this.lineStartIndices[lineNumber - 1] }; } @@ -544,6 +720,9 @@ class SourceCode extends TokenStore { * @param {Object} loc A line/column location * @param {number} loc.line The line number of the location (1-indexed) * @param {number} loc.column The column number of the location (0-indexed) + * @throws {TypeError|RangeError} If `loc` is not an object with a numeric + * `line` and `column`, if the `line` is less than or equal to zero or + * the line or column is out of the expected range. * @returns {number} The range index of the location in the file. * @public */ @@ -581,6 +760,296 @@ class SourceCode extends TokenStore { return positionIndex; } + + /** + * Gets the scope for the given node + * @param {ASTNode} currentNode The node to get the scope of + * @returns {eslint-scope.Scope} The scope information for this node + * @throws {TypeError} If the `currentNode` argument is missing. + */ + getScope(currentNode) { + + if (!currentNode) { + throw new TypeError("Missing required argument: node."); + } + + // check cache first + const cache = this[caches].get("scopes"); + const cachedScope = cache.get(currentNode); + + if (cachedScope) { + return cachedScope; + } + + // On Program node, get the outermost scope to avoid return Node.js special function scope or ES modules scope. + const inner = currentNode.type !== "Program"; + + for (let node = currentNode; node; node = node.parent) { + const scope = this.scopeManager.acquire(node, inner); + + if (scope) { + if (scope.type === "function-expression-name") { + cache.set(currentNode, scope.childScopes[0]); + return scope.childScopes[0]; + } + + cache.set(currentNode, scope); + return scope; + } + } + + cache.set(currentNode, this.scopeManager.scopes[0]); + return this.scopeManager.scopes[0]; + } + + /** + * Get the variables that `node` defines. + * This is a convenience method that passes through + * to the same method on the `scopeManager`. + * @param {ASTNode} node The node for which the variables are obtained. + * @returns {Array} An array of variable nodes representing + * the variables that `node` defines. + */ + getDeclaredVariables(node) { + return this.scopeManager.getDeclaredVariables(node); + } + + /* eslint-disable class-methods-use-this -- node is owned by SourceCode */ + /** + * Gets all the ancestors of a given node + * @param {ASTNode} node The node + * @returns {Array} All the ancestor nodes in the AST, not including the provided node, starting + * from the root node at index 0 and going inwards to the parent node. + * @throws {TypeError} When `node` is missing. + */ + getAncestors(node) { + + if (!node) { + throw new TypeError("Missing required argument: node."); + } + + const ancestorsStartingAtParent = []; + + for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) { + ancestorsStartingAtParent.push(ancestor); + } + + return ancestorsStartingAtParent.reverse(); + } + /* eslint-enable class-methods-use-this -- node is owned by SourceCode */ + + /** + * Marks a variable as used in the current scope + * @param {string} name The name of the variable to mark as used. + * @param {ASTNode} [refNode] The closest node to the variable reference. + * @returns {boolean} True if the variable was found and marked as used, false if not. + */ + markVariableAsUsed(name, refNode = this.ast) { + + const currentScope = this.getScope(refNode); + let initialScope = currentScope; + + /* + * When we are in an ESM or CommonJS module, we need to start searching + * from the top-level scope, not the global scope. For ESM the top-level + * scope is the module scope; for CommonJS the top-level scope is the + * outer function scope. + * + * Without this check, we might miss a variable declared with `var` at + * the top-level because it won't exist in the global scope. + */ + if ( + currentScope.type === "global" && + currentScope.childScopes.length > 0 && + + // top-level scopes refer to a `Program` node + currentScope.childScopes[0].block === this.ast + ) { + initialScope = currentScope.childScopes[0]; + } + + for (let scope = initialScope; scope; scope = scope.upper) { + const variable = scope.variables.find(scopeVar => scopeVar.name === name); + + if (variable) { + variable.eslintUsed = true; + return true; + } + } + + return false; + } + + + /** + * Returns an array of all inline configuration nodes found in the + * source code. + * @returns {Array} An array of all inline configuration nodes. + */ + getInlineConfigNodes() { + + // check the cache first + let configNodes = this[caches].get("configNodes"); + + if (configNodes) { + return configNodes; + } + + // calculate fresh config nodes + configNodes = this.ast.comments.filter(comment => { + + // shebang comments are never directives + if (comment.type === "Shebang") { + return false; + } + + const { directivePart } = commentParser.extractDirectiveComment(comment.value); + + const directiveMatch = directivesPattern.exec(directivePart); + + if (!directiveMatch) { + return false; + } + + // only certain comment types are supported as line comments + return comment.type !== "Line" || !!/^eslint-disable-(next-)?line$/u.test(directiveMatch[1]); + }); + + this[caches].set("configNodes", configNodes); + + return configNodes; + } + + /** + * Applies language options sent in from the core. + * @param {Object} languageOptions The language options for this run. + * @returns {void} + */ + applyLanguageOptions(languageOptions) { + + /* + * Add configured globals and language globals + * + * Using Object.assign instead of object spread for performance reasons + * https://github.com/eslint/eslint/issues/16302 + */ + const configGlobals = Object.assign( + {}, + getGlobalsForEcmaVersion(languageOptions.ecmaVersion), + languageOptions.sourceType === "commonjs" ? globals.commonjs : void 0, + languageOptions.globals + ); + const varsCache = this[caches].get("vars"); + + varsCache.set("configGlobals", configGlobals); + } + + /** + * Applies configuration found inside of the source code. This method is only + * called when ESLint is running with inline configuration allowed. + * @returns {{problems:Array,configs:{config:FlatConfigArray,node:ASTNode}}} Information + * that ESLint needs to further process the inline configuration. + */ + applyInlineConfig() { + + const problems = []; + const configs = []; + const exportedVariables = {}; + const inlineGlobals = Object.create(null); + + this.getInlineConfigNodes().forEach(comment => { + + const { directiveText, directiveValue } = commentParser.parseDirective(comment); + + switch (directiveText) { + case "exported": + Object.assign(exportedVariables, commentParser.parseStringConfig(directiveValue, comment)); + break; + + case "globals": + case "global": + for (const [id, { value }] of Object.entries(commentParser.parseStringConfig(directiveValue, comment))) { + let normalizedValue; + + try { + normalizedValue = normalizeConfigGlobal(value); + } catch (err) { + problems.push({ + ruleId: null, + loc: comment.loc, + message: err.message + }); + continue; + } + + if (inlineGlobals[id]) { + inlineGlobals[id].comments.push(comment); + inlineGlobals[id].value = normalizedValue; + } else { + inlineGlobals[id] = { + comments: [comment], + value: normalizedValue + }; + } + } + break; + + case "eslint": { + const parseResult = commentParser.parseJsonConfig(directiveValue, comment.loc); + + if (parseResult.success) { + configs.push({ + config: { + rules: parseResult.config + }, + node: comment + }); + } else { + problems.push(parseResult.error); + } + + break; + } + + // no default + } + }); + + // save all the new variables for later + const varsCache = this[caches].get("vars"); + + varsCache.set("inlineGlobals", inlineGlobals); + varsCache.set("exportedVariables", exportedVariables); + + return { + configs, + problems + }; + } + + /** + * Called by ESLint core to indicate that it has finished providing + * information. We now add in all the missing variables and ensure that + * state-changing methods cannot be called by rules. + * @returns {void} + */ + finalize() { + + // Step 1: ensure that all of the necessary variables are up to date + const varsCache = this[caches].get("vars"); + const globalScope = this.scopeManager.scopes[0]; + const configGlobals = varsCache.get("configGlobals"); + const inlineGlobals = varsCache.get("inlineGlobals"); + const exportedVariables = varsCache.get("exportedVariables"); + + addDeclaredGlobals(globalScope, configGlobals, inlineGlobals); + + if (exportedVariables) { + markExportedVariables(globalScope, exportedVariables); + } + + } + } module.exports = SourceCode; diff --git a/node_modules/eslint/lib/source-code/token-store/cursor.js b/node_modules/eslint/lib/source-code/token-store/cursor.js index 4e1595c6d..0b726006e 100644 --- a/node_modules/eslint/lib/source-code/token-store/cursor.js +++ b/node_modules/eslint/lib/source-code/token-store/cursor.js @@ -69,8 +69,8 @@ module.exports = class Cursor { * @returns {boolean} `true` if the next token exists. * @abstract */ - /* istanbul ignore next */ - moveNext() { // eslint-disable-line class-methods-use-this + /* c8 ignore next */ + moveNext() { // eslint-disable-line class-methods-use-this -- Unused throw new Error("Not implemented."); } }; diff --git a/node_modules/eslint/lib/source-code/token-store/index.js b/node_modules/eslint/lib/source-code/token-store/index.js index 25db8a4f4..46a96b2f4 100644 --- a/node_modules/eslint/lib/source-code/token-store/index.js +++ b/node_modules/eslint/lib/source-code/token-store/index.js @@ -9,7 +9,7 @@ //------------------------------------------------------------------------------ const assert = require("assert"); -const { isCommentToken } = require("eslint-utils"); +const { isCommentToken } = require("@eslint-community/eslint-utils"); const cursors = require("./cursors"); const ForwardTokenCursor = require("./forward-token-cursor"); const PaddedTokenCursor = require("./padded-token-cursor"); diff --git a/node_modules/eslint/lib/source-code/token-store/utils.js b/node_modules/eslint/lib/source-code/token-store/utils.js index 21e1d6ff7..3e0147032 100644 --- a/node_modules/eslint/lib/source-code/token-store/utils.js +++ b/node_modules/eslint/lib/source-code/token-store/utils.js @@ -4,43 +4,40 @@ */ "use strict"; -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -const lodash = require("lodash"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -/** - * Gets `token.range[0]` from the given token. - * @param {Node|Token|Comment} token The token to get. - * @returns {number} The start location. - * @private - */ -function getStartLocation(token) { - return token.range[0]; -} - //------------------------------------------------------------------------------ // Exports //------------------------------------------------------------------------------ /** - * Binary-searches the index of the first token which is after the given location. + * Finds the index of the first token which is after the given location. * If it was not found, this returns `tokens.length`. * @param {(Token|Comment)[]} tokens It searches the token in this list. * @param {number} location The location to search. * @returns {number} The found index or `tokens.length`. */ exports.search = function search(tokens, location) { - return lodash.sortedIndexBy( - tokens, - { range: [location] }, - getStartLocation - ); + for (let minIndex = 0, maxIndex = tokens.length - 1; minIndex <= maxIndex;) { + + /* + * Calculate the index in the middle between minIndex and maxIndex. + * `| 0` is used to round a fractional value down to the nearest integer: this is similar to + * using `Math.trunc()` or `Math.floor()`, but performance tests have shown this method to + * be faster. + */ + const index = (minIndex + maxIndex) / 2 | 0; + const token = tokens[index]; + const tokenStartLocation = token.range[0]; + + if (location <= tokenStartLocation) { + if (index === minIndex) { + return index; + } + maxIndex = index; + } else { + minIndex = index + 1; + } + } + return tokens.length; }; /** @@ -57,13 +54,18 @@ exports.getFirstIndex = function getFirstIndex(tokens, indexMap, startLoc) { } if ((startLoc - 1) in indexMap) { const index = indexMap[startLoc - 1]; - const token = (index >= 0 && index < tokens.length) ? tokens[index] : null; + const token = tokens[index]; + + // If the mapped index is out of bounds, the returned cursor index will point after the end of the tokens array. + if (!token) { + return tokens.length; + } /* * For the map of "comment's location -> token's index", it points the next token of a comment. * In that case, +1 is unnecessary. */ - if (token && token.range[0] >= startLoc) { + if (token.range[0] >= startLoc) { return index; } return index + 1; @@ -85,13 +87,18 @@ exports.getLastIndex = function getLastIndex(tokens, indexMap, endLoc) { } if ((endLoc - 1) in indexMap) { const index = indexMap[endLoc - 1]; - const token = (index >= 0 && index < tokens.length) ? tokens[index] : null; + const token = tokens[index]; + + // If the mapped index is out of bounds, the returned cursor index will point before the end of the tokens array. + if (!token) { + return tokens.length - 1; + } /* * For the map of "comment's location -> token's index", it points the next token of a comment. * In that case, -1 is necessary. */ - if (token && token.range[1] > endLoc) { + if (token.range[1] > endLoc) { return index - 1; } return index; diff --git a/node_modules/eslint/lib/unsupported-api.js b/node_modules/eslint/lib/unsupported-api.js new file mode 100644 index 000000000..8a2e147aa --- /dev/null +++ b/node_modules/eslint/lib/unsupported-api.js @@ -0,0 +1,30 @@ +/** + * @fileoverview APIs that are not officially supported by ESLint. + * These APIs may change or be removed at any time. Use at your + * own risk. + * @author Nicholas C. Zakas + */ + +"use strict"; + +//----------------------------------------------------------------------------- +// Requirements +//----------------------------------------------------------------------------- + +const { FileEnumerator } = require("./cli-engine/file-enumerator"); +const { FlatESLint, shouldUseFlatConfig } = require("./eslint/flat-eslint"); +const FlatRuleTester = require("./rule-tester/flat-rule-tester"); +const { ESLint } = require("./eslint/eslint"); + +//----------------------------------------------------------------------------- +// Exports +//----------------------------------------------------------------------------- + +module.exports = { + builtinRules: require("./rules"), + FlatESLint, + shouldUseFlatConfig, + FlatRuleTester, + FileEnumerator, + LegacyESLint: ESLint +}; diff --git a/node_modules/eslint/messages/all-files-ignored.txt b/node_modules/eslint/messages/all-files-ignored.js similarity index 50% rename from node_modules/eslint/messages/all-files-ignored.txt rename to node_modules/eslint/messages/all-files-ignored.js index 3f4c8ced4..70877a4d8 100644 --- a/node_modules/eslint/messages/all-files-ignored.txt +++ b/node_modules/eslint/messages/all-files-ignored.js @@ -1,8 +1,16 @@ -You are linting "<%= pattern %>", but all of the files matching the glob pattern "<%= pattern %>" are ignored. +"use strict"; -If you don't want to lint these files, remove the pattern "<%= pattern %>" from the list of arguments passed to ESLint. +module.exports = function(it) { + const { pattern } = it; + + return ` +You are linting "${pattern}", but all of the files matching the glob pattern "${pattern}" are ignored. + +If you don't want to lint these files, remove the pattern "${pattern}" from the list of arguments passed to ESLint. If you do want to lint these files, try the following solutions: * Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored. * Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/eslintrc-incompat.js b/node_modules/eslint/messages/eslintrc-incompat.js new file mode 100644 index 000000000..ee77cb232 --- /dev/null +++ b/node_modules/eslint/messages/eslintrc-incompat.js @@ -0,0 +1,98 @@ +"use strict"; + +/* eslint consistent-return: 0 -- no default case */ + +const messages = { + + env: ` +A config object is using the "env" key, which is not supported in flat config system. + +Flat config uses "languageOptions.globals" to define global variables for your files. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options +`, + + extends: ` +A config object is using the "extends" key, which is not supported in flat config system. + +Instead of "extends", you can include config objects that you'd like to extend from directly in the flat config array. + +Please see the following page for more information: +https://eslint.org/docs/latest/use/configure/migration-guide#predefined-and-shareable-configs +`, + + globals: ` +A config object is using the "globals" key, which is not supported in flat config system. + +Flat config uses "languageOptions.globals" to define global variables for your files. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options +`, + + ignorePatterns: ` +A config object is using the "ignorePatterns" key, which is not supported in flat config system. + +Flat config uses "ignores" to specify files to ignore. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files +`, + + noInlineConfig: ` +A config object is using the "noInlineConfig" key, which is not supported in flat config system. + +Flat config uses "linterOptions.noInlineConfig" to specify files to ignore. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#linter-options +`, + + overrides: ` +A config object is using the "overrides" key, which is not supported in flat config system. + +Flat config is an array that acts like the eslintrc "overrides" array. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#glob-based-configs +`, + + parser: ` +A config object is using the "parser" key, which is not supported in flat config system. + +Flat config uses "languageOptions.parser" to override the default parser. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers +`, + + parserOptions: ` +A config object is using the "parserOptions" key, which is not supported in flat config system. + +Flat config uses "languageOptions.parserOptions" to specify parser options. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#configuring-language-options +`, + + reportUnusedDisableDirectives: ` +A config object is using the "reportUnusedDisableDirectives" key, which is not supported in flat config system. + +Flat config uses "linterOptions.reportUnusedDisableDirectives" to specify files to ignore. + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#linter-options +`, + + root: ` +A config object is using the "root" key, which is not supported in flat config system. + +Flat configs always act as if they are the root config file, so this key can be safely removed. +` +}; + +module.exports = function({ key }) { + + return messages[key].trim(); +}; diff --git a/node_modules/eslint/messages/eslintrc-plugins.js b/node_modules/eslint/messages/eslintrc-plugins.js new file mode 100644 index 000000000..bb708c95b --- /dev/null +++ b/node_modules/eslint/messages/eslintrc-plugins.js @@ -0,0 +1,24 @@ +"use strict"; + +module.exports = function({ plugins }) { + + const isArrayOfStrings = typeof plugins[0] === "string"; + + return ` +A config object has a "plugins" key defined as an array${isArrayOfStrings ? " of strings" : ""}. + +Flat config requires "plugins" to be an object in this form: + + { + plugins: { + ${isArrayOfStrings && plugins[0] ? plugins[0] : "namespace"}: pluginObject + } + } + +Please see the following page for information on how to convert your config object into the correct format: +https://eslint.org/docs/latest/use/configure/migration-guide#importing-plugins-and-custom-parsers + +If you're using a shareable config that you cannot rewrite in flat config format, then use the compatibility utility: +https://eslint.org/docs/latest/use/configure/migration-guide#using-eslintrc-configs-in-flat-config +`; +}; diff --git a/node_modules/eslint/messages/extend-config-missing.js b/node_modules/eslint/messages/extend-config-missing.js new file mode 100644 index 000000000..5b3498fcd --- /dev/null +++ b/node_modules/eslint/messages/extend-config-missing.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function(it) { + const { configName, importerName } = it; + + return ` +ESLint couldn't find the config "${configName}" to extend from. Please check that the name of the config is correct. + +The config "${configName}" was referenced from the config file in "${importerName}". + +If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/extend-config-missing.txt b/node_modules/eslint/messages/extend-config-missing.txt deleted file mode 100644 index 4defd7ac4..000000000 --- a/node_modules/eslint/messages/extend-config-missing.txt +++ /dev/null @@ -1,5 +0,0 @@ -ESLint couldn't find the config "<%- configName %>" to extend from. Please check that the name of the config is correct. - -The config "<%- configName %>" was referenced from the config file in "<%- importerName %>". - -If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. diff --git a/node_modules/eslint/messages/failed-to-read-json.js b/node_modules/eslint/messages/failed-to-read-json.js new file mode 100644 index 000000000..e7c6cb587 --- /dev/null +++ b/node_modules/eslint/messages/failed-to-read-json.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function(it) { + const { path, message } = it; + + return ` +Failed to read JSON file at ${path}: + +${message} +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/failed-to-read-json.txt b/node_modules/eslint/messages/failed-to-read-json.txt deleted file mode 100644 index b5e2b861c..000000000 --- a/node_modules/eslint/messages/failed-to-read-json.txt +++ /dev/null @@ -1,3 +0,0 @@ -Failed to read JSON file at <%= path %>: - -<%= message %> diff --git a/node_modules/eslint/messages/file-not-found.js b/node_modules/eslint/messages/file-not-found.js new file mode 100644 index 000000000..1a62fcf96 --- /dev/null +++ b/node_modules/eslint/messages/file-not-found.js @@ -0,0 +1,10 @@ +"use strict"; + +module.exports = function(it) { + const { pattern, globDisabled } = it; + + return ` +No files matching the pattern "${pattern}"${globDisabled ? " (with disabling globs)" : ""} were found. +Please check for typing mistakes in the pattern. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/file-not-found.txt b/node_modules/eslint/messages/file-not-found.txt deleted file mode 100644 index 639498eb5..000000000 --- a/node_modules/eslint/messages/file-not-found.txt +++ /dev/null @@ -1,2 +0,0 @@ -No files matching the pattern "<%= pattern %>"<% if (globDisabled) { %> (with disabling globs)<% } %> were found. -Please check for typing mistakes in the pattern. diff --git a/node_modules/eslint/messages/invalid-rule-options.js b/node_modules/eslint/messages/invalid-rule-options.js new file mode 100644 index 000000000..9a8acc934 --- /dev/null +++ b/node_modules/eslint/messages/invalid-rule-options.js @@ -0,0 +1,17 @@ +"use strict"; + +const { stringifyValueForError } = require("./shared"); + +module.exports = function({ ruleId, value }) { + return ` +Configuration for rule "${ruleId}" is invalid. Each rule must have a severity ("off", 0, "warn", 1, "error", or 2) and may be followed by additional options for the rule. + +You passed '${stringifyValueForError(value, 4)}', which doesn't contain a valid severity. + +If you're attempting to configure rule options, perhaps you meant: + + "${ruleId}": ["error", ${stringifyValueForError(value, 8)}] + +See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/invalid-rule-severity.js b/node_modules/eslint/messages/invalid-rule-severity.js new file mode 100644 index 000000000..3f13183c6 --- /dev/null +++ b/node_modules/eslint/messages/invalid-rule-severity.js @@ -0,0 +1,13 @@ +"use strict"; + +const { stringifyValueForError } = require("./shared"); + +module.exports = function({ ruleId, value }) { + return ` +Configuration for rule "${ruleId}" is invalid. Expected severity of "off", 0, "warn", 1, "error", or 2. + +You passed '${stringifyValueForError(value, 4)}'. + +See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/no-config-found.js b/node_modules/eslint/messages/no-config-found.js new file mode 100644 index 000000000..21cf549eb --- /dev/null +++ b/node_modules/eslint/messages/no-config-found.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function(it) { + const { directoryPath } = it; + + return ` +ESLint couldn't find a configuration file. To set up a configuration file for this project, please run: + + npm init @eslint/config + +ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory. + +If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/no-config-found.txt b/node_modules/eslint/messages/no-config-found.txt deleted file mode 100644 index b46a7e5a7..000000000 --- a/node_modules/eslint/messages/no-config-found.txt +++ /dev/null @@ -1,7 +0,0 @@ -ESLint couldn't find a configuration file. To set up a configuration file for this project, please run: - - eslint --init - -ESLint looked for configuration files in <%= directoryPath %> and its ancestors. If it found none, it then looked in your home directory. - -If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://eslint.org/chat/help diff --git a/node_modules/eslint/messages/plugin-conflict.js b/node_modules/eslint/messages/plugin-conflict.js new file mode 100644 index 000000000..c8c060e2f --- /dev/null +++ b/node_modules/eslint/messages/plugin-conflict.js @@ -0,0 +1,22 @@ +"use strict"; + +module.exports = function(it) { + const { pluginId, plugins } = it; + + let result = `ESLint couldn't determine the plugin "${pluginId}" uniquely. +`; + + for (const { filePath, importerName } of plugins) { + result += ` +- ${filePath} (loaded in "${importerName}")`; + } + + result += ` + +Please remove the "plugins" setting from either config or remove either plugin installation. + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`; + + return result; +}; diff --git a/node_modules/eslint/messages/plugin-conflict.txt b/node_modules/eslint/messages/plugin-conflict.txt deleted file mode 100644 index 3ab4b340e..000000000 --- a/node_modules/eslint/messages/plugin-conflict.txt +++ /dev/null @@ -1,7 +0,0 @@ -ESLint couldn't determine the plugin "<%- pluginId %>" uniquely. -<% for (const { filePath, importerName } of plugins) { %> -- <%= filePath %> (loaded in "<%= importerName %>")<% } %> - -Please remove the "plugins" setting from either config or remove either plugin installation. - -If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. diff --git a/node_modules/eslint/messages/plugin-invalid.js b/node_modules/eslint/messages/plugin-invalid.js new file mode 100644 index 000000000..8b471d4a3 --- /dev/null +++ b/node_modules/eslint/messages/plugin-invalid.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function(it) { + const { configName, importerName } = it; + + return ` +"${configName}" is invalid syntax for a config specifier. + +* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "${configName}/myConfig". +* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "${configName.slice("plugin:".length)}". + +"${configName}" was referenced from the config file in "${importerName}". + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/plugin-invalid.txt b/node_modules/eslint/messages/plugin-invalid.txt deleted file mode 100644 index 3ee251821..000000000 --- a/node_modules/eslint/messages/plugin-invalid.txt +++ /dev/null @@ -1,8 +0,0 @@ -"<%- configName %>" is invalid syntax for a config specifier. - -* If your intention is to extend from a configuration exported from the plugin, add the configuration name after a slash: e.g. "<%- configName %>/myConfig". -* If this is the name of a shareable config instead of a plugin, remove the "plugin:" prefix: i.e. "<%- configName.slice("plugin:".length) %>". - -"<%- configName %>" was referenced from the config file in "<%- importerName %>". - -If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. diff --git a/node_modules/eslint/messages/plugin-missing.js b/node_modules/eslint/messages/plugin-missing.js new file mode 100644 index 000000000..0b7d34e3a --- /dev/null +++ b/node_modules/eslint/messages/plugin-missing.js @@ -0,0 +1,19 @@ +"use strict"; + +module.exports = function(it) { + const { pluginName, resolvePluginsRelativeTo, importerName } = it; + + return ` +ESLint couldn't find the plugin "${pluginName}". + +(The package "${pluginName}" was not found when loaded as a Node module from the directory "${resolvePluginsRelativeTo}".) + +It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: + + npm install ${pluginName}@latest --save-dev + +The plugin "${pluginName}" was referenced from the config file in "${importerName}". + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/plugin-missing.txt b/node_modules/eslint/messages/plugin-missing.txt deleted file mode 100644 index aa25f59ac..000000000 --- a/node_modules/eslint/messages/plugin-missing.txt +++ /dev/null @@ -1,11 +0,0 @@ -ESLint couldn't find the plugin "<%- pluginName %>". - -(The package "<%- pluginName %>" was not found when loaded as a Node module from the directory "<%- resolvePluginsRelativeTo %>".) - -It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: - - npm install <%- pluginName %>@latest --save-dev - -The plugin "<%- pluginName %>" was referenced from the config file in "<%- importerName %>". - -If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. diff --git a/node_modules/eslint/messages/print-config-with-directory-path.js b/node_modules/eslint/messages/print-config-with-directory-path.js new file mode 100644 index 000000000..4559c8d6d --- /dev/null +++ b/node_modules/eslint/messages/print-config-with-directory-path.js @@ -0,0 +1,8 @@ +"use strict"; + +module.exports = function() { + return ` +The '--print-config' CLI option requires a path to a source code file rather than a directory. +See also: https://eslint.org/docs/latest/use/command-line-interface#--print-config +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/print-config-with-directory-path.txt b/node_modules/eslint/messages/print-config-with-directory-path.txt deleted file mode 100644 index 1afc9b1e8..000000000 --- a/node_modules/eslint/messages/print-config-with-directory-path.txt +++ /dev/null @@ -1,2 +0,0 @@ -The '--print-config' CLI option requires a path to a source code file rather than a directory. -See also: https://eslint.org/docs/user-guide/command-line-interface#--print-config diff --git a/node_modules/eslint/messages/shared.js b/node_modules/eslint/messages/shared.js new file mode 100644 index 000000000..8c6e9b921 --- /dev/null +++ b/node_modules/eslint/messages/shared.js @@ -0,0 +1,18 @@ +/** + * @fileoverview Shared utilities for error messages. + * @author Josh Goldberg + */ + +"use strict"; + +/** + * Converts a value to a string that may be printed in errors. + * @param {any} value The invalid value. + * @param {number} indentation How many spaces to indent + * @returns {string} The value, stringified. + */ +function stringifyValueForError(value, indentation) { + return value ? JSON.stringify(value, null, 4).replace(/\n/gu, `\n${" ".repeat(indentation)}`) : `${value}`; +} + +module.exports = { stringifyValueForError }; diff --git a/node_modules/eslint/messages/whitespace-found.js b/node_modules/eslint/messages/whitespace-found.js new file mode 100644 index 000000000..8a801bcec --- /dev/null +++ b/node_modules/eslint/messages/whitespace-found.js @@ -0,0 +1,11 @@ +"use strict"; + +module.exports = function(it) { + const { pluginName } = it; + + return ` +ESLint couldn't find the plugin "${pluginName}". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name. + +If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. +`.trimStart(); +}; diff --git a/node_modules/eslint/messages/whitespace-found.txt b/node_modules/eslint/messages/whitespace-found.txt deleted file mode 100644 index 3eed1af58..000000000 --- a/node_modules/eslint/messages/whitespace-found.txt +++ /dev/null @@ -1,3 +0,0 @@ -ESLint couldn't find the plugin "<%- pluginName %>". because there is whitespace in the name. Please check your configuration and remove all whitespace from the plugin name. - -If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team. diff --git a/node_modules/eslint/node_modules/.bin/js-yaml b/node_modules/eslint/node_modules/.bin/js-yaml new file mode 120000 index 000000000..9dbd010d4 --- /dev/null +++ b/node_modules/eslint/node_modules/.bin/js-yaml @@ -0,0 +1 @@ +../js-yaml/bin/js-yaml.js \ No newline at end of file diff --git a/node_modules/eslint/node_modules/argparse/CHANGELOG.md b/node_modules/eslint/node_modules/argparse/CHANGELOG.md new file mode 100644 index 000000000..dc39ed695 --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/CHANGELOG.md @@ -0,0 +1,216 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [2.0.1] - 2020-08-29 +### Fixed +- Fix issue with `process.argv` when used with interpreters (`coffee`, `ts-node`, etc.), #150. + + +## [2.0.0] - 2020-08-14 +### Changed +- Full rewrite. Now port from python 3.9.0 & more precise following. + See [doc](./doc) for difference and migration info. +- node.js 10+ required +- Removed most of local docs in favour of original ones. + + +## [1.0.10] - 2018-02-15 +### Fixed +- Use .concat instead of + for arrays, #122. + + +## [1.0.9] - 2016-09-29 +### Changed +- Rerelease after 1.0.8 - deps cleanup. + + +## [1.0.8] - 2016-09-29 +### Changed +- Maintenance (deps bump, fix node 6.5+ tests, coverage report). + + +## [1.0.7] - 2016-03-17 +### Changed +- Teach `addArgument` to accept string arg names. #97, @tomxtobin. + + +## [1.0.6] - 2016-02-06 +### Changed +- Maintenance: moved to eslint & updated CS. + + +## [1.0.5] - 2016-02-05 +### Changed +- Removed lodash dependency to significantly reduce install size. + Thanks to @mourner. + + +## [1.0.4] - 2016-01-17 +### Changed +- Maintenance: lodash update to 4.0.0. + + +## [1.0.3] - 2015-10-27 +### Fixed +- Fix parse `=` in args: `--examplepath="C:\myfolder\env=x64"`. #84, @CatWithApple. + + +## [1.0.2] - 2015-03-22 +### Changed +- Relaxed lodash version dependency. + + +## [1.0.1] - 2015-02-20 +### Changed +- Changed dependencies to be compatible with ancient nodejs. + + +## [1.0.0] - 2015-02-19 +### Changed +- Maintenance release. +- Replaced `underscore` with `lodash`. +- Bumped version to 1.0.0 to better reflect semver meaning. +- HISTORY.md -> CHANGELOG.md + + +## [0.1.16] - 2013-12-01 +### Changed +- Maintenance release. Updated dependencies and docs. + + +## [0.1.15] - 2013-05-13 +### Fixed +- Fixed #55, @trebor89 + + +## [0.1.14] - 2013-05-12 +### Fixed +- Fixed #62, @maxtaco + + +## [0.1.13] - 2013-04-08 +### Changed +- Added `.npmignore` to reduce package size + + +## [0.1.12] - 2013-02-10 +### Fixed +- Fixed conflictHandler (#46), @hpaulj + + +## [0.1.11] - 2013-02-07 +### Added +- Added 70+ tests (ported from python), @hpaulj +- Added conflictHandler, @applepicke +- Added fromfilePrefixChar, @hpaulj + +### Fixed +- Multiple bugfixes, @hpaulj + + +## [0.1.10] - 2012-12-30 +### Added +- Added [mutual exclusion](http://docs.python.org/dev/library/argparse.html#mutual-exclusion) + support, thanks to @hpaulj + +### Fixed +- Fixed options check for `storeConst` & `appendConst` actions, thanks to @hpaulj + + +## [0.1.9] - 2012-12-27 +### Fixed +- Fixed option dest interferens with other options (issue #23), thanks to @hpaulj +- Fixed default value behavior with `*` positionals, thanks to @hpaulj +- Improve `getDefault()` behavior, thanks to @hpaulj +- Improve negative argument parsing, thanks to @hpaulj + + +## [0.1.8] - 2012-12-01 +### Fixed +- Fixed parser parents (issue #19), thanks to @hpaulj +- Fixed negative argument parse (issue #20), thanks to @hpaulj + + +## [0.1.7] - 2012-10-14 +### Fixed +- Fixed 'choices' argument parse (issue #16) +- Fixed stderr output (issue #15) + + +## [0.1.6] - 2012-09-09 +### Fixed +- Fixed check for conflict of options (thanks to @tomxtobin) + + +## [0.1.5] - 2012-09-03 +### Fixed +- Fix parser #setDefaults method (thanks to @tomxtobin) + + +## [0.1.4] - 2012-07-30 +### Fixed +- Fixed pseudo-argument support (thanks to @CGamesPlay) +- Fixed addHelp default (should be true), if not set (thanks to @benblank) + + +## [0.1.3] - 2012-06-27 +### Fixed +- Fixed formatter api name: Formatter -> HelpFormatter + + +## [0.1.2] - 2012-05-29 +### Fixed +- Removed excess whitespace in help +- Fixed error reporting, when parcer with subcommands + called with empty arguments + +### Added +- Added basic tests + + +## [0.1.1] - 2012-05-23 +### Fixed +- Fixed line wrapping in help formatter +- Added better error reporting on invalid arguments + + +## [0.1.0] - 2012-05-16 +### Added +- First release. + + +[2.0.1]: https://github.com/nodeca/argparse/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/argparse/compare/1.0.10...2.0.0 +[1.0.10]: https://github.com/nodeca/argparse/compare/1.0.9...1.0.10 +[1.0.9]: https://github.com/nodeca/argparse/compare/1.0.8...1.0.9 +[1.0.8]: https://github.com/nodeca/argparse/compare/1.0.7...1.0.8 +[1.0.7]: https://github.com/nodeca/argparse/compare/1.0.6...1.0.7 +[1.0.6]: https://github.com/nodeca/argparse/compare/1.0.5...1.0.6 +[1.0.5]: https://github.com/nodeca/argparse/compare/1.0.4...1.0.5 +[1.0.4]: https://github.com/nodeca/argparse/compare/1.0.3...1.0.4 +[1.0.3]: https://github.com/nodeca/argparse/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/argparse/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/argparse/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/argparse/compare/0.1.16...1.0.0 +[0.1.16]: https://github.com/nodeca/argparse/compare/0.1.15...0.1.16 +[0.1.15]: https://github.com/nodeca/argparse/compare/0.1.14...0.1.15 +[0.1.14]: https://github.com/nodeca/argparse/compare/0.1.13...0.1.14 +[0.1.13]: https://github.com/nodeca/argparse/compare/0.1.12...0.1.13 +[0.1.12]: https://github.com/nodeca/argparse/compare/0.1.11...0.1.12 +[0.1.11]: https://github.com/nodeca/argparse/compare/0.1.10...0.1.11 +[0.1.10]: https://github.com/nodeca/argparse/compare/0.1.9...0.1.10 +[0.1.9]: https://github.com/nodeca/argparse/compare/0.1.8...0.1.9 +[0.1.8]: https://github.com/nodeca/argparse/compare/0.1.7...0.1.8 +[0.1.7]: https://github.com/nodeca/argparse/compare/0.1.6...0.1.7 +[0.1.6]: https://github.com/nodeca/argparse/compare/0.1.5...0.1.6 +[0.1.5]: https://github.com/nodeca/argparse/compare/0.1.4...0.1.5 +[0.1.4]: https://github.com/nodeca/argparse/compare/0.1.3...0.1.4 +[0.1.3]: https://github.com/nodeca/argparse/compare/0.1.2...0.1.3 +[0.1.2]: https://github.com/nodeca/argparse/compare/0.1.1...0.1.2 +[0.1.1]: https://github.com/nodeca/argparse/compare/0.1.0...0.1.1 +[0.1.0]: https://github.com/nodeca/argparse/releases/tag/0.1.0 diff --git a/node_modules/eslint/node_modules/argparse/LICENSE b/node_modules/eslint/node_modules/argparse/LICENSE new file mode 100644 index 000000000..66a3ac80d --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/LICENSE @@ -0,0 +1,254 @@ +A. HISTORY OF THE SOFTWARE +========================== + +Python was created in the early 1990s by Guido van Rossum at Stichting +Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands +as a successor of a language called ABC. Guido remains Python's +principal author, although it includes many contributions from others. + +In 1995, Guido continued his work on Python at the Corporation for +National Research Initiatives (CNRI, see http://www.cnri.reston.va.us) +in Reston, Virginia where he released several versions of the +software. + +In May 2000, Guido and the Python core development team moved to +BeOpen.com to form the BeOpen PythonLabs team. In October of the same +year, the PythonLabs team moved to Digital Creations, which became +Zope Corporation. In 2001, the Python Software Foundation (PSF, see +https://www.python.org/psf/) was formed, a non-profit organization +created specifically to own Python-related Intellectual Property. +Zope Corporation was a sponsoring member of the PSF. + +All Python releases are Open Source (see http://www.opensource.org for +the Open Source Definition). Historically, most, but not all, Python +releases have also been GPL-compatible; the table below summarizes +the various releases. + + Release Derived Year Owner GPL- + from compatible? (1) + + 0.9.0 thru 1.2 1991-1995 CWI yes + 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes + 1.6 1.5.2 2000 CNRI no + 2.0 1.6 2000 BeOpen.com no + 1.6.1 1.6 2001 CNRI yes (2) + 2.1 2.0+1.6.1 2001 PSF no + 2.0.1 2.0+1.6.1 2001 PSF yes + 2.1.1 2.1+2.0.1 2001 PSF yes + 2.1.2 2.1.1 2002 PSF yes + 2.1.3 2.1.2 2002 PSF yes + 2.2 and above 2.1.1 2001-now PSF yes + +Footnotes: + +(1) GPL-compatible doesn't mean that we're distributing Python under + the GPL. All Python licenses, unlike the GPL, let you distribute + a modified version without making your changes open source. The + GPL-compatible licenses make it possible to combine Python with + other software that is released under the GPL; the others don't. + +(2) According to Richard Stallman, 1.6.1 is not GPL-compatible, + because its license has a choice of law clause. According to + CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1 + is "not incompatible" with the GPL. + +Thanks to the many outside volunteers who have worked under Guido's +direction to make these releases possible. + + +B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON +=============================================================== + +PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 +-------------------------------------------- + +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, PSF hereby +grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, +analyze, test, perform and/or display publicly, prepare derivative works, +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Python Software Foundation; +All Rights Reserved" are retained in Python alone or in any derivative version +prepared by Licensee. + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. + +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. + +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 +------------------------------------------- + +BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 + +1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an +office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the +Individual or Organization ("Licensee") accessing and otherwise using +this software in source or binary form and its associated +documentation ("the Software"). + +2. Subject to the terms and conditions of this BeOpen Python License +Agreement, BeOpen hereby grants Licensee a non-exclusive, +royalty-free, world-wide license to reproduce, analyze, test, perform +and/or display publicly, prepare derivative works, distribute, and +otherwise use the Software alone or in any derivative version, +provided, however, that the BeOpen Python License is retained in the +Software, alone or in any derivative version prepared by Licensee. + +3. BeOpen is making the Software available to Licensee on an "AS IS" +basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE +SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS +AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY +DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +5. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +6. This License Agreement shall be governed by and interpreted in all +respects by the law of the State of California, excluding conflict of +law provisions. Nothing in this License Agreement shall be deemed to +create any relationship of agency, partnership, or joint venture +between BeOpen and Licensee. This License Agreement does not grant +permission to use BeOpen trademarks or trade names in a trademark +sense to endorse or promote products or services of Licensee, or any +third party. As an exception, the "BeOpen Python" logos available at +http://www.pythonlabs.com/logos.html may be used according to the +permissions granted on that web page. + +7. By copying, installing or otherwise using the software, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. + + +CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1 +--------------------------------------- + +1. This LICENSE AGREEMENT is between the Corporation for National +Research Initiatives, having an office at 1895 Preston White Drive, +Reston, VA 20191 ("CNRI"), and the Individual or Organization +("Licensee") accessing and otherwise using Python 1.6.1 software in +source or binary form and its associated documentation. + +2. Subject to the terms and conditions of this License Agreement, CNRI +hereby grants Licensee a nonexclusive, royalty-free, world-wide +license to reproduce, analyze, test, perform and/or display publicly, +prepare derivative works, distribute, and otherwise use Python 1.6.1 +alone or in any derivative version, provided, however, that CNRI's +License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) +1995-2001 Corporation for National Research Initiatives; All Rights +Reserved" are retained in Python 1.6.1 alone or in any derivative +version prepared by Licensee. Alternately, in lieu of CNRI's License +Agreement, Licensee may substitute the following text (omitting the +quotes): "Python 1.6.1 is made available subject to the terms and +conditions in CNRI's License Agreement. This Agreement together with +Python 1.6.1 may be located on the Internet using the following +unique, persistent identifier (known as a handle): 1895.22/1013. This +Agreement may also be obtained from a proxy server on the Internet +using the following URL: http://hdl.handle.net/1895.22/1013". + +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python 1.6.1 or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python 1.6.1. + +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" +basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. + +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. + +7. This License Agreement shall be governed by the federal +intellectual property law of the United States, including without +limitation the federal copyright law, and, to the extent such +U.S. federal law does not apply, by the law of the Commonwealth of +Virginia, excluding Virginia's conflict of law provisions. +Notwithstanding the foregoing, with regard to derivative works based +on Python 1.6.1 that incorporate non-separable material that was +previously distributed under the GNU General Public License (GPL), the +law of the Commonwealth of Virginia shall govern this License +Agreement only as to issues arising under or with respect to +Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this +License Agreement shall be deemed to create any relationship of +agency, partnership, or joint venture between CNRI and Licensee. This +License Agreement does not grant permission to use CNRI trademarks or +trade name in a trademark sense to endorse or promote products or +services of Licensee, or any third party. + +8. By clicking on the "ACCEPT" button where indicated, or by copying, +installing or otherwise using Python 1.6.1, Licensee agrees to be +bound by the terms and conditions of this License Agreement. + + ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 +-------------------------------------------------- + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, +The Netherlands. All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Stichting Mathematisch +Centrum or CWI not be used in advertising or publicity pertaining to +distribution of the software without specific, written prior +permission. + +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/eslint/node_modules/argparse/README.md b/node_modules/eslint/node_modules/argparse/README.md new file mode 100644 index 000000000..550b5c9b7 --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/README.md @@ -0,0 +1,84 @@ +argparse +======== + +[![Build Status](https://secure.travis-ci.org/nodeca/argparse.svg?branch=master)](http://travis-ci.org/nodeca/argparse) +[![NPM version](https://img.shields.io/npm/v/argparse.svg)](https://www.npmjs.org/package/argparse) + +CLI arguments parser for node.js, with [sub-commands](https://docs.python.org/3.9/library/argparse.html#sub-commands) support. Port of python's [argparse](http://docs.python.org/dev/library/argparse.html) (version [3.9.0](https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py)). + +**Difference with original.** + +- JS has no keyword arguments support. + - Pass options instead: `new ArgumentParser({ description: 'example', add_help: true })`. +- JS has no python's types `int`, `float`, ... + - Use string-typed names: `.add_argument('-b', { type: 'int', help: 'help' })`. +- `%r` format specifier uses `require('util').inspect()`. + +More details in [doc](./doc). + + +Example +------- + +`test.js` file: + +```javascript +#!/usr/bin/env node +'use strict'; + +const { ArgumentParser } = require('argparse'); +const { version } = require('./package.json'); + +const parser = new ArgumentParser({ + description: 'Argparse example' +}); + +parser.add_argument('-v', '--version', { action: 'version', version }); +parser.add_argument('-f', '--foo', { help: 'foo bar' }); +parser.add_argument('-b', '--bar', { help: 'bar foo' }); +parser.add_argument('--baz', { help: 'baz bar' }); + +console.dir(parser.parse_args()); +``` + +Display help: + +``` +$ ./test.js -h +usage: test.js [-h] [-v] [-f FOO] [-b BAR] [--baz BAZ] + +Argparse example + +optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + -f FOO, --foo FOO foo bar + -b BAR, --bar BAR bar foo + --baz BAZ baz bar +``` + +Parse arguments: + +``` +$ ./test.js -f=3 --bar=4 --baz 5 +{ foo: '3', bar: '4', baz: '5' } +``` + + +API docs +-------- + +Since this is a port with minimal divergence, there's no separate documentation. +Use original one instead, with notes about difference. + +1. [Original doc](https://docs.python.org/3.9/library/argparse.html). +2. [Original tutorial](https://docs.python.org/3.9/howto/argparse.html). +3. [Difference with python](./doc). + + +argparse for enterprise +----------------------- + +Available as part of the Tidelift Subscription + +The maintainers of argparse and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-argparse?utm_source=npm-argparse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/eslint/node_modules/argparse/argparse.js b/node_modules/eslint/node_modules/argparse/argparse.js new file mode 100644 index 000000000..2b8c8c631 --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/argparse.js @@ -0,0 +1,3707 @@ +// Port of python's argparse module, version 3.9.0: +// https://github.com/python/cpython/blob/v3.9.0rc1/Lib/argparse.py + +'use strict' + +// Copyright (C) 2010-2020 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors + +/* + * Command-line parsing library + * + * This module is an optparse-inspired command-line parsing library that: + * + * - handles both optional and positional arguments + * - produces highly informative usage messages + * - supports parsers that dispatch to sub-parsers + * + * The following is a simple usage example that sums integers from the + * command-line and writes the result to a file:: + * + * parser = argparse.ArgumentParser( + * description='sum the integers at the command line') + * parser.add_argument( + * 'integers', metavar='int', nargs='+', type=int, + * help='an integer to be summed') + * parser.add_argument( + * '--log', default=sys.stdout, type=argparse.FileType('w'), + * help='the file where the sum should be written') + * args = parser.parse_args() + * args.log.write('%s' % sum(args.integers)) + * args.log.close() + * + * The module contains the following public classes: + * + * - ArgumentParser -- The main entry point for command-line parsing. As the + * example above shows, the add_argument() method is used to populate + * the parser with actions for optional and positional arguments. Then + * the parse_args() method is invoked to convert the args at the + * command-line into an object with attributes. + * + * - ArgumentError -- The exception raised by ArgumentParser objects when + * there are errors with the parser's actions. Errors raised while + * parsing the command-line are caught by ArgumentParser and emitted + * as command-line messages. + * + * - FileType -- A factory for defining types of files to be created. As the + * example above shows, instances of FileType are typically passed as + * the type= argument of add_argument() calls. + * + * - Action -- The base class for parser actions. Typically actions are + * selected by passing strings like 'store_true' or 'append_const' to + * the action= argument of add_argument(). However, for greater + * customization of ArgumentParser actions, subclasses of Action may + * be defined and passed as the action= argument. + * + * - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter, + * ArgumentDefaultsHelpFormatter -- Formatter classes which + * may be passed as the formatter_class= argument to the + * ArgumentParser constructor. HelpFormatter is the default, + * RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser + * not to change the formatting for help text, and + * ArgumentDefaultsHelpFormatter adds information about argument defaults + * to the help. + * + * All other classes in this module are considered implementation details. + * (Also note that HelpFormatter and RawDescriptionHelpFormatter are only + * considered public as object names -- the API of the formatter objects is + * still considered an implementation detail.) + */ + +const SUPPRESS = '==SUPPRESS==' + +const OPTIONAL = '?' +const ZERO_OR_MORE = '*' +const ONE_OR_MORE = '+' +const PARSER = 'A...' +const REMAINDER = '...' +const _UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args' + + +// ================================== +// Utility functions used for porting +// ================================== +const assert = require('assert') +const util = require('util') +const fs = require('fs') +const sub = require('./lib/sub') +const path = require('path') +const repr = util.inspect + +function get_argv() { + // omit first argument (which is assumed to be interpreter - `node`, `coffee`, `ts-node`, etc.) + return process.argv.slice(1) +} + +function get_terminal_size() { + return { + columns: +process.env.COLUMNS || process.stdout.columns || 80 + } +} + +function hasattr(object, name) { + return Object.prototype.hasOwnProperty.call(object, name) +} + +function getattr(object, name, value) { + return hasattr(object, name) ? object[name] : value +} + +function setattr(object, name, value) { + object[name] = value +} + +function setdefault(object, name, value) { + if (!hasattr(object, name)) object[name] = value + return object[name] +} + +function delattr(object, name) { + delete object[name] +} + +function range(from, to, step=1) { + // range(10) is equivalent to range(0, 10) + if (arguments.length === 1) [ to, from ] = [ from, 0 ] + if (typeof from !== 'number' || typeof to !== 'number' || typeof step !== 'number') { + throw new TypeError('argument cannot be interpreted as an integer') + } + if (step === 0) throw new TypeError('range() arg 3 must not be zero') + + let result = [] + if (step > 0) { + for (let i = from; i < to; i += step) result.push(i) + } else { + for (let i = from; i > to; i += step) result.push(i) + } + return result +} + +function splitlines(str, keepends = false) { + let result + if (!keepends) { + result = str.split(/\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029]/) + } else { + result = [] + let parts = str.split(/(\r\n|[\n\r\v\f\x1c\x1d\x1e\x85\u2028\u2029])/) + for (let i = 0; i < parts.length; i += 2) { + result.push(parts[i] + (i + 1 < parts.length ? parts[i + 1] : '')) + } + } + if (!result[result.length - 1]) result.pop() + return result +} + +function _string_lstrip(string, prefix_chars) { + let idx = 0 + while (idx < string.length && prefix_chars.includes(string[idx])) idx++ + return idx ? string.slice(idx) : string +} + +function _string_split(string, sep, maxsplit) { + let result = string.split(sep) + if (result.length > maxsplit) { + result = result.slice(0, maxsplit).concat([ result.slice(maxsplit).join(sep) ]) + } + return result +} + +function _array_equal(array1, array2) { + if (array1.length !== array2.length) return false + for (let i = 0; i < array1.length; i++) { + if (array1[i] !== array2[i]) return false + } + return true +} + +function _array_remove(array, item) { + let idx = array.indexOf(item) + if (idx === -1) throw new TypeError(sub('%r not in list', item)) + array.splice(idx, 1) +} + +// normalize choices to array; +// this isn't required in python because `in` and `map` operators work with anything, +// but in js dealing with multiple types here is too clunky +function _choices_to_array(choices) { + if (choices === undefined) { + return [] + } else if (Array.isArray(choices)) { + return choices + } else if (choices !== null && typeof choices[Symbol.iterator] === 'function') { + return Array.from(choices) + } else if (typeof choices === 'object' && choices !== null) { + return Object.keys(choices) + } else { + throw new Error(sub('invalid choices value: %r', choices)) + } +} + +// decorator that allows a class to be called without new +function _callable(cls) { + let result = { // object is needed for inferred class name + [cls.name]: function (...args) { + let this_class = new.target === result || !new.target + return Reflect.construct(cls, args, this_class ? cls : new.target) + } + } + result[cls.name].prototype = cls.prototype + // fix default tag for toString, e.g. [object Action] instead of [object Object] + cls.prototype[Symbol.toStringTag] = cls.name + return result[cls.name] +} + +function _alias(object, from, to) { + try { + let name = object.constructor.name + Object.defineProperty(object, from, { + value: util.deprecate(object[to], sub('%s.%s() is renamed to %s.%s()', + name, from, name, to)), + enumerable: false + }) + } catch {} +} + +// decorator that allows snake_case class methods to be called with camelCase and vice versa +function _camelcase_alias(_class) { + for (let name of Object.getOwnPropertyNames(_class.prototype)) { + let camelcase = name.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (camelcase !== name) _alias(_class.prototype, camelcase, name) + } + return _class +} + +function _to_legacy_name(key) { + key = key.replace(/\w_[a-z]/g, s => s[0] + s[2].toUpperCase()) + if (key === 'default') key = 'defaultValue' + if (key === 'const') key = 'constant' + return key +} + +function _to_new_name(key) { + if (key === 'defaultValue') key = 'default' + if (key === 'constant') key = 'const' + key = key.replace(/[A-Z]/g, c => '_' + c.toLowerCase()) + return key +} + +// parse options +let no_default = Symbol('no_default_value') +function _parse_opts(args, descriptor) { + function get_name() { + let stack = new Error().stack.split('\n') + .map(x => x.match(/^ at (.*) \(.*\)$/)) + .filter(Boolean) + .map(m => m[1]) + .map(fn => fn.match(/[^ .]*$/)[0]) + + if (stack.length && stack[0] === get_name.name) stack.shift() + if (stack.length && stack[0] === _parse_opts.name) stack.shift() + return stack.length ? stack[0] : '' + } + + args = Array.from(args) + let kwargs = {} + let result = [] + let last_opt = args.length && args[args.length - 1] + + if (typeof last_opt === 'object' && last_opt !== null && !Array.isArray(last_opt) && + (!last_opt.constructor || last_opt.constructor.name === 'Object')) { + kwargs = Object.assign({}, args.pop()) + } + + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(descriptor)) { + let old_name = _to_legacy_name(key) + if (old_name !== key && (old_name in kwargs)) { + if (key in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else { + kwargs[key] = kwargs[old_name] + } + renames.push([ old_name, key ]) + delete kwargs[old_name] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + + let missing_positionals = [] + let positional_count = args.length + + for (let [ key, def ] of Object.entries(descriptor)) { + if (key[0] === '*') { + if (key.length > 0 && key[1] === '*') { + // LEGACY (v1 compatibility): camelcase + let renames = [] + for (let key of Object.keys(kwargs)) { + let new_name = _to_new_name(key) + if (new_name !== key && (key in kwargs)) { + if (new_name in kwargs) { + // default and defaultValue specified at the same time, happens often in old tests + //throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), new_name)) + } else { + kwargs[new_name] = kwargs[key] + } + renames.push([ key, new_name ]) + delete kwargs[key] + } + } + if (renames.length) { + let name = get_name() + deprecate('camelcase_' + name, sub('%s(): following options are renamed: %s', + name, renames.map(([ a, b ]) => sub('%r -> %r', a, b)))) + } + // end + result.push(kwargs) + kwargs = {} + } else { + result.push(args) + args = [] + } + } else if (key in kwargs && args.length > 0) { + throw new TypeError(sub('%s() got multiple values for argument %r', get_name(), key)) + } else if (key in kwargs) { + result.push(kwargs[key]) + delete kwargs[key] + } else if (args.length > 0) { + result.push(args.shift()) + } else if (def !== no_default) { + result.push(def) + } else { + missing_positionals.push(key) + } + } + + if (Object.keys(kwargs).length) { + throw new TypeError(sub('%s() got an unexpected keyword argument %r', + get_name(), Object.keys(kwargs)[0])) + } + + if (args.length) { + let from = Object.entries(descriptor).filter(([ k, v ]) => k[0] !== '*' && v !== no_default).length + let to = Object.entries(descriptor).filter(([ k ]) => k[0] !== '*').length + throw new TypeError(sub('%s() takes %s positional argument%s but %s %s given', + get_name(), + from === to ? sub('from %s to %s', from, to) : to, + from === to && to === 1 ? '' : 's', + positional_count, + positional_count === 1 ? 'was' : 'were')) + } + + if (missing_positionals.length) { + let strs = missing_positionals.map(repr) + if (strs.length > 1) strs[strs.length - 1] = 'and ' + strs[strs.length - 1] + let str_joined = strs.join(strs.length === 2 ? '' : ', ') + throw new TypeError(sub('%s() missing %i required positional argument%s: %s', + get_name(), strs.length, strs.length === 1 ? '' : 's', str_joined)) + } + + return result +} + +let _deprecations = {} +function deprecate(id, string) { + _deprecations[id] = _deprecations[id] || util.deprecate(() => {}, string) + _deprecations[id]() +} + + +// ============================= +// Utility functions and classes +// ============================= +function _AttributeHolder(cls = Object) { + /* + * Abstract base class that provides __repr__. + * + * The __repr__ method returns a string in the format:: + * ClassName(attr=name, attr=name, ...) + * The attributes are determined either by a class-level attribute, + * '_kwarg_names', or by inspecting the instance __dict__. + */ + + return class _AttributeHolder extends cls { + [util.inspect.custom]() { + let type_name = this.constructor.name + let arg_strings = [] + let star_args = {} + for (let arg of this._get_args()) { + arg_strings.push(repr(arg)) + } + for (let [ name, value ] of this._get_kwargs()) { + if (/^[a-z_][a-z0-9_$]*$/i.test(name)) { + arg_strings.push(sub('%s=%r', name, value)) + } else { + star_args[name] = value + } + } + if (Object.keys(star_args).length) { + arg_strings.push(sub('**%s', repr(star_args))) + } + return sub('%s(%s)', type_name, arg_strings.join(', ')) + } + + toString() { + return this[util.inspect.custom]() + } + + _get_kwargs() { + return Object.entries(this) + } + + _get_args() { + return [] + } + } +} + + +function _copy_items(items) { + if (items === undefined) { + return [] + } + return items.slice(0) +} + + +// =============== +// Formatting Help +// =============== +const HelpFormatter = _camelcase_alias(_callable(class HelpFormatter { + /* + * Formatter for generating usage messages and argument help strings. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + constructor() { + let [ + prog, + indent_increment, + max_help_position, + width + ] = _parse_opts(arguments, { + prog: no_default, + indent_increment: 2, + max_help_position: 24, + width: undefined + }) + + // default setting for width + if (width === undefined) { + width = get_terminal_size().columns + width -= 2 + } + + this._prog = prog + this._indent_increment = indent_increment + this._max_help_position = Math.min(max_help_position, + Math.max(width - 20, indent_increment * 2)) + this._width = width + + this._current_indent = 0 + this._level = 0 + this._action_max_length = 0 + + this._root_section = this._Section(this, undefined) + this._current_section = this._root_section + + this._whitespace_matcher = /[ \t\n\r\f\v]+/g // equivalent to python /\s+/ with ASCII flag + this._long_break_matcher = /\n\n\n+/g + } + + // =============================== + // Section and indentation methods + // =============================== + _indent() { + this._current_indent += this._indent_increment + this._level += 1 + } + + _dedent() { + this._current_indent -= this._indent_increment + assert(this._current_indent >= 0, 'Indent decreased below 0.') + this._level -= 1 + } + + _add_item(func, args) { + this._current_section.items.push([ func, args ]) + } + + // ======================== + // Message building methods + // ======================== + start_section(heading) { + this._indent() + let section = this._Section(this, this._current_section, heading) + this._add_item(section.format_help.bind(section), []) + this._current_section = section + } + + end_section() { + this._current_section = this._current_section.parent + this._dedent() + } + + add_text(text) { + if (text !== SUPPRESS && text !== undefined) { + this._add_item(this._format_text.bind(this), [text]) + } + } + + add_usage(usage, actions, groups, prefix = undefined) { + if (usage !== SUPPRESS) { + let args = [ usage, actions, groups, prefix ] + this._add_item(this._format_usage.bind(this), args) + } + } + + add_argument(action) { + if (action.help !== SUPPRESS) { + + // find all invocations + let invocations = [this._format_action_invocation(action)] + for (let subaction of this._iter_indented_subactions(action)) { + invocations.push(this._format_action_invocation(subaction)) + } + + // update the maximum item length + let invocation_length = Math.max(...invocations.map(invocation => invocation.length)) + let action_length = invocation_length + this._current_indent + this._action_max_length = Math.max(this._action_max_length, + action_length) + + // add the item to the list + this._add_item(this._format_action.bind(this), [action]) + } + } + + add_arguments(actions) { + for (let action of actions) { + this.add_argument(action) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_help() { + let help = this._root_section.format_help() + if (help) { + help = help.replace(this._long_break_matcher, '\n\n') + help = help.replace(/^\n+|\n+$/g, '') + '\n' + } + return help + } + + _join_parts(part_strings) { + return part_strings.filter(part => part && part !== SUPPRESS).join('') + } + + _format_usage(usage, actions, groups, prefix) { + if (prefix === undefined) { + prefix = 'usage: ' + } + + // if usage is specified, use that + if (usage !== undefined) { + usage = sub(usage, { prog: this._prog }) + + // if no optionals or positionals are available, usage is just prog + } else if (usage === undefined && !actions.length) { + usage = sub('%(prog)s', { prog: this._prog }) + + // if optionals and positionals are available, calculate usage + } else if (usage === undefined) { + let prog = sub('%(prog)s', { prog: this._prog }) + + // split optionals from positionals + let optionals = [] + let positionals = [] + for (let action of actions) { + if (action.option_strings.length) { + optionals.push(action) + } else { + positionals.push(action) + } + } + + // build full usage string + let action_usage = this._format_actions_usage([].concat(optionals).concat(positionals), groups) + usage = [ prog, action_usage ].map(String).join(' ') + + // wrap the usage parts if it's too long + let text_width = this._width - this._current_indent + if (prefix.length + usage.length > text_width) { + + // break usage into wrappable parts + let part_regexp = /\(.*?\)+(?=\s|$)|\[.*?\]+(?=\s|$)|\S+/g + let opt_usage = this._format_actions_usage(optionals, groups) + let pos_usage = this._format_actions_usage(positionals, groups) + let opt_parts = opt_usage.match(part_regexp) || [] + let pos_parts = pos_usage.match(part_regexp) || [] + assert(opt_parts.join(' ') === opt_usage) + assert(pos_parts.join(' ') === pos_usage) + + // helper for wrapping lines + let get_lines = (parts, indent, prefix = undefined) => { + let lines = [] + let line = [] + let line_len + if (prefix !== undefined) { + line_len = prefix.length - 1 + } else { + line_len = indent.length - 1 + } + for (let part of parts) { + if (line_len + 1 + part.length > text_width && line) { + lines.push(indent + line.join(' ')) + line = [] + line_len = indent.length - 1 + } + line.push(part) + line_len += part.length + 1 + } + if (line.length) { + lines.push(indent + line.join(' ')) + } + if (prefix !== undefined) { + lines[0] = lines[0].slice(indent.length) + } + return lines + } + + let lines + + // if prog is short, follow it with optionals or positionals + if (prefix.length + prog.length <= 0.75 * text_width) { + let indent = ' '.repeat(prefix.length + prog.length + 1) + if (opt_parts.length) { + lines = get_lines([prog].concat(opt_parts), indent, prefix) + lines = lines.concat(get_lines(pos_parts, indent)) + } else if (pos_parts.length) { + lines = get_lines([prog].concat(pos_parts), indent, prefix) + } else { + lines = [prog] + } + + // if prog is long, put it on its own line + } else { + let indent = ' '.repeat(prefix.length) + let parts = [].concat(opt_parts).concat(pos_parts) + lines = get_lines(parts, indent) + if (lines.length > 1) { + lines = [] + lines = lines.concat(get_lines(opt_parts, indent)) + lines = lines.concat(get_lines(pos_parts, indent)) + } + lines = [prog].concat(lines) + } + + // join lines into usage + usage = lines.join('\n') + } + } + + // prefix with 'usage:' + return sub('%s%s\n\n', prefix, usage) + } + + _format_actions_usage(actions, groups) { + // find group indices and identify actions in groups + let group_actions = new Set() + let inserts = {} + for (let group of groups) { + let start = actions.indexOf(group._group_actions[0]) + if (start === -1) { + continue + } else { + let end = start + group._group_actions.length + if (_array_equal(actions.slice(start, end), group._group_actions)) { + for (let action of group._group_actions) { + group_actions.add(action) + } + if (!group.required) { + if (start in inserts) { + inserts[start] += ' [' + } else { + inserts[start] = '[' + } + if (end in inserts) { + inserts[end] += ']' + } else { + inserts[end] = ']' + } + } else { + if (start in inserts) { + inserts[start] += ' (' + } else { + inserts[start] = '(' + } + if (end in inserts) { + inserts[end] += ')' + } else { + inserts[end] = ')' + } + } + for (let i of range(start + 1, end)) { + inserts[i] = '|' + } + } + } + } + + // collect all actions format strings + let parts = [] + for (let [ i, action ] of Object.entries(actions)) { + + // suppressed arguments are marked with None + // remove | separators for suppressed arguments + if (action.help === SUPPRESS) { + parts.push(undefined) + if (inserts[+i] === '|') { + delete inserts[+i] + } else if (inserts[+i + 1] === '|') { + delete inserts[+i + 1] + } + + // produce all arg strings + } else if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let part = this._format_args(action, default_value) + + // if it's in a group, strip the outer [] + if (group_actions.has(action)) { + if (part[0] === '[' && part[part.length - 1] === ']') { + part = part.slice(1, -1) + } + } + + // add the action string to the list + parts.push(part) + + // produce the first way to invoke the option in brackets + } else { + let option_string = action.option_strings[0] + let part + + // if the Optional doesn't take a value, format is: + // -s or --long + if (action.nargs === 0) { + part = action.format_usage() + + // if the Optional takes a value, format is: + // -s ARGS or --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + part = sub('%s %s', option_string, args_string) + } + + // make it look optional if it's not required or in a group + if (!action.required && !group_actions.has(action)) { + part = sub('[%s]', part) + } + + // add the action string to the list + parts.push(part) + } + } + + // insert things at the necessary indices + for (let i of Object.keys(inserts).map(Number).sort((a, b) => b - a)) { + parts.splice(+i, 0, inserts[+i]) + } + + // join all the action items with spaces + let text = parts.filter(Boolean).join(' ') + + // clean up separators for mutually exclusive groups + text = text.replace(/([\[(]) /g, '$1') + text = text.replace(/ ([\])])/g, '$1') + text = text.replace(/[\[(] *[\])]/g, '') + text = text.replace(/\(([^|]*)\)/g, '$1', text) + text = text.trim() + + // return the text + return text + } + + _format_text(text) { + if (text.includes('%(prog)')) { + text = sub(text, { prog: this._prog }) + } + let text_width = Math.max(this._width - this._current_indent, 11) + let indent = ' '.repeat(this._current_indent) + return this._fill_text(text, text_width, indent) + '\n\n' + } + + _format_action(action) { + // determine the required width and the entry label + let help_position = Math.min(this._action_max_length + 2, + this._max_help_position) + let help_width = Math.max(this._width - help_position, 11) + let action_width = help_position - this._current_indent - 2 + let action_header = this._format_action_invocation(action) + let indent_first + + // no help; start on same line and add a final newline + if (!action.help) { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + + // short action name; start on the same line and pad two spaces + } else if (action_header.length <= action_width) { + let tup = [ this._current_indent, '', action_width, action_header ] + action_header = sub('%*s%-*s ', ...tup) + indent_first = 0 + + // long action name; start on the next line + } else { + let tup = [ this._current_indent, '', action_header ] + action_header = sub('%*s%s\n', ...tup) + indent_first = help_position + } + + // collect the pieces of the action help + let parts = [action_header] + + // if there was help for the action, add lines of help text + if (action.help) { + let help_text = this._expand_help(action) + let help_lines = this._split_lines(help_text, help_width) + parts.push(sub('%*s%s\n', indent_first, '', help_lines[0])) + for (let line of help_lines.slice(1)) { + parts.push(sub('%*s%s\n', help_position, '', line)) + } + + // or add a newline if the description doesn't end with one + } else if (!action_header.endsWith('\n')) { + parts.push('\n') + } + + // if there are any sub-actions, add their help as well + for (let subaction of this._iter_indented_subactions(action)) { + parts.push(this._format_action(subaction)) + } + + // return a single string + return this._join_parts(parts) + } + + _format_action_invocation(action) { + if (!action.option_strings.length) { + let default_value = this._get_default_metavar_for_positional(action) + let metavar = this._metavar_formatter(action, default_value)(1)[0] + return metavar + + } else { + let parts = [] + + // if the Optional doesn't take a value, format is: + // -s, --long + if (action.nargs === 0) { + parts = parts.concat(action.option_strings) + + // if the Optional takes a value, format is: + // -s ARGS, --long ARGS + } else { + let default_value = this._get_default_metavar_for_optional(action) + let args_string = this._format_args(action, default_value) + for (let option_string of action.option_strings) { + parts.push(sub('%s %s', option_string, args_string)) + } + } + + return parts.join(', ') + } + } + + _metavar_formatter(action, default_metavar) { + let result + if (action.metavar !== undefined) { + result = action.metavar + } else if (action.choices !== undefined) { + let choice_strs = _choices_to_array(action.choices).map(String) + result = sub('{%s}', choice_strs.join(',')) + } else { + result = default_metavar + } + + function format(tuple_size) { + if (Array.isArray(result)) { + return result + } else { + return Array(tuple_size).fill(result) + } + } + return format + } + + _format_args(action, default_metavar) { + let get_metavar = this._metavar_formatter(action, default_metavar) + let result + if (action.nargs === undefined) { + result = sub('%s', ...get_metavar(1)) + } else if (action.nargs === OPTIONAL) { + result = sub('[%s]', ...get_metavar(1)) + } else if (action.nargs === ZERO_OR_MORE) { + let metavar = get_metavar(1) + if (metavar.length === 2) { + result = sub('[%s [%s ...]]', ...metavar) + } else { + result = sub('[%s ...]', ...metavar) + } + } else if (action.nargs === ONE_OR_MORE) { + result = sub('%s [%s ...]', ...get_metavar(2)) + } else if (action.nargs === REMAINDER) { + result = '...' + } else if (action.nargs === PARSER) { + result = sub('%s ...', ...get_metavar(1)) + } else if (action.nargs === SUPPRESS) { + result = '' + } else { + let formats + try { + formats = range(action.nargs).map(() => '%s') + } catch (err) { + throw new TypeError('invalid nargs value') + } + result = sub(formats.join(' '), ...get_metavar(action.nargs)) + } + return result + } + + _expand_help(action) { + let params = Object.assign({ prog: this._prog }, action) + for (let name of Object.keys(params)) { + if (params[name] === SUPPRESS) { + delete params[name] + } + } + for (let name of Object.keys(params)) { + if (params[name] && params[name].name) { + params[name] = params[name].name + } + } + if (params.choices !== undefined) { + let choices_str = _choices_to_array(params.choices).map(String).join(', ') + params.choices = choices_str + } + // LEGACY (v1 compatibility): camelcase + for (let key of Object.keys(params)) { + let old_name = _to_legacy_name(key) + if (old_name !== key) { + params[old_name] = params[key] + } + } + // end + return sub(this._get_help_string(action), params) + } + + * _iter_indented_subactions(action) { + if (typeof action._get_subactions === 'function') { + this._indent() + yield* action._get_subactions() + this._dedent() + } + } + + _split_lines(text, width) { + text = text.replace(this._whitespace_matcher, ' ').trim() + // The textwrap module is used only for formatting help. + // Delay its import for speeding up the common usage of argparse. + let textwrap = require('./lib/textwrap') + return textwrap.wrap(text, { width }) + } + + _fill_text(text, width, indent) { + text = text.replace(this._whitespace_matcher, ' ').trim() + let textwrap = require('./lib/textwrap') + return textwrap.fill(text, { width, + initial_indent: indent, + subsequent_indent: indent }) + } + + _get_help_string(action) { + return action.help + } + + _get_default_metavar_for_optional(action) { + return action.dest.toUpperCase() + } + + _get_default_metavar_for_positional(action) { + return action.dest + } +})) + +HelpFormatter.prototype._Section = _callable(class _Section { + + constructor(formatter, parent, heading = undefined) { + this.formatter = formatter + this.parent = parent + this.heading = heading + this.items = [] + } + + format_help() { + // format the indented section + if (this.parent !== undefined) { + this.formatter._indent() + } + let item_help = this.formatter._join_parts(this.items.map(([ func, args ]) => func.apply(null, args))) + if (this.parent !== undefined) { + this.formatter._dedent() + } + + // return nothing if the section was empty + if (!item_help) { + return '' + } + + // add the heading if the section was non-empty + let heading + if (this.heading !== SUPPRESS && this.heading !== undefined) { + let current_indent = this.formatter._current_indent + heading = sub('%*s%s:\n', current_indent, '', this.heading) + } else { + heading = '' + } + + // join the section-initial newline, the heading and the help + return this.formatter._join_parts(['\n', heading, item_help, '\n']) + } +}) + + +const RawDescriptionHelpFormatter = _camelcase_alias(_callable(class RawDescriptionHelpFormatter extends HelpFormatter { + /* + * Help message formatter which retains any formatting in descriptions. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _fill_text(text, width, indent) { + return splitlines(text, true).map(line => indent + line).join('') + } +})) + + +const RawTextHelpFormatter = _camelcase_alias(_callable(class RawTextHelpFormatter extends RawDescriptionHelpFormatter { + /* + * Help message formatter which retains formatting of all help text. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _split_lines(text/*, width*/) { + return splitlines(text) + } +})) + + +const ArgumentDefaultsHelpFormatter = _camelcase_alias(_callable(class ArgumentDefaultsHelpFormatter extends HelpFormatter { + /* + * Help message formatter which adds default values to argument help. + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_help_string(action) { + let help = action.help + // LEGACY (v1 compatibility): additional check for defaultValue needed + if (!action.help.includes('%(default)') && !action.help.includes('%(defaultValue)')) { + if (action.default !== SUPPRESS) { + let defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] + if (action.option_strings.length || defaulting_nargs.includes(action.nargs)) { + help += ' (default: %(default)s)' + } + } + } + return help + } +})) + + +const MetavarTypeHelpFormatter = _camelcase_alias(_callable(class MetavarTypeHelpFormatter extends HelpFormatter { + /* + * Help message formatter which uses the argument 'type' as the default + * metavar value (instead of the argument 'dest') + * + * Only the name of this class is considered a public API. All the methods + * provided by the class are considered an implementation detail. + */ + + _get_default_metavar_for_optional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } + + _get_default_metavar_for_positional(action) { + return typeof action.type === 'function' ? action.type.name : action.type + } +})) + + +// ===================== +// Options and Arguments +// ===================== +function _get_action_name(argument) { + if (argument === undefined) { + return undefined + } else if (argument.option_strings.length) { + return argument.option_strings.join('/') + } else if (![ undefined, SUPPRESS ].includes(argument.metavar)) { + return argument.metavar + } else if (![ undefined, SUPPRESS ].includes(argument.dest)) { + return argument.dest + } else { + return undefined + } +} + + +const ArgumentError = _callable(class ArgumentError extends Error { + /* + * An error from creating or using an argument (optional or positional). + * + * The string value of this exception is the message, augmented with + * information about the argument that caused it. + */ + + constructor(argument, message) { + super() + this.name = 'ArgumentError' + this._argument_name = _get_action_name(argument) + this._message = message + this.message = this.str() + } + + str() { + let format + if (this._argument_name === undefined) { + format = '%(message)s' + } else { + format = 'argument %(argument_name)s: %(message)s' + } + return sub(format, { message: this._message, + argument_name: this._argument_name }) + } +}) + + +const ArgumentTypeError = _callable(class ArgumentTypeError extends Error { + /* + * An error from trying to convert a command line string to a type. + */ + + constructor(message) { + super(message) + this.name = 'ArgumentTypeError' + } +}) + + +// ============== +// Action classes +// ============== +const Action = _camelcase_alias(_callable(class Action extends _AttributeHolder(Function) { + /* + * Information about how to convert command line strings to Python objects. + * + * Action objects are used by an ArgumentParser to represent the information + * needed to parse a single argument from one or more strings from the + * command line. The keyword arguments to the Action constructor are also + * all attributes of Action instances. + * + * Keyword Arguments: + * + * - option_strings -- A list of command-line option strings which + * should be associated with this action. + * + * - dest -- The name of the attribute to hold the created object(s) + * + * - nargs -- The number of command-line arguments that should be + * consumed. By default, one argument will be consumed and a single + * value will be produced. Other values include: + * - N (an integer) consumes N arguments (and produces a list) + * - '?' consumes zero or one arguments + * - '*' consumes zero or more arguments (and produces a list) + * - '+' consumes one or more arguments (and produces a list) + * Note that the difference between the default and nargs=1 is that + * with the default, a single value will be produced, while with + * nargs=1, a list containing a single value will be produced. + * + * - const -- The value to be produced if the option is specified and the + * option uses an action that takes no values. + * + * - default -- The value to be produced if the option is not specified. + * + * - type -- A callable that accepts a single string argument, and + * returns the converted value. The standard Python types str, int, + * float, and complex are useful examples of such callables. If None, + * str is used. + * + * - choices -- A container of values that should be allowed. If not None, + * after a command-line argument has been converted to the appropriate + * type, an exception will be raised if it is not a member of this + * collection. + * + * - required -- True if the action must always be specified at the + * command line. This is only meaningful for optional command-line + * arguments. + * + * - help -- The help string describing the argument. + * + * - metavar -- The name to be used for the option's argument with the + * help string. If None, the 'dest' value will be used as the name. + */ + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + this.option_strings = option_strings + this.dest = dest + this.nargs = nargs + this.const = const_value + this.default = default_value + this.type = type + this.choices = choices + this.required = required + this.help = help + this.metavar = metavar + } + + _get_kwargs() { + let names = [ + 'option_strings', + 'dest', + 'nargs', + 'const', + 'default', + 'type', + 'choices', + 'help', + 'metavar' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + format_usage() { + return this.option_strings[0] + } + + call(/*parser, namespace, values, option_string = undefined*/) { + throw new Error('.call() not defined') + } +})) + + +const BooleanOptionalAction = _camelcase_alias(_callable(class BooleanOptionalAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + let _option_strings = [] + for (let option_string of option_strings) { + _option_strings.push(option_string) + + if (option_string.startsWith('--')) { + option_string = '--no-' + option_string.slice(2) + _option_strings.push(option_string) + } + } + + if (help !== undefined && default_value !== undefined) { + help += ` (default: ${default_value})` + } + + super({ + option_strings: _option_strings, + dest, + nargs: 0, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values, option_string = undefined) { + if (this.option_strings.includes(option_string)) { + setattr(namespace, this.dest, !option_string.startsWith('--no-')) + } + } + + format_usage() { + return this.option_strings.join(' | ') + } +})) + + +const _StoreAction = _callable(class _StoreAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for store actions must be != 0; if you ' + + 'have nothing to store, actions such as store ' + + 'true or store const may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + setattr(namespace, this.dest, values) + } +}) + + +const _StoreConstAction = _callable(class _StoreConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help + //, metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + setattr(namespace, this.dest, this.const) + } +}) + + +const _StoreTrueAction = _callable(class _StoreTrueAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: false, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: true, + default: default_value, + required, + help + }) + } +}) + + +const _StoreFalseAction = _callable(class _StoreFalseAction extends _StoreConstAction { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: true, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + const: false, + default: default_value, + required, + help + }) + } +}) + + +const _AppendAction = _callable(class _AppendAction extends Action { + + constructor() { + let [ + option_strings, + dest, + nargs, + const_value, + default_value, + type, + choices, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + nargs: undefined, + const: undefined, + default: undefined, + type: undefined, + choices: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + if (nargs === 0) { + throw new TypeError('nargs for append actions must be != 0; if arg ' + + 'strings are not supplying the value to append, ' + + 'the append const action may be more appropriate') + } + if (const_value !== undefined && nargs !== OPTIONAL) { + throw new TypeError(sub('nargs must be %r to supply const', OPTIONAL)) + } + super({ + option_strings, + dest, + nargs, + const: const_value, + default: default_value, + type, + choices, + required, + help, + metavar + }) + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(values) + setattr(namespace, this.dest, items) + } +}) + + +const _AppendConstAction = _callable(class _AppendConstAction extends Action { + + constructor() { + let [ + option_strings, + dest, + const_value, + default_value, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + const: no_default, + default: undefined, + required: false, + help: undefined, + metavar: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + const: const_value, + default: default_value, + required, + help, + metavar + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items.push(this.const) + setattr(namespace, this.dest, items) + } +}) + + +const _CountAction = _callable(class _CountAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + required, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: no_default, + default: undefined, + required: false, + help: undefined + }) + + super({ + option_strings, + dest, + nargs: 0, + default: default_value, + required, + help + }) + } + + call(parser, namespace/*, values, option_string = undefined*/) { + let count = getattr(namespace, this.dest, undefined) + if (count === undefined) { + count = 0 + } + setattr(namespace, this.dest, count + 1) + } +}) + + +const _HelpAction = _callable(class _HelpAction extends Action { + + constructor() { + let [ + option_strings, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + dest: SUPPRESS, + default: SUPPRESS, + help: undefined + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + } + + call(parser/*, namespace, values, option_string = undefined*/) { + parser.print_help() + parser.exit() + } +}) + + +const _VersionAction = _callable(class _VersionAction extends Action { + + constructor() { + let [ + option_strings, + version, + dest, + default_value, + help + ] = _parse_opts(arguments, { + option_strings: no_default, + version: undefined, + dest: SUPPRESS, + default: SUPPRESS, + help: "show program's version number and exit" + }) + + super({ + option_strings, + dest, + default: default_value, + nargs: 0, + help + }) + this.version = version + } + + call(parser/*, namespace, values, option_string = undefined*/) { + let version = this.version + if (version === undefined) { + version = parser.version + } + let formatter = parser._get_formatter() + formatter.add_text(version) + parser._print_message(formatter.format_help(), process.stdout) + parser.exit() + } +}) + + +const _SubParsersAction = _camelcase_alias(_callable(class _SubParsersAction extends Action { + + constructor() { + let [ + option_strings, + prog, + parser_class, + dest, + required, + help, + metavar + ] = _parse_opts(arguments, { + option_strings: no_default, + prog: no_default, + parser_class: no_default, + dest: SUPPRESS, + required: false, + help: undefined, + metavar: undefined + }) + + let name_parser_map = {} + + super({ + option_strings, + dest, + nargs: PARSER, + choices: name_parser_map, + required, + help, + metavar + }) + + this._prog_prefix = prog + this._parser_class = parser_class + this._name_parser_map = name_parser_map + this._choices_actions = [] + } + + add_parser() { + let [ + name, + kwargs + ] = _parse_opts(arguments, { + name: no_default, + '**kwargs': no_default + }) + + // set prog from the existing prefix + if (kwargs.prog === undefined) { + kwargs.prog = sub('%s %s', this._prog_prefix, name) + } + + let aliases = getattr(kwargs, 'aliases', []) + delete kwargs.aliases + + // create a pseudo-action to hold the choice help + if ('help' in kwargs) { + let help = kwargs.help + delete kwargs.help + let choice_action = this._ChoicesPseudoAction(name, aliases, help) + this._choices_actions.push(choice_action) + } + + // create the parser and add it to the map + let parser = new this._parser_class(kwargs) + this._name_parser_map[name] = parser + + // make parser available under aliases also + for (let alias of aliases) { + this._name_parser_map[alias] = parser + } + + return parser + } + + _get_subactions() { + return this._choices_actions + } + + call(parser, namespace, values/*, option_string = undefined*/) { + let parser_name = values[0] + let arg_strings = values.slice(1) + + // set the parser name if requested + if (this.dest !== SUPPRESS) { + setattr(namespace, this.dest, parser_name) + } + + // select the parser + if (hasattr(this._name_parser_map, parser_name)) { + parser = this._name_parser_map[parser_name] + } else { + let args = {parser_name, + choices: this._name_parser_map.join(', ')} + let msg = sub('unknown parser %(parser_name)r (choices: %(choices)s)', args) + throw new ArgumentError(this, msg) + } + + // parse all the remaining options into the namespace + // store any unrecognized options on the object, so that the top + // level parser can decide what to do with them + + // In case this subparser defines new defaults, we parse them + // in a new namespace object and then update the original + // namespace for the relevant parts. + let subnamespace + [ subnamespace, arg_strings ] = parser.parse_known_args(arg_strings, undefined) + for (let [ key, value ] of Object.entries(subnamespace)) { + setattr(namespace, key, value) + } + + if (arg_strings.length) { + setdefault(namespace, _UNRECOGNIZED_ARGS_ATTR, []) + getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).push(...arg_strings) + } + } +})) + + +_SubParsersAction.prototype._ChoicesPseudoAction = _callable(class _ChoicesPseudoAction extends Action { + constructor(name, aliases, help) { + let metavar = name, dest = name + if (aliases.length) { + metavar += sub(' (%s)', aliases.join(', ')) + } + super({ option_strings: [], dest, help, metavar }) + } +}) + + +const _ExtendAction = _callable(class _ExtendAction extends _AppendAction { + call(parser, namespace, values/*, option_string = undefined*/) { + let items = getattr(namespace, this.dest, undefined) + items = _copy_items(items) + items = items.concat(values) + setattr(namespace, this.dest, items) + } +}) + + +// ============== +// Type classes +// ============== +const FileType = _callable(class FileType extends Function { + /* + * Factory for creating file object types + * + * Instances of FileType are typically passed as type= arguments to the + * ArgumentParser add_argument() method. + * + * Keyword Arguments: + * - mode -- A string indicating how the file is to be opened. Accepts the + * same values as the builtin open() function. + * - bufsize -- The file's desired buffer size. Accepts the same values as + * the builtin open() function. + * - encoding -- The file's encoding. Accepts the same values as the + * builtin open() function. + * - errors -- A string indicating how encoding and decoding errors are to + * be handled. Accepts the same value as the builtin open() function. + */ + + constructor() { + let [ + flags, + encoding, + mode, + autoClose, + emitClose, + start, + end, + highWaterMark, + fs + ] = _parse_opts(arguments, { + flags: 'r', + encoding: undefined, + mode: undefined, // 0o666 + autoClose: undefined, // true + emitClose: undefined, // false + start: undefined, // 0 + end: undefined, // Infinity + highWaterMark: undefined, // 64 * 1024 + fs: undefined + }) + + // when this class is called as a function, redirect it to .call() method of itself + super('return arguments.callee.call.apply(arguments.callee, arguments)') + + Object.defineProperty(this, 'name', { + get() { + return sub('FileType(%r)', flags) + } + }) + this._flags = flags + this._options = {} + if (encoding !== undefined) this._options.encoding = encoding + if (mode !== undefined) this._options.mode = mode + if (autoClose !== undefined) this._options.autoClose = autoClose + if (emitClose !== undefined) this._options.emitClose = emitClose + if (start !== undefined) this._options.start = start + if (end !== undefined) this._options.end = end + if (highWaterMark !== undefined) this._options.highWaterMark = highWaterMark + if (fs !== undefined) this._options.fs = fs + } + + call(string) { + // the special argument "-" means sys.std{in,out} + if (string === '-') { + if (this._flags.includes('r')) { + return process.stdin + } else if (this._flags.includes('w')) { + return process.stdout + } else { + let msg = sub('argument "-" with mode %r', this._flags) + throw new TypeError(msg) + } + } + + // all other arguments are used as file names + let fd + try { + fd = fs.openSync(string, this._flags, this._options.mode) + } catch (e) { + let args = { filename: string, error: e.message } + let message = "can't open '%(filename)s': %(error)s" + throw new ArgumentTypeError(sub(message, args)) + } + + let options = Object.assign({ fd, flags: this._flags }, this._options) + if (this._flags.includes('r')) { + return fs.createReadStream(undefined, options) + } else if (this._flags.includes('w')) { + return fs.createWriteStream(undefined, options) + } else { + let msg = sub('argument "%s" with mode %r', string, this._flags) + throw new TypeError(msg) + } + } + + [util.inspect.custom]() { + let args = [ this._flags ] + let kwargs = Object.entries(this._options).map(([ k, v ]) => { + if (k === 'mode') v = { value: v, [util.inspect.custom]() { return '0o' + this.value.toString(8) } } + return [ k, v ] + }) + let args_str = [] + .concat(args.filter(arg => arg !== -1).map(repr)) + .concat(kwargs.filter(([/*kw*/, arg]) => arg !== undefined) + .map(([kw, arg]) => sub('%s=%r', kw, arg))) + .join(', ') + return sub('%s(%s)', this.constructor.name, args_str) + } + + toString() { + return this[util.inspect.custom]() + } +}) + +// =========================== +// Optional and Positional Parsing +// =========================== +const Namespace = _callable(class Namespace extends _AttributeHolder() { + /* + * Simple object for storing attributes. + * + * Implements equality by attribute names and values, and provides a simple + * string representation. + */ + + constructor(options = {}) { + super() + Object.assign(this, options) + } +}) + +// unset string tag to mimic plain object +Namespace.prototype[Symbol.toStringTag] = undefined + + +const _ActionsContainer = _camelcase_alias(_callable(class _ActionsContainer { + + constructor() { + let [ + description, + prefix_chars, + argument_default, + conflict_handler + ] = _parse_opts(arguments, { + description: no_default, + prefix_chars: no_default, + argument_default: no_default, + conflict_handler: no_default + }) + + this.description = description + this.argument_default = argument_default + this.prefix_chars = prefix_chars + this.conflict_handler = conflict_handler + + // set up registries + this._registries = {} + + // register actions + this.register('action', undefined, _StoreAction) + this.register('action', 'store', _StoreAction) + this.register('action', 'store_const', _StoreConstAction) + this.register('action', 'store_true', _StoreTrueAction) + this.register('action', 'store_false', _StoreFalseAction) + this.register('action', 'append', _AppendAction) + this.register('action', 'append_const', _AppendConstAction) + this.register('action', 'count', _CountAction) + this.register('action', 'help', _HelpAction) + this.register('action', 'version', _VersionAction) + this.register('action', 'parsers', _SubParsersAction) + this.register('action', 'extend', _ExtendAction) + // LEGACY (v1 compatibility): camelcase variants + ;[ 'storeConst', 'storeTrue', 'storeFalse', 'appendConst' ].forEach(old_name => { + let new_name = _to_new_name(old_name) + this.register('action', old_name, util.deprecate(this._registry_get('action', new_name), + sub('{action: "%s"} is renamed to {action: "%s"}', old_name, new_name))) + }) + // end + + // raise an exception if the conflict handler is invalid + this._get_handler() + + // action storage + this._actions = [] + this._option_string_actions = {} + + // groups + this._action_groups = [] + this._mutually_exclusive_groups = [] + + // defaults storage + this._defaults = {} + + // determines whether an "option" looks like a negative number + this._negative_number_matcher = /^-\d+$|^-\d*\.\d+$/ + + // whether or not there are any optionals that look like negative + // numbers -- uses a list so it can be shared and edited + this._has_negative_number_optionals = [] + } + + // ==================== + // Registration methods + // ==================== + register(registry_name, value, object) { + let registry = setdefault(this._registries, registry_name, {}) + registry[value] = object + } + + _registry_get(registry_name, value, default_value = undefined) { + return getattr(this._registries[registry_name], value, default_value) + } + + // ================================== + // Namespace default accessor methods + // ================================== + set_defaults(kwargs) { + Object.assign(this._defaults, kwargs) + + // if these defaults match any existing arguments, replace + // the previous default on the object with the new one + for (let action of this._actions) { + if (action.dest in kwargs) { + action.default = kwargs[action.dest] + } + } + } + + get_default(dest) { + for (let action of this._actions) { + if (action.dest === dest && action.default !== undefined) { + return action.default + } + } + return this._defaults[dest] + } + + + // ======================= + // Adding argument actions + // ======================= + add_argument() { + /* + * add_argument(dest, ..., name=value, ...) + * add_argument(option_string, option_string, ..., name=value, ...) + */ + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + // LEGACY (v1 compatibility), old-style add_argument([ args ], { options }) + if (args.length === 1 && Array.isArray(args[0])) { + args = args[0] + deprecate('argument-array', + sub('use add_argument(%(args)s, {...}) instead of add_argument([ %(args)s ], { ... })', { + args: args.map(repr).join(', ') + })) + } + // end + + // if no positional args are supplied or only one is supplied and + // it doesn't look like an option string, parse a positional + // argument + let chars = this.prefix_chars + if (!args.length || args.length === 1 && !chars.includes(args[0][0])) { + if (args.length && 'dest' in kwargs) { + throw new TypeError('dest supplied twice for positional argument') + } + kwargs = this._get_positional_kwargs(...args, kwargs) + + // otherwise, we're adding an optional argument + } else { + kwargs = this._get_optional_kwargs(...args, kwargs) + } + + // if no default was supplied, use the parser-level default + if (!('default' in kwargs)) { + let dest = kwargs.dest + if (dest in this._defaults) { + kwargs.default = this._defaults[dest] + } else if (this.argument_default !== undefined) { + kwargs.default = this.argument_default + } + } + + // create the action object, and add it to the parser + let action_class = this._pop_action_class(kwargs) + if (typeof action_class !== 'function') { + throw new TypeError(sub('unknown action "%s"', action_class)) + } + // eslint-disable-next-line new-cap + let action = new action_class(kwargs) + + // raise an error if the action type is not callable + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + throw new TypeError(sub('%r is not callable', type_func)) + } + + if (type_func === FileType) { + throw new TypeError(sub('%r is a FileType class object, instance of it' + + ' must be passed', type_func)) + } + + // raise an error if the metavar does not match the type + if ('_get_formatter' in this) { + try { + this._get_formatter()._format_args(action, undefined) + } catch (err) { + // check for 'invalid nargs value' is an artifact of TypeError and ValueError in js being the same + if (err instanceof TypeError && err.message !== 'invalid nargs value') { + throw new TypeError('length of metavar tuple does not match nargs') + } else { + throw err + } + } + } + + return this._add_action(action) + } + + add_argument_group() { + let group = _ArgumentGroup(this, ...arguments) + this._action_groups.push(group) + return group + } + + add_mutually_exclusive_group() { + // eslint-disable-next-line no-use-before-define + let group = _MutuallyExclusiveGroup(this, ...arguments) + this._mutually_exclusive_groups.push(group) + return group + } + + _add_action(action) { + // resolve any conflicts + this._check_conflict(action) + + // add to actions list + this._actions.push(action) + action.container = this + + // index the action by any option strings it has + for (let option_string of action.option_strings) { + this._option_string_actions[option_string] = action + } + + // set the flag if any option strings look like negative numbers + for (let option_string of action.option_strings) { + if (this._negative_number_matcher.test(option_string)) { + if (!this._has_negative_number_optionals.length) { + this._has_negative_number_optionals.push(true) + } + } + } + + // return the created action + return action + } + + _remove_action(action) { + _array_remove(this._actions, action) + } + + _add_container_actions(container) { + // collect groups by titles + let title_group_map = {} + for (let group of this._action_groups) { + if (group.title in title_group_map) { + let msg = 'cannot merge actions - two groups are named %r' + throw new TypeError(sub(msg, group.title)) + } + title_group_map[group.title] = group + } + + // map each action to its group + let group_map = new Map() + for (let group of container._action_groups) { + + // if a group with the title exists, use that, otherwise + // create a new group matching the container's group + if (!(group.title in title_group_map)) { + title_group_map[group.title] = this.add_argument_group({ + title: group.title, + description: group.description, + conflict_handler: group.conflict_handler + }) + } + + // map the actions to their new group + for (let action of group._group_actions) { + group_map.set(action, title_group_map[group.title]) + } + } + + // add container's mutually exclusive groups + // NOTE: if add_mutually_exclusive_group ever gains title= and + // description= then this code will need to be expanded as above + for (let group of container._mutually_exclusive_groups) { + let mutex_group = this.add_mutually_exclusive_group({ + required: group.required + }) + + // map the actions to their new mutex group + for (let action of group._group_actions) { + group_map.set(action, mutex_group) + } + } + + // add all actions to this container or their group + for (let action of container._actions) { + group_map.get(action)._add_action(action) + } + } + + _get_positional_kwargs() { + let [ + dest, + kwargs + ] = _parse_opts(arguments, { + dest: no_default, + '**kwargs': no_default + }) + + // make sure required is not specified + if ('required' in kwargs) { + let msg = "'required' is an invalid argument for positionals" + throw new TypeError(msg) + } + + // mark positional arguments as required if at least one is + // always required + if (![OPTIONAL, ZERO_OR_MORE].includes(kwargs.nargs)) { + kwargs.required = true + } + if (kwargs.nargs === ZERO_OR_MORE && !('default' in kwargs)) { + kwargs.required = true + } + + // return the keyword arguments with no option strings + return Object.assign(kwargs, { dest, option_strings: [] }) + } + + _get_optional_kwargs() { + let [ + args, + kwargs + ] = _parse_opts(arguments, { + '*args': no_default, + '**kwargs': no_default + }) + + // determine short and long option strings + let option_strings = [] + let long_option_strings = [] + let option_string + for (option_string of args) { + // error on strings that don't start with an appropriate prefix + if (!this.prefix_chars.includes(option_string[0])) { + let args = {option: option_string, + prefix_chars: this.prefix_chars} + let msg = 'invalid option string %(option)r: ' + + 'must start with a character %(prefix_chars)r' + throw new TypeError(sub(msg, args)) + } + + // strings starting with two prefix characters are long options + option_strings.push(option_string) + if (option_string.length > 1 && this.prefix_chars.includes(option_string[1])) { + long_option_strings.push(option_string) + } + } + + // infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' + let dest = kwargs.dest + delete kwargs.dest + if (dest === undefined) { + let dest_option_string + if (long_option_strings.length) { + dest_option_string = long_option_strings[0] + } else { + dest_option_string = option_strings[0] + } + dest = _string_lstrip(dest_option_string, this.prefix_chars) + if (!dest) { + let msg = 'dest= is required for options like %r' + throw new TypeError(sub(msg, option_string)) + } + dest = dest.replace(/-/g, '_') + } + + // return the updated keyword arguments + return Object.assign(kwargs, { dest, option_strings }) + } + + _pop_action_class(kwargs, default_value = undefined) { + let action = getattr(kwargs, 'action', default_value) + delete kwargs.action + return this._registry_get('action', action, action) + } + + _get_handler() { + // determine function from conflict handler string + let handler_func_name = sub('_handle_conflict_%s', this.conflict_handler) + if (typeof this[handler_func_name] === 'function') { + return this[handler_func_name] + } else { + let msg = 'invalid conflict_resolution value: %r' + throw new TypeError(sub(msg, this.conflict_handler)) + } + } + + _check_conflict(action) { + + // find all options that conflict with this option + let confl_optionals = [] + for (let option_string of action.option_strings) { + if (hasattr(this._option_string_actions, option_string)) { + let confl_optional = this._option_string_actions[option_string] + confl_optionals.push([ option_string, confl_optional ]) + } + } + + // resolve any conflicts + if (confl_optionals.length) { + let conflict_handler = this._get_handler() + conflict_handler.call(this, action, confl_optionals) + } + } + + _handle_conflict_error(action, conflicting_actions) { + let message = conflicting_actions.length === 1 ? + 'conflicting option string: %s' : + 'conflicting option strings: %s' + let conflict_string = conflicting_actions.map(([ option_string/*, action*/ ]) => option_string).join(', ') + throw new ArgumentError(action, sub(message, conflict_string)) + } + + _handle_conflict_resolve(action, conflicting_actions) { + + // remove all conflicting options + for (let [ option_string, action ] of conflicting_actions) { + + // remove the conflicting option + _array_remove(action.option_strings, option_string) + delete this._option_string_actions[option_string] + + // if the option now has no option string, remove it from the + // container holding it + if (!action.option_strings.length) { + action.container._remove_action(action) + } + } + } +})) + + +const _ArgumentGroup = _callable(class _ArgumentGroup extends _ActionsContainer { + + constructor() { + let [ + container, + title, + description, + kwargs + ] = _parse_opts(arguments, { + container: no_default, + title: undefined, + description: undefined, + '**kwargs': no_default + }) + + // add any missing keyword arguments by checking the container + setdefault(kwargs, 'conflict_handler', container.conflict_handler) + setdefault(kwargs, 'prefix_chars', container.prefix_chars) + setdefault(kwargs, 'argument_default', container.argument_default) + super(Object.assign({ description }, kwargs)) + + // group attributes + this.title = title + this._group_actions = [] + + // share most attributes with the container + this._registries = container._registries + this._actions = container._actions + this._option_string_actions = container._option_string_actions + this._defaults = container._defaults + this._has_negative_number_optionals = + container._has_negative_number_optionals + this._mutually_exclusive_groups = container._mutually_exclusive_groups + } + + _add_action(action) { + action = super._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + super._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const _MutuallyExclusiveGroup = _callable(class _MutuallyExclusiveGroup extends _ArgumentGroup { + + constructor() { + let [ + container, + required + ] = _parse_opts(arguments, { + container: no_default, + required: false + }) + + super(container) + this.required = required + this._container = container + } + + _add_action(action) { + if (action.required) { + let msg = 'mutually exclusive arguments must be optional' + throw new TypeError(msg) + } + action = this._container._add_action(action) + this._group_actions.push(action) + return action + } + + _remove_action(action) { + this._container._remove_action(action) + _array_remove(this._group_actions, action) + } +}) + + +const ArgumentParser = _camelcase_alias(_callable(class ArgumentParser extends _AttributeHolder(_ActionsContainer) { + /* + * Object for parsing command line strings into Python objects. + * + * Keyword Arguments: + * - prog -- The name of the program (default: sys.argv[0]) + * - usage -- A usage message (default: auto-generated from arguments) + * - description -- A description of what the program does + * - epilog -- Text following the argument descriptions + * - parents -- Parsers whose arguments should be copied into this one + * - formatter_class -- HelpFormatter class for printing help messages + * - prefix_chars -- Characters that prefix optional arguments + * - fromfile_prefix_chars -- Characters that prefix files containing + * additional arguments + * - argument_default -- The default value for all arguments + * - conflict_handler -- String indicating how to handle conflicts + * - add_help -- Add a -h/-help option + * - allow_abbrev -- Allow long options to be abbreviated unambiguously + * - exit_on_error -- Determines whether or not ArgumentParser exits with + * error info when an error occurs + */ + + constructor() { + let [ + prog, + usage, + description, + epilog, + parents, + formatter_class, + prefix_chars, + fromfile_prefix_chars, + argument_default, + conflict_handler, + add_help, + allow_abbrev, + exit_on_error, + debug, // LEGACY (v1 compatibility), debug mode + version // LEGACY (v1 compatibility), version + ] = _parse_opts(arguments, { + prog: undefined, + usage: undefined, + description: undefined, + epilog: undefined, + parents: [], + formatter_class: HelpFormatter, + prefix_chars: '-', + fromfile_prefix_chars: undefined, + argument_default: undefined, + conflict_handler: 'error', + add_help: true, + allow_abbrev: true, + exit_on_error: true, + debug: undefined, // LEGACY (v1 compatibility), debug mode + version: undefined // LEGACY (v1 compatibility), version + }) + + // LEGACY (v1 compatibility) + if (debug !== undefined) { + deprecate('debug', + 'The "debug" argument to ArgumentParser is deprecated. Please ' + + 'override ArgumentParser.exit function instead.' + ) + } + + if (version !== undefined) { + deprecate('version', + 'The "version" argument to ArgumentParser is deprecated. Please use ' + + "add_argument(..., { action: 'version', version: 'N', ... }) instead." + ) + } + // end + + super({ + description, + prefix_chars, + argument_default, + conflict_handler + }) + + // default setting for prog + if (prog === undefined) { + prog = path.basename(get_argv()[0] || '') + } + + this.prog = prog + this.usage = usage + this.epilog = epilog + this.formatter_class = formatter_class + this.fromfile_prefix_chars = fromfile_prefix_chars + this.add_help = add_help + this.allow_abbrev = allow_abbrev + this.exit_on_error = exit_on_error + // LEGACY (v1 compatibility), debug mode + this.debug = debug + // end + + this._positionals = this.add_argument_group('positional arguments') + this._optionals = this.add_argument_group('optional arguments') + this._subparsers = undefined + + // register types + function identity(string) { + return string + } + this.register('type', undefined, identity) + this.register('type', null, identity) + this.register('type', 'auto', identity) + this.register('type', 'int', function (x) { + let result = Number(x) + if (!Number.isInteger(result)) { + throw new TypeError(sub('could not convert string to int: %r', x)) + } + return result + }) + this.register('type', 'float', function (x) { + let result = Number(x) + if (isNaN(result)) { + throw new TypeError(sub('could not convert string to float: %r', x)) + } + return result + }) + this.register('type', 'str', String) + // LEGACY (v1 compatibility): custom types + this.register('type', 'string', + util.deprecate(String, 'use {type:"str"} or {type:String} instead of {type:"string"}')) + // end + + // add help argument if necessary + // (using explicit default to override global argument_default) + let default_prefix = prefix_chars.includes('-') ? '-' : prefix_chars[0] + if (this.add_help) { + this.add_argument( + default_prefix + 'h', + default_prefix.repeat(2) + 'help', + { + action: 'help', + default: SUPPRESS, + help: 'show this help message and exit' + } + ) + } + // LEGACY (v1 compatibility), version + if (version) { + this.add_argument( + default_prefix + 'v', + default_prefix.repeat(2) + 'version', + { + action: 'version', + default: SUPPRESS, + version: this.version, + help: "show program's version number and exit" + } + ) + } + // end + + // add parent arguments and defaults + for (let parent of parents) { + this._add_container_actions(parent) + Object.assign(this._defaults, parent._defaults) + } + } + + // ======================= + // Pretty __repr__ methods + // ======================= + _get_kwargs() { + let names = [ + 'prog', + 'usage', + 'description', + 'formatter_class', + 'conflict_handler', + 'add_help' + ] + return names.map(name => [ name, getattr(this, name) ]) + } + + // ================================== + // Optional/Positional adding methods + // ================================== + add_subparsers() { + let [ + kwargs + ] = _parse_opts(arguments, { + '**kwargs': no_default + }) + + if (this._subparsers !== undefined) { + this.error('cannot have multiple subparser arguments') + } + + // add the parser class to the arguments if it's not present + setdefault(kwargs, 'parser_class', this.constructor) + + if ('title' in kwargs || 'description' in kwargs) { + let title = getattr(kwargs, 'title', 'subcommands') + let description = getattr(kwargs, 'description', undefined) + delete kwargs.title + delete kwargs.description + this._subparsers = this.add_argument_group(title, description) + } else { + this._subparsers = this._positionals + } + + // prog defaults to the usage message of this parser, skipping + // optional arguments and with no "usage:" prefix + if (kwargs.prog === undefined) { + let formatter = this._get_formatter() + let positionals = this._get_positional_actions() + let groups = this._mutually_exclusive_groups + formatter.add_usage(this.usage, positionals, groups, '') + kwargs.prog = formatter.format_help().trim() + } + + // create the parsers action and add it to the positionals list + let parsers_class = this._pop_action_class(kwargs, 'parsers') + // eslint-disable-next-line new-cap + let action = new parsers_class(Object.assign({ option_strings: [] }, kwargs)) + this._subparsers._add_action(action) + + // return the created parsers action + return action + } + + _add_action(action) { + if (action.option_strings.length) { + this._optionals._add_action(action) + } else { + this._positionals._add_action(action) + } + return action + } + + _get_optional_actions() { + return this._actions.filter(action => action.option_strings.length) + } + + _get_positional_actions() { + return this._actions.filter(action => !action.option_strings.length) + } + + // ===================================== + // Command line argument parsing methods + // ===================================== + parse_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_args(args, namespace) + if (argv && argv.length > 0) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_args(args = undefined, namespace = undefined) { + if (args === undefined) { + args = get_argv().slice(1) + } + + // default Namespace built from parser defaults + if (namespace === undefined) { + namespace = new Namespace() + } + + // add any action defaults that aren't present + for (let action of this._actions) { + if (action.dest !== SUPPRESS) { + if (!hasattr(namespace, action.dest)) { + if (action.default !== SUPPRESS) { + setattr(namespace, action.dest, action.default) + } + } + } + } + + // add any parser defaults that aren't present + for (let dest of Object.keys(this._defaults)) { + if (!hasattr(namespace, dest)) { + setattr(namespace, dest, this._defaults[dest]) + } + } + + // parse the arguments and exit if there are any errors + if (this.exit_on_error) { + try { + [ namespace, args ] = this._parse_known_args(args, namespace) + } catch (err) { + if (err instanceof ArgumentError) { + this.error(err.message) + } else { + throw err + } + } + } else { + [ namespace, args ] = this._parse_known_args(args, namespace) + } + + if (hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) { + args = args.concat(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR)) + delattr(namespace, _UNRECOGNIZED_ARGS_ATTR) + } + + return [ namespace, args ] + } + + _parse_known_args(arg_strings, namespace) { + // replace arg strings that are file references + if (this.fromfile_prefix_chars !== undefined) { + arg_strings = this._read_args_from_files(arg_strings) + } + + // map all mutually exclusive arguments to the other arguments + // they can't occur with + let action_conflicts = new Map() + for (let mutex_group of this._mutually_exclusive_groups) { + let group_actions = mutex_group._group_actions + for (let [ i, mutex_action ] of Object.entries(mutex_group._group_actions)) { + let conflicts = action_conflicts.get(mutex_action) || [] + conflicts = conflicts.concat(group_actions.slice(0, +i)) + conflicts = conflicts.concat(group_actions.slice(+i + 1)) + action_conflicts.set(mutex_action, conflicts) + } + } + + // find all option indices, and determine the arg_string_pattern + // which has an 'O' if there is an option at an index, + // an 'A' if there is an argument, or a '-' if there is a '--' + let option_string_indices = {} + let arg_string_pattern_parts = [] + let arg_strings_iter = Object.entries(arg_strings)[Symbol.iterator]() + for (let [ i, arg_string ] of arg_strings_iter) { + + // all args after -- are non-options + if (arg_string === '--') { + arg_string_pattern_parts.push('-') + for ([ i, arg_string ] of arg_strings_iter) { + arg_string_pattern_parts.push('A') + } + + // otherwise, add the arg to the arg strings + // and note the index if it was an option + } else { + let option_tuple = this._parse_optional(arg_string) + let pattern + if (option_tuple === undefined) { + pattern = 'A' + } else { + option_string_indices[i] = option_tuple + pattern = 'O' + } + arg_string_pattern_parts.push(pattern) + } + } + + // join the pieces together to form the pattern + let arg_strings_pattern = arg_string_pattern_parts.join('') + + // converts arg strings to the appropriate and then takes the action + let seen_actions = new Set() + let seen_non_default_actions = new Set() + let extras + + let take_action = (action, argument_strings, option_string = undefined) => { + seen_actions.add(action) + let argument_values = this._get_values(action, argument_strings) + + // error if this argument is not allowed with other previously + // seen arguments, assuming that actions that use the default + // value don't really count as "present" + if (argument_values !== action.default) { + seen_non_default_actions.add(action) + for (let conflict_action of action_conflicts.get(action) || []) { + if (seen_non_default_actions.has(conflict_action)) { + let msg = 'not allowed with argument %s' + let action_name = _get_action_name(conflict_action) + throw new ArgumentError(action, sub(msg, action_name)) + } + } + } + + // take the action if we didn't receive a SUPPRESS value + // (e.g. from a default) + if (argument_values !== SUPPRESS) { + action(this, namespace, argument_values, option_string) + } + } + + // function to convert arg_strings into an optional action + let consume_optional = start_index => { + + // get the optional identified at this index + let option_tuple = option_string_indices[start_index] + let [ action, option_string, explicit_arg ] = option_tuple + + // identify additional optionals in the same arg string + // (e.g. -xyz is the same as -x -y -z if no args are required) + let action_tuples = [] + let stop + for (;;) { + + // if we found no optional action, skip it + if (action === undefined) { + extras.push(arg_strings[start_index]) + return start_index + 1 + } + + // if there is an explicit argument, try to match the + // optional's string arguments to only this + if (explicit_arg !== undefined) { + let arg_count = this._match_argument(action, 'A') + + // if the action is a single-dash option and takes no + // arguments, try to parse more single-dash options out + // of the tail of the option string + let chars = this.prefix_chars + if (arg_count === 0 && !chars.includes(option_string[1])) { + action_tuples.push([ action, [], option_string ]) + let char = option_string[0] + option_string = char + explicit_arg[0] + let new_explicit_arg = explicit_arg.slice(1) || undefined + let optionals_map = this._option_string_actions + if (hasattr(optionals_map, option_string)) { + action = optionals_map[option_string] + explicit_arg = new_explicit_arg + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if the action expect exactly one argument, we've + // successfully matched the option; exit the loop + } else if (arg_count === 1) { + stop = start_index + 1 + let args = [ explicit_arg ] + action_tuples.push([ action, args, option_string ]) + break + + // error if a double-dash option did not use the + // explicit argument + } else { + let msg = 'ignored explicit argument %r' + throw new ArgumentError(action, sub(msg, explicit_arg)) + } + + // if there is no explicit argument, try to match the + // optional's string arguments with the following strings + // if successful, exit the loop + } else { + let start = start_index + 1 + let selected_patterns = arg_strings_pattern.slice(start) + let arg_count = this._match_argument(action, selected_patterns) + stop = start + arg_count + let args = arg_strings.slice(start, stop) + action_tuples.push([ action, args, option_string ]) + break + } + } + + // add the Optional to the list and return the index at which + // the Optional's string args stopped + assert(action_tuples.length) + for (let [ action, args, option_string ] of action_tuples) { + take_action(action, args, option_string) + } + return stop + } + + // the list of Positionals left to be parsed; this is modified + // by consume_positionals() + let positionals = this._get_positional_actions() + + // function to convert arg_strings into positional actions + let consume_positionals = start_index => { + // match as many Positionals as possible + let selected_pattern = arg_strings_pattern.slice(start_index) + let arg_counts = this._match_arguments_partial(positionals, selected_pattern) + + // slice off the appropriate arg strings for each Positional + // and add the Positional and its args to the list + for (let i = 0; i < positionals.length && i < arg_counts.length; i++) { + let action = positionals[i] + let arg_count = arg_counts[i] + let args = arg_strings.slice(start_index, start_index + arg_count) + start_index += arg_count + take_action(action, args) + } + + // slice off the Positionals that we just parsed and return the + // index at which the Positionals' string args stopped + positionals = positionals.slice(arg_counts.length) + return start_index + } + + // consume Positionals and Optionals alternately, until we have + // passed the last option string + extras = [] + let start_index = 0 + let max_option_string_index = Math.max(-1, ...Object.keys(option_string_indices).map(Number)) + while (start_index <= max_option_string_index) { + + // consume any Positionals preceding the next option + let next_option_string_index = Math.min( + // eslint-disable-next-line no-loop-func + ...Object.keys(option_string_indices).map(Number).filter(index => index >= start_index) + ) + if (start_index !== next_option_string_index) { + let positionals_end_index = consume_positionals(start_index) + + // only try to parse the next optional if we didn't consume + // the option string during the positionals parsing + if (positionals_end_index > start_index) { + start_index = positionals_end_index + continue + } else { + start_index = positionals_end_index + } + } + + // if we consumed all the positionals we could and we're not + // at the index of an option string, there were extra arguments + if (!(start_index in option_string_indices)) { + let strings = arg_strings.slice(start_index, next_option_string_index) + extras = extras.concat(strings) + start_index = next_option_string_index + } + + // consume the next optional and any arguments for it + start_index = consume_optional(start_index) + } + + // consume any positionals following the last Optional + let stop_index = consume_positionals(start_index) + + // if we didn't consume all the argument strings, there were extras + extras = extras.concat(arg_strings.slice(stop_index)) + + // make sure all required actions were present and also convert + // action defaults which were not given as arguments + let required_actions = [] + for (let action of this._actions) { + if (!seen_actions.has(action)) { + if (action.required) { + required_actions.push(_get_action_name(action)) + } else { + // Convert action default now instead of doing it before + // parsing arguments to avoid calling convert functions + // twice (which may fail) if the argument was given, but + // only if it was defined already in the namespace + if (action.default !== undefined && + typeof action.default === 'string' && + hasattr(namespace, action.dest) && + action.default === getattr(namespace, action.dest)) { + setattr(namespace, action.dest, + this._get_value(action, action.default)) + } + } + } + } + + if (required_actions.length) { + this.error(sub('the following arguments are required: %s', + required_actions.join(', '))) + } + + // make sure all required groups had one option present + for (let group of this._mutually_exclusive_groups) { + if (group.required) { + let no_actions_used = true + for (let action of group._group_actions) { + if (seen_non_default_actions.has(action)) { + no_actions_used = false + break + } + } + + // if no actions were used, report the error + if (no_actions_used) { + let names = group._group_actions + .filter(action => action.help !== SUPPRESS) + .map(action => _get_action_name(action)) + let msg = 'one of the arguments %s is required' + this.error(sub(msg, names.join(' '))) + } + } + } + + // return the updated namespace and the extra arguments + return [ namespace, extras ] + } + + _read_args_from_files(arg_strings) { + // expand arguments referencing files + let new_arg_strings = [] + for (let arg_string of arg_strings) { + + // for regular arguments, just add them back into the list + if (!arg_string || !this.fromfile_prefix_chars.includes(arg_string[0])) { + new_arg_strings.push(arg_string) + + // replace arguments referencing files with the file content + } else { + try { + let args_file = fs.readFileSync(arg_string.slice(1), 'utf8') + let arg_strings = [] + for (let arg_line of splitlines(args_file)) { + for (let arg of this.convert_arg_line_to_args(arg_line)) { + arg_strings.push(arg) + } + } + arg_strings = this._read_args_from_files(arg_strings) + new_arg_strings = new_arg_strings.concat(arg_strings) + } catch (err) { + this.error(err.message) + } + } + } + + // return the modified argument list + return new_arg_strings + } + + convert_arg_line_to_args(arg_line) { + return [arg_line] + } + + _match_argument(action, arg_strings_pattern) { + // match the pattern for this action to the arg strings + let nargs_pattern = this._get_nargs_pattern(action) + let match = arg_strings_pattern.match(new RegExp('^' + nargs_pattern)) + + // raise an exception if we weren't able to find a match + if (match === null) { + let nargs_errors = { + undefined: 'expected one argument', + [OPTIONAL]: 'expected at most one argument', + [ONE_OR_MORE]: 'expected at least one argument' + } + let msg = nargs_errors[action.nargs] + if (msg === undefined) { + msg = sub(action.nargs === 1 ? 'expected %s argument' : 'expected %s arguments', action.nargs) + } + throw new ArgumentError(action, msg) + } + + // return the number of arguments matched + return match[1].length + } + + _match_arguments_partial(actions, arg_strings_pattern) { + // progressively shorten the actions list by slicing off the + // final actions until we find a match + let result = [] + for (let i of range(actions.length, 0, -1)) { + let actions_slice = actions.slice(0, i) + let pattern = actions_slice.map(action => this._get_nargs_pattern(action)).join('') + let match = arg_strings_pattern.match(new RegExp('^' + pattern)) + if (match !== null) { + result = result.concat(match.slice(1).map(string => string.length)) + break + } + } + + // return the list of arg string counts + return result + } + + _parse_optional(arg_string) { + // if it's an empty string, it was meant to be a positional + if (!arg_string) { + return undefined + } + + // if it doesn't start with a prefix, it was meant to be positional + if (!this.prefix_chars.includes(arg_string[0])) { + return undefined + } + + // if the option string is present in the parser, return the action + if (arg_string in this._option_string_actions) { + let action = this._option_string_actions[arg_string] + return [ action, arg_string, undefined ] + } + + // if it's just a single character, it was meant to be positional + if (arg_string.length === 1) { + return undefined + } + + // if the option string before the "=" is present, return the action + if (arg_string.includes('=')) { + let [ option_string, explicit_arg ] = _string_split(arg_string, '=', 1) + if (option_string in this._option_string_actions) { + let action = this._option_string_actions[option_string] + return [ action, option_string, explicit_arg ] + } + } + + // search through all possible prefixes of the option string + // and all actions in the parser for possible interpretations + let option_tuples = this._get_option_tuples(arg_string) + + // if multiple actions match, the option string was ambiguous + if (option_tuples.length > 1) { + let options = option_tuples.map(([ /*action*/, option_string/*, explicit_arg*/ ]) => option_string).join(', ') + let args = {option: arg_string, matches: options} + let msg = 'ambiguous option: %(option)s could match %(matches)s' + this.error(sub(msg, args)) + + // if exactly one action matched, this segmentation is good, + // so return the parsed action + } else if (option_tuples.length === 1) { + let [ option_tuple ] = option_tuples + return option_tuple + } + + // if it was not found as an option, but it looks like a negative + // number, it was meant to be positional + // unless there are negative-number-like options + if (this._negative_number_matcher.test(arg_string)) { + if (!this._has_negative_number_optionals.length) { + return undefined + } + } + + // if it contains a space, it was meant to be a positional + if (arg_string.includes(' ')) { + return undefined + } + + // it was meant to be an optional but there is no such option + // in this parser (though it might be a valid option in a subparser) + return [ undefined, arg_string, undefined ] + } + + _get_option_tuples(option_string) { + let result = [] + + // option strings starting with two prefix characters are only + // split at the '=' + let chars = this.prefix_chars + if (chars.includes(option_string[0]) && chars.includes(option_string[1])) { + if (this.allow_abbrev) { + let option_prefix, explicit_arg + if (option_string.includes('=')) { + [ option_prefix, explicit_arg ] = _string_split(option_string, '=', 1) + } else { + option_prefix = option_string + explicit_arg = undefined + } + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + } + + // single character options can be concatenated with their arguments + // but multiple character options always have to have their argument + // separate + } else if (chars.includes(option_string[0]) && !chars.includes(option_string[1])) { + let option_prefix = option_string + let explicit_arg = undefined + let short_option_prefix = option_string.slice(0, 2) + let short_explicit_arg = option_string.slice(2) + + for (let option_string of Object.keys(this._option_string_actions)) { + if (option_string === short_option_prefix) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, short_explicit_arg ] + result.push(tup) + } else if (option_string.startsWith(option_prefix)) { + let action = this._option_string_actions[option_string] + let tup = [ action, option_string, explicit_arg ] + result.push(tup) + } + } + + // shouldn't ever get here + } else { + this.error(sub('unexpected option string: %s', option_string)) + } + + // return the collected option tuples + return result + } + + _get_nargs_pattern(action) { + // in all examples below, we have to allow for '--' args + // which are represented as '-' in the pattern + let nargs = action.nargs + let nargs_pattern + + // the default (None) is assumed to be a single argument + if (nargs === undefined) { + nargs_pattern = '(-*A-*)' + + // allow zero or one arguments + } else if (nargs === OPTIONAL) { + nargs_pattern = '(-*A?-*)' + + // allow zero or more arguments + } else if (nargs === ZERO_OR_MORE) { + nargs_pattern = '(-*[A-]*)' + + // allow one or more arguments + } else if (nargs === ONE_OR_MORE) { + nargs_pattern = '(-*A[A-]*)' + + // allow any number of options or arguments + } else if (nargs === REMAINDER) { + nargs_pattern = '([-AO]*)' + + // allow one argument followed by any number of options or arguments + } else if (nargs === PARSER) { + nargs_pattern = '(-*A[-AO]*)' + + // suppress action, like nargs=0 + } else if (nargs === SUPPRESS) { + nargs_pattern = '(-*-*)' + + // all others should be integers + } else { + nargs_pattern = sub('(-*%s-*)', 'A'.repeat(nargs).split('').join('-*')) + } + + // if this is an optional action, -- is not allowed + if (action.option_strings.length) { + nargs_pattern = nargs_pattern.replace(/-\*/g, '') + nargs_pattern = nargs_pattern.replace(/-/g, '') + } + + // return the pattern + return nargs_pattern + } + + // ======================== + // Alt command line argument parsing, allowing free intermix + // ======================== + + parse_intermixed_args(args = undefined, namespace = undefined) { + let argv + [ args, argv ] = this.parse_known_intermixed_args(args, namespace) + if (argv.length) { + let msg = 'unrecognized arguments: %s' + this.error(sub(msg, argv.join(' '))) + } + return args + } + + parse_known_intermixed_args(args = undefined, namespace = undefined) { + // returns a namespace and list of extras + // + // positional can be freely intermixed with optionals. optionals are + // first parsed with all positional arguments deactivated. The 'extras' + // are then parsed. If the parser definition is incompatible with the + // intermixed assumptions (e.g. use of REMAINDER, subparsers) a + // TypeError is raised. + // + // positionals are 'deactivated' by setting nargs and default to + // SUPPRESS. This blocks the addition of that positional to the + // namespace + + let extras + let positionals = this._get_positional_actions() + let a = positionals.filter(action => [ PARSER, REMAINDER ].includes(action.nargs)) + if (a.length) { + throw new TypeError(sub('parse_intermixed_args: positional arg' + + ' with nargs=%s', a[0].nargs)) + } + + for (let group of this._mutually_exclusive_groups) { + for (let action of group._group_actions) { + if (positionals.includes(action)) { + throw new TypeError('parse_intermixed_args: positional in' + + ' mutuallyExclusiveGroup') + } + } + } + + let save_usage + try { + save_usage = this.usage + let remaining_args + try { + if (this.usage === undefined) { + // capture the full usage for use in error messages + this.usage = this.format_usage().slice(7) + } + for (let action of positionals) { + // deactivate positionals + action.save_nargs = action.nargs + // action.nargs = 0 + action.nargs = SUPPRESS + action.save_default = action.default + action.default = SUPPRESS + } + [ namespace, remaining_args ] = this.parse_known_args(args, + namespace) + for (let action of positionals) { + // remove the empty positional values from namespace + let attr = getattr(namespace, action.dest) + if (Array.isArray(attr) && attr.length === 0) { + // eslint-disable-next-line no-console + console.warn(sub('Do not expect %s in %s', action.dest, namespace)) + delattr(namespace, action.dest) + } + } + } finally { + // restore nargs and usage before exiting + for (let action of positionals) { + action.nargs = action.save_nargs + action.default = action.save_default + } + } + let optionals = this._get_optional_actions() + try { + // parse positionals. optionals aren't normally required, but + // they could be, so make sure they aren't. + for (let action of optionals) { + action.save_required = action.required + action.required = false + } + for (let group of this._mutually_exclusive_groups) { + group.save_required = group.required + group.required = false + } + [ namespace, extras ] = this.parse_known_args(remaining_args, + namespace) + } finally { + // restore parser values before exiting + for (let action of optionals) { + action.required = action.save_required + } + for (let group of this._mutually_exclusive_groups) { + group.required = group.save_required + } + } + } finally { + this.usage = save_usage + } + return [ namespace, extras ] + } + + // ======================== + // Value conversion methods + // ======================== + _get_values(action, arg_strings) { + // for everything but PARSER, REMAINDER args, strip out first '--' + if (![PARSER, REMAINDER].includes(action.nargs)) { + try { + _array_remove(arg_strings, '--') + } catch (err) {} + } + + let value + // optional argument produces a default when not present + if (!arg_strings.length && action.nargs === OPTIONAL) { + if (action.option_strings.length) { + value = action.const + } else { + value = action.default + } + if (typeof value === 'string') { + value = this._get_value(action, value) + this._check_value(action, value) + } + + // when nargs='*' on a positional, if there were no command-line + // args, use the default if it is anything other than None + } else if (!arg_strings.length && action.nargs === ZERO_OR_MORE && + !action.option_strings.length) { + if (action.default !== undefined) { + value = action.default + } else { + value = arg_strings + } + this._check_value(action, value) + + // single argument or optional argument produces a single value + } else if (arg_strings.length === 1 && [undefined, OPTIONAL].includes(action.nargs)) { + let arg_string = arg_strings[0] + value = this._get_value(action, arg_string) + this._check_value(action, value) + + // REMAINDER arguments convert all values, checking none + } else if (action.nargs === REMAINDER) { + value = arg_strings.map(v => this._get_value(action, v)) + + // PARSER arguments convert all values, but check only the first + } else if (action.nargs === PARSER) { + value = arg_strings.map(v => this._get_value(action, v)) + this._check_value(action, value[0]) + + // SUPPRESS argument does not put anything in the namespace + } else if (action.nargs === SUPPRESS) { + value = SUPPRESS + + // all other types of nargs produce a list + } else { + value = arg_strings.map(v => this._get_value(action, v)) + for (let v of value) { + this._check_value(action, v) + } + } + + // return the converted value + return value + } + + _get_value(action, arg_string) { + let type_func = this._registry_get('type', action.type, action.type) + if (typeof type_func !== 'function') { + let msg = '%r is not callable' + throw new ArgumentError(action, sub(msg, type_func)) + } + + // convert the value to the appropriate type + let result + try { + try { + result = type_func(arg_string) + } catch (err) { + // Dear TC39, why would you ever consider making es6 classes not callable? + // We had one universal interface, [[Call]], which worked for anything + // (with familiar this-instanceof guard for classes). Now we have two. + if (err instanceof TypeError && + /Class constructor .* cannot be invoked without 'new'/.test(err.message)) { + // eslint-disable-next-line new-cap + result = new type_func(arg_string) + } else { + throw err + } + } + + } catch (err) { + // ArgumentTypeErrors indicate errors + if (err instanceof ArgumentTypeError) { + //let name = getattr(action.type, 'name', repr(action.type)) + let msg = err.message + throw new ArgumentError(action, msg) + + // TypeErrors or ValueErrors also indicate errors + } else if (err instanceof TypeError) { + let name = getattr(action.type, 'name', repr(action.type)) + let args = {type: name, value: arg_string} + let msg = 'invalid %(type)s value: %(value)r' + throw new ArgumentError(action, sub(msg, args)) + } else { + throw err + } + } + + // return the converted value + return result + } + + _check_value(action, value) { + // converted value must be one of the choices (if specified) + if (action.choices !== undefined && !_choices_to_array(action.choices).includes(value)) { + let args = {value, + choices: _choices_to_array(action.choices).map(repr).join(', ')} + let msg = 'invalid choice: %(value)r (choose from %(choices)s)' + throw new ArgumentError(action, sub(msg, args)) + } + } + + // ======================= + // Help-formatting methods + // ======================= + format_usage() { + let formatter = this._get_formatter() + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + return formatter.format_help() + } + + format_help() { + let formatter = this._get_formatter() + + // usage + formatter.add_usage(this.usage, this._actions, + this._mutually_exclusive_groups) + + // description + formatter.add_text(this.description) + + // positionals, optionals and user-defined groups + for (let action_group of this._action_groups) { + formatter.start_section(action_group.title) + formatter.add_text(action_group.description) + formatter.add_arguments(action_group._group_actions) + formatter.end_section() + } + + // epilog + formatter.add_text(this.epilog) + + // determine help from format above + return formatter.format_help() + } + + _get_formatter() { + // eslint-disable-next-line new-cap + return new this.formatter_class({ prog: this.prog }) + } + + // ===================== + // Help-printing methods + // ===================== + print_usage(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_usage(), file) + } + + print_help(file = undefined) { + if (file === undefined) file = process.stdout + this._print_message(this.format_help(), file) + } + + _print_message(message, file = undefined) { + if (message) { + if (file === undefined) file = process.stderr + file.write(message) + } + } + + // =============== + // Exiting methods + // =============== + exit(status = 0, message = undefined) { + if (message) { + this._print_message(message, process.stderr) + } + process.exit(status) + } + + error(message) { + /* + * error(message: string) + * + * Prints a usage message incorporating the message to stderr and + * exits. + * + * If you override this in a subclass, it should not return -- it + * should either exit or raise an exception. + */ + + // LEGACY (v1 compatibility), debug mode + if (this.debug === true) throw new Error(message) + // end + this.print_usage(process.stderr) + let args = {prog: this.prog, message: message} + this.exit(2, sub('%(prog)s: error: %(message)s\n', args)) + } +})) + + +module.exports = { + ArgumentParser, + ArgumentError, + ArgumentTypeError, + BooleanOptionalAction, + FileType, + HelpFormatter, + ArgumentDefaultsHelpFormatter, + RawDescriptionHelpFormatter, + RawTextHelpFormatter, + MetavarTypeHelpFormatter, + Namespace, + Action, + ONE_OR_MORE, + OPTIONAL, + PARSER, + REMAINDER, + SUPPRESS, + ZERO_OR_MORE +} + +// LEGACY (v1 compatibility), Const alias +Object.defineProperty(module.exports, 'Const', { + get() { + let result = {} + Object.entries({ ONE_OR_MORE, OPTIONAL, PARSER, REMAINDER, SUPPRESS, ZERO_OR_MORE }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('use argparse.%s instead of argparse.Const.%s', n, n)) + return v + } + }) + }) + Object.entries({ _UNRECOGNIZED_ARGS_ATTR }).forEach(([ n, v ]) => { + Object.defineProperty(result, n, { + get() { + deprecate(n, sub('argparse.Const.%s is an internal symbol and will no longer be available', n)) + return v + } + }) + }) + return result + }, + enumerable: false +}) +// end diff --git a/node_modules/eslint/node_modules/argparse/lib/sub.js b/node_modules/eslint/node_modules/argparse/lib/sub.js new file mode 100644 index 000000000..e3eb3215f --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/lib/sub.js @@ -0,0 +1,67 @@ +// Limited implementation of python % string operator, supports only %s and %r for now +// (other formats are not used here, but may appear in custom templates) + +'use strict' + +const { inspect } = require('util') + + +module.exports = function sub(pattern, ...values) { + let regex = /%(?:(%)|(-)?(\*)?(?:\((\w+)\))?([A-Za-z]))/g + + let result = pattern.replace(regex, function (_, is_literal, is_left_align, is_padded, name, format) { + if (is_literal) return '%' + + let padded_count = 0 + if (is_padded) { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + padded_count = values.shift() + if (!Number.isInteger(padded_count)) throw new TypeError('* wants int') + } + + let str + if (name !== undefined) { + let dict = values[0] + if (typeof dict !== 'object' || dict === null) throw new TypeError('format requires a mapping') + if (!(name in dict)) throw new TypeError(`no such key: '${name}'`) + str = dict[name] + } else { + if (values.length === 0) throw new TypeError('not enough arguments for format string') + str = values.shift() + } + + switch (format) { + case 's': + str = String(str) + break + case 'r': + str = inspect(str) + break + case 'd': + case 'i': + if (typeof str !== 'number') { + throw new TypeError(`%${format} format: a number is required, not ${typeof str}`) + } + str = String(str.toFixed(0)) + break + default: + throw new TypeError(`unsupported format character '${format}'`) + } + + if (padded_count > 0) { + return is_left_align ? str.padEnd(padded_count) : str.padStart(padded_count) + } else { + return str + } + }) + + if (values.length) { + if (values.length === 1 && typeof values[0] === 'object' && values[0] !== null) { + // mapping + } else { + throw new TypeError('not all arguments converted during string formatting') + } + } + + return result +} diff --git a/node_modules/eslint/node_modules/argparse/lib/textwrap.js b/node_modules/eslint/node_modules/argparse/lib/textwrap.js new file mode 100644 index 000000000..23d51cdb9 --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/lib/textwrap.js @@ -0,0 +1,440 @@ +// Partial port of python's argparse module, version 3.9.0 (only wrap and fill functions): +// https://github.com/python/cpython/blob/v3.9.0b4/Lib/textwrap.py + +'use strict' + +/* + * Text wrapping and filling. + */ + +// Copyright (C) 1999-2001 Gregory P. Ward. +// Copyright (C) 2002, 2003 Python Software Foundation. +// Copyright (C) 2020 argparse.js authors +// Originally written by Greg Ward + +// Hardcode the recognized whitespace characters to the US-ASCII +// whitespace characters. The main reason for doing this is that +// some Unicode spaces (like \u00a0) are non-breaking whitespaces. +// +// This less funky little regex just split on recognized spaces. E.g. +// "Hello there -- you goof-ball, use the -b option!" +// splits into +// Hello/ /there/ /--/ /you/ /goof-ball,/ /use/ /the/ /-b/ /option!/ +const wordsep_simple_re = /([\t\n\x0b\x0c\r ]+)/ + +class TextWrapper { + /* + * Object for wrapping/filling text. The public interface consists of + * the wrap() and fill() methods; the other methods are just there for + * subclasses to override in order to tweak the default behaviour. + * If you want to completely replace the main wrapping algorithm, + * you'll probably have to override _wrap_chunks(). + * + * Several instance attributes control various aspects of wrapping: + * width (default: 70) + * the maximum width of wrapped lines (unless break_long_words + * is false) + * initial_indent (default: "") + * string that will be prepended to the first line of wrapped + * output. Counts towards the line's width. + * subsequent_indent (default: "") + * string that will be prepended to all lines save the first + * of wrapped output; also counts towards each line's width. + * expand_tabs (default: true) + * Expand tabs in input text to spaces before further processing. + * Each tab will become 0 .. 'tabsize' spaces, depending on its position + * in its line. If false, each tab is treated as a single character. + * tabsize (default: 8) + * Expand tabs in input text to 0 .. 'tabsize' spaces, unless + * 'expand_tabs' is false. + * replace_whitespace (default: true) + * Replace all whitespace characters in the input text by spaces + * after tab expansion. Note that if expand_tabs is false and + * replace_whitespace is true, every tab will be converted to a + * single space! + * fix_sentence_endings (default: false) + * Ensure that sentence-ending punctuation is always followed + * by two spaces. Off by default because the algorithm is + * (unavoidably) imperfect. + * break_long_words (default: true) + * Break words longer than 'width'. If false, those words will not + * be broken, and some lines might be longer than 'width'. + * break_on_hyphens (default: true) + * Allow breaking hyphenated words. If true, wrapping will occur + * preferably on whitespaces and right after hyphens part of + * compound words. + * drop_whitespace (default: true) + * Drop leading and trailing whitespace from lines. + * max_lines (default: None) + * Truncate wrapped lines. + * placeholder (default: ' [...]') + * Append to the last line of truncated text. + */ + + constructor(options = {}) { + let { + width = 70, + initial_indent = '', + subsequent_indent = '', + expand_tabs = true, + replace_whitespace = true, + fix_sentence_endings = false, + break_long_words = true, + drop_whitespace = true, + break_on_hyphens = true, + tabsize = 8, + max_lines = undefined, + placeholder=' [...]' + } = options + + this.width = width + this.initial_indent = initial_indent + this.subsequent_indent = subsequent_indent + this.expand_tabs = expand_tabs + this.replace_whitespace = replace_whitespace + this.fix_sentence_endings = fix_sentence_endings + this.break_long_words = break_long_words + this.drop_whitespace = drop_whitespace + this.break_on_hyphens = break_on_hyphens + this.tabsize = tabsize + this.max_lines = max_lines + this.placeholder = placeholder + } + + + // -- Private methods ----------------------------------------------- + // (possibly useful for subclasses to override) + + _munge_whitespace(text) { + /* + * _munge_whitespace(text : string) -> string + * + * Munge whitespace in text: expand tabs and convert all other + * whitespace characters to spaces. Eg. " foo\\tbar\\n\\nbaz" + * becomes " foo bar baz". + */ + if (this.expand_tabs) { + text = text.replace(/\t/g, ' '.repeat(this.tabsize)) // not strictly correct in js + } + if (this.replace_whitespace) { + text = text.replace(/[\t\n\x0b\x0c\r]/g, ' ') + } + return text + } + + _split(text) { + /* + * _split(text : string) -> [string] + * + * Split the text to wrap into indivisible chunks. Chunks are + * not quite the same as words; see _wrap_chunks() for full + * details. As an example, the text + * Look, goof-ball -- use the -b option! + * breaks into the following chunks: + * 'Look,', ' ', 'goof-', 'ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', 'option!' + * if break_on_hyphens is True, or in: + * 'Look,', ' ', 'goof-ball', ' ', '--', ' ', + * 'use', ' ', 'the', ' ', '-b', ' ', option!' + * otherwise. + */ + let chunks = text.split(wordsep_simple_re) + chunks = chunks.filter(Boolean) + return chunks + } + + _handle_long_word(reversed_chunks, cur_line, cur_len, width) { + /* + * _handle_long_word(chunks : [string], + * cur_line : [string], + * cur_len : int, width : int) + * + * Handle a chunk of text (most likely a word, not whitespace) that + * is too long to fit in any line. + */ + // Figure out when indent is larger than the specified width, and make + // sure at least one character is stripped off on every pass + let space_left + if (width < 1) { + space_left = 1 + } else { + space_left = width - cur_len + } + + // If we're allowed to break long words, then do so: put as much + // of the next chunk onto the current line as will fit. + if (this.break_long_words) { + cur_line.push(reversed_chunks[reversed_chunks.length - 1].slice(0, space_left)) + reversed_chunks[reversed_chunks.length - 1] = reversed_chunks[reversed_chunks.length - 1].slice(space_left) + + // Otherwise, we have to preserve the long word intact. Only add + // it to the current line if there's nothing already there -- + // that minimizes how much we violate the width constraint. + } else if (!cur_line) { + cur_line.push(...reversed_chunks.pop()) + } + + // If we're not allowed to break long words, and there's already + // text on the current line, do nothing. Next time through the + // main loop of _wrap_chunks(), we'll wind up here again, but + // cur_len will be zero, so the next line will be entirely + // devoted to the long word that we can't handle right now. + } + + _wrap_chunks(chunks) { + /* + * _wrap_chunks(chunks : [string]) -> [string] + * + * Wrap a sequence of text chunks and return a list of lines of + * length 'self.width' or less. (If 'break_long_words' is false, + * some lines may be longer than this.) Chunks correspond roughly + * to words and the whitespace between them: each chunk is + * indivisible (modulo 'break_long_words'), but a line break can + * come between any two chunks. Chunks should not have internal + * whitespace; ie. a chunk is either all whitespace or a "word". + * Whitespace chunks will be removed from the beginning and end of + * lines, but apart from that whitespace is preserved. + */ + let lines = [] + let indent + if (this.width <= 0) { + throw Error(`invalid width ${this.width} (must be > 0)`) + } + if (this.max_lines !== undefined) { + if (this.max_lines > 1) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + if (indent.length + this.placeholder.trimStart().length > this.width) { + throw Error('placeholder too large for max width') + } + } + + // Arrange in reverse order so items can be efficiently popped + // from a stack of chucks. + chunks = chunks.reverse() + + while (chunks.length > 0) { + + // Start the list of chunks that will make up the current line. + // cur_len is just the length of all the chunks in cur_line. + let cur_line = [] + let cur_len = 0 + + // Figure out which static string will prefix this line. + let indent + if (lines) { + indent = this.subsequent_indent + } else { + indent = this.initial_indent + } + + // Maximum width for this line. + let width = this.width - indent.length + + // First chunk on line is whitespace -- drop it, unless this + // is the very beginning of the text (ie. no lines started yet). + if (this.drop_whitespace && chunks[chunks.length - 1].trim() === '' && lines.length > 0) { + chunks.pop() + } + + while (chunks.length > 0) { + let l = chunks[chunks.length - 1].length + + // Can at least squeeze this chunk onto the current line. + if (cur_len + l <= width) { + cur_line.push(chunks.pop()) + cur_len += l + + // Nope, this line is full. + } else { + break + } + } + + // The current line is full, and the next chunk is too big to + // fit on *any* line (not just this one). + if (chunks.length && chunks[chunks.length - 1].length > width) { + this._handle_long_word(chunks, cur_line, cur_len, width) + cur_len = cur_line.map(l => l.length).reduce((a, b) => a + b, 0) + } + + // If the last chunk on this line is all whitespace, drop it. + if (this.drop_whitespace && cur_line.length > 0 && cur_line[cur_line.length - 1].trim() === '') { + cur_len -= cur_line[cur_line.length - 1].length + cur_line.pop() + } + + if (cur_line) { + if (this.max_lines === undefined || + lines.length + 1 < this.max_lines || + (chunks.length === 0 || + this.drop_whitespace && + chunks.length === 1 && + !chunks[0].trim()) && cur_len <= width) { + // Convert current line back to a string and store it in + // list of all lines (return value). + lines.push(indent + cur_line.join('')) + } else { + let had_break = false + while (cur_line) { + if (cur_line[cur_line.length - 1].trim() && + cur_len + this.placeholder.length <= width) { + cur_line.push(this.placeholder) + lines.push(indent + cur_line.join('')) + had_break = true + break + } + cur_len -= cur_line[-1].length + cur_line.pop() + } + if (!had_break) { + if (lines) { + let prev_line = lines[lines.length - 1].trimEnd() + if (prev_line.length + this.placeholder.length <= + this.width) { + lines[lines.length - 1] = prev_line + this.placeholder + break + } + } + lines.push(indent + this.placeholder.lstrip()) + } + break + } + } + } + + return lines + } + + _split_chunks(text) { + text = this._munge_whitespace(text) + return this._split(text) + } + + // -- Public interface ---------------------------------------------- + + wrap(text) { + /* + * wrap(text : string) -> [string] + * + * Reformat the single paragraph in 'text' so it fits in lines of + * no more than 'self.width' columns, and return a list of wrapped + * lines. Tabs in 'text' are expanded with string.expandtabs(), + * and all other whitespace characters (including newline) are + * converted to space. + */ + let chunks = this._split_chunks(text) + // not implemented in js + //if (this.fix_sentence_endings) { + // this._fix_sentence_endings(chunks) + //} + return this._wrap_chunks(chunks) + } + + fill(text) { + /* + * fill(text : string) -> string + * + * Reformat the single paragraph in 'text' to fit in lines of no + * more than 'self.width' columns, and return a new string + * containing the entire wrapped paragraph. + */ + return this.wrap(text).join('\n') + } +} + + +// -- Convenience interface --------------------------------------------- + +function wrap(text, options = {}) { + /* + * Wrap a single paragraph of text, returning a list of wrapped lines. + * + * Reformat the single paragraph in 'text' so it fits in lines of no + * more than 'width' columns, and return a list of wrapped lines. By + * default, tabs in 'text' are expanded with string.expandtabs(), and + * all other whitespace characters (including newline) are converted to + * space. See TextWrapper class for available keyword args to customize + * wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.wrap(text) +} + +function fill(text, options = {}) { + /* + * Fill a single paragraph of text, returning a new string. + * + * Reformat the single paragraph in 'text' to fit in lines of no more + * than 'width' columns, and return a new string containing the entire + * wrapped paragraph. As with wrap(), tabs are expanded and other + * whitespace characters converted to space. See TextWrapper class for + * available keyword args to customize wrapping behaviour. + */ + let { width = 70, ...kwargs } = options + let w = new TextWrapper(Object.assign({ width }, kwargs)) + return w.fill(text) +} + +// -- Loosely related functionality ------------------------------------- + +let _whitespace_only_re = /^[ \t]+$/mg +let _leading_whitespace_re = /(^[ \t]*)(?:[^ \t\n])/mg + +function dedent(text) { + /* + * Remove any common leading whitespace from every line in `text`. + * + * This can be used to make triple-quoted strings line up with the left + * edge of the display, while still presenting them in the source code + * in indented form. + * + * Note that tabs and spaces are both treated as whitespace, but they + * are not equal: the lines " hello" and "\\thello" are + * considered to have no common leading whitespace. + * + * Entirely blank lines are normalized to a newline character. + */ + // Look for the longest leading string of spaces and tabs common to + // all lines. + let margin = undefined + text = text.replace(_whitespace_only_re, '') + let indents = text.match(_leading_whitespace_re) || [] + for (let indent of indents) { + indent = indent.slice(0, -1) + + if (margin === undefined) { + margin = indent + + // Current line more deeply indented than previous winner: + // no change (previous winner is still on top). + } else if (indent.startsWith(margin)) { + // pass + + // Current line consistent with and no deeper than previous winner: + // it's the new winner. + } else if (margin.startsWith(indent)) { + margin = indent + + // Find the largest common whitespace between current line and previous + // winner. + } else { + for (let i = 0; i < margin.length && i < indent.length; i++) { + if (margin[i] !== indent[i]) { + margin = margin.slice(0, i) + break + } + } + } + } + + if (margin) { + text = text.replace(new RegExp('^' + margin, 'mg'), '') + } + return text +} + +module.exports = { wrap, fill, dedent } diff --git a/node_modules/eslint/node_modules/argparse/package.json b/node_modules/eslint/node_modules/argparse/package.json new file mode 100644 index 000000000..647d2aff1 --- /dev/null +++ b/node_modules/eslint/node_modules/argparse/package.json @@ -0,0 +1,31 @@ +{ + "name": "argparse", + "description": "CLI arguments parser. Native port of python's argparse.", + "version": "2.0.1", + "keywords": [ + "cli", + "parser", + "argparse", + "option", + "args" + ], + "main": "argparse.js", + "files": [ + "argparse.js", + "lib/" + ], + "license": "Python-2.0", + "repository": "nodeca/argparse", + "scripts": { + "lint": "eslint .", + "test": "npm run lint && nyc mocha", + "coverage": "npm run test && nyc report --reporter html" + }, + "devDependencies": { + "@babel/eslint-parser": "^7.11.0", + "@babel/plugin-syntax-class-properties": "^7.10.4", + "eslint": "^7.5.0", + "mocha": "^8.0.1", + "nyc": "^15.1.0" + } +} diff --git a/node_modules/eslint/node_modules/escape-string-regexp/index.d.ts b/node_modules/eslint/node_modules/escape-string-regexp/index.d.ts new file mode 100644 index 000000000..7d34edc7c --- /dev/null +++ b/node_modules/eslint/node_modules/escape-string-regexp/index.d.ts @@ -0,0 +1,18 @@ +/** +Escape RegExp special characters. + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +@example +``` +import escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` +*/ +declare const escapeStringRegexp: (string: string) => string; + +export = escapeStringRegexp; diff --git a/node_modules/eslint/node_modules/escape-string-regexp/index.js b/node_modules/eslint/node_modules/escape-string-regexp/index.js new file mode 100644 index 000000000..387c5615a --- /dev/null +++ b/node_modules/eslint/node_modules/escape-string-regexp/index.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = string => { + if (typeof string !== 'string') { + throw new TypeError('Expected a string'); + } + + // Escape characters with special meaning either inside or outside character sets. + // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. + return string + .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') + .replace(/-/g, '\\x2d'); +}; diff --git a/node_modules/@eslint/eslintrc/node_modules/globals/license b/node_modules/eslint/node_modules/escape-string-regexp/license similarity index 100% rename from node_modules/@eslint/eslintrc/node_modules/globals/license rename to node_modules/eslint/node_modules/escape-string-regexp/license diff --git a/node_modules/eslint/node_modules/escape-string-regexp/package.json b/node_modules/eslint/node_modules/escape-string-regexp/package.json new file mode 100644 index 000000000..c6eb4a91b --- /dev/null +++ b/node_modules/eslint/node_modules/escape-string-regexp/package.json @@ -0,0 +1,38 @@ +{ + "name": "escape-string-regexp", + "version": "4.0.0", + "description": "Escape RegExp special characters", + "license": "MIT", + "repository": "sindresorhus/escape-string-regexp", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "escape", + "regex", + "regexp", + "regular", + "expression", + "string", + "special", + "characters" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.11.0", + "xo": "^0.28.3" + } +} diff --git a/node_modules/eslint/node_modules/escape-string-regexp/readme.md b/node_modules/eslint/node_modules/escape-string-regexp/readme.md new file mode 100644 index 000000000..2945dfcb2 --- /dev/null +++ b/node_modules/eslint/node_modules/escape-string-regexp/readme.md @@ -0,0 +1,34 @@ +# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp) + +> Escape RegExp special characters + +## Install + +``` +$ npm install escape-string-regexp +``` + +## Usage + +```js +const escapeStringRegexp = require('escape-string-regexp'); + +const escapedString = escapeStringRegexp('How much $ for a 🦄?'); +//=> 'How much \\$ for a 🦄\\?' + +new RegExp(escapedString); +``` + +You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class. + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/eslint/node_modules/find-up/index.d.ts b/node_modules/eslint/node_modules/find-up/index.d.ts new file mode 100644 index 000000000..6746bb729 --- /dev/null +++ b/node_modules/eslint/node_modules/find-up/index.d.ts @@ -0,0 +1,138 @@ +/* eslint-disable @typescript-eslint/unified-signatures */ +import {Options as LocatePathOptions} from 'locate-path'; + +declare const stop: unique symbol; + +declare namespace findUp { + interface Options extends LocatePathOptions {} + + type StopSymbol = typeof stop; + + type Match = string | StopSymbol | undefined; +} + +declare const findUp: { + sync: { + /** + Synchronously check if a path exists. + + @param path - Path to the file or directory. + @returns Whether the path exists. + + @example + ``` + import findUp = require('find-up'); + + console.log(findUp.sync.exists('/Users/sindresorhus/unicorn.png')); + //=> true + ``` + */ + exists: (path: string) => boolean; + + /** + Synchronously find a file or directory by walking up parent directories. + + @param name - Name of the file or directory to find. Can be multiple. + @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. + */ + (name: string | readonly string[], options?: findUp.Options): string | undefined; + + /** + Synchronously find a file or directory by walking up parent directories. + + @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. + @returns The first path found or `undefined` if none could be found. + + @example + ``` + import path = require('path'); + import findUp = require('find-up'); + + console.log(findUp.sync(directory => { + const hasUnicorns = findUp.sync.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' + ``` + */ + (matcher: (directory: string) => findUp.Match, options?: findUp.Options): string | undefined; + }; + + /** + Check if a path exists. + + @param path - Path to a file or directory. + @returns Whether the path exists. + + @example + ``` + import findUp = require('find-up'); + + (async () => { + console.log(await findUp.exists('/Users/sindresorhus/unicorn.png')); + //=> true + })(); + ``` + */ + exists: (path: string) => Promise; + + /** + Return this in a `matcher` function to stop the search and force `findUp` to immediately return `undefined`. + */ + readonly stop: findUp.StopSymbol; + + /** + Find a file or directory by walking up parent directories. + + @param name - Name of the file or directory to find. Can be multiple. + @returns The first path found (by respecting the order of `name`s) or `undefined` if none could be found. + + @example + ``` + // / + // └── Users + // └── sindresorhus + // ├── unicorn.png + // └── foo + // └── bar + // ├── baz + // └── example.js + + // example.js + import findUp = require('find-up'); + + (async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' + })(); + ``` + */ + (name: string | readonly string[], options?: findUp.Options): Promise; + + /** + Find a file or directory by walking up parent directories. + + @param matcher - Called for each directory in the search. Return a path or `findUp.stop` to stop the search. + @returns The first path found or `undefined` if none could be found. + + @example + ``` + import path = require('path'); + import findUp = require('find-up'); + + (async () => { + console.log(await findUp(async directory => { + const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' + })(); + ``` + */ + (matcher: (directory: string) => (findUp.Match | Promise), options?: findUp.Options): Promise; +}; + +export = findUp; diff --git a/node_modules/eslint/node_modules/find-up/index.js b/node_modules/eslint/node_modules/find-up/index.js new file mode 100644 index 000000000..ce564e5d3 --- /dev/null +++ b/node_modules/eslint/node_modules/find-up/index.js @@ -0,0 +1,89 @@ +'use strict'; +const path = require('path'); +const locatePath = require('locate-path'); +const pathExists = require('path-exists'); + +const stop = Symbol('findUp.stop'); + +module.exports = async (name, options = {}) => { + let directory = path.resolve(options.cwd || ''); + const {root} = path.parse(directory); + const paths = [].concat(name); + + const runMatcher = async locateOptions => { + if (typeof name !== 'function') { + return locatePath(paths, locateOptions); + } + + const foundPath = await name(locateOptions.cwd); + if (typeof foundPath === 'string') { + return locatePath([foundPath], locateOptions); + } + + return foundPath; + }; + + // eslint-disable-next-line no-constant-condition + while (true) { + // eslint-disable-next-line no-await-in-loop + const foundPath = await runMatcher({...options, cwd: directory}); + + if (foundPath === stop) { + return; + } + + if (foundPath) { + return path.resolve(directory, foundPath); + } + + if (directory === root) { + return; + } + + directory = path.dirname(directory); + } +}; + +module.exports.sync = (name, options = {}) => { + let directory = path.resolve(options.cwd || ''); + const {root} = path.parse(directory); + const paths = [].concat(name); + + const runMatcher = locateOptions => { + if (typeof name !== 'function') { + return locatePath.sync(paths, locateOptions); + } + + const foundPath = name(locateOptions.cwd); + if (typeof foundPath === 'string') { + return locatePath.sync([foundPath], locateOptions); + } + + return foundPath; + }; + + // eslint-disable-next-line no-constant-condition + while (true) { + const foundPath = runMatcher({...options, cwd: directory}); + + if (foundPath === stop) { + return; + } + + if (foundPath) { + return path.resolve(directory, foundPath); + } + + if (directory === root) { + return; + } + + directory = path.dirname(directory); + } +}; + +module.exports.exists = pathExists; + +module.exports.sync.exists = pathExists.sync; + +module.exports.stop = stop; diff --git a/node_modules/slice-ansi/license b/node_modules/eslint/node_modules/find-up/license similarity index 96% rename from node_modules/slice-ansi/license rename to node_modules/eslint/node_modules/find-up/license index e05b33c55..fa7ceba3e 100644 --- a/node_modules/slice-ansi/license +++ b/node_modules/eslint/node_modules/find-up/license @@ -1,6 +1,5 @@ MIT License -Copyright (c) DC Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/node_modules/eslint/node_modules/find-up/package.json b/node_modules/eslint/node_modules/find-up/package.json new file mode 100644 index 000000000..56db6dd80 --- /dev/null +++ b/node_modules/eslint/node_modules/find-up/package.json @@ -0,0 +1,54 @@ +{ + "name": "find-up", + "version": "5.0.0", + "description": "Find a file or directory by walking up parent directories", + "license": "MIT", + "repository": "sindresorhus/find-up", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "find", + "up", + "find-up", + "findup", + "look-up", + "look", + "file", + "search", + "match", + "package", + "resolve", + "parent", + "parents", + "folder", + "directory", + "walk", + "walking", + "path" + ], + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "devDependencies": { + "ava": "^2.1.0", + "is-path-inside": "^2.1.0", + "tempy": "^0.6.0", + "tsd": "^0.13.1", + "xo": "^0.33.0" + } +} diff --git a/node_modules/eslint/node_modules/find-up/readme.md b/node_modules/eslint/node_modules/find-up/readme.md new file mode 100644 index 000000000..7ad908a7c --- /dev/null +++ b/node_modules/eslint/node_modules/find-up/readme.md @@ -0,0 +1,151 @@ +# find-up [![Build Status](https://travis-ci.com/sindresorhus/find-up.svg?branch=master)](https://travis-ci.com/github/sindresorhus/find-up) + +> Find a file or directory by walking up parent directories + +## Install + +``` +$ npm install find-up +``` + +## Usage + +``` +/ +└── Users + └── sindresorhus + ├── unicorn.png + └── foo + └── bar + ├── baz + └── example.js +``` + +`example.js` + +```js +const path = require('path'); +const findUp = require('find-up'); + +(async () => { + console.log(await findUp('unicorn.png')); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(['rainbow.png', 'unicorn.png'])); + //=> '/Users/sindresorhus/unicorn.png' + + console.log(await findUp(async directory => { + const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png')); + return hasUnicorns && directory; + }, {type: 'directory'})); + //=> '/Users/sindresorhus' +})(); +``` + +## API + +### findUp(name, options?) +### findUp(matcher, options?) + +Returns a `Promise` for either the path or `undefined` if it couldn't be found. + +### findUp([...name], options?) + +Returns a `Promise` for either the first path found (by respecting the order of the array) or `undefined` if none could be found. + +### findUp.sync(name, options?) +### findUp.sync(matcher, options?) + +Returns a path or `undefined` if it couldn't be found. + +### findUp.sync([...name], options?) + +Returns the first path found (by respecting the order of the array) or `undefined` if none could be found. + +#### name + +Type: `string` + +Name of the file or directory to find. + +#### matcher + +Type: `Function` + +A function that will be called with each directory until it returns a `string` with the path, which stops the search, or the root directory has been reached and nothing was found. Useful if you want to match files with certain patterns, set of permissions, or other advanced use-cases. + +When using async mode, the `matcher` may optionally be an async or promise-returning function that returns the path. + +#### options + +Type: `object` + +##### cwd + +Type: `string`\ +Default: `process.cwd()` + +Directory to start from. + +##### type + +Type: `string`\ +Default: `'file'`\ +Values: `'file'` `'directory'` + +The type of paths that can match. + +##### allowSymlinks + +Type: `boolean`\ +Default: `true` + +Allow symbolic links to match if they point to the chosen path type. + +### findUp.exists(path) + +Returns a `Promise` of whether the path exists. + +### findUp.sync.exists(path) + +Returns a `boolean` of whether the path exists. + +#### path + +Type: `string` + +Path to a file or directory. + +### findUp.stop + +A [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that can be returned by a `matcher` function to stop the search and cause `findUp` to immediately return `undefined`. Useful as a performance optimization in case the current working directory is deeply nested in the filesystem. + +```js +const path = require('path'); +const findUp = require('find-up'); + +(async () => { + await findUp(directory => { + return path.basename(directory) === 'work' ? findUp.stop : 'logo.png'; + }); +})(); +``` + +## Related + +- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module +- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file +- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package +- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path + +--- + +
+ + Get professional support for 'find-up' with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/eslint/node_modules/js-yaml/CHANGELOG.md b/node_modules/eslint/node_modules/js-yaml/CHANGELOG.md new file mode 100644 index 000000000..ff2375e05 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/CHANGELOG.md @@ -0,0 +1,616 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + + +## [4.1.0] - 2021-04-15 +### Added +- Types are now exported as `yaml.types.XXX`. +- Every type now has `options` property with original arguments kept as they were + (see `yaml.types.int.options` as an example). + +### Changed +- `Schema.extend()` now keeps old type order in case of conflicts + (e.g. Schema.extend([ a, b, c ]).extend([ b, a, d ]) is now ordered as `abcd` instead of `cbad`). + + +## [4.0.0] - 2021-01-03 +### Changed +- Check [migration guide](migrate_v3_to_v4.md) to see details for all breaking changes. +- Breaking: "unsafe" tags `!!js/function`, `!!js/regexp`, `!!js/undefined` are + moved to [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) package. +- Breaking: removed `safe*` functions. Use `load`, `loadAll`, `dump` + instead which are all now safe by default. +- `yaml.DEFAULT_SAFE_SCHEMA` and `yaml.DEFAULT_FULL_SCHEMA` are removed, use + `yaml.DEFAULT_SCHEMA` instead. +- `yaml.Schema.create(schema, tags)` is removed, use `schema.extend(tags)` instead. +- `!!binary` now always mapped to `Uint8Array` on load. +- Reduced nesting of `/lib` folder. +- Parse numbers according to YAML 1.2 instead of YAML 1.1 (`01234` is now decimal, + `0o1234` is octal, `1:23` is parsed as string instead of base60). +- `dump()` no longer quotes `:`, `[`, `]`, `(`, `)` except when necessary, #470, #557. +- Line and column in exceptions are now formatted as `(X:Y)` instead of + `at line X, column Y` (also present in compact format), #332. +- Code snippet created in exceptions now contains multiple lines with line numbers. +- `dump()` now serializes `undefined` as `null` in collections and removes keys with + `undefined` in mappings, #571. +- `dump()` with `skipInvalid=true` now serializes invalid items in collections as null. +- Custom tags starting with `!` are now dumped as `!tag` instead of `!`, #576. +- Custom tags starting with `tag:yaml.org,2002:` are now shorthanded using `!!`, #258. + +### Added +- Added `.mjs` (es modules) support. +- Added `quotingType` and `forceQuotes` options for dumper to configure + string literal style, #290, #529. +- Added `styles: { '!!null': 'empty' }` option for dumper + (serializes `{ foo: null }` as "`foo: `"), #570. +- Added `replacer` option (similar to option in JSON.stringify), #339. +- Custom `Tag` can now handle all tags or multiple tags with the same prefix, #385. + +### Fixed +- Astral characters are no longer encoded by `dump()`, #587. +- "duplicate mapping key" exception now points at the correct column, #452. +- Extra commas in flow collections (e.g. `[foo,,bar]`) now throw an exception + instead of producing null, #321. +- `__proto__` key no longer overrides object prototype, #164. +- Removed `bower.json`. +- Tags are now url-decoded in `load()` and url-encoded in `dump()` + (previously usage of custom non-ascii tags may have led to invalid YAML that can't be parsed). +- Anchors now work correctly with empty nodes, #301. +- Fix incorrect parsing of invalid block mapping syntax, #418. +- Throw an error if block sequence/mapping indent contains a tab, #80. + + +## [3.14.1] - 2020-12-07 +### Security +- Fix possible code execution in (already unsafe) `.load()` (in &anchor). + + +## [3.14.0] - 2020-05-22 +### Changed +- Support `safe/loadAll(input, options)` variant of call. +- CI: drop outdated nodejs versions. +- Dev deps bump. + +### Fixed +- Quote `=` in plain scalars #519. +- Check the node type for `!` tag in case user manually specifies it. +- Verify that there are no null-bytes in input. +- Fix wrong quote position when writing condensed flow, #526. + + +## [3.13.1] - 2019-04-05 +### Security +- Fix possible code execution in (already unsafe) `.load()`, #480. + + +## [3.13.0] - 2019-03-20 +### Security +- Security fix: `safeLoad()` can hang when arrays with nested refs + used as key. Now throws exception for nested arrays. #475. + + +## [3.12.2] - 2019-02-26 +### Fixed +- Fix `noArrayIndent` option for root level, #468. + + +## [3.12.1] - 2019-01-05 +### Added +- Added `noArrayIndent` option, #432. + + +## [3.12.0] - 2018-06-02 +### Changed +- Support arrow functions without a block statement, #421. + + +## [3.11.0] - 2018-03-05 +### Added +- Add arrow functions suport for `!!js/function`. + +### Fixed +- Fix dump in bin/octal/hex formats for negative integers, #399. + + +## [3.10.0] - 2017-09-10 +### Fixed +- Fix `condenseFlow` output (quote keys for sure, instead of spaces), #371, #370. +- Dump astrals as codepoints instead of surrogate pair, #368. + + +## [3.9.1] - 2017-07-08 +### Fixed +- Ensure stack is present for custom errors in node 7.+, #351. + + +## [3.9.0] - 2017-07-08 +### Added +- Add `condenseFlow` option (to create pretty URL query params), #346. + +### Fixed +- Support array return from safeLoadAll/loadAll, #350. + + +## [3.8.4] - 2017-05-08 +### Fixed +- Dumper: prevent space after dash for arrays that wrap, #343. + + +## [3.8.3] - 2017-04-05 +### Fixed +- Should not allow numbers to begin and end with underscore, #335. + + +## [3.8.2] - 2017-03-02 +### Fixed +- Fix `!!float 123` (integers) parse, #333. +- Don't allow leading zeros in floats (except 0, 0.xxx). +- Allow positive exponent without sign in floats. + + +## [3.8.1] - 2017-02-07 +### Changed +- Maintenance: update browserified build. + + +## [3.8.0] - 2017-02-07 +### Fixed +- Fix reported position for `duplicated mapping key` errors. + Now points to block start instead of block end. + (#243, thanks to @shockey). + + +## [3.7.0] - 2016-11-12 +### Added +- Support polymorphism for tags (#300, thanks to @monken). + +### Fixed +- Fix parsing of quotes followed by newlines (#304, thanks to @dplepage). + + +## [3.6.1] - 2016-05-11 +### Fixed +- Fix output cut on a pipe, #286. + + +## [3.6.0] - 2016-04-16 +### Fixed +- Dumper rewrite, fix multiple bugs with trailing `\n`. + Big thanks to @aepsilon! +- Loader: fix leading/trailing newlines in block scalars, @aepsilon. + + +## [3.5.5] - 2016-03-17 +### Fixed +- Date parse fix: don't allow dates with on digit in month and day, #268. + + +## [3.5.4] - 2016-03-09 +### Added +- `noCompatMode` for dumper, to disable quoting YAML 1.1 values. + + +## [3.5.3] - 2016-02-11 +### Changed +- Maintenance release. + + +## [3.5.2] - 2016-01-11 +### Changed +- Maintenance: missed comma in bower config. + + +## [3.5.1] - 2016-01-11 +### Changed +- Removed `inherit` dependency, #239. +- Better browserify workaround for esprima load. +- Demo rewrite. + + +## [3.5.0] - 2016-01-10 +### Fixed +- Dumper. Fold strings only, #217. +- Dumper. `norefs` option, to clone linked objects, #229. +- Loader. Throw a warning for duplicate keys, #166. +- Improved browserify support (mark `esprima` & `Buffer` excluded). + + +## [3.4.6] - 2015-11-26 +### Changed +- Use standalone `inherit` to keep browserified files clear. + + +## [3.4.5] - 2015-11-23 +### Added +- Added `lineWidth` option to dumper. + + +## [3.4.4] - 2015-11-21 +### Fixed +- Fixed floats dump (missed dot for scientific format), #220. +- Allow non-printable characters inside quoted scalars, #192. + + +## [3.4.3] - 2015-10-10 +### Changed +- Maintenance release - deps bump (esprima, argparse). + + +## [3.4.2] - 2015-09-09 +### Fixed +- Fixed serialization of duplicated entries in sequences, #205. + Thanks to @vogelsgesang. + + +## [3.4.1] - 2015-09-05 +### Fixed +- Fixed stacktrace handling in generated errors, for browsers (FF/IE). + + +## [3.4.0] - 2015-08-23 +### Changed +- Don't throw on warnings anymore. Use `onWarning` option to catch. +- Throw error on unknown tags (was warning before). +- Reworked internals of error class. + +### Fixed +- Fixed multiline keys dump, #197. Thanks to @tcr. +- Fixed heading line breaks in some scalars (regression). + + +## [3.3.1] - 2015-05-13 +### Added +- Added `.sortKeys` dumper option, thanks to @rjmunro. + +### Fixed +- Fixed astral characters support, #191. + + +## [3.3.0] - 2015-04-26 +### Changed +- Significantly improved long strings formatting in dumper, thanks to @isaacs. +- Strip BOM if exists. + + +## [3.2.7] - 2015-02-19 +### Changed +- Maintenance release. +- Updated dependencies. +- HISTORY.md -> CHANGELOG.md + + +## [3.2.6] - 2015-02-07 +### Fixed +- Fixed encoding of UTF-16 surrogate pairs. (e.g. "\U0001F431" CAT FACE). +- Fixed demo dates dump (#113, thanks to @Hypercubed). + + +## [3.2.5] - 2014-12-28 +### Fixed +- Fixed resolving of all built-in types on empty nodes. +- Fixed invalid warning on empty lines within quoted scalars and flow collections. +- Fixed bug: Tag on an empty node didn't resolve in some cases. + + +## [3.2.4] - 2014-12-19 +### Fixed +- Fixed resolving of !!null tag on an empty node. + + +## [3.2.3] - 2014-11-08 +### Fixed +- Implemented dumping of objects with circular and cross references. +- Partially fixed aliasing of constructed objects. (see issue #141 for details) + + +## [3.2.2] - 2014-09-07 +### Fixed +- Fixed infinite loop on unindented block scalars. +- Rewritten base64 encode/decode in binary type, to keep code licence clear. + + +## [3.2.1] - 2014-08-24 +### Fixed +- Nothig new. Just fix npm publish error. + + +## [3.2.0] - 2014-08-24 +### Added +- Added input piping support to CLI. + +### Fixed +- Fixed typo, that could cause hand on initial indent (#139). + + +## [3.1.0] - 2014-07-07 +### Changed +- 1.5x-2x speed boost. +- Removed deprecated `require('xxx.yml')` support. +- Significant code cleanup and refactoring. +- Internal API changed. If you used custom types - see updated examples. + Others are not affected. +- Even if the input string has no trailing line break character, + it will be parsed as if it has one. +- Added benchmark scripts. +- Moved bower files to /dist folder +- Bugfixes. + + +## [3.0.2] - 2014-02-27 +### Fixed +- Fixed bug: "constructor" string parsed as `null`. + + +## [3.0.1] - 2013-12-22 +### Fixed +- Fixed parsing of literal scalars. (issue #108) +- Prevented adding unnecessary spaces in object dumps. (issue #68) +- Fixed dumping of objects with very long (> 1024 in length) keys. + + +## [3.0.0] - 2013-12-16 +### Changed +- Refactored code. Changed API for custom types. +- Removed output colors in CLI, dump json by default. +- Removed big dependencies from browser version (esprima, buffer). Load `esprima` manually, if `!!js/function` needed. `!!bin` now returns Array in browser +- AMD support. +- Don't quote dumped strings because of `-` & `?` (if not first char). +- __Deprecated__ loading yaml files via `require()`, as not recommended + behaviour for node. + + +## [2.1.3] - 2013-10-16 +### Fixed +- Fix wrong loading of empty block scalars. + + +## [2.1.2] - 2013-10-07 +### Fixed +- Fix unwanted line breaks in folded scalars. + + +## [2.1.1] - 2013-10-02 +### Fixed +- Dumper now respects deprecated booleans syntax from YAML 1.0/1.1 +- Fixed reader bug in JSON-like sequences/mappings. + + +## [2.1.0] - 2013-06-05 +### Added +- Add standard YAML schemas: Failsafe (`FAILSAFE_SCHEMA`), + JSON (`JSON_SCHEMA`) and Core (`CORE_SCHEMA`). +- Add `skipInvalid` dumper option. + +### Changed +- Rename `DEFAULT_SCHEMA` to `DEFAULT_FULL_SCHEMA` + and `SAFE_SCHEMA` to `DEFAULT_SAFE_SCHEMA`. +- Use `safeLoad` for `require` extension. + +### Fixed +- Bug fix: export `NIL` constant from the public interface. + + +## [2.0.5] - 2013-04-26 +### Security +- Close security issue in !!js/function constructor. + Big thanks to @nealpoole for security audit. + + +## [2.0.4] - 2013-04-08 +### Changed +- Updated .npmignore to reduce package size + + +## [2.0.3] - 2013-02-26 +### Fixed +- Fixed dumping of empty arrays ans objects. ([] and {} instead of null) + + +## [2.0.2] - 2013-02-15 +### Fixed +- Fixed input validation: tabs are printable characters. + + +## [2.0.1] - 2013-02-09 +### Fixed +- Fixed error, when options not passed to function cass + + +## [2.0.0] - 2013-02-09 +### Changed +- Full rewrite. New architecture. Fast one-stage parsing. +- Changed custom types API. +- Added YAML dumper. + + +## [1.0.3] - 2012-11-05 +### Fixed +- Fixed utf-8 files loading. + + +## [1.0.2] - 2012-08-02 +### Fixed +- Pull out hand-written shims. Use ES5-Shims for old browsers support. See #44. +- Fix timstamps incorectly parsed in local time when no time part specified. + + +## [1.0.1] - 2012-07-07 +### Fixed +- Fixes `TypeError: 'undefined' is not an object` under Safari. Thanks Phuong. +- Fix timestamps incorrectly parsed in local time. Thanks @caolan. Closes #46. + + +## [1.0.0] - 2012-07-01 +### Changed +- `y`, `yes`, `n`, `no`, `on`, `off` are not converted to Booleans anymore. + Fixes #42. +- `require(filename)` now returns a single document and throws an Error if + file contains more than one document. +- CLI was merged back from js-yaml.bin + + +## [0.3.7] - 2012-02-28 +### Fixed +- Fix export of `addConstructor()`. Closes #39. + + +## [0.3.6] - 2012-02-22 +### Changed +- Removed AMD parts - too buggy to use. Need help to rewrite from scratch + +### Fixed +- Removed YUI compressor warning (renamed `double` variable). Closes #40. + + +## [0.3.5] - 2012-01-10 +### Fixed +- Workagound for .npmignore fuckup under windows. Thanks to airportyh. + + +## [0.3.4] - 2011-12-24 +### Fixed +- Fixes str[] for oldIEs support. +- Adds better has change support for browserified demo. +- improves compact output of Error. Closes #33. + + +## [0.3.3] - 2011-12-20 +### Added +- adds `compact` stringification of Errors. + +### Changed +- jsyaml executable moved to separate module. + + +## [0.3.2] - 2011-12-16 +### Added +- Added jsyaml executable. +- Added !!js/function support. Closes #12. + +### Fixed +- Fixes ug with block style scalars. Closes #26. +- All sources are passing JSLint now. +- Fixes bug in Safari. Closes #28. +- Fixes bug in Opers. Closes #29. +- Improves browser support. Closes #20. + + +## [0.3.1] - 2011-11-18 +### Added +- Added AMD support for browserified version. +- Added permalinks for online demo YAML snippets. Now we have YPaste service, lol. +- Added !!js/regexp and !!js/undefined types. Partially solves #12. + +### Changed +- Wrapped browserified js-yaml into closure. + +### Fixed +- Fixed the resolvement of non-specific tags. Closes #17. +- Fixed !!set mapping. +- Fixed month parse in dates. Closes #19. + + +## [0.3.0] - 2011-11-09 +### Added +- Added browserified version. Closes #13. +- Added live demo of browserified version. +- Ported some of the PyYAML tests. See #14. + +### Fixed +- Removed JS.Class dependency. Closes #3. +- Fixed timestamp bug when fraction was given. + + +## [0.2.2] - 2011-11-06 +### Fixed +- Fixed crash on docs without ---. Closes #8. +- Fixed multiline string parse +- Fixed tests/comments for using array as key + + +## [0.2.1] - 2011-11-02 +### Fixed +- Fixed short file read (<4k). Closes #9. + + +## [0.2.0] - 2011-11-02 +### Changed +- First public release + + +[4.1.0]: https://github.com/nodeca/js-yaml/compare/4.0.0...4.1.0 +[4.0.0]: https://github.com/nodeca/js-yaml/compare/3.14.0...4.0.0 +[3.14.0]: https://github.com/nodeca/js-yaml/compare/3.13.1...3.14.0 +[3.13.1]: https://github.com/nodeca/js-yaml/compare/3.13.0...3.13.1 +[3.13.0]: https://github.com/nodeca/js-yaml/compare/3.12.2...3.13.0 +[3.12.2]: https://github.com/nodeca/js-yaml/compare/3.12.1...3.12.2 +[3.12.1]: https://github.com/nodeca/js-yaml/compare/3.12.0...3.12.1 +[3.12.0]: https://github.com/nodeca/js-yaml/compare/3.11.0...3.12.0 +[3.11.0]: https://github.com/nodeca/js-yaml/compare/3.10.0...3.11.0 +[3.10.0]: https://github.com/nodeca/js-yaml/compare/3.9.1...3.10.0 +[3.9.1]: https://github.com/nodeca/js-yaml/compare/3.9.0...3.9.1 +[3.9.0]: https://github.com/nodeca/js-yaml/compare/3.8.4...3.9.0 +[3.8.4]: https://github.com/nodeca/js-yaml/compare/3.8.3...3.8.4 +[3.8.3]: https://github.com/nodeca/js-yaml/compare/3.8.2...3.8.3 +[3.8.2]: https://github.com/nodeca/js-yaml/compare/3.8.1...3.8.2 +[3.8.1]: https://github.com/nodeca/js-yaml/compare/3.8.0...3.8.1 +[3.8.0]: https://github.com/nodeca/js-yaml/compare/3.7.0...3.8.0 +[3.7.0]: https://github.com/nodeca/js-yaml/compare/3.6.1...3.7.0 +[3.6.1]: https://github.com/nodeca/js-yaml/compare/3.6.0...3.6.1 +[3.6.0]: https://github.com/nodeca/js-yaml/compare/3.5.5...3.6.0 +[3.5.5]: https://github.com/nodeca/js-yaml/compare/3.5.4...3.5.5 +[3.5.4]: https://github.com/nodeca/js-yaml/compare/3.5.3...3.5.4 +[3.5.3]: https://github.com/nodeca/js-yaml/compare/3.5.2...3.5.3 +[3.5.2]: https://github.com/nodeca/js-yaml/compare/3.5.1...3.5.2 +[3.5.1]: https://github.com/nodeca/js-yaml/compare/3.5.0...3.5.1 +[3.5.0]: https://github.com/nodeca/js-yaml/compare/3.4.6...3.5.0 +[3.4.6]: https://github.com/nodeca/js-yaml/compare/3.4.5...3.4.6 +[3.4.5]: https://github.com/nodeca/js-yaml/compare/3.4.4...3.4.5 +[3.4.4]: https://github.com/nodeca/js-yaml/compare/3.4.3...3.4.4 +[3.4.3]: https://github.com/nodeca/js-yaml/compare/3.4.2...3.4.3 +[3.4.2]: https://github.com/nodeca/js-yaml/compare/3.4.1...3.4.2 +[3.4.1]: https://github.com/nodeca/js-yaml/compare/3.4.0...3.4.1 +[3.4.0]: https://github.com/nodeca/js-yaml/compare/3.3.1...3.4.0 +[3.3.1]: https://github.com/nodeca/js-yaml/compare/3.3.0...3.3.1 +[3.3.0]: https://github.com/nodeca/js-yaml/compare/3.2.7...3.3.0 +[3.2.7]: https://github.com/nodeca/js-yaml/compare/3.2.6...3.2.7 +[3.2.6]: https://github.com/nodeca/js-yaml/compare/3.2.5...3.2.6 +[3.2.5]: https://github.com/nodeca/js-yaml/compare/3.2.4...3.2.5 +[3.2.4]: https://github.com/nodeca/js-yaml/compare/3.2.3...3.2.4 +[3.2.3]: https://github.com/nodeca/js-yaml/compare/3.2.2...3.2.3 +[3.2.2]: https://github.com/nodeca/js-yaml/compare/3.2.1...3.2.2 +[3.2.1]: https://github.com/nodeca/js-yaml/compare/3.2.0...3.2.1 +[3.2.0]: https://github.com/nodeca/js-yaml/compare/3.1.0...3.2.0 +[3.1.0]: https://github.com/nodeca/js-yaml/compare/3.0.2...3.1.0 +[3.0.2]: https://github.com/nodeca/js-yaml/compare/3.0.1...3.0.2 +[3.0.1]: https://github.com/nodeca/js-yaml/compare/3.0.0...3.0.1 +[3.0.0]: https://github.com/nodeca/js-yaml/compare/2.1.3...3.0.0 +[2.1.3]: https://github.com/nodeca/js-yaml/compare/2.1.2...2.1.3 +[2.1.2]: https://github.com/nodeca/js-yaml/compare/2.1.1...2.1.2 +[2.1.1]: https://github.com/nodeca/js-yaml/compare/2.1.0...2.1.1 +[2.1.0]: https://github.com/nodeca/js-yaml/compare/2.0.5...2.1.0 +[2.0.5]: https://github.com/nodeca/js-yaml/compare/2.0.4...2.0.5 +[2.0.4]: https://github.com/nodeca/js-yaml/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/nodeca/js-yaml/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/nodeca/js-yaml/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/nodeca/js-yaml/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/nodeca/js-yaml/compare/1.0.3...2.0.0 +[1.0.3]: https://github.com/nodeca/js-yaml/compare/1.0.2...1.0.3 +[1.0.2]: https://github.com/nodeca/js-yaml/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/nodeca/js-yaml/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/nodeca/js-yaml/compare/0.3.7...1.0.0 +[0.3.7]: https://github.com/nodeca/js-yaml/compare/0.3.6...0.3.7 +[0.3.6]: https://github.com/nodeca/js-yaml/compare/0.3.5...0.3.6 +[0.3.5]: https://github.com/nodeca/js-yaml/compare/0.3.4...0.3.5 +[0.3.4]: https://github.com/nodeca/js-yaml/compare/0.3.3...0.3.4 +[0.3.3]: https://github.com/nodeca/js-yaml/compare/0.3.2...0.3.3 +[0.3.2]: https://github.com/nodeca/js-yaml/compare/0.3.1...0.3.2 +[0.3.1]: https://github.com/nodeca/js-yaml/compare/0.3.0...0.3.1 +[0.3.0]: https://github.com/nodeca/js-yaml/compare/0.2.2...0.3.0 +[0.2.2]: https://github.com/nodeca/js-yaml/compare/0.2.1...0.2.2 +[0.2.1]: https://github.com/nodeca/js-yaml/compare/0.2.0...0.2.1 +[0.2.0]: https://github.com/nodeca/js-yaml/releases/tag/0.2.0 diff --git a/node_modules/enquirer/LICENSE b/node_modules/eslint/node_modules/js-yaml/LICENSE similarity index 93% rename from node_modules/enquirer/LICENSE rename to node_modules/eslint/node_modules/js-yaml/LICENSE index 681d1bf72..09d3a29e9 100644 --- a/node_modules/enquirer/LICENSE +++ b/node_modules/eslint/node_modules/js-yaml/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +(The MIT License) -Copyright (c) 2016-present, Jon Schlinkert. +Copyright (C) 2011-2015 by Vitaly Puzrin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/eslint/node_modules/js-yaml/README.md b/node_modules/eslint/node_modules/js-yaml/README.md new file mode 100644 index 000000000..3cbc4bd2d --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/README.md @@ -0,0 +1,246 @@ +JS-YAML - YAML 1.2 parser / writer for JavaScript +================================================= + +[![CI](https://github.com/nodeca/js-yaml/workflows/CI/badge.svg?branch=master)](https://github.com/nodeca/js-yaml/actions) +[![NPM version](https://img.shields.io/npm/v/js-yaml.svg)](https://www.npmjs.org/package/js-yaml) + +__[Online Demo](http://nodeca.github.com/js-yaml/)__ + + +This is an implementation of [YAML](http://yaml.org/), a human-friendly data +serialization language. Started as [PyYAML](http://pyyaml.org/) port, it was +completely rewritten from scratch. Now it's very fast, and supports 1.2 spec. + + +Installation +------------ + +### YAML module for node.js + +``` +npm install js-yaml +``` + + +### CLI executable + +If you want to inspect your YAML files from CLI, install js-yaml globally: + +``` +npm install -g js-yaml +``` + +#### Usage + +``` +usage: js-yaml [-h] [-v] [-c] [-t] file + +Positional arguments: + file File with YAML document(s) + +Optional arguments: + -h, --help Show this help message and exit. + -v, --version Show program's version number and exit. + -c, --compact Display errors in compact mode + -t, --trace Show stack trace on error +``` + + +API +--- + +Here we cover the most 'useful' methods. If you need advanced details (creating +your own tags), see [examples](https://github.com/nodeca/js-yaml/tree/master/examples) +for more info. + +``` javascript +const yaml = require('js-yaml'); +const fs = require('fs'); + +// Get document, or throw exception on error +try { + const doc = yaml.load(fs.readFileSync('/home/ixti/example.yml', 'utf8')); + console.log(doc); +} catch (e) { + console.log(e); +} +``` + + +### load (string [ , options ]) + +Parses `string` as single YAML document. Returns either a +plain object, a string, a number, `null` or `undefined`, or throws `YAMLException` on error. By default, does +not support regexps, functions and undefined. + +options: + +- `filename` _(default: null)_ - string to be used as a file path in + error/warning messages. +- `onWarning` _(default: null)_ - function to call on warning messages. + Loader will call this function with an instance of `YAMLException` for each warning. +- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use. + - `FAILSAFE_SCHEMA` - only strings, arrays and plain objects: + http://www.yaml.org/spec/1.2/spec.html#id2802346 + - `JSON_SCHEMA` - all JSON-supported types: + http://www.yaml.org/spec/1.2/spec.html#id2803231 + - `CORE_SCHEMA` - same as `JSON_SCHEMA`: + http://www.yaml.org/spec/1.2/spec.html#id2804923 + - `DEFAULT_SCHEMA` - all supported YAML types. +- `json` _(default: false)_ - compatibility with JSON.parse behaviour. If true, then duplicate keys in a mapping will override values rather than throwing an error. + +NOTE: This function **does not** understand multi-document sources, it throws +exception on those. + +NOTE: JS-YAML **does not** support schema-specific tag resolution restrictions. +So, the JSON schema is not as strictly defined in the YAML specification. +It allows numbers in any notation, use `Null` and `NULL` as `null`, etc. +The core schema also has no such restrictions. It allows binary notation for integers. + + +### loadAll (string [, iterator] [, options ]) + +Same as `load()`, but understands multi-document sources. Applies +`iterator` to each document if specified, or returns array of documents. + +``` javascript +const yaml = require('js-yaml'); + +yaml.loadAll(data, function (doc) { + console.log(doc); +}); +``` + + +### dump (object [ , options ]) + +Serializes `object` as a YAML document. Uses `DEFAULT_SCHEMA`, so it will +throw an exception if you try to dump regexps or functions. However, you can +disable exceptions by setting the `skipInvalid` option to `true`. + +options: + +- `indent` _(default: 2)_ - indentation width to use (in spaces). +- `noArrayIndent` _(default: false)_ - when true, will not add an indentation level to array elements +- `skipInvalid` _(default: false)_ - do not throw on invalid types (like function + in the safe schema) and skip pairs and single values with such types. +- `flowLevel` _(default: -1)_ - specifies level of nesting, when to switch from + block to flow style for collections. -1 means block style everwhere +- `styles` - "tag" => "style" map. Each tag may have own set of styles. +- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use. +- `sortKeys` _(default: `false`)_ - if `true`, sort keys when dumping YAML. If a + function, use the function to sort the keys. +- `lineWidth` _(default: `80`)_ - set max line width. Set `-1` for unlimited width. +- `noRefs` _(default: `false`)_ - if `true`, don't convert duplicate objects into references +- `noCompatMode` _(default: `false`)_ - if `true` don't try to be compatible with older + yaml versions. Currently: don't quote "yes", "no" and so on, as required for YAML 1.1 +- `condenseFlow` _(default: `false`)_ - if `true` flow sequences will be condensed, omitting the space between `a, b`. Eg. `'[a,b]'`, and omitting the space between `key: value` and quoting the key. Eg. `'{"a":b}'` Can be useful when using yaml for pretty URL query params as spaces are %-encoded. +- `quotingType` _(`'` or `"`, default: `'`)_ - strings will be quoted using this quoting style. If you specify single quotes, double quotes will still be used for non-printable characters. +- `forceQuotes` _(default: `false`)_ - if `true`, all non-key strings will be quoted even if they normally don't need to. +- `replacer` - callback `function (key, value)` called recursively on each key/value in source object (see `replacer` docs for `JSON.stringify`). + +The following table show availlable styles (e.g. "canonical", +"binary"...) available for each tag (.e.g. !!null, !!int ...). Yaml +output is shown on the right side after `=>` (default setting) or `->`: + +``` none +!!null + "canonical" -> "~" + "lowercase" => "null" + "uppercase" -> "NULL" + "camelcase" -> "Null" + +!!int + "binary" -> "0b1", "0b101010", "0b1110001111010" + "octal" -> "0o1", "0o52", "0o16172" + "decimal" => "1", "42", "7290" + "hexadecimal" -> "0x1", "0x2A", "0x1C7A" + +!!bool + "lowercase" => "true", "false" + "uppercase" -> "TRUE", "FALSE" + "camelcase" -> "True", "False" + +!!float + "lowercase" => ".nan", '.inf' + "uppercase" -> ".NAN", '.INF' + "camelcase" -> ".NaN", '.Inf' +``` + +Example: + +``` javascript +dump(object, { + 'styles': { + '!!null': 'canonical' // dump null as ~ + }, + 'sortKeys': true // sort object keys +}); +``` + +Supported YAML types +-------------------- + +The list of standard YAML tags and corresponding JavaScript types. See also +[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and +[YAML types repository](http://yaml.org/type/). + +``` +!!null '' # null +!!bool 'yes' # bool +!!int '3...' # number +!!float '3.14...' # number +!!binary '...base64...' # buffer +!!timestamp 'YYYY-...' # date +!!omap [ ... ] # array of key-value pairs +!!pairs [ ... ] # array or array pairs +!!set { ... } # array of objects with given keys and null values +!!str '...' # string +!!seq [ ... ] # array +!!map { ... } # object +``` + +**JavaScript-specific tags** + +See [js-yaml-js-types](https://github.com/nodeca/js-yaml-js-types) for +extra types. + + +Caveats +------- + +Note, that you use arrays or objects as key in JS-YAML. JS does not allow objects +or arrays as keys, and stringifies (by calling `toString()` method) them at the +moment of adding them. + +``` yaml +--- +? [ foo, bar ] +: - baz +? { foo: bar } +: - baz + - baz +``` + +``` javascript +{ "foo,bar": ["baz"], "[object Object]": ["baz", "baz"] } +``` + +Also, reading of properties on implicit block mapping keys is not supported yet. +So, the following YAML document cannot be loaded. + +``` yaml +&anchor foo: + foo: bar + *anchor: duplicate key + baz: bat + *anchor: duplicate key +``` + + +js-yaml for enterprise +---------------------- + +Available as part of the Tidelift Subscription + +The maintainers of js-yaml and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-js-yaml?utm_source=npm-js-yaml&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js b/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js new file mode 100755 index 000000000..a182f1afb --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/bin/js-yaml.js @@ -0,0 +1,126 @@ +#!/usr/bin/env node + + +'use strict'; + +/*eslint-disable no-console*/ + + +var fs = require('fs'); +var argparse = require('argparse'); +var yaml = require('..'); + + +//////////////////////////////////////////////////////////////////////////////// + + +var cli = new argparse.ArgumentParser({ + prog: 'js-yaml', + add_help: true +}); + +cli.add_argument('-v', '--version', { + action: 'version', + version: require('../package.json').version +}); + +cli.add_argument('-c', '--compact', { + help: 'Display errors in compact mode', + action: 'store_true' +}); + +// deprecated (not needed after we removed output colors) +// option suppressed, but not completely removed for compatibility +cli.add_argument('-j', '--to-json', { + help: argparse.SUPPRESS, + dest: 'json', + action: 'store_true' +}); + +cli.add_argument('-t', '--trace', { + help: 'Show stack trace on error', + action: 'store_true' +}); + +cli.add_argument('file', { + help: 'File to read, utf-8 encoded without BOM', + nargs: '?', + default: '-' +}); + + +//////////////////////////////////////////////////////////////////////////////// + + +var options = cli.parse_args(); + + +//////////////////////////////////////////////////////////////////////////////// + +function readFile(filename, encoding, callback) { + if (options.file === '-') { + // read from stdin + + var chunks = []; + + process.stdin.on('data', function (chunk) { + chunks.push(chunk); + }); + + process.stdin.on('end', function () { + return callback(null, Buffer.concat(chunks).toString(encoding)); + }); + } else { + fs.readFile(filename, encoding, callback); + } +} + +readFile(options.file, 'utf8', function (error, input) { + var output, isYaml; + + if (error) { + if (error.code === 'ENOENT') { + console.error('File not found: ' + options.file); + process.exit(2); + } + + console.error( + options.trace && error.stack || + error.message || + String(error)); + + process.exit(1); + } + + try { + output = JSON.parse(input); + isYaml = false; + } catch (err) { + if (err instanceof SyntaxError) { + try { + output = []; + yaml.loadAll(input, function (doc) { output.push(doc); }, {}); + isYaml = true; + + if (output.length === 0) output = null; + else if (output.length === 1) output = output[0]; + + } catch (e) { + if (options.trace && err.stack) console.error(e.stack); + else console.error(e.toString(options.compact)); + + process.exit(1); + } + } else { + console.error( + options.trace && err.stack || + err.message || + String(err)); + + process.exit(1); + } + } + + if (isYaml) console.log(JSON.stringify(output, null, ' ')); + else console.log(yaml.dump(output)); +}); diff --git a/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js b/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js new file mode 100644 index 000000000..4cc0ddf6d --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js @@ -0,0 +1,3874 @@ + +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jsyaml = {})); +}(this, (function (exports) { 'use strict'; + + function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); + } + + + function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); + } + + + function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; + } + + + function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; + } + + + function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; + } + + + function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); + } + + + var isNothing_1 = isNothing; + var isObject_1 = isObject; + var toArray_1 = toArray; + var repeat_1 = repeat; + var isNegativeZero_1 = isNegativeZero; + var extend_1 = extend; + + var common = { + isNothing: isNothing_1, + isObject: isObject_1, + toArray: toArray_1, + repeat: repeat_1, + isNegativeZero: isNegativeZero_1, + extend: extend_1 + }; + + // YAML error class. http://stackoverflow.com/questions/8458984 + + + function formatError(exception, compact) { + var where = '', message = exception.reason || '(unknown reason)'; + + if (!exception.mark) return message; + + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + + where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; + + if (!compact && exception.mark.snippet) { + where += '\n\n' + exception.mark.snippet; + } + + return message + ' ' + where; + } + + + function YAMLException$1(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } + } + + + // Inherit from Error + YAMLException$1.prototype = Object.create(Error.prototype); + YAMLException$1.prototype.constructor = YAMLException$1; + + + YAMLException$1.prototype.toString = function toString(compact) { + return this.name + ': ' + formatError(this, compact); + }; + + + var exception = YAMLException$1; + + // get snippet for a single line, respecting maxLength + function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ''; + var tail = ''; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + + if (position - lineStart > maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; + } + + + function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; + } + + + function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); + } + + + var snippet = makeSnippet; + + var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' + ]; + + var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' + ]; + + function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; + } + + function Type$1(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } + } + + var type = Type$1; + + /*eslint-disable max-len*/ + + + + + + function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; + } + + + function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; + } + + + function Schema$1(definition) { + return this.extend(definition); + } + + + Schema$1.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new exception('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type$1.loadKind && type$1.loadKind !== 'scalar') { + throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type$1.multi) { + throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema$1.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; + }; + + + var schema = Schema$1; + + var str = new type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } + }); + + var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } + }); + + var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } + }); + + var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] + }); + + function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); + } + + function constructYamlNull() { + return null; + } + + function isNull(object) { + return object === null; + } + + var _null = new type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' + }); + + function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); + } + + function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; + } + + function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; + } + + var bool = new type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' + }); + + function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); + } + + function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); + } + + function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); + } + + function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; + } + + function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); + } + + function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); + } + + var int = new type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } + }); + + var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + + function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; + } + + function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); + } + + + var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + + function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; + } + + function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); + } + + var float = new type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' + }); + + var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] + }); + + var core = json; + + var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + + var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + + function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; + } + + function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; + } + + function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); + } + + var timestamp = new type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp + }); + + function resolveYamlMerge(data) { + return data === '<<' || data === null; + } + + var merge = new type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge + }); + + /*eslint-disable no-bitwise*/ + + + + + + // [ 64, 65, 66 ] -> [ padding, CR, LF ] + var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + + function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; + } + + function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); + } + + function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; + } + + function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; + } + + var binary = new type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary + }); + + var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; + var _toString$2 = Object.prototype.toString; + + function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString$2.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; + } + + function constructYamlOmap(data) { + return data !== null ? data : []; + } + + var omap = new type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap + }); + + var _toString$1 = Object.prototype.toString; + + function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString$1.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; + } + + function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; + } + + var pairs = new type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs + }); + + var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + + function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; + } + + function constructYamlSet(data) { + return data !== null ? data : {}; + } + + var set = new type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet + }); + + var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] + }); + + /*eslint-disable max-len,no-use-before-define*/ + + + + + + + + var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + + var CONTEXT_FLOW_IN = 1; + var CONTEXT_FLOW_OUT = 2; + var CONTEXT_BLOCK_IN = 3; + var CONTEXT_BLOCK_OUT = 4; + + + var CHOMPING_CLIP = 1; + var CHOMPING_STRIP = 2; + var CHOMPING_KEEP = 3; + + + var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; + var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; + var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; + var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; + var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + + function _class(obj) { return Object.prototype.toString.call(obj); } + + function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); + } + + function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); + } + + function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); + } + + function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; + } + + function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; + } + + function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; + } + + function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; + } + + function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; + } + + function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); + } + + var simpleEscapeCheck = new Array(256); // integer, for fast access + var simpleEscapeMap = new Array(256); + for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); + } + + + function State$1(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || _default; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + + } + + + function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = snippet(mark); + + return new exception(message, mark); + } + + function throwError(state, message) { + throw generateError(state, message); + } + + function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } + } + + + var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty$1.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } + }; + + + function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } + } + + function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } + } + + function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty$1.call(overridableKeys, keyNode) && + _hasOwnProperty$1.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; + } + + function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; + } + + function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; + } + + function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; + } + + function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } + } + + + function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; + } + + function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); + } + + function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); + } + + function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); + } + + function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; + } + + function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; + } + + function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; + } + + function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; + } + + function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; + } + + function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; + } + + function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; + } + + function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } + } + + + function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State$1(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; + } + + + function loadAll$1(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } + } + + + function load$1(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception('expected a single document in the stream, but found more'); + } + + + var loadAll_1 = loadAll$1; + var load_1 = load$1; + + var loader = { + loadAll: loadAll_1, + load: load_1 + }; + + /*eslint-disable no-use-before-define*/ + + + + + + var _toString = Object.prototype.toString; + var _hasOwnProperty = Object.prototype.hasOwnProperty; + + var CHAR_BOM = 0xFEFF; + var CHAR_TAB = 0x09; /* Tab */ + var CHAR_LINE_FEED = 0x0A; /* LF */ + var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ + var CHAR_SPACE = 0x20; /* Space */ + var CHAR_EXCLAMATION = 0x21; /* ! */ + var CHAR_DOUBLE_QUOTE = 0x22; /* " */ + var CHAR_SHARP = 0x23; /* # */ + var CHAR_PERCENT = 0x25; /* % */ + var CHAR_AMPERSAND = 0x26; /* & */ + var CHAR_SINGLE_QUOTE = 0x27; /* ' */ + var CHAR_ASTERISK = 0x2A; /* * */ + var CHAR_COMMA = 0x2C; /* , */ + var CHAR_MINUS = 0x2D; /* - */ + var CHAR_COLON = 0x3A; /* : */ + var CHAR_EQUALS = 0x3D; /* = */ + var CHAR_GREATER_THAN = 0x3E; /* > */ + var CHAR_QUESTION = 0x3F; /* ? */ + var CHAR_COMMERCIAL_AT = 0x40; /* @ */ + var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ + var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ + var CHAR_GRAVE_ACCENT = 0x60; /* ` */ + var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ + var CHAR_VERTICAL_LINE = 0x7C; /* | */ + var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + + var ESCAPE_SEQUENCES = {}; + + ESCAPE_SEQUENCES[0x00] = '\\0'; + ESCAPE_SEQUENCES[0x07] = '\\a'; + ESCAPE_SEQUENCES[0x08] = '\\b'; + ESCAPE_SEQUENCES[0x09] = '\\t'; + ESCAPE_SEQUENCES[0x0A] = '\\n'; + ESCAPE_SEQUENCES[0x0B] = '\\v'; + ESCAPE_SEQUENCES[0x0C] = '\\f'; + ESCAPE_SEQUENCES[0x0D] = '\\r'; + ESCAPE_SEQUENCES[0x1B] = '\\e'; + ESCAPE_SEQUENCES[0x22] = '\\"'; + ESCAPE_SEQUENCES[0x5C] = '\\\\'; + ESCAPE_SEQUENCES[0x85] = '\\N'; + ESCAPE_SEQUENCES[0xA0] = '\\_'; + ESCAPE_SEQUENCES[0x2028] = '\\L'; + ESCAPE_SEQUENCES[0x2029] = '\\P'; + + var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' + ]; + + var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + + function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; + } + + function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; + } + + + var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + + function State(options) { + this.schema = options['schema'] || _default; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; + } + + // Indents every line in a string. Empty lines (\n only) are not indented. + function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; + } + + function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); + } + + function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; + } + + // [33] s-white ::= s-space | s-tab + function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; + } + + // Returns true if the character can be printed without escaping. + // From YAML 1.2: "any allowed characters known to be non-printable + // should also be escaped. [However,] This isn’t mandatory" + // Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. + function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); + } + + // [34] ns-char ::= nb-char - s-white + // [27] nb-char ::= c-printable - b-char - c-byte-order-mark + // [26] b-char ::= b-line-feed | b-carriage-return + // Including s-white (for some reason, examples doesn't match specs in this aspect) + // ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark + function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; + } + + // [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out + // c = flow-in ⇒ ns-plain-safe-in + // c = block-key ⇒ ns-plain-safe-out + // c = flow-key ⇒ ns-plain-safe-in + // [128] ns-plain-safe-out ::= ns-char + // [129] ns-plain-safe-in ::= ns-char - c-flow-indicator + // [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) + // | ( /* An ns-char preceding */ “#” ) + // | ( “:” /* Followed by an ns-plain-safe(c) */ ) + function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' + } + + // Simplified test for values allowed as the first character in plain style. + function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; + } + + // Simplified test for values allowed as the last character in plain style. + function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; + } + + // Same as 'string'.codePointAt(pos), but works in older browsers. + function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; + } + + // Determines whether block indentation indicator is required. + function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); + } + + var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + + // Determines which scalar styles are possible and returns the preferred style. + // lineWidth = -1 => no limit. + // Pre-conditions: str.length > 0. + // Post-conditions: + // STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. + // STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). + // STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). + function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + + // Note: line breaking/folding is implemented for only the folded style. + // NB. We drop the last trailing newline (if any) of a returned block scalar + // since the dumper adds its own newline. This always works: + // • No ending newline => unaffected; already using strip "-" chomping. + // • Ending newline => removed then restored. + // Importantly, this keeps the "+" chomp indicator from gaining an extra line. + function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string) + '"'; + default: + throw new exception('impossible error: invalid scalar style'); + } + }()); + } + + // Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. + function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; + } + + // (See the note for writeScalar.) + function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; + } + + // Note: a long line without a suitable break point will exceed the width limit. + // Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. + function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; + } + + // Greedy line breaking. + // Picks the longest line under the limit each time, + // otherwise settles for the shortest line over the limit. + // NB. More-indented lines *cannot* be folded, as that would add an extra \n. + function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner + } + + // Escapes a double-quoted string. + function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; + } + + function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; + } + + function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. + } + + function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; + } + + function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new exception('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. + } + + function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; + } + + // Serializes `object` and writes it to global `result`. + // Returns true on success, or false on invalid object. + // + function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new exception('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; + } + + function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); + } + + function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } + } + + function dump$1(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; + } + + var dump_1 = dump$1; + + var dumper = { + dump: dump_1 + }; + + function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; + } + + + var Type = type; + var Schema = schema; + var FAILSAFE_SCHEMA = failsafe; + var JSON_SCHEMA = json; + var CORE_SCHEMA = core; + var DEFAULT_SCHEMA = _default; + var load = loader.load; + var loadAll = loader.loadAll; + var dump = dumper.dump; + var YAMLException = exception; + + // Re-export all types in case user wants to create custom schema + var types = { + binary: binary, + float: float, + map: map, + null: _null, + pairs: pairs, + set: set, + timestamp: timestamp, + bool: bool, + int: int, + merge: merge, + omap: omap, + seq: seq, + str: str + }; + + // Removed functions from JS-YAML 3.0.x + var safeLoad = renamed('safeLoad', 'load'); + var safeLoadAll = renamed('safeLoadAll', 'loadAll'); + var safeDump = renamed('safeDump', 'dump'); + + var jsYaml = { + Type: Type, + Schema: Schema, + FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, + JSON_SCHEMA: JSON_SCHEMA, + CORE_SCHEMA: CORE_SCHEMA, + DEFAULT_SCHEMA: DEFAULT_SCHEMA, + load: load, + loadAll: loadAll, + dump: dump, + YAMLException: YAMLException, + types: types, + safeLoad: safeLoad, + safeLoadAll: safeLoadAll, + safeDump: safeDump + }; + + exports.CORE_SCHEMA = CORE_SCHEMA; + exports.DEFAULT_SCHEMA = DEFAULT_SCHEMA; + exports.FAILSAFE_SCHEMA = FAILSAFE_SCHEMA; + exports.JSON_SCHEMA = JSON_SCHEMA; + exports.Schema = Schema; + exports.Type = Type; + exports.YAMLException = YAMLException; + exports.default = jsYaml; + exports.dump = dump; + exports.load = load; + exports.loadAll = loadAll; + exports.safeDump = safeDump; + exports.safeLoad = safeLoad; + exports.safeLoadAll = safeLoadAll; + exports.types = types; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); diff --git a/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js b/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js new file mode 100644 index 000000000..bdd8eef54 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/dist/js-yaml.min.js @@ -0,0 +1,2 @@ +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})}(this,(function(e){"use strict";function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,o=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var u,p,f="",d=Math.min(e.line+t.linesAfter,c.length).toString().length,h=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=a(e.buffer,o[s-u],c[s-u],e.position-(o[s]-o[s-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=a(e.buffer,o[s],c[s],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=c.length);u++)p=a(e.buffer,o[s+u],c[s+u],e.position-(o[s]-o[s+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[];if(e instanceof p)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(d.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var I=/^[-+]?[0-9]+e/;var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),O=b.extend({implicit:[A,v,C,S]}),j=O,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==N.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=T.exec(e))&&(t=N.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var E=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var L=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=M;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=M,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=M;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString;var U=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ie=new Array(256),re=new Array(256),oe=0;oe<256;oe++)ie[oe]=te(oe)?1:0,re[oe]=te(oe);function ae(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=c(n),new o(t,n)}function ce(e,t){throw le(e,t)}function se(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var ue={YAML:function(e,t,n){var i,r,o;null!==e.version&&ce(e,"duplication of %YAML directive"),1!==n.length&&ce(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ce(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&se(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ce(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],G.test(i)||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&ce(e,'there is a previously declared suffix for "'+i+'" tag handle'),V.test(r)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ce(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function pe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=n.repeat("\n",t-1))}function be(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),45===i)&&z(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,we(e,t,3,!1,!0),a.push(e.result),ge(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ce(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),we(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(de(e,f,d,h,g,m,a,l,c),h=g=m=null),ge(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ce(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ce(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(Q(a)){do{a=e.input.charCodeAt(++e.position)}while(Q(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!J(a)&&0!==a)}for(;0!==a;){for(he(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),J(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ee(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ce(e,"expected hexadecimal character");e.result+=ne(o),e.position++}else ce(e,"unknown escape sequence");n=i=e.position}else J(l)?(pe(e,n,i,!0),ye(e,ge(e,!1,t)),n=i=e.position):e.position===e.lineStart&&me(e)?ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ce(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!z(i)&&!X(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(z(u=e.input.charCodeAt(e.position))||X(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(z(i=e.input.charCodeAt(e.position+1))||n&&X(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(z(i=e.input.charCodeAt(e.position+1))||n&&X(i))break}else if(35===u){if(z(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&me(e)||n&&X(u))break;if(J(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(pe(e,r,o,!1),ye(e,e.line-l),r=o=e.position,a=!1),Q(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return pe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ce(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&be(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ce(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function ke(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ce(e,"directive name must not be less than one character in length");0!==r;){for(;Q(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!J(r));break}if(J(r))break;for(t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&he(e),P.call(ue,n)?ue[n](e,n,i):se(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):a&&ce(e,"directives end mark is expected"),we(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&H.test(e.input.slice(o,e.position))&&se(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&me(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Re(e){return/^\n* /.test(e)}function Be(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=De(s=Ye(e,0))&&s!==Oe&&!_e(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!_e(e)&&58!==e}(Ye(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!De(u=Ye(e,c)))return 5;m=m&&qe(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Ye(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!De(u))return 5;m=m&&qe(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Re(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Ke(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Te.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(Be(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Pe(t,e.indent)+We(Me(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,He(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+He(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Ye(e,r),!(t=je[i])&&De(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Fe(i);return n}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function Pe(e,t){var n=Re(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function We(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function He(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function $e(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Ve(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Ge(e,n,!1)||Ge(e,n,!0);var c,s=Ie.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(r=0,a=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Le(e,t)),Ve(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ve(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$e(e,t-1,e.dump,r):$e(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function Ze(e,t){var n,i,r=[],o=[];for(Je(e,r,o),n=0,i=o.length;n maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; +} + + +function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; +} + + +function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); +} + + +var snippet = makeSnippet; + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type$1(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new exception('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new exception('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +var type = Type$1; + +/*eslint-disable max-len*/ + + + + + +function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema$1(definition) { + return this.extend(definition); +} + + +Schema$1.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new exception('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type$1.loadKind && type$1.loadKind !== 'scalar') { + throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type$1.multi) { + throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type$1) { + if (!(type$1 instanceof type)) { + throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema$1.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; +}; + + +var schema = Schema$1; + +var str = new type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); + +var seq = new type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); + +var map = new type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); + +var failsafe = new schema({ + explicit: [ + str, + seq, + map + ] +}); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +var _null = new type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' +}); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +var bool = new type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +var int = new type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +var float = new type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); + +var json = failsafe.extend({ + implicit: [ + _null, + bool, + int, + float + ] +}); + +var core = json; + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +var timestamp = new type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +var merge = new type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); + +/*eslint-disable no-bitwise*/ + + + + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; +} + +var binary = new type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); + +var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; +var _toString$2 = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString$2.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty$3.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +var omap = new type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); + +var _toString$1 = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString$1.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +var pairs = new type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); + +var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty$2.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +var set = new type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); + +var _default = core.extend({ + implicit: [ + timestamp, + merge + ], + explicit: [ + binary, + omap, + pairs, + set + ] +}); + +/*eslint-disable max-len,no-use-before-define*/ + + + + + + + +var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State$1(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || _default; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = snippet(mark); + + return new exception(message, mark); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty$1.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty$1.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty$1.call(overridableKeys, keyNode) && + _hasOwnProperty$1.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty$1.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State$1(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll$1(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load$1(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new exception('expected a single document in the stream, but found more'); +} + + +var loadAll_1 = loadAll$1; +var load_1 = load$1; + +var loader = { + loadAll: loadAll_1, + load: load_1 +}; + +/*eslint-disable no-use-before-define*/ + + + + + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_BOM = 0xFEFF; +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new exception('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + + +var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + +function State(options) { + this.schema = options['schema'] || _default; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// Including s-white (for some reason, examples doesn't match specs in this aspect) +// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark +function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out +// c = flow-in ⇒ ns-plain-safe-in +// c = block-key ⇒ ns-plain-safe-out +// c = flow-key ⇒ ns-plain-safe-in +// [128] ns-plain-safe-out ::= ns-char +// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator +// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) +// | ( /* An ns-char preceding */ “#” ) +// | ( “:” /* Followed by an ns-plain-safe(c) */ ) +function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Simplified test for values allowed as the last character in plain style. +function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; +} + +// Same as 'string'.codePointAt(pos), but works in older browsers. +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string) + '"'; + default: + throw new exception('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new exception('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new exception('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new exception('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump$1(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; +} + +var dump_1 = dump$1; + +var dumper = { + dump: dump_1 +}; + +function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; +} + + +var Type = type; +var Schema = schema; +var FAILSAFE_SCHEMA = failsafe; +var JSON_SCHEMA = json; +var CORE_SCHEMA = core; +var DEFAULT_SCHEMA = _default; +var load = loader.load; +var loadAll = loader.loadAll; +var dump = dumper.dump; +var YAMLException = exception; + +// Re-export all types in case user wants to create custom schema +var types = { + binary: binary, + float: float, + map: map, + null: _null, + pairs: pairs, + set: set, + timestamp: timestamp, + bool: bool, + int: int, + merge: merge, + omap: omap, + seq: seq, + str: str +}; + +// Removed functions from JS-YAML 3.0.x +var safeLoad = renamed('safeLoad', 'load'); +var safeLoadAll = renamed('safeLoadAll', 'loadAll'); +var safeDump = renamed('safeDump', 'dump'); + +var jsYaml = { + Type: Type, + Schema: Schema, + FAILSAFE_SCHEMA: FAILSAFE_SCHEMA, + JSON_SCHEMA: JSON_SCHEMA, + CORE_SCHEMA: CORE_SCHEMA, + DEFAULT_SCHEMA: DEFAULT_SCHEMA, + load: load, + loadAll: loadAll, + dump: dump, + YAMLException: YAMLException, + types: types, + safeLoad: safeLoad, + safeLoadAll: safeLoadAll, + safeDump: safeDump +}; + +export default jsYaml; +export { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types }; diff --git a/node_modules/eslint/node_modules/js-yaml/index.js b/node_modules/eslint/node_modules/js-yaml/index.js new file mode 100644 index 000000000..bcb7eba7a --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/index.js @@ -0,0 +1,47 @@ +'use strict'; + + +var loader = require('./lib/loader'); +var dumper = require('./lib/dumper'); + + +function renamed(from, to) { + return function () { + throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' + + 'Use yaml.' + to + ' instead, which is now safe by default.'); + }; +} + + +module.exports.Type = require('./lib/type'); +module.exports.Schema = require('./lib/schema'); +module.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe'); +module.exports.JSON_SCHEMA = require('./lib/schema/json'); +module.exports.CORE_SCHEMA = require('./lib/schema/core'); +module.exports.DEFAULT_SCHEMA = require('./lib/schema/default'); +module.exports.load = loader.load; +module.exports.loadAll = loader.loadAll; +module.exports.dump = dumper.dump; +module.exports.YAMLException = require('./lib/exception'); + +// Re-export all types in case user wants to create custom schema +module.exports.types = { + binary: require('./lib/type/binary'), + float: require('./lib/type/float'), + map: require('./lib/type/map'), + null: require('./lib/type/null'), + pairs: require('./lib/type/pairs'), + set: require('./lib/type/set'), + timestamp: require('./lib/type/timestamp'), + bool: require('./lib/type/bool'), + int: require('./lib/type/int'), + merge: require('./lib/type/merge'), + omap: require('./lib/type/omap'), + seq: require('./lib/type/seq'), + str: require('./lib/type/str') +}; + +// Removed functions from JS-YAML 3.0.x +module.exports.safeLoad = renamed('safeLoad', 'load'); +module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll'); +module.exports.safeDump = renamed('safeDump', 'dump'); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/common.js b/node_modules/eslint/node_modules/js-yaml/lib/common.js new file mode 100644 index 000000000..25ef7d8e4 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/common.js @@ -0,0 +1,59 @@ +'use strict'; + + +function isNothing(subject) { + return (typeof subject === 'undefined') || (subject === null); +} + + +function isObject(subject) { + return (typeof subject === 'object') && (subject !== null); +} + + +function toArray(sequence) { + if (Array.isArray(sequence)) return sequence; + else if (isNothing(sequence)) return []; + + return [ sequence ]; +} + + +function extend(target, source) { + var index, length, key, sourceKeys; + + if (source) { + sourceKeys = Object.keys(source); + + for (index = 0, length = sourceKeys.length; index < length; index += 1) { + key = sourceKeys[index]; + target[key] = source[key]; + } + } + + return target; +} + + +function repeat(string, count) { + var result = '', cycle; + + for (cycle = 0; cycle < count; cycle += 1) { + result += string; + } + + return result; +} + + +function isNegativeZero(number) { + return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number); +} + + +module.exports.isNothing = isNothing; +module.exports.isObject = isObject; +module.exports.toArray = toArray; +module.exports.repeat = repeat; +module.exports.isNegativeZero = isNegativeZero; +module.exports.extend = extend; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/dumper.js b/node_modules/eslint/node_modules/js-yaml/lib/dumper.js new file mode 100644 index 000000000..f357a6aee --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/dumper.js @@ -0,0 +1,965 @@ +'use strict'; + +/*eslint-disable no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var DEFAULT_SCHEMA = require('./schema/default'); + +var _toString = Object.prototype.toString; +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +var CHAR_BOM = 0xFEFF; +var CHAR_TAB = 0x09; /* Tab */ +var CHAR_LINE_FEED = 0x0A; /* LF */ +var CHAR_CARRIAGE_RETURN = 0x0D; /* CR */ +var CHAR_SPACE = 0x20; /* Space */ +var CHAR_EXCLAMATION = 0x21; /* ! */ +var CHAR_DOUBLE_QUOTE = 0x22; /* " */ +var CHAR_SHARP = 0x23; /* # */ +var CHAR_PERCENT = 0x25; /* % */ +var CHAR_AMPERSAND = 0x26; /* & */ +var CHAR_SINGLE_QUOTE = 0x27; /* ' */ +var CHAR_ASTERISK = 0x2A; /* * */ +var CHAR_COMMA = 0x2C; /* , */ +var CHAR_MINUS = 0x2D; /* - */ +var CHAR_COLON = 0x3A; /* : */ +var CHAR_EQUALS = 0x3D; /* = */ +var CHAR_GREATER_THAN = 0x3E; /* > */ +var CHAR_QUESTION = 0x3F; /* ? */ +var CHAR_COMMERCIAL_AT = 0x40; /* @ */ +var CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */ +var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */ +var CHAR_GRAVE_ACCENT = 0x60; /* ` */ +var CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */ +var CHAR_VERTICAL_LINE = 0x7C; /* | */ +var CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */ + +var ESCAPE_SEQUENCES = {}; + +ESCAPE_SEQUENCES[0x00] = '\\0'; +ESCAPE_SEQUENCES[0x07] = '\\a'; +ESCAPE_SEQUENCES[0x08] = '\\b'; +ESCAPE_SEQUENCES[0x09] = '\\t'; +ESCAPE_SEQUENCES[0x0A] = '\\n'; +ESCAPE_SEQUENCES[0x0B] = '\\v'; +ESCAPE_SEQUENCES[0x0C] = '\\f'; +ESCAPE_SEQUENCES[0x0D] = '\\r'; +ESCAPE_SEQUENCES[0x1B] = '\\e'; +ESCAPE_SEQUENCES[0x22] = '\\"'; +ESCAPE_SEQUENCES[0x5C] = '\\\\'; +ESCAPE_SEQUENCES[0x85] = '\\N'; +ESCAPE_SEQUENCES[0xA0] = '\\_'; +ESCAPE_SEQUENCES[0x2028] = '\\L'; +ESCAPE_SEQUENCES[0x2029] = '\\P'; + +var DEPRECATED_BOOLEANS_SYNTAX = [ + 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON', + 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF' +]; + +var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; + +function compileStyleMap(schema, map) { + var result, keys, index, length, tag, style, type; + + if (map === null) return {}; + + result = {}; + keys = Object.keys(map); + + for (index = 0, length = keys.length; index < length; index += 1) { + tag = keys[index]; + style = String(map[tag]); + + if (tag.slice(0, 2) === '!!') { + tag = 'tag:yaml.org,2002:' + tag.slice(2); + } + type = schema.compiledTypeMap['fallback'][tag]; + + if (type && _hasOwnProperty.call(type.styleAliases, style)) { + style = type.styleAliases[style]; + } + + result[tag] = style; + } + + return result; +} + +function encodeHex(character) { + var string, handle, length; + + string = character.toString(16).toUpperCase(); + + if (character <= 0xFF) { + handle = 'x'; + length = 2; + } else if (character <= 0xFFFF) { + handle = 'u'; + length = 4; + } else if (character <= 0xFFFFFFFF) { + handle = 'U'; + length = 8; + } else { + throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF'); + } + + return '\\' + handle + common.repeat('0', length - string.length) + string; +} + + +var QUOTING_TYPE_SINGLE = 1, + QUOTING_TYPE_DOUBLE = 2; + +function State(options) { + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.indent = Math.max(1, (options['indent'] || 2)); + this.noArrayIndent = options['noArrayIndent'] || false; + this.skipInvalid = options['skipInvalid'] || false; + this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']); + this.styleMap = compileStyleMap(this.schema, options['styles'] || null); + this.sortKeys = options['sortKeys'] || false; + this.lineWidth = options['lineWidth'] || 80; + this.noRefs = options['noRefs'] || false; + this.noCompatMode = options['noCompatMode'] || false; + this.condenseFlow = options['condenseFlow'] || false; + this.quotingType = options['quotingType'] === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE; + this.forceQuotes = options['forceQuotes'] || false; + this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null; + + this.implicitTypes = this.schema.compiledImplicit; + this.explicitTypes = this.schema.compiledExplicit; + + this.tag = null; + this.result = ''; + + this.duplicates = []; + this.usedDuplicates = null; +} + +// Indents every line in a string. Empty lines (\n only) are not indented. +function indentString(string, spaces) { + var ind = common.repeat(' ', spaces), + position = 0, + next = -1, + result = '', + line, + length = string.length; + + while (position < length) { + next = string.indexOf('\n', position); + if (next === -1) { + line = string.slice(position); + position = length; + } else { + line = string.slice(position, next + 1); + position = next + 1; + } + + if (line.length && line !== '\n') result += ind; + + result += line; + } + + return result; +} + +function generateNextLine(state, level) { + return '\n' + common.repeat(' ', state.indent * level); +} + +function testImplicitResolving(state, str) { + var index, length, type; + + for (index = 0, length = state.implicitTypes.length; index < length; index += 1) { + type = state.implicitTypes[index]; + + if (type.resolve(str)) { + return true; + } + } + + return false; +} + +// [33] s-white ::= s-space | s-tab +function isWhitespace(c) { + return c === CHAR_SPACE || c === CHAR_TAB; +} + +// Returns true if the character can be printed without escaping. +// From YAML 1.2: "any allowed characters known to be non-printable +// should also be escaped. [However,] This isn’t mandatory" +// Derived from nb-char - \t - #x85 - #xA0 - #x2028 - #x2029. +function isPrintable(c) { + return (0x00020 <= c && c <= 0x00007E) + || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029) + || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM) + || (0x10000 <= c && c <= 0x10FFFF); +} + +// [34] ns-char ::= nb-char - s-white +// [27] nb-char ::= c-printable - b-char - c-byte-order-mark +// [26] b-char ::= b-line-feed | b-carriage-return +// Including s-white (for some reason, examples doesn't match specs in this aspect) +// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark +function isNsCharOrWhitespace(c) { + return isPrintable(c) + && c !== CHAR_BOM + // - b-char + && c !== CHAR_CARRIAGE_RETURN + && c !== CHAR_LINE_FEED; +} + +// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out +// c = flow-in ⇒ ns-plain-safe-in +// c = block-key ⇒ ns-plain-safe-out +// c = flow-key ⇒ ns-plain-safe-in +// [128] ns-plain-safe-out ::= ns-char +// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator +// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” ) +// | ( /* An ns-char preceding */ “#” ) +// | ( “:” /* Followed by an ns-plain-safe(c) */ ) +function isPlainSafe(c, prev, inblock) { + var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c); + var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c); + return ( + // ns-plain-safe + inblock ? // c = flow-in + cIsNsCharOrWhitespace + : cIsNsCharOrWhitespace + // - c-flow-indicator + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + ) + // ns-plain-char + && c !== CHAR_SHARP // false on '#' + && !(prev === CHAR_COLON && !cIsNsChar) // false on ': ' + || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#' + || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]' +} + +// Simplified test for values allowed as the first character in plain style. +function isPlainSafeFirst(c) { + // Uses a subset of ns-char - c-indicator + // where ns-char = nb-char - s-white. + // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part + return isPrintable(c) && c !== CHAR_BOM + && !isWhitespace(c) // - s-white + // - (c-indicator ::= + // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}” + && c !== CHAR_MINUS + && c !== CHAR_QUESTION + && c !== CHAR_COLON + && c !== CHAR_COMMA + && c !== CHAR_LEFT_SQUARE_BRACKET + && c !== CHAR_RIGHT_SQUARE_BRACKET + && c !== CHAR_LEFT_CURLY_BRACKET + && c !== CHAR_RIGHT_CURLY_BRACKET + // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “"” + && c !== CHAR_SHARP + && c !== CHAR_AMPERSAND + && c !== CHAR_ASTERISK + && c !== CHAR_EXCLAMATION + && c !== CHAR_VERTICAL_LINE + && c !== CHAR_EQUALS + && c !== CHAR_GREATER_THAN + && c !== CHAR_SINGLE_QUOTE + && c !== CHAR_DOUBLE_QUOTE + // | “%” | “@” | “`”) + && c !== CHAR_PERCENT + && c !== CHAR_COMMERCIAL_AT + && c !== CHAR_GRAVE_ACCENT; +} + +// Simplified test for values allowed as the last character in plain style. +function isPlainSafeLast(c) { + // just not whitespace or colon, it will be checked to be plain character later + return !isWhitespace(c) && c !== CHAR_COLON; +} + +// Same as 'string'.codePointAt(pos), but works in older browsers. +function codePointAt(string, pos) { + var first = string.charCodeAt(pos), second; + if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) { + second = string.charCodeAt(pos + 1); + if (second >= 0xDC00 && second <= 0xDFFF) { + // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000; + } + } + return first; +} + +// Determines whether block indentation indicator is required. +function needIndentIndicator(string) { + var leadingSpaceRe = /^\n* /; + return leadingSpaceRe.test(string); +} + +var STYLE_PLAIN = 1, + STYLE_SINGLE = 2, + STYLE_LITERAL = 3, + STYLE_FOLDED = 4, + STYLE_DOUBLE = 5; + +// Determines which scalar styles are possible and returns the preferred style. +// lineWidth = -1 => no limit. +// Pre-conditions: str.length > 0. +// Post-conditions: +// STYLE_PLAIN or STYLE_SINGLE => no \n are in the string. +// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1). +// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1). +function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, + testAmbiguousType, quotingType, forceQuotes, inblock) { + + var i; + var char = 0; + var prevChar = null; + var hasLineBreak = false; + var hasFoldableLine = false; // only checked if shouldTrackWidth + var shouldTrackWidth = lineWidth !== -1; + var previousLineBreak = -1; // count the first line correctly + var plain = isPlainSafeFirst(codePointAt(string, 0)) + && isPlainSafeLast(codePointAt(string, string.length - 1)); + + if (singleLineOnly || forceQuotes) { + // Case: no block styles. + // Check for disallowed characters to rule out plain and single. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + } else { + // Case: block styles permitted. + for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + if (char === CHAR_LINE_FEED) { + hasLineBreak = true; + // Check if any line can be folded. + if (shouldTrackWidth) { + hasFoldableLine = hasFoldableLine || + // Foldable line = too long, and not more-indented. + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' '); + previousLineBreak = i; + } + } else if (!isPrintable(char)) { + return STYLE_DOUBLE; + } + plain = plain && isPlainSafe(char, prevChar, inblock); + prevChar = char; + } + // in case the end is missing a \n + hasFoldableLine = hasFoldableLine || (shouldTrackWidth && + (i - previousLineBreak - 1 > lineWidth && + string[previousLineBreak + 1] !== ' ')); + } + // Although every style can represent \n without escaping, prefer block styles + // for multiline, since they're more readable and they don't add empty lines. + // Also prefer folding a super-long line. + if (!hasLineBreak && !hasFoldableLine) { + // Strings interpretable as another type have to be quoted; + // e.g. the string 'true' vs. the boolean true. + if (plain && !forceQuotes && !testAmbiguousType(string)) { + return STYLE_PLAIN; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; + } + // Edge case: block indentation indicator can only have one digit. + if (indentPerLevel > 9 && needIndentIndicator(string)) { + return STYLE_DOUBLE; + } + // At this point we know block styles are valid. + // Prefer literal style unless we want to fold. + if (!forceQuotes) { + return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL; + } + return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE; +} + +// Note: line breaking/folding is implemented for only the folded style. +// NB. We drop the last trailing newline (if any) of a returned block scalar +// since the dumper adds its own newline. This always works: +// • No ending newline => unaffected; already using strip "-" chomping. +// • Ending newline => removed then restored. +// Importantly, this keeps the "+" chomp indicator from gaining an extra line. +function writeScalar(state, string, level, iskey, inblock) { + state.dump = (function () { + if (string.length === 0) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; + } + if (!state.noCompatMode) { + if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) { + return state.quotingType === QUOTING_TYPE_DOUBLE ? ('"' + string + '"') : ("'" + string + "'"); + } + } + + var indent = state.indent * Math.max(1, level); // no 0-indent scalars + // As indentation gets deeper, let the width decrease monotonically + // to the lower bound min(state.lineWidth, 40). + // Note that this implies + // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound. + // state.lineWidth > 40 + state.indent: width decreases until the lower bound. + // This behaves better than a constant minimum width which disallows narrower options, + // or an indent threshold which causes the width to suddenly increase. + var lineWidth = state.lineWidth === -1 + ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent); + + // Without knowing if keys are implicit/explicit, assume implicit for safety. + var singleLineOnly = iskey + // No block styles in flow mode. + || (state.flowLevel > -1 && level >= state.flowLevel); + function testAmbiguity(string) { + return testImplicitResolving(state, string); + } + + switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, + testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) { + + case STYLE_PLAIN: + return string; + case STYLE_SINGLE: + return "'" + string.replace(/'/g, "''") + "'"; + case STYLE_LITERAL: + return '|' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(string, indent)); + case STYLE_FOLDED: + return '>' + blockHeader(string, state.indent) + + dropEndingNewline(indentString(foldString(string, lineWidth), indent)); + case STYLE_DOUBLE: + return '"' + escapeString(string, lineWidth) + '"'; + default: + throw new YAMLException('impossible error: invalid scalar style'); + } + }()); +} + +// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9. +function blockHeader(string, indentPerLevel) { + var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : ''; + + // note the special case: the string '\n' counts as a "trailing" empty line. + var clip = string[string.length - 1] === '\n'; + var keep = clip && (string[string.length - 2] === '\n' || string === '\n'); + var chomp = keep ? '+' : (clip ? '' : '-'); + + return indentIndicator + chomp + '\n'; +} + +// (See the note for writeScalar.) +function dropEndingNewline(string) { + return string[string.length - 1] === '\n' ? string.slice(0, -1) : string; +} + +// Note: a long line without a suitable break point will exceed the width limit. +// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0. +function foldString(string, width) { + // In folded style, $k$ consecutive newlines output as $k+1$ newlines— + // unless they're before or after a more-indented line, or at the very + // beginning or end, in which case $k$ maps to $k$. + // Therefore, parse each chunk as newline(s) followed by a content line. + var lineRe = /(\n+)([^\n]*)/g; + + // first line (possibly an empty line) + var result = (function () { + var nextLF = string.indexOf('\n'); + nextLF = nextLF !== -1 ? nextLF : string.length; + lineRe.lastIndex = nextLF; + return foldLine(string.slice(0, nextLF), width); + }()); + // If we haven't reached the first content line yet, don't add an extra \n. + var prevMoreIndented = string[0] === '\n' || string[0] === ' '; + var moreIndented; + + // rest of the lines + var match; + while ((match = lineRe.exec(string))) { + var prefix = match[1], line = match[2]; + moreIndented = (line[0] === ' '); + result += prefix + + (!prevMoreIndented && !moreIndented && line !== '' + ? '\n' : '') + + foldLine(line, width); + prevMoreIndented = moreIndented; + } + + return result; +} + +// Greedy line breaking. +// Picks the longest line under the limit each time, +// otherwise settles for the shortest line over the limit. +// NB. More-indented lines *cannot* be folded, as that would add an extra \n. +function foldLine(line, width) { + if (line === '' || line[0] === ' ') return line; + + // Since a more-indented line adds a \n, breaks can't be followed by a space. + var breakRe = / [^ ]/g; // note: the match index will always be <= length-2. + var match; + // start is an inclusive index. end, curr, and next are exclusive. + var start = 0, end, curr = 0, next = 0; + var result = ''; + + // Invariants: 0 <= start <= length-1. + // 0 <= curr <= next <= max(0, length-2). curr - start <= width. + // Inside the loop: + // A match implies length >= 2, so curr and next are <= length-2. + while ((match = breakRe.exec(line))) { + next = match.index; + // maintain invariant: curr - start <= width + if (next - start > width) { + end = (curr > start) ? curr : next; // derive end <= length-2 + result += '\n' + line.slice(start, end); + // skip the space that was output as \n + start = end + 1; // derive start <= length-1 + } + curr = next; + } + + // By the invariants, start <= length-1, so there is something left over. + // It is either the whole string or a part starting from non-whitespace. + result += '\n'; + // Insert a break if the remainder is too long and there is a break available. + if (line.length - start > width && curr > start) { + result += line.slice(start, curr) + '\n' + line.slice(curr + 1); + } else { + result += line.slice(start); + } + + return result.slice(1); // drop extra \n joiner +} + +// Escapes a double-quoted string. +function escapeString(string) { + var result = ''; + var char = 0; + var escapeSeq; + + for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) { + char = codePointAt(string, i); + escapeSeq = ESCAPE_SEQUENCES[char]; + + if (!escapeSeq && isPrintable(char)) { + result += string[i]; + if (char >= 0x10000) result += string[i + 1]; + } else { + result += escapeSeq || encodeHex(char); + } + } + + return result; +} + +function writeFlowSequence(state, level, object) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level, value, false, false) || + (typeof value === 'undefined' && + writeNode(state, level, null, false, false))) { + + if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : ''); + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = '[' + _result + ']'; +} + +function writeBlockSequence(state, level, object, compact) { + var _result = '', + _tag = state.tag, + index, + length, + value; + + for (index = 0, length = object.length; index < length; index += 1) { + value = object[index]; + + if (state.replacer) { + value = state.replacer.call(object, String(index), value); + } + + // Write only valid elements, put null instead of invalid elements. + if (writeNode(state, level + 1, value, true, true, false, true) || + (typeof value === 'undefined' && + writeNode(state, level + 1, null, true, true, false, true))) { + + if (!compact || _result !== '') { + _result += generateNextLine(state, level); + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + _result += '-'; + } else { + _result += '- '; + } + + _result += state.dump; + } + } + + state.tag = _tag; + state.dump = _result || '[]'; // Empty sequence if no valid values. +} + +function writeFlowMapping(state, level, object) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + pairBuffer; + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + + pairBuffer = ''; + if (_result !== '') pairBuffer += ', '; + + if (state.condenseFlow) pairBuffer += '"'; + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level, objectKey, false, false)) { + continue; // Skip this pair because of invalid key; + } + + if (state.dump.length > 1024) pairBuffer += '? '; + + pairBuffer += state.dump + (state.condenseFlow ? '"' : '') + ':' + (state.condenseFlow ? '' : ' '); + + if (!writeNode(state, level, objectValue, false, false)) { + continue; // Skip this pair because of invalid value. + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = '{' + _result + '}'; +} + +function writeBlockMapping(state, level, object, compact) { + var _result = '', + _tag = state.tag, + objectKeyList = Object.keys(object), + index, + length, + objectKey, + objectValue, + explicitPair, + pairBuffer; + + // Allow sorting keys so that the output file is deterministic + if (state.sortKeys === true) { + // Default sorting + objectKeyList.sort(); + } else if (typeof state.sortKeys === 'function') { + // Custom sort function + objectKeyList.sort(state.sortKeys); + } else if (state.sortKeys) { + // Something is wrong + throw new YAMLException('sortKeys must be a boolean or a function'); + } + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + pairBuffer = ''; + + if (!compact || _result !== '') { + pairBuffer += generateNextLine(state, level); + } + + objectKey = objectKeyList[index]; + objectValue = object[objectKey]; + + if (state.replacer) { + objectValue = state.replacer.call(object, objectKey, objectValue); + } + + if (!writeNode(state, level + 1, objectKey, true, true, true)) { + continue; // Skip this pair because of invalid key. + } + + explicitPair = (state.tag !== null && state.tag !== '?') || + (state.dump && state.dump.length > 1024); + + if (explicitPair) { + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += '?'; + } else { + pairBuffer += '? '; + } + } + + pairBuffer += state.dump; + + if (explicitPair) { + pairBuffer += generateNextLine(state, level); + } + + if (!writeNode(state, level + 1, objectValue, true, explicitPair)) { + continue; // Skip this pair because of invalid value. + } + + if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) { + pairBuffer += ':'; + } else { + pairBuffer += ': '; + } + + pairBuffer += state.dump; + + // Both key and value are valid. + _result += pairBuffer; + } + + state.tag = _tag; + state.dump = _result || '{}'; // Empty mapping if no valid pairs. +} + +function detectType(state, object, explicit) { + var _result, typeList, index, length, type, style; + + typeList = explicit ? state.explicitTypes : state.implicitTypes; + + for (index = 0, length = typeList.length; index < length; index += 1) { + type = typeList[index]; + + if ((type.instanceOf || type.predicate) && + (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) && + (!type.predicate || type.predicate(object))) { + + if (explicit) { + if (type.multi && type.representName) { + state.tag = type.representName(object); + } else { + state.tag = type.tag; + } + } else { + state.tag = '?'; + } + + if (type.represent) { + style = state.styleMap[type.tag] || type.defaultStyle; + + if (_toString.call(type.represent) === '[object Function]') { + _result = type.represent(object, style); + } else if (_hasOwnProperty.call(type.represent, style)) { + _result = type.represent[style](object, style); + } else { + throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style'); + } + + state.dump = _result; + } + + return true; + } + } + + return false; +} + +// Serializes `object` and writes it to global `result`. +// Returns true on success, or false on invalid object. +// +function writeNode(state, level, object, block, compact, iskey, isblockseq) { + state.tag = null; + state.dump = object; + + if (!detectType(state, object, false)) { + detectType(state, object, true); + } + + var type = _toString.call(state.dump); + var inblock = block; + var tagStr; + + if (block) { + block = (state.flowLevel < 0 || state.flowLevel > level); + } + + var objectOrArray = type === '[object Object]' || type === '[object Array]', + duplicateIndex, + duplicate; + + if (objectOrArray) { + duplicateIndex = state.duplicates.indexOf(object); + duplicate = duplicateIndex !== -1; + } + + if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) { + compact = false; + } + + if (duplicate && state.usedDuplicates[duplicateIndex]) { + state.dump = '*ref_' + duplicateIndex; + } else { + if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) { + state.usedDuplicates[duplicateIndex] = true; + } + if (type === '[object Object]') { + if (block && (Object.keys(state.dump).length !== 0)) { + writeBlockMapping(state, level, state.dump, compact); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowMapping(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object Array]') { + if (block && (state.dump.length !== 0)) { + if (state.noArrayIndent && !isblockseq && level > 0) { + writeBlockSequence(state, level - 1, state.dump, compact); + } else { + writeBlockSequence(state, level, state.dump, compact); + } + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + state.dump; + } + } else { + writeFlowSequence(state, level, state.dump); + if (duplicate) { + state.dump = '&ref_' + duplicateIndex + ' ' + state.dump; + } + } + } else if (type === '[object String]') { + if (state.tag !== '?') { + writeScalar(state, state.dump, level, iskey, inblock); + } + } else if (type === '[object Undefined]') { + return false; + } else { + if (state.skipInvalid) return false; + throw new YAMLException('unacceptable kind of an object to dump ' + type); + } + + if (state.tag !== null && state.tag !== '?') { + // Need to encode all characters except those allowed by the spec: + // + // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */ + // [36] ns-hex-digit ::= ns-dec-digit + // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */ + // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */ + // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-” + // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#” + // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,” + // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]” + // + // Also need to encode '!' because it has special meaning (end of tag prefix). + // + tagStr = encodeURI( + state.tag[0] === '!' ? state.tag.slice(1) : state.tag + ).replace(/!/g, '%21'); + + if (state.tag[0] === '!') { + tagStr = '!' + tagStr; + } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') { + tagStr = '!!' + tagStr.slice(18); + } else { + tagStr = '!<' + tagStr + '>'; + } + + state.dump = tagStr + ' ' + state.dump; + } + } + + return true; +} + +function getDuplicateReferences(object, state) { + var objects = [], + duplicatesIndexes = [], + index, + length; + + inspectNode(object, objects, duplicatesIndexes); + + for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) { + state.duplicates.push(objects[duplicatesIndexes[index]]); + } + state.usedDuplicates = new Array(length); +} + +function inspectNode(object, objects, duplicatesIndexes) { + var objectKeyList, + index, + length; + + if (object !== null && typeof object === 'object') { + index = objects.indexOf(object); + if (index !== -1) { + if (duplicatesIndexes.indexOf(index) === -1) { + duplicatesIndexes.push(index); + } + } else { + objects.push(object); + + if (Array.isArray(object)) { + for (index = 0, length = object.length; index < length; index += 1) { + inspectNode(object[index], objects, duplicatesIndexes); + } + } else { + objectKeyList = Object.keys(object); + + for (index = 0, length = objectKeyList.length; index < length; index += 1) { + inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes); + } + } + } + } +} + +function dump(input, options) { + options = options || {}; + + var state = new State(options); + + if (!state.noRefs) getDuplicateReferences(input, state); + + var value = input; + + if (state.replacer) { + value = state.replacer.call({ '': value }, '', value); + } + + if (writeNode(state, 0, value, true, true)) return state.dump + '\n'; + + return ''; +} + +module.exports.dump = dump; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/exception.js b/node_modules/eslint/node_modules/js-yaml/lib/exception.js new file mode 100644 index 000000000..7f62daaef --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/exception.js @@ -0,0 +1,55 @@ +// YAML error class. http://stackoverflow.com/questions/8458984 +// +'use strict'; + + +function formatError(exception, compact) { + var where = '', message = exception.reason || '(unknown reason)'; + + if (!exception.mark) return message; + + if (exception.mark.name) { + where += 'in "' + exception.mark.name + '" '; + } + + where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')'; + + if (!compact && exception.mark.snippet) { + where += '\n\n' + exception.mark.snippet; + } + + return message + ' ' + where; +} + + +function YAMLException(reason, mark) { + // Super constructor + Error.call(this); + + this.name = 'YAMLException'; + this.reason = reason; + this.mark = mark; + this.message = formatError(this, false); + + // Include stack trace in error object + if (Error.captureStackTrace) { + // Chrome and NodeJS + Error.captureStackTrace(this, this.constructor); + } else { + // FF, IE 10+ and Safari 6+. Fallback for others + this.stack = (new Error()).stack || ''; + } +} + + +// Inherit from Error +YAMLException.prototype = Object.create(Error.prototype); +YAMLException.prototype.constructor = YAMLException; + + +YAMLException.prototype.toString = function toString(compact) { + return this.name + ': ' + formatError(this, compact); +}; + + +module.exports = YAMLException; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/loader.js b/node_modules/eslint/node_modules/js-yaml/lib/loader.js new file mode 100644 index 000000000..39f13f561 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/loader.js @@ -0,0 +1,1727 @@ +'use strict'; + +/*eslint-disable max-len,no-use-before-define*/ + +var common = require('./common'); +var YAMLException = require('./exception'); +var makeSnippet = require('./snippet'); +var DEFAULT_SCHEMA = require('./schema/default'); + + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + + +var CONTEXT_FLOW_IN = 1; +var CONTEXT_FLOW_OUT = 2; +var CONTEXT_BLOCK_IN = 3; +var CONTEXT_BLOCK_OUT = 4; + + +var CHOMPING_CLIP = 1; +var CHOMPING_STRIP = 2; +var CHOMPING_KEEP = 3; + + +var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; +var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; +var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; +var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; +var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; + + +function _class(obj) { return Object.prototype.toString.call(obj); } + +function is_EOL(c) { + return (c === 0x0A/* LF */) || (c === 0x0D/* CR */); +} + +function is_WHITE_SPACE(c) { + return (c === 0x09/* Tab */) || (c === 0x20/* Space */); +} + +function is_WS_OR_EOL(c) { + return (c === 0x09/* Tab */) || + (c === 0x20/* Space */) || + (c === 0x0A/* LF */) || + (c === 0x0D/* CR */); +} + +function is_FLOW_INDICATOR(c) { + return c === 0x2C/* , */ || + c === 0x5B/* [ */ || + c === 0x5D/* ] */ || + c === 0x7B/* { */ || + c === 0x7D/* } */; +} + +function fromHexCode(c) { + var lc; + + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + /*eslint-disable no-bitwise*/ + lc = c | 0x20; + + if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) { + return lc - 0x61 + 10; + } + + return -1; +} + +function escapedHexLen(c) { + if (c === 0x78/* x */) { return 2; } + if (c === 0x75/* u */) { return 4; } + if (c === 0x55/* U */) { return 8; } + return 0; +} + +function fromDecimalCode(c) { + if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) { + return c - 0x30; + } + + return -1; +} + +function simpleEscapeSequence(c) { + /* eslint-disable indent */ + return (c === 0x30/* 0 */) ? '\x00' : + (c === 0x61/* a */) ? '\x07' : + (c === 0x62/* b */) ? '\x08' : + (c === 0x74/* t */) ? '\x09' : + (c === 0x09/* Tab */) ? '\x09' : + (c === 0x6E/* n */) ? '\x0A' : + (c === 0x76/* v */) ? '\x0B' : + (c === 0x66/* f */) ? '\x0C' : + (c === 0x72/* r */) ? '\x0D' : + (c === 0x65/* e */) ? '\x1B' : + (c === 0x20/* Space */) ? ' ' : + (c === 0x22/* " */) ? '\x22' : + (c === 0x2F/* / */) ? '/' : + (c === 0x5C/* \ */) ? '\x5C' : + (c === 0x4E/* N */) ? '\x85' : + (c === 0x5F/* _ */) ? '\xA0' : + (c === 0x4C/* L */) ? '\u2028' : + (c === 0x50/* P */) ? '\u2029' : ''; +} + +function charFromCodepoint(c) { + if (c <= 0xFFFF) { + return String.fromCharCode(c); + } + // Encode UTF-16 surrogate pair + // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF + return String.fromCharCode( + ((c - 0x010000) >> 10) + 0xD800, + ((c - 0x010000) & 0x03FF) + 0xDC00 + ); +} + +var simpleEscapeCheck = new Array(256); // integer, for fast access +var simpleEscapeMap = new Array(256); +for (var i = 0; i < 256; i++) { + simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0; + simpleEscapeMap[i] = simpleEscapeSequence(i); +} + + +function State(input, options) { + this.input = input; + + this.filename = options['filename'] || null; + this.schema = options['schema'] || DEFAULT_SCHEMA; + this.onWarning = options['onWarning'] || null; + // (Hidden) Remove? makes the loader to expect YAML 1.1 documents + // if such documents have no explicit %YAML directive + this.legacy = options['legacy'] || false; + + this.json = options['json'] || false; + this.listener = options['listener'] || null; + + this.implicitTypes = this.schema.compiledImplicit; + this.typeMap = this.schema.compiledTypeMap; + + this.length = input.length; + this.position = 0; + this.line = 0; + this.lineStart = 0; + this.lineIndent = 0; + + // position of first leading tab in the current line, + // used to make sure there are no tabs in the indentation + this.firstTabInLine = -1; + + this.documents = []; + + /* + this.version; + this.checkLineBreaks; + this.tagMap; + this.anchorMap; + this.tag; + this.anchor; + this.kind; + this.result;*/ + +} + + +function generateError(state, message) { + var mark = { + name: state.filename, + buffer: state.input.slice(0, -1), // omit trailing \0 + position: state.position, + line: state.line, + column: state.position - state.lineStart + }; + + mark.snippet = makeSnippet(mark); + + return new YAMLException(message, mark); +} + +function throwError(state, message) { + throw generateError(state, message); +} + +function throwWarning(state, message) { + if (state.onWarning) { + state.onWarning.call(null, generateError(state, message)); + } +} + + +var directiveHandlers = { + + YAML: function handleYamlDirective(state, name, args) { + + var match, major, minor; + + if (state.version !== null) { + throwError(state, 'duplication of %YAML directive'); + } + + if (args.length !== 1) { + throwError(state, 'YAML directive accepts exactly one argument'); + } + + match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]); + + if (match === null) { + throwError(state, 'ill-formed argument of the YAML directive'); + } + + major = parseInt(match[1], 10); + minor = parseInt(match[2], 10); + + if (major !== 1) { + throwError(state, 'unacceptable YAML version of the document'); + } + + state.version = args[0]; + state.checkLineBreaks = (minor < 2); + + if (minor !== 1 && minor !== 2) { + throwWarning(state, 'unsupported YAML version of the document'); + } + }, + + TAG: function handleTagDirective(state, name, args) { + + var handle, prefix; + + if (args.length !== 2) { + throwError(state, 'TAG directive accepts exactly two arguments'); + } + + handle = args[0]; + prefix = args[1]; + + if (!PATTERN_TAG_HANDLE.test(handle)) { + throwError(state, 'ill-formed tag handle (first argument) of the TAG directive'); + } + + if (_hasOwnProperty.call(state.tagMap, handle)) { + throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle'); + } + + if (!PATTERN_TAG_URI.test(prefix)) { + throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive'); + } + + try { + prefix = decodeURIComponent(prefix); + } catch (err) { + throwError(state, 'tag prefix is malformed: ' + prefix); + } + + state.tagMap[handle] = prefix; + } +}; + + +function captureSegment(state, start, end, checkJson) { + var _position, _length, _character, _result; + + if (start < end) { + _result = state.input.slice(start, end); + + if (checkJson) { + for (_position = 0, _length = _result.length; _position < _length; _position += 1) { + _character = _result.charCodeAt(_position); + if (!(_character === 0x09 || + (0x20 <= _character && _character <= 0x10FFFF))) { + throwError(state, 'expected valid JSON character'); + } + } + } else if (PATTERN_NON_PRINTABLE.test(_result)) { + throwError(state, 'the stream contains non-printable characters'); + } + + state.result += _result; + } +} + +function mergeMappings(state, destination, source, overridableKeys) { + var sourceKeys, key, index, quantity; + + if (!common.isObject(source)) { + throwError(state, 'cannot merge mappings; the provided source object is unacceptable'); + } + + sourceKeys = Object.keys(source); + + for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) { + key = sourceKeys[index]; + + if (!_hasOwnProperty.call(destination, key)) { + destination[key] = source[key]; + overridableKeys[key] = true; + } + } +} + +function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, + startLine, startLineStart, startPos) { + + var index, quantity; + + // The output is a plain object here, so keys can only be strings. + // We need to convert keyNode to a string, but doing so can hang the process + // (deeply nested arrays that explode exponentially using aliases). + if (Array.isArray(keyNode)) { + keyNode = Array.prototype.slice.call(keyNode); + + for (index = 0, quantity = keyNode.length; index < quantity; index += 1) { + if (Array.isArray(keyNode[index])) { + throwError(state, 'nested arrays are not supported inside keys'); + } + + if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') { + keyNode[index] = '[object Object]'; + } + } + } + + // Avoid code execution in load() via toString property + // (still use its own toString for arrays, timestamps, + // and whatever user schema extensions happen to have @@toStringTag) + if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') { + keyNode = '[object Object]'; + } + + + keyNode = String(keyNode); + + if (_result === null) { + _result = {}; + } + + if (keyTag === 'tag:yaml.org,2002:merge') { + if (Array.isArray(valueNode)) { + for (index = 0, quantity = valueNode.length; index < quantity; index += 1) { + mergeMappings(state, _result, valueNode[index], overridableKeys); + } + } else { + mergeMappings(state, _result, valueNode, overridableKeys); + } + } else { + if (!state.json && + !_hasOwnProperty.call(overridableKeys, keyNode) && + _hasOwnProperty.call(_result, keyNode)) { + state.line = startLine || state.line; + state.lineStart = startLineStart || state.lineStart; + state.position = startPos || state.position; + throwError(state, 'duplicated mapping key'); + } + + // used for this specific key only because Object.defineProperty is slow + if (keyNode === '__proto__') { + Object.defineProperty(_result, keyNode, { + configurable: true, + enumerable: true, + writable: true, + value: valueNode + }); + } else { + _result[keyNode] = valueNode; + } + delete overridableKeys[keyNode]; + } + + return _result; +} + +function readLineBreak(state) { + var ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x0A/* LF */) { + state.position++; + } else if (ch === 0x0D/* CR */) { + state.position++; + if (state.input.charCodeAt(state.position) === 0x0A/* LF */) { + state.position++; + } + } else { + throwError(state, 'a line break is expected'); + } + + state.line += 1; + state.lineStart = state.position; + state.firstTabInLine = -1; +} + +function skipSeparationSpace(state, allowComments, checkIndent) { + var lineBreaks = 0, + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) { + state.firstTabInLine = state.position; + } + ch = state.input.charCodeAt(++state.position); + } + + if (allowComments && ch === 0x23/* # */) { + do { + ch = state.input.charCodeAt(++state.position); + } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0); + } + + if (is_EOL(ch)) { + readLineBreak(state); + + ch = state.input.charCodeAt(state.position); + lineBreaks++; + state.lineIndent = 0; + + while (ch === 0x20/* Space */) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + } else { + break; + } + } + + if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) { + throwWarning(state, 'deficient indentation'); + } + + return lineBreaks; +} + +function testDocumentSeparator(state) { + var _position = state.position, + ch; + + ch = state.input.charCodeAt(_position); + + // Condition state.position === state.lineStart is tested + // in parent on each call, for efficiency. No needs to test here again. + if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) && + ch === state.input.charCodeAt(_position + 1) && + ch === state.input.charCodeAt(_position + 2)) { + + _position += 3; + + ch = state.input.charCodeAt(_position); + + if (ch === 0 || is_WS_OR_EOL(ch)) { + return true; + } + } + + return false; +} + +function writeFoldedLines(state, count) { + if (count === 1) { + state.result += ' '; + } else if (count > 1) { + state.result += common.repeat('\n', count - 1); + } +} + + +function readPlainScalar(state, nodeIndent, withinFlowCollection) { + var preceding, + following, + captureStart, + captureEnd, + hasPendingContent, + _line, + _lineStart, + _lineIndent, + _kind = state.kind, + _result = state.result, + ch; + + ch = state.input.charCodeAt(state.position); + + if (is_WS_OR_EOL(ch) || + is_FLOW_INDICATOR(ch) || + ch === 0x23/* # */ || + ch === 0x26/* & */ || + ch === 0x2A/* * */ || + ch === 0x21/* ! */ || + ch === 0x7C/* | */ || + ch === 0x3E/* > */ || + ch === 0x27/* ' */ || + ch === 0x22/* " */ || + ch === 0x25/* % */ || + ch === 0x40/* @ */ || + ch === 0x60/* ` */) { + return false; + } + + if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + return false; + } + } + + state.kind = 'scalar'; + state.result = ''; + captureStart = captureEnd = state.position; + hasPendingContent = false; + + while (ch !== 0) { + if (ch === 0x3A/* : */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following) || + withinFlowCollection && is_FLOW_INDICATOR(following)) { + break; + } + + } else if (ch === 0x23/* # */) { + preceding = state.input.charCodeAt(state.position - 1); + + if (is_WS_OR_EOL(preceding)) { + break; + } + + } else if ((state.position === state.lineStart && testDocumentSeparator(state)) || + withinFlowCollection && is_FLOW_INDICATOR(ch)) { + break; + + } else if (is_EOL(ch)) { + _line = state.line; + _lineStart = state.lineStart; + _lineIndent = state.lineIndent; + skipSeparationSpace(state, false, -1); + + if (state.lineIndent >= nodeIndent) { + hasPendingContent = true; + ch = state.input.charCodeAt(state.position); + continue; + } else { + state.position = captureEnd; + state.line = _line; + state.lineStart = _lineStart; + state.lineIndent = _lineIndent; + break; + } + } + + if (hasPendingContent) { + captureSegment(state, captureStart, captureEnd, false); + writeFoldedLines(state, state.line - _line); + captureStart = captureEnd = state.position; + hasPendingContent = false; + } + + if (!is_WHITE_SPACE(ch)) { + captureEnd = state.position + 1; + } + + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, captureEnd, false); + + if (state.result) { + return true; + } + + state.kind = _kind; + state.result = _result; + return false; +} + +function readSingleQuotedScalar(state, nodeIndent) { + var ch, + captureStart, captureEnd; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x27/* ' */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x27/* ' */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x27/* ' */) { + captureStart = state.position; + state.position++; + captureEnd = state.position; + } else { + return true; + } + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a single quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a single quoted scalar'); +} + +function readDoubleQuotedScalar(state, nodeIndent) { + var captureStart, + captureEnd, + hexLength, + hexResult, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x22/* " */) { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + state.position++; + captureStart = captureEnd = state.position; + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + if (ch === 0x22/* " */) { + captureSegment(state, captureStart, state.position, true); + state.position++; + return true; + + } else if (ch === 0x5C/* \ */) { + captureSegment(state, captureStart, state.position, true); + ch = state.input.charCodeAt(++state.position); + + if (is_EOL(ch)) { + skipSeparationSpace(state, false, nodeIndent); + + // TODO: rework to inline fn with no type cast? + } else if (ch < 256 && simpleEscapeCheck[ch]) { + state.result += simpleEscapeMap[ch]; + state.position++; + + } else if ((tmp = escapedHexLen(ch)) > 0) { + hexLength = tmp; + hexResult = 0; + + for (; hexLength > 0; hexLength--) { + ch = state.input.charCodeAt(++state.position); + + if ((tmp = fromHexCode(ch)) >= 0) { + hexResult = (hexResult << 4) + tmp; + + } else { + throwError(state, 'expected hexadecimal character'); + } + } + + state.result += charFromCodepoint(hexResult); + + state.position++; + + } else { + throwError(state, 'unknown escape sequence'); + } + + captureStart = captureEnd = state.position; + + } else if (is_EOL(ch)) { + captureSegment(state, captureStart, captureEnd, true); + writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent)); + captureStart = captureEnd = state.position; + + } else if (state.position === state.lineStart && testDocumentSeparator(state)) { + throwError(state, 'unexpected end of the document within a double quoted scalar'); + + } else { + state.position++; + captureEnd = state.position; + } + } + + throwError(state, 'unexpected end of the stream within a double quoted scalar'); +} + +function readFlowCollection(state, nodeIndent) { + var readNext = true, + _line, + _lineStart, + _pos, + _tag = state.tag, + _result, + _anchor = state.anchor, + following, + terminator, + isPair, + isExplicitPair, + isMapping, + overridableKeys = Object.create(null), + keyNode, + keyTag, + valueNode, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x5B/* [ */) { + terminator = 0x5D;/* ] */ + isMapping = false; + _result = []; + } else if (ch === 0x7B/* { */) { + terminator = 0x7D;/* } */ + isMapping = true; + _result = {}; + } else { + return false; + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(++state.position); + + while (ch !== 0) { + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === terminator) { + state.position++; + state.tag = _tag; + state.anchor = _anchor; + state.kind = isMapping ? 'mapping' : 'sequence'; + state.result = _result; + return true; + } else if (!readNext) { + throwError(state, 'missed comma between flow collection entries'); + } else if (ch === 0x2C/* , */) { + // "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4 + throwError(state, "expected the node content, but found ','"); + } + + keyTag = keyNode = valueNode = null; + isPair = isExplicitPair = false; + + if (ch === 0x3F/* ? */) { + following = state.input.charCodeAt(state.position + 1); + + if (is_WS_OR_EOL(following)) { + isPair = isExplicitPair = true; + state.position++; + skipSeparationSpace(state, true, nodeIndent); + } + } + + _line = state.line; // Save the current line. + _lineStart = state.lineStart; + _pos = state.position; + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + keyTag = state.tag; + keyNode = state.result; + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) { + isPair = true; + ch = state.input.charCodeAt(++state.position); + skipSeparationSpace(state, true, nodeIndent); + composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true); + valueNode = state.result; + } + + if (isMapping) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos); + } else if (isPair) { + _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)); + } else { + _result.push(keyNode); + } + + skipSeparationSpace(state, true, nodeIndent); + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x2C/* , */) { + readNext = true; + ch = state.input.charCodeAt(++state.position); + } else { + readNext = false; + } + } + + throwError(state, 'unexpected end of the stream within a flow collection'); +} + +function readBlockScalar(state, nodeIndent) { + var captureStart, + folding, + chomping = CHOMPING_CLIP, + didReadContent = false, + detectedIndent = false, + textIndent = nodeIndent, + emptyLines = 0, + atMoreIndented = false, + tmp, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch === 0x7C/* | */) { + folding = false; + } else if (ch === 0x3E/* > */) { + folding = true; + } else { + return false; + } + + state.kind = 'scalar'; + state.result = ''; + + while (ch !== 0) { + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x2B/* + */ || ch === 0x2D/* - */) { + if (CHOMPING_CLIP === chomping) { + chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP; + } else { + throwError(state, 'repeat of a chomping mode identifier'); + } + + } else if ((tmp = fromDecimalCode(ch)) >= 0) { + if (tmp === 0) { + throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one'); + } else if (!detectedIndent) { + textIndent = nodeIndent + tmp - 1; + detectedIndent = true; + } else { + throwError(state, 'repeat of an indentation width identifier'); + } + + } else { + break; + } + } + + if (is_WHITE_SPACE(ch)) { + do { ch = state.input.charCodeAt(++state.position); } + while (is_WHITE_SPACE(ch)); + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (!is_EOL(ch) && (ch !== 0)); + } + } + + while (ch !== 0) { + readLineBreak(state); + state.lineIndent = 0; + + ch = state.input.charCodeAt(state.position); + + while ((!detectedIndent || state.lineIndent < textIndent) && + (ch === 0x20/* Space */)) { + state.lineIndent++; + ch = state.input.charCodeAt(++state.position); + } + + if (!detectedIndent && state.lineIndent > textIndent) { + textIndent = state.lineIndent; + } + + if (is_EOL(ch)) { + emptyLines++; + continue; + } + + // End of the scalar. + if (state.lineIndent < textIndent) { + + // Perform the chomping. + if (chomping === CHOMPING_KEEP) { + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } else if (chomping === CHOMPING_CLIP) { + if (didReadContent) { // i.e. only if the scalar is not empty. + state.result += '\n'; + } + } + + // Break this `while` cycle and go to the funciton's epilogue. + break; + } + + // Folded style: use fancy rules to handle line breaks. + if (folding) { + + // Lines starting with white space characters (more-indented lines) are not folded. + if (is_WHITE_SPACE(ch)) { + atMoreIndented = true; + // except for the first content line (cf. Example 8.1) + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + + // End of more-indented block. + } else if (atMoreIndented) { + atMoreIndented = false; + state.result += common.repeat('\n', emptyLines + 1); + + // Just one line break - perceive as the same line. + } else if (emptyLines === 0) { + if (didReadContent) { // i.e. only if we have already read some scalar content. + state.result += ' '; + } + + // Several line breaks - perceive as different lines. + } else { + state.result += common.repeat('\n', emptyLines); + } + + // Literal style: just add exact number of line breaks between content lines. + } else { + // Keep all line breaks except the header line break. + state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines); + } + + didReadContent = true; + detectedIndent = true; + emptyLines = 0; + captureStart = state.position; + + while (!is_EOL(ch) && (ch !== 0)) { + ch = state.input.charCodeAt(++state.position); + } + + captureSegment(state, captureStart, state.position, false); + } + + return true; +} + +function readBlockSequence(state, nodeIndent) { + var _line, + _tag = state.tag, + _anchor = state.anchor, + _result = [], + following, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + if (ch !== 0x2D/* - */) { + break; + } + + following = state.input.charCodeAt(state.position + 1); + + if (!is_WS_OR_EOL(following)) { + break; + } + + detected = true; + state.position++; + + if (skipSeparationSpace(state, true, -1)) { + if (state.lineIndent <= nodeIndent) { + _result.push(null); + ch = state.input.charCodeAt(state.position); + continue; + } + } + + _line = state.line; + composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true); + _result.push(state.result); + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a sequence entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'sequence'; + state.result = _result; + return true; + } + return false; +} + +function readBlockMapping(state, nodeIndent, flowIndent) { + var following, + allowCompact, + _line, + _keyLine, + _keyLineStart, + _keyPos, + _tag = state.tag, + _anchor = state.anchor, + _result = {}, + overridableKeys = Object.create(null), + keyTag = null, + keyNode = null, + valueNode = null, + atExplicitKey = false, + detected = false, + ch; + + // there is a leading tab before this token, so it can't be a block sequence/mapping; + // it can still be flow sequence/mapping or a scalar + if (state.firstTabInLine !== -1) return false; + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = _result; + } + + ch = state.input.charCodeAt(state.position); + + while (ch !== 0) { + if (!atExplicitKey && state.firstTabInLine !== -1) { + state.position = state.firstTabInLine; + throwError(state, 'tab characters must not be used in indentation'); + } + + following = state.input.charCodeAt(state.position + 1); + _line = state.line; // Save the current line. + + // + // Explicit notation case. There are two separate blocks: + // first for the key (denoted by "?") and second for the value (denoted by ":") + // + if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) { + + if (ch === 0x3F/* ? */) { + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = true; + allowCompact = true; + + } else if (atExplicitKey) { + // i.e. 0x3A/* : */ === character after the explicit key. + atExplicitKey = false; + allowCompact = true; + + } else { + throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line'); + } + + state.position += 1; + ch = following; + + // + // Implicit notation case. Flow-style node as the key first, then ":", and the value. + // + } else { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + + if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) { + // Neither implicit nor explicit notation. + // Reading is done. Go to the epilogue. + break; + } + + if (state.line === _line) { + ch = state.input.charCodeAt(state.position); + + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x3A/* : */) { + ch = state.input.charCodeAt(++state.position); + + if (!is_WS_OR_EOL(ch)) { + throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping'); + } + + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + detected = true; + atExplicitKey = false; + allowCompact = false; + keyTag = state.tag; + keyNode = state.result; + + } else if (detected) { + throwError(state, 'can not read an implicit mapping pair; a colon is missed'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + + } else if (detected) { + throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key'); + + } else { + state.tag = _tag; + state.anchor = _anchor; + return true; // Keep the result of `composeNode`. + } + } + + // + // Common reading code for both explicit and implicit notations. + // + if (state.line === _line || state.lineIndent > nodeIndent) { + if (atExplicitKey) { + _keyLine = state.line; + _keyLineStart = state.lineStart; + _keyPos = state.position; + } + + if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) { + if (atExplicitKey) { + keyNode = state.result; + } else { + valueNode = state.result; + } + } + + if (!atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos); + keyTag = keyNode = valueNode = null; + } + + skipSeparationSpace(state, true, -1); + ch = state.input.charCodeAt(state.position); + } + + if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) { + throwError(state, 'bad indentation of a mapping entry'); + } else if (state.lineIndent < nodeIndent) { + break; + } + } + + // + // Epilogue. + // + + // Special case: last mapping's node contains only the key in explicit notation. + if (atExplicitKey) { + storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos); + } + + // Expose the resulting mapping. + if (detected) { + state.tag = _tag; + state.anchor = _anchor; + state.kind = 'mapping'; + state.result = _result; + } + + return detected; +} + +function readTagProperty(state) { + var _position, + isVerbatim = false, + isNamed = false, + tagHandle, + tagName, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x21/* ! */) return false; + + if (state.tag !== null) { + throwError(state, 'duplication of a tag property'); + } + + ch = state.input.charCodeAt(++state.position); + + if (ch === 0x3C/* < */) { + isVerbatim = true; + ch = state.input.charCodeAt(++state.position); + + } else if (ch === 0x21/* ! */) { + isNamed = true; + tagHandle = '!!'; + ch = state.input.charCodeAt(++state.position); + + } else { + tagHandle = '!'; + } + + _position = state.position; + + if (isVerbatim) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && ch !== 0x3E/* > */); + + if (state.position < state.length) { + tagName = state.input.slice(_position, state.position); + ch = state.input.charCodeAt(++state.position); + } else { + throwError(state, 'unexpected end of the stream within a verbatim tag'); + } + } else { + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + + if (ch === 0x21/* ! */) { + if (!isNamed) { + tagHandle = state.input.slice(_position - 1, state.position + 1); + + if (!PATTERN_TAG_HANDLE.test(tagHandle)) { + throwError(state, 'named tag handle cannot contain such characters'); + } + + isNamed = true; + _position = state.position + 1; + } else { + throwError(state, 'tag suffix cannot contain exclamation marks'); + } + } + + ch = state.input.charCodeAt(++state.position); + } + + tagName = state.input.slice(_position, state.position); + + if (PATTERN_FLOW_INDICATORS.test(tagName)) { + throwError(state, 'tag suffix cannot contain flow indicator characters'); + } + } + + if (tagName && !PATTERN_TAG_URI.test(tagName)) { + throwError(state, 'tag name cannot contain such characters: ' + tagName); + } + + try { + tagName = decodeURIComponent(tagName); + } catch (err) { + throwError(state, 'tag name is malformed: ' + tagName); + } + + if (isVerbatim) { + state.tag = tagName; + + } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) { + state.tag = state.tagMap[tagHandle] + tagName; + + } else if (tagHandle === '!') { + state.tag = '!' + tagName; + + } else if (tagHandle === '!!') { + state.tag = 'tag:yaml.org,2002:' + tagName; + + } else { + throwError(state, 'undeclared tag handle "' + tagHandle + '"'); + } + + return true; +} + +function readAnchorProperty(state) { + var _position, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x26/* & */) return false; + + if (state.anchor !== null) { + throwError(state, 'duplication of an anchor property'); + } + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an anchor node must contain at least one character'); + } + + state.anchor = state.input.slice(_position, state.position); + return true; +} + +function readAlias(state) { + var _position, alias, + ch; + + ch = state.input.charCodeAt(state.position); + + if (ch !== 0x2A/* * */) return false; + + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (state.position === _position) { + throwError(state, 'name of an alias node must contain at least one character'); + } + + alias = state.input.slice(_position, state.position); + + if (!_hasOwnProperty.call(state.anchorMap, alias)) { + throwError(state, 'unidentified alias "' + alias + '"'); + } + + state.result = state.anchorMap[alias]; + skipSeparationSpace(state, true, -1); + return true; +} + +function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) { + var allowBlockStyles, + allowBlockScalars, + allowBlockCollections, + indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } + } + + if (indentStatus === 1) { + while (readTagProperty(state) || readAnchorProperty(state)) { + if (skipSeparationSpace(state, true, -1)) { + atNewLine = true; + allowBlockCollections = allowBlockStyles; + + if (state.lineIndent > parentIndent) { + indentStatus = 1; + } else if (state.lineIndent === parentIndent) { + indentStatus = 0; + } else if (state.lineIndent < parentIndent) { + indentStatus = -1; + } + } else { + allowBlockCollections = false; + } + } + } + + if (allowBlockCollections) { + allowBlockCollections = atNewLine || allowCompact; + } + + if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) { + if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) { + flowIndent = parentIndent; + } else { + flowIndent = parentIndent + 1; + } + + blockIndent = state.position - state.lineStart; + + if (indentStatus === 1) { + if (allowBlockCollections && + (readBlockSequence(state, blockIndent) || + readBlockMapping(state, blockIndent, flowIndent)) || + readFlowCollection(state, flowIndent)) { + hasContent = true; + } else { + if ((allowBlockScalars && readBlockScalar(state, flowIndent)) || + readSingleQuotedScalar(state, flowIndent) || + readDoubleQuotedScalar(state, flowIndent)) { + hasContent = true; + + } else if (readAlias(state)) { + hasContent = true; + + if (state.tag !== null || state.anchor !== null) { + throwError(state, 'alias node should not have any properties'); + } + + } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) { + hasContent = true; + + if (state.tag === null) { + state.tag = '?'; + } + } + + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } else if (indentStatus === 0) { + // Special case: block sequences are allowed to have same indentation level as the parent. + // http://www.yaml.org/spec/1.2/spec.html#id2799784 + hasContent = allowBlockCollections && readBlockSequence(state, blockIndent); + } + } + + if (state.tag === null) { + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + + } else if (state.tag === '?') { + // Implicit resolving is not allowed for non-scalar types, and '?' + // non-specific tag is only automatically assigned to plain scalars. + // + // We only need to check kind conformity in case user explicitly assigns '?' + // tag, for example like this: "! [0]" + // + if (state.result !== null && state.kind !== 'scalar') { + throwError(state, 'unacceptable node kind for ! tag; it should be "scalar", not "' + state.kind + '"'); + } + + for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) { + type = state.implicitTypes[typeIndex]; + + if (type.resolve(state.result)) { // `state.result` updated in resolver if matched + state.result = type.construct(state.result); + state.tag = type.tag; + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + break; + } + } + } else if (state.tag !== '!') { + if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) { + type = state.typeMap[state.kind || 'fallback'][state.tag]; + } else { + // looking for multi type + type = null; + typeList = state.typeMap.multi[state.kind || 'fallback']; + + for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) { + if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) { + type = typeList[typeIndex]; + break; + } + } + } + + if (!type) { + throwError(state, 'unknown tag !<' + state.tag + '>'); + } + + if (state.result !== null && type.kind !== state.kind) { + throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"'); + } + + if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched + throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag'); + } else { + state.result = type.construct(state.result, state.tag); + if (state.anchor !== null) { + state.anchorMap[state.anchor] = state.result; + } + } + } + + if (state.listener !== null) { + state.listener('close', state); + } + return state.tag !== null || state.anchor !== null || hasContent; +} + +function readDocument(state) { + var documentStart = state.position, + _position, + directiveName, + directiveArgs, + hasDirectives = false, + ch; + + state.version = null; + state.checkLineBreaks = state.legacy; + state.tagMap = Object.create(null); + state.anchorMap = Object.create(null); + + while ((ch = state.input.charCodeAt(state.position)) !== 0) { + skipSeparationSpace(state, true, -1); + + ch = state.input.charCodeAt(state.position); + + if (state.lineIndent > 0 || ch !== 0x25/* % */) { + break; + } + + hasDirectives = true; + ch = state.input.charCodeAt(++state.position); + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveName = state.input.slice(_position, state.position); + directiveArgs = []; + + if (directiveName.length < 1) { + throwError(state, 'directive name must not be less than one character in length'); + } + + while (ch !== 0) { + while (is_WHITE_SPACE(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + if (ch === 0x23/* # */) { + do { ch = state.input.charCodeAt(++state.position); } + while (ch !== 0 && !is_EOL(ch)); + break; + } + + if (is_EOL(ch)) break; + + _position = state.position; + + while (ch !== 0 && !is_WS_OR_EOL(ch)) { + ch = state.input.charCodeAt(++state.position); + } + + directiveArgs.push(state.input.slice(_position, state.position)); + } + + if (ch !== 0) readLineBreak(state); + + if (_hasOwnProperty.call(directiveHandlers, directiveName)) { + directiveHandlers[directiveName](state, directiveName, directiveArgs); + } else { + throwWarning(state, 'unknown document directive "' + directiveName + '"'); + } + } + + skipSeparationSpace(state, true, -1); + + if (state.lineIndent === 0 && + state.input.charCodeAt(state.position) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 1) === 0x2D/* - */ && + state.input.charCodeAt(state.position + 2) === 0x2D/* - */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + + } else if (hasDirectives) { + throwError(state, 'directives end mark is expected'); + } + + composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true); + skipSeparationSpace(state, true, -1); + + if (state.checkLineBreaks && + PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) { + throwWarning(state, 'non-ASCII line breaks are interpreted as content'); + } + + state.documents.push(state.result); + + if (state.position === state.lineStart && testDocumentSeparator(state)) { + + if (state.input.charCodeAt(state.position) === 0x2E/* . */) { + state.position += 3; + skipSeparationSpace(state, true, -1); + } + return; + } + + if (state.position < (state.length - 1)) { + throwError(state, 'end of the stream or a document separator is expected'); + } else { + return; + } +} + + +function loadDocuments(input, options) { + input = String(input); + options = options || {}; + + if (input.length !== 0) { + + // Add tailing `\n` if not exists + if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ && + input.charCodeAt(input.length - 1) !== 0x0D/* CR */) { + input += '\n'; + } + + // Strip BOM + if (input.charCodeAt(0) === 0xFEFF) { + input = input.slice(1); + } + } + + var state = new State(input, options); + + var nullpos = input.indexOf('\0'); + + if (nullpos !== -1) { + state.position = nullpos; + throwError(state, 'null byte is not allowed in input'); + } + + // Use 0 as string terminator. That significantly simplifies bounds check. + state.input += '\0'; + + while (state.input.charCodeAt(state.position) === 0x20/* Space */) { + state.lineIndent += 1; + state.position += 1; + } + + while (state.position < (state.length - 1)) { + readDocument(state); + } + + return state.documents; +} + + +function loadAll(input, iterator, options) { + if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') { + options = iterator; + iterator = null; + } + + var documents = loadDocuments(input, options); + + if (typeof iterator !== 'function') { + return documents; + } + + for (var index = 0, length = documents.length; index < length; index += 1) { + iterator(documents[index]); + } +} + + +function load(input, options) { + var documents = loadDocuments(input, options); + + if (documents.length === 0) { + /*eslint-disable no-undefined*/ + return undefined; + } else if (documents.length === 1) { + return documents[0]; + } + throw new YAMLException('expected a single document in the stream, but found more'); +} + + +module.exports.loadAll = loadAll; +module.exports.load = load; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/schema.js b/node_modules/eslint/node_modules/js-yaml/lib/schema.js new file mode 100644 index 000000000..65b41f401 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/schema.js @@ -0,0 +1,121 @@ +'use strict'; + +/*eslint-disable max-len*/ + +var YAMLException = require('./exception'); +var Type = require('./type'); + + +function compileList(schema, name) { + var result = []; + + schema[name].forEach(function (currentType) { + var newIndex = result.length; + + result.forEach(function (previousType, previousIndex) { + if (previousType.tag === currentType.tag && + previousType.kind === currentType.kind && + previousType.multi === currentType.multi) { + + newIndex = previousIndex; + } + }); + + result[newIndex] = currentType; + }); + + return result; +} + + +function compileMap(/* lists... */) { + var result = { + scalar: {}, + sequence: {}, + mapping: {}, + fallback: {}, + multi: { + scalar: [], + sequence: [], + mapping: [], + fallback: [] + } + }, index, length; + + function collectType(type) { + if (type.multi) { + result.multi[type.kind].push(type); + result.multi['fallback'].push(type); + } else { + result[type.kind][type.tag] = result['fallback'][type.tag] = type; + } + } + + for (index = 0, length = arguments.length; index < length; index += 1) { + arguments[index].forEach(collectType); + } + return result; +} + + +function Schema(definition) { + return this.extend(definition); +} + + +Schema.prototype.extend = function extend(definition) { + var implicit = []; + var explicit = []; + + if (definition instanceof Type) { + // Schema.extend(type) + explicit.push(definition); + + } else if (Array.isArray(definition)) { + // Schema.extend([ type1, type2, ... ]) + explicit = explicit.concat(definition); + + } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) { + // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] }) + if (definition.implicit) implicit = implicit.concat(definition.implicit); + if (definition.explicit) explicit = explicit.concat(definition.explicit); + + } else { + throw new YAMLException('Schema.extend argument should be a Type, [ Type ], ' + + 'or a schema definition ({ implicit: [...], explicit: [...] })'); + } + + implicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + + if (type.loadKind && type.loadKind !== 'scalar') { + throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.'); + } + + if (type.multi) { + throw new YAMLException('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.'); + } + }); + + explicit.forEach(function (type) { + if (!(type instanceof Type)) { + throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.'); + } + }); + + var result = Object.create(Schema.prototype); + + result.implicit = (this.implicit || []).concat(implicit); + result.explicit = (this.explicit || []).concat(explicit); + + result.compiledImplicit = compileList(result, 'implicit'); + result.compiledExplicit = compileList(result, 'explicit'); + result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit); + + return result; +}; + + +module.exports = Schema; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/schema/core.js b/node_modules/eslint/node_modules/js-yaml/lib/schema/core.js new file mode 100644 index 000000000..608b26de2 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/schema/core.js @@ -0,0 +1,11 @@ +// Standard YAML's Core schema. +// http://www.yaml.org/spec/1.2/spec.html#id2804923 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, Core schema has no distinctions from JSON schema is JS-YAML. + + +'use strict'; + + +module.exports = require('./json'); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/schema/default.js b/node_modules/eslint/node_modules/js-yaml/lib/schema/default.js new file mode 100644 index 000000000..3af0520d5 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/schema/default.js @@ -0,0 +1,22 @@ +// JS-YAML's default schema for `safeLoad` function. +// It is not described in the YAML specification. +// +// This schema is based on standard YAML's Core schema and includes most of +// extra types described at YAML tag repository. (http://yaml.org/type/) + + +'use strict'; + + +module.exports = require('./core').extend({ + implicit: [ + require('../type/timestamp'), + require('../type/merge') + ], + explicit: [ + require('../type/binary'), + require('../type/omap'), + require('../type/pairs'), + require('../type/set') + ] +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/schema/failsafe.js b/node_modules/eslint/node_modules/js-yaml/lib/schema/failsafe.js new file mode 100644 index 000000000..b7a33eb7a --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/schema/failsafe.js @@ -0,0 +1,17 @@ +// Standard YAML's Failsafe schema. +// http://www.yaml.org/spec/1.2/spec.html#id2802346 + + +'use strict'; + + +var Schema = require('../schema'); + + +module.exports = new Schema({ + explicit: [ + require('../type/str'), + require('../type/seq'), + require('../type/map') + ] +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/schema/json.js b/node_modules/eslint/node_modules/js-yaml/lib/schema/json.js new file mode 100644 index 000000000..b73df78e5 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/schema/json.js @@ -0,0 +1,19 @@ +// Standard YAML's JSON schema. +// http://www.yaml.org/spec/1.2/spec.html#id2803231 +// +// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. +// So, this schema is not such strict as defined in the YAML specification. +// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. + + +'use strict'; + + +module.exports = require('./failsafe').extend({ + implicit: [ + require('../type/null'), + require('../type/bool'), + require('../type/int'), + require('../type/float') + ] +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/snippet.js b/node_modules/eslint/node_modules/js-yaml/lib/snippet.js new file mode 100644 index 000000000..00e2133c0 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/snippet.js @@ -0,0 +1,101 @@ +'use strict'; + + +var common = require('./common'); + + +// get snippet for a single line, respecting maxLength +function getLine(buffer, lineStart, lineEnd, position, maxLineLength) { + var head = ''; + var tail = ''; + var maxHalfLength = Math.floor(maxLineLength / 2) - 1; + + if (position - lineStart > maxHalfLength) { + head = ' ... '; + lineStart = position - maxHalfLength + head.length; + } + + if (lineEnd - position > maxHalfLength) { + tail = ' ...'; + lineEnd = position + maxHalfLength - tail.length; + } + + return { + str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail, + pos: position - lineStart + head.length // relative position + }; +} + + +function padStart(string, max) { + return common.repeat(' ', max - string.length) + string; +} + + +function makeSnippet(mark, options) { + options = Object.create(options || null); + + if (!mark.buffer) return null; + + if (!options.maxLength) options.maxLength = 79; + if (typeof options.indent !== 'number') options.indent = 1; + if (typeof options.linesBefore !== 'number') options.linesBefore = 3; + if (typeof options.linesAfter !== 'number') options.linesAfter = 2; + + var re = /\r?\n|\r|\0/g; + var lineStarts = [ 0 ]; + var lineEnds = []; + var match; + var foundLineNo = -1; + + while ((match = re.exec(mark.buffer))) { + lineEnds.push(match.index); + lineStarts.push(match.index + match[0].length); + + if (mark.position <= match.index && foundLineNo < 0) { + foundLineNo = lineStarts.length - 2; + } + } + + if (foundLineNo < 0) foundLineNo = lineStarts.length - 1; + + var result = '', i, line; + var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length; + var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3); + + for (i = 1; i <= options.linesBefore; i++) { + if (foundLineNo - i < 0) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); + result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n' + result; + } + + line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); + result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n'; + + for (i = 1; i <= options.linesAfter; i++) { + if (foundLineNo + i >= lineEnds.length) break; + line = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); + result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + + ' | ' + line.str + '\n'; + } + + return result.replace(/\n$/, ''); +} + + +module.exports = makeSnippet; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type.js b/node_modules/eslint/node_modules/js-yaml/lib/type.js new file mode 100644 index 000000000..5e57877fe --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type.js @@ -0,0 +1,66 @@ +'use strict'; + +var YAMLException = require('./exception'); + +var TYPE_CONSTRUCTOR_OPTIONS = [ + 'kind', + 'multi', + 'resolve', + 'construct', + 'instanceOf', + 'predicate', + 'represent', + 'representName', + 'defaultStyle', + 'styleAliases' +]; + +var YAML_NODE_KINDS = [ + 'scalar', + 'sequence', + 'mapping' +]; + +function compileStyleAliases(map) { + var result = {}; + + if (map !== null) { + Object.keys(map).forEach(function (style) { + map[style].forEach(function (alias) { + result[String(alias)] = style; + }); + }); + } + + return result; +} + +function Type(tag, options) { + options = options || {}; + + Object.keys(options).forEach(function (name) { + if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) { + throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.'); + } + }); + + // TODO: Add tag format check. + this.options = options; // keep original options in case user wants to extend this type later + this.tag = tag; + this.kind = options['kind'] || null; + this.resolve = options['resolve'] || function () { return true; }; + this.construct = options['construct'] || function (data) { return data; }; + this.instanceOf = options['instanceOf'] || null; + this.predicate = options['predicate'] || null; + this.represent = options['represent'] || null; + this.representName = options['representName'] || null; + this.defaultStyle = options['defaultStyle'] || null; + this.multi = options['multi'] || false; + this.styleAliases = compileStyleAliases(options['styleAliases'] || null); + + if (YAML_NODE_KINDS.indexOf(this.kind) === -1) { + throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.'); + } +} + +module.exports = Type; diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/binary.js b/node_modules/eslint/node_modules/js-yaml/lib/type/binary.js new file mode 100644 index 000000000..e1523513d --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/binary.js @@ -0,0 +1,125 @@ +'use strict'; + +/*eslint-disable no-bitwise*/ + + +var Type = require('../type'); + + +// [ 64, 65, 66 ] -> [ padding, CR, LF ] +var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r'; + + +function resolveYamlBinary(data) { + if (data === null) return false; + + var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP; + + // Convert one by one. + for (idx = 0; idx < max; idx++) { + code = map.indexOf(data.charAt(idx)); + + // Skip CR/LF + if (code > 64) continue; + + // Fail on illegal characters + if (code < 0) return false; + + bitlen += 6; + } + + // If there are any bits left, source was corrupted + return (bitlen % 8) === 0; +} + +function constructYamlBinary(data) { + var idx, tailbits, + input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan + max = input.length, + map = BASE64_MAP, + bits = 0, + result = []; + + // Collect by 6*4 bits (3 bytes) + + for (idx = 0; idx < max; idx++) { + if ((idx % 4 === 0) && idx) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } + + bits = (bits << 6) | map.indexOf(input.charAt(idx)); + } + + // Dump tail + + tailbits = (max % 4) * 6; + + if (tailbits === 0) { + result.push((bits >> 16) & 0xFF); + result.push((bits >> 8) & 0xFF); + result.push(bits & 0xFF); + } else if (tailbits === 18) { + result.push((bits >> 10) & 0xFF); + result.push((bits >> 2) & 0xFF); + } else if (tailbits === 12) { + result.push((bits >> 4) & 0xFF); + } + + return new Uint8Array(result); +} + +function representYamlBinary(object /*, style*/) { + var result = '', bits = 0, idx, tail, + max = object.length, + map = BASE64_MAP; + + // Convert every three bytes to 4 ASCII characters. + + for (idx = 0; idx < max; idx++) { + if ((idx % 3 === 0) && idx) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } + + bits = (bits << 8) + object[idx]; + } + + // Dump tail + + tail = max % 3; + + if (tail === 0) { + result += map[(bits >> 18) & 0x3F]; + result += map[(bits >> 12) & 0x3F]; + result += map[(bits >> 6) & 0x3F]; + result += map[bits & 0x3F]; + } else if (tail === 2) { + result += map[(bits >> 10) & 0x3F]; + result += map[(bits >> 4) & 0x3F]; + result += map[(bits << 2) & 0x3F]; + result += map[64]; + } else if (tail === 1) { + result += map[(bits >> 2) & 0x3F]; + result += map[(bits << 4) & 0x3F]; + result += map[64]; + result += map[64]; + } + + return result; +} + +function isBinary(obj) { + return Object.prototype.toString.call(obj) === '[object Uint8Array]'; +} + +module.exports = new Type('tag:yaml.org,2002:binary', { + kind: 'scalar', + resolve: resolveYamlBinary, + construct: constructYamlBinary, + predicate: isBinary, + represent: representYamlBinary +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/bool.js b/node_modules/eslint/node_modules/js-yaml/lib/type/bool.js new file mode 100644 index 000000000..cb7745930 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/bool.js @@ -0,0 +1,35 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlBoolean(data) { + if (data === null) return false; + + var max = data.length; + + return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) || + (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE')); +} + +function constructYamlBoolean(data) { + return data === 'true' || + data === 'True' || + data === 'TRUE'; +} + +function isBoolean(object) { + return Object.prototype.toString.call(object) === '[object Boolean]'; +} + +module.exports = new Type('tag:yaml.org,2002:bool', { + kind: 'scalar', + resolve: resolveYamlBoolean, + construct: constructYamlBoolean, + predicate: isBoolean, + represent: { + lowercase: function (object) { return object ? 'true' : 'false'; }, + uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; }, + camelcase: function (object) { return object ? 'True' : 'False'; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/float.js b/node_modules/eslint/node_modules/js-yaml/lib/type/float.js new file mode 100644 index 000000000..74d77ec2e --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/float.js @@ -0,0 +1,97 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +var YAML_FLOAT_PATTERN = new RegExp( + // 2.5e4, 2.5 and integers + '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' + + // .2e4, .2 + // special case, seems not from spec + '|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' + + // .inf + '|[-+]?\\.(?:inf|Inf|INF)' + + // .nan + '|\\.(?:nan|NaN|NAN))$'); + +function resolveYamlFloat(data) { + if (data === null) return false; + + if (!YAML_FLOAT_PATTERN.test(data) || + // Quick hack to not allow integers end with `_` + // Probably should update regexp & check speed + data[data.length - 1] === '_') { + return false; + } + + return true; +} + +function constructYamlFloat(data) { + var value, sign; + + value = data.replace(/_/g, '').toLowerCase(); + sign = value[0] === '-' ? -1 : 1; + + if ('+-'.indexOf(value[0]) >= 0) { + value = value.slice(1); + } + + if (value === '.inf') { + return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY; + + } else if (value === '.nan') { + return NaN; + } + return sign * parseFloat(value, 10); +} + + +var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; + +function representYamlFloat(object, style) { + var res; + + if (isNaN(object)) { + switch (style) { + case 'lowercase': return '.nan'; + case 'uppercase': return '.NAN'; + case 'camelcase': return '.NaN'; + } + } else if (Number.POSITIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '.inf'; + case 'uppercase': return '.INF'; + case 'camelcase': return '.Inf'; + } + } else if (Number.NEGATIVE_INFINITY === object) { + switch (style) { + case 'lowercase': return '-.inf'; + case 'uppercase': return '-.INF'; + case 'camelcase': return '-.Inf'; + } + } else if (common.isNegativeZero(object)) { + return '-0.0'; + } + + res = object.toString(10); + + // JS stringifier can build scientific format without dots: 5e-100, + // while YAML requres dot: 5.e-100. Fix it with simple hack + + return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; +} + +function isFloat(object) { + return (Object.prototype.toString.call(object) === '[object Number]') && + (object % 1 !== 0 || common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:float', { + kind: 'scalar', + resolve: resolveYamlFloat, + construct: constructYamlFloat, + predicate: isFloat, + represent: representYamlFloat, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/int.js b/node_modules/eslint/node_modules/js-yaml/lib/type/int.js new file mode 100644 index 000000000..3fe3a4437 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/int.js @@ -0,0 +1,156 @@ +'use strict'; + +var common = require('../common'); +var Type = require('../type'); + +function isHexCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) || + ((0x41/* A */ <= c) && (c <= 0x46/* F */)) || + ((0x61/* a */ <= c) && (c <= 0x66/* f */)); +} + +function isOctCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */)); +} + +function isDecCode(c) { + return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)); +} + +function resolveYamlInteger(data) { + if (data === null) return false; + + var max = data.length, + index = 0, + hasDigits = false, + ch; + + if (!max) return false; + + ch = data[index]; + + // sign + if (ch === '-' || ch === '+') { + ch = data[++index]; + } + + if (ch === '0') { + // 0 + if (index + 1 === max) return true; + ch = data[++index]; + + // base 2, base 8, base 16 + + if (ch === 'b') { + // base 2 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (ch !== '0' && ch !== '1') return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'x') { + // base 16 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isHexCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + + + if (ch === 'o') { + // base 8 + index++; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isOctCode(data.charCodeAt(index))) return false; + hasDigits = true; + } + return hasDigits && ch !== '_'; + } + } + + // base 10 (except 0) + + // value should not start with `_`; + if (ch === '_') return false; + + for (; index < max; index++) { + ch = data[index]; + if (ch === '_') continue; + if (!isDecCode(data.charCodeAt(index))) { + return false; + } + hasDigits = true; + } + + // Should have digits and should not end with `_` + if (!hasDigits || ch === '_') return false; + + return true; +} + +function constructYamlInteger(data) { + var value = data, sign = 1, ch; + + if (value.indexOf('_') !== -1) { + value = value.replace(/_/g, ''); + } + + ch = value[0]; + + if (ch === '-' || ch === '+') { + if (ch === '-') sign = -1; + value = value.slice(1); + ch = value[0]; + } + + if (value === '0') return 0; + + if (ch === '0') { + if (value[1] === 'b') return sign * parseInt(value.slice(2), 2); + if (value[1] === 'x') return sign * parseInt(value.slice(2), 16); + if (value[1] === 'o') return sign * parseInt(value.slice(2), 8); + } + + return sign * parseInt(value, 10); +} + +function isInteger(object) { + return (Object.prototype.toString.call(object)) === '[object Number]' && + (object % 1 === 0 && !common.isNegativeZero(object)); +} + +module.exports = new Type('tag:yaml.org,2002:int', { + kind: 'scalar', + resolve: resolveYamlInteger, + construct: constructYamlInteger, + predicate: isInteger, + represent: { + binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); }, + octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); }, + decimal: function (obj) { return obj.toString(10); }, + /* eslint-disable max-len */ + hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); } + }, + defaultStyle: 'decimal', + styleAliases: { + binary: [ 2, 'bin' ], + octal: [ 8, 'oct' ], + decimal: [ 10, 'dec' ], + hexadecimal: [ 16, 'hex' ] + } +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/map.js b/node_modules/eslint/node_modules/js-yaml/lib/type/map.js new file mode 100644 index 000000000..f327beebd --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/map.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:map', { + kind: 'mapping', + construct: function (data) { return data !== null ? data : {}; } +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/merge.js b/node_modules/eslint/node_modules/js-yaml/lib/type/merge.js new file mode 100644 index 000000000..ae08a8644 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/merge.js @@ -0,0 +1,12 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlMerge(data) { + return data === '<<' || data === null; +} + +module.exports = new Type('tag:yaml.org,2002:merge', { + kind: 'scalar', + resolve: resolveYamlMerge +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/null.js b/node_modules/eslint/node_modules/js-yaml/lib/type/null.js new file mode 100644 index 000000000..315ca4e23 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/null.js @@ -0,0 +1,35 @@ +'use strict'; + +var Type = require('../type'); + +function resolveYamlNull(data) { + if (data === null) return true; + + var max = data.length; + + return (max === 1 && data === '~') || + (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL')); +} + +function constructYamlNull() { + return null; +} + +function isNull(object) { + return object === null; +} + +module.exports = new Type('tag:yaml.org,2002:null', { + kind: 'scalar', + resolve: resolveYamlNull, + construct: constructYamlNull, + predicate: isNull, + represent: { + canonical: function () { return '~'; }, + lowercase: function () { return 'null'; }, + uppercase: function () { return 'NULL'; }, + camelcase: function () { return 'Null'; }, + empty: function () { return ''; } + }, + defaultStyle: 'lowercase' +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/omap.js b/node_modules/eslint/node_modules/js-yaml/lib/type/omap.js new file mode 100644 index 000000000..b2b5323bd --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/omap.js @@ -0,0 +1,44 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; +var _toString = Object.prototype.toString; + +function resolveYamlOmap(data) { + if (data === null) return true; + + var objectKeys = [], index, length, pair, pairKey, pairHasKey, + object = data; + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + pairHasKey = false; + + if (_toString.call(pair) !== '[object Object]') return false; + + for (pairKey in pair) { + if (_hasOwnProperty.call(pair, pairKey)) { + if (!pairHasKey) pairHasKey = true; + else return false; + } + } + + if (!pairHasKey) return false; + + if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey); + else return false; + } + + return true; +} + +function constructYamlOmap(data) { + return data !== null ? data : []; +} + +module.exports = new Type('tag:yaml.org,2002:omap', { + kind: 'sequence', + resolve: resolveYamlOmap, + construct: constructYamlOmap +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/pairs.js b/node_modules/eslint/node_modules/js-yaml/lib/type/pairs.js new file mode 100644 index 000000000..74b52403f --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/pairs.js @@ -0,0 +1,53 @@ +'use strict'; + +var Type = require('../type'); + +var _toString = Object.prototype.toString; + +function resolveYamlPairs(data) { + if (data === null) return true; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + if (_toString.call(pair) !== '[object Object]') return false; + + keys = Object.keys(pair); + + if (keys.length !== 1) return false; + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return true; +} + +function constructYamlPairs(data) { + if (data === null) return []; + + var index, length, pair, keys, result, + object = data; + + result = new Array(object.length); + + for (index = 0, length = object.length; index < length; index += 1) { + pair = object[index]; + + keys = Object.keys(pair); + + result[index] = [ keys[0], pair[keys[0]] ]; + } + + return result; +} + +module.exports = new Type('tag:yaml.org,2002:pairs', { + kind: 'sequence', + resolve: resolveYamlPairs, + construct: constructYamlPairs +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/seq.js b/node_modules/eslint/node_modules/js-yaml/lib/type/seq.js new file mode 100644 index 000000000..be8f77f28 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/seq.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:seq', { + kind: 'sequence', + construct: function (data) { return data !== null ? data : []; } +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/set.js b/node_modules/eslint/node_modules/js-yaml/lib/type/set.js new file mode 100644 index 000000000..f885a329c --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/set.js @@ -0,0 +1,29 @@ +'use strict'; + +var Type = require('../type'); + +var _hasOwnProperty = Object.prototype.hasOwnProperty; + +function resolveYamlSet(data) { + if (data === null) return true; + + var key, object = data; + + for (key in object) { + if (_hasOwnProperty.call(object, key)) { + if (object[key] !== null) return false; + } + } + + return true; +} + +function constructYamlSet(data) { + return data !== null ? data : {}; +} + +module.exports = new Type('tag:yaml.org,2002:set', { + kind: 'mapping', + resolve: resolveYamlSet, + construct: constructYamlSet +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/str.js b/node_modules/eslint/node_modules/js-yaml/lib/type/str.js new file mode 100644 index 000000000..27acc106c --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/str.js @@ -0,0 +1,8 @@ +'use strict'; + +var Type = require('../type'); + +module.exports = new Type('tag:yaml.org,2002:str', { + kind: 'scalar', + construct: function (data) { return data !== null ? data : ''; } +}); diff --git a/node_modules/eslint/node_modules/js-yaml/lib/type/timestamp.js b/node_modules/eslint/node_modules/js-yaml/lib/type/timestamp.js new file mode 100644 index 000000000..8fa9c5865 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/lib/type/timestamp.js @@ -0,0 +1,88 @@ +'use strict'; + +var Type = require('../type'); + +var YAML_DATE_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9])' + // [2] month + '-([0-9][0-9])$'); // [3] day + +var YAML_TIMESTAMP_REGEXP = new RegExp( + '^([0-9][0-9][0-9][0-9])' + // [1] year + '-([0-9][0-9]?)' + // [2] month + '-([0-9][0-9]?)' + // [3] day + '(?:[Tt]|[ \\t]+)' + // ... + '([0-9][0-9]?)' + // [4] hour + ':([0-9][0-9])' + // [5] minute + ':([0-9][0-9])' + // [6] second + '(?:\\.([0-9]*))?' + // [7] fraction + '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour + '(?::([0-9][0-9]))?))?$'); // [11] tz_minute + +function resolveYamlTimestamp(data) { + if (data === null) return false; + if (YAML_DATE_REGEXP.exec(data) !== null) return true; + if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true; + return false; +} + +function constructYamlTimestamp(data) { + var match, year, month, day, hour, minute, second, fraction = 0, + delta = null, tz_hour, tz_minute, date; + + match = YAML_DATE_REGEXP.exec(data); + if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data); + + if (match === null) throw new Error('Date resolve error'); + + // match: [1] year [2] month [3] day + + year = +(match[1]); + month = +(match[2]) - 1; // JS month starts with 0 + day = +(match[3]); + + if (!match[4]) { // no hour + return new Date(Date.UTC(year, month, day)); + } + + // match: [4] hour [5] minute [6] second [7] fraction + + hour = +(match[4]); + minute = +(match[5]); + second = +(match[6]); + + if (match[7]) { + fraction = match[7].slice(0, 3); + while (fraction.length < 3) { // milli-seconds + fraction += '0'; + } + fraction = +fraction; + } + + // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute + + if (match[9]) { + tz_hour = +(match[10]); + tz_minute = +(match[11] || 0); + delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds + if (match[9] === '-') delta = -delta; + } + + date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); + + if (delta) date.setTime(date.getTime() - delta); + + return date; +} + +function representYamlTimestamp(object /*, style*/) { + return object.toISOString(); +} + +module.exports = new Type('tag:yaml.org,2002:timestamp', { + kind: 'scalar', + resolve: resolveYamlTimestamp, + construct: constructYamlTimestamp, + instanceOf: Date, + represent: representYamlTimestamp +}); diff --git a/node_modules/eslint/node_modules/js-yaml/package.json b/node_modules/eslint/node_modules/js-yaml/package.json new file mode 100644 index 000000000..17574da80 --- /dev/null +++ b/node_modules/eslint/node_modules/js-yaml/package.json @@ -0,0 +1,66 @@ +{ + "name": "js-yaml", + "version": "4.1.0", + "description": "YAML 1.2 parser and serializer", + "keywords": [ + "yaml", + "parser", + "serializer", + "pyyaml" + ], + "author": "Vladimir Zapparov ", + "contributors": [ + "Aleksey V Zapparov (http://www.ixti.net/)", + "Vitaly Puzrin (https://github.com/puzrin)", + "Martin Grenfell (http://got-ravings.blogspot.com)" + ], + "license": "MIT", + "repository": "nodeca/js-yaml", + "files": [ + "index.js", + "lib/", + "bin/", + "dist/" + ], + "bin": { + "js-yaml": "bin/js-yaml.js" + }, + "module": "./dist/js-yaml.mjs", + "exports": { + ".": { + "import": "./dist/js-yaml.mjs", + "require": "./index.js" + }, + "./package.json": "./package.json" + }, + "scripts": { + "lint": "eslint .", + "test": "npm run lint && mocha", + "coverage": "npm run lint && nyc mocha && nyc report --reporter html", + "demo": "npm run lint && node support/build_demo.js", + "gh-demo": "npm run demo && gh-pages -d demo -f", + "browserify": "rollup -c support/rollup.config.js", + "prepublishOnly": "npm run gh-demo" + }, + "unpkg": "dist/js-yaml.min.js", + "jsdelivr": "dist/js-yaml.min.js", + "dependencies": { + "argparse": "^2.0.1" + }, + "devDependencies": { + "@rollup/plugin-commonjs": "^17.0.0", + "@rollup/plugin-node-resolve": "^11.0.0", + "ansi": "^0.3.1", + "benchmark": "^2.1.4", + "codemirror": "^5.13.4", + "eslint": "^7.0.0", + "fast-check": "^2.8.0", + "gh-pages": "^3.1.0", + "mocha": "^8.2.1", + "nyc": "^15.1.0", + "rollup": "^2.34.1", + "rollup-plugin-node-polyfills": "^0.2.1", + "rollup-plugin-terser": "^7.0.2", + "shelljs": "^0.8.4" + } +} diff --git a/node_modules/eslint/node_modules/locate-path/index.d.ts b/node_modules/eslint/node_modules/locate-path/index.d.ts new file mode 100644 index 000000000..a714f1d3f --- /dev/null +++ b/node_modules/eslint/node_modules/locate-path/index.d.ts @@ -0,0 +1,83 @@ +declare namespace locatePath { + interface Options { + /** + Current working directory. + + @default process.cwd() + */ + readonly cwd?: string; + + /** + Type of path to match. + + @default 'file' + */ + readonly type?: 'file' | 'directory'; + + /** + Allow symbolic links to match if they point to the requested path type. + + @default true + */ + readonly allowSymlinks?: boolean; + } + + interface AsyncOptions extends Options { + /** + Number of concurrently pending promises. Minimum: `1`. + + @default Infinity + */ + readonly concurrency?: number; + + /** + Preserve `paths` order when searching. + + Disable this to improve performance if you don't care about the order. + + @default true + */ + readonly preserveOrder?: boolean; + } +} + +declare const locatePath: { + /** + Synchronously get the first path that exists on disk of multiple paths. + + @param paths - Paths to check. + @returns The first path that exists or `undefined` if none exists. + */ + sync: ( + paths: Iterable, + options?: locatePath.Options + ) => string | undefined; + + /** + Get the first path that exists on disk of multiple paths. + + @param paths - Paths to check. + @returns The first path that exists or `undefined` if none exists. + + @example + ``` + import locatePath = require('locate-path'); + + const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' + ]; + + (async () => { + console(await locatePath(files)); + //=> 'rainbow' + })(); + ``` + */ + (paths: Iterable, options?: locatePath.AsyncOptions): Promise< + string | undefined + >; +}; + +export = locatePath; diff --git a/node_modules/eslint/node_modules/locate-path/index.js b/node_modules/eslint/node_modules/locate-path/index.js new file mode 100644 index 000000000..a6358e546 --- /dev/null +++ b/node_modules/eslint/node_modules/locate-path/index.js @@ -0,0 +1,68 @@ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const {promisify} = require('util'); +const pLocate = require('p-locate'); + +const fsStat = promisify(fs.stat); +const fsLStat = promisify(fs.lstat); + +const typeMappings = { + directory: 'isDirectory', + file: 'isFile' +}; + +function checkType({type}) { + if (type in typeMappings) { + return; + } + + throw new Error(`Invalid type specified: ${type}`); +} + +const matchType = (type, stat) => type === undefined || stat[typeMappings[type]](); + +module.exports = async (paths, options) => { + options = { + cwd: process.cwd(), + type: 'file', + allowSymlinks: true, + ...options + }; + + checkType(options); + + const statFn = options.allowSymlinks ? fsStat : fsLStat; + + return pLocate(paths, async path_ => { + try { + const stat = await statFn(path.resolve(options.cwd, path_)); + return matchType(options.type, stat); + } catch { + return false; + } + }, options); +}; + +module.exports.sync = (paths, options) => { + options = { + cwd: process.cwd(), + allowSymlinks: true, + type: 'file', + ...options + }; + + checkType(options); + + const statFn = options.allowSymlinks ? fs.statSync : fs.lstatSync; + + for (const path_ of paths) { + try { + const stat = statFn(path.resolve(options.cwd, path_)); + + if (matchType(options.type, stat)) { + return path_; + } + } catch {} + } +}; diff --git a/node_modules/astral-regex/license b/node_modules/eslint/node_modules/locate-path/license similarity index 92% rename from node_modules/astral-regex/license rename to node_modules/eslint/node_modules/locate-path/license index db6bc32cc..fa7ceba3e 100644 --- a/node_modules/astral-regex/license +++ b/node_modules/eslint/node_modules/locate-path/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Kevin Mårtensson (github.com/kevva) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/node_modules/eslint/node_modules/locate-path/package.json b/node_modules/eslint/node_modules/locate-path/package.json new file mode 100644 index 000000000..08bea50dc --- /dev/null +++ b/node_modules/eslint/node_modules/locate-path/package.json @@ -0,0 +1,46 @@ +{ + "name": "locate-path", + "version": "6.0.0", + "description": "Get the first path that exists on disk of multiple paths", + "license": "MIT", + "repository": "sindresorhus/locate-path", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "locate", + "path", + "paths", + "file", + "files", + "exists", + "find", + "finder", + "search", + "searcher", + "array", + "iterable", + "iterator" + ], + "dependencies": { + "p-locate": "^5.0.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.13.1", + "xo": "^0.32.1" + } +} diff --git a/node_modules/eslint/node_modules/locate-path/readme.md b/node_modules/eslint/node_modules/locate-path/readme.md new file mode 100644 index 000000000..1002bcd6a --- /dev/null +++ b/node_modules/eslint/node_modules/locate-path/readme.md @@ -0,0 +1,125 @@ +# locate-path [![Build Status](https://travis-ci.com/sindresorhus/locate-path.svg?branch=master)](https://travis-ci.com/github/sindresorhus/locate-path) + +> Get the first path that exists on disk of multiple paths + +## Install + +``` +$ npm install locate-path +``` + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const locatePath = require('locate-path'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + console(await locatePath(files)); + //=> 'rainbow' +})(); +``` + +## API + +### locatePath(paths, options?) + +Returns a `Promise` for the first path that exists or `undefined` if none exists. + +#### paths + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `object` + +##### concurrency + +Type: `number`\ +Default: `Infinity`\ +Minimum: `1` + +Number of concurrently pending promises. + +##### preserveOrder + +Type: `boolean`\ +Default: `true` + +Preserve `paths` order when searching. + +Disable this to improve performance if you don't care about the order. + +##### cwd + +Type: `string`\ +Default: `process.cwd()` + +Current working directory. + +##### type + +Type: `string`\ +Default: `'file'`\ +Values: `'file' | 'directory'` + +The type of paths that can match. + +##### allowSymlinks + +Type: `boolean`\ +Default: `true` + +Allow symbolic links to match if they point to the chosen path type. + +### locatePath.sync(paths, options?) + +Returns the first path that exists or `undefined` if none exists. + +#### paths + +Type: `Iterable` + +Paths to check. + +#### options + +Type: `object` + +##### cwd + +Same as above. + +##### type + +Same as above. + +##### allowSymlinks + +Same as above. + +## Related + +- [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/eslint/node_modules/p-limit/index.d.ts b/node_modules/eslint/node_modules/p-limit/index.d.ts new file mode 100644 index 000000000..f348d7f13 --- /dev/null +++ b/node_modules/eslint/node_modules/p-limit/index.d.ts @@ -0,0 +1,42 @@ +declare namespace pLimit { + interface Limit { + /** + The number of promises that are currently running. + */ + readonly activeCount: number; + + /** + The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + */ + readonly pendingCount: number; + + /** + Discard pending promises that are waiting to run. + + This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app. + + Note: This does not cancel promises that are already running. + */ + clearQueue: () => void; + + /** + @param fn - Promise-returning/async function. + @param arguments - Any arguments to pass through to `fn`. Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a lot of functions. + @returns The promise returned by calling `fn(...arguments)`. + */ + ( + fn: (...arguments: Arguments) => PromiseLike | ReturnType, + ...arguments: Arguments + ): Promise; + } +} + +/** +Run multiple promise-returning & async functions with limited concurrency. + +@param concurrency - Concurrency limit. Minimum: `1`. +@returns A `limit` function. +*/ +declare function pLimit(concurrency: number): pLimit.Limit; + +export = pLimit; diff --git a/node_modules/eslint/node_modules/p-limit/index.js b/node_modules/eslint/node_modules/p-limit/index.js new file mode 100644 index 000000000..c2ae52d90 --- /dev/null +++ b/node_modules/eslint/node_modules/p-limit/index.js @@ -0,0 +1,71 @@ +'use strict'; +const Queue = require('yocto-queue'); + +const pLimit = concurrency => { + if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) { + throw new TypeError('Expected `concurrency` to be a number from 1 and up'); + } + + const queue = new Queue(); + let activeCount = 0; + + const next = () => { + activeCount--; + + if (queue.size > 0) { + queue.dequeue()(); + } + }; + + const run = async (fn, resolve, ...args) => { + activeCount++; + + const result = (async () => fn(...args))(); + + resolve(result); + + try { + await result; + } catch {} + + next(); + }; + + const enqueue = (fn, resolve, ...args) => { + queue.enqueue(run.bind(null, fn, resolve, ...args)); + + (async () => { + // This function needs to wait until the next microtask before comparing + // `activeCount` to `concurrency`, because `activeCount` is updated asynchronously + // when the run function is dequeued and called. The comparison in the if-statement + // needs to happen asynchronously as well to get an up-to-date value for `activeCount`. + await Promise.resolve(); + + if (activeCount < concurrency && queue.size > 0) { + queue.dequeue()(); + } + })(); + }; + + const generator = (fn, ...args) => new Promise(resolve => { + enqueue(fn, resolve, ...args); + }); + + Object.defineProperties(generator, { + activeCount: { + get: () => activeCount + }, + pendingCount: { + get: () => queue.size + }, + clearQueue: { + value: () => { + queue.clear(); + } + } + }); + + return generator; +}; + +module.exports = pLimit; diff --git a/node_modules/slice-ansi/node_modules/color-name/LICENSE b/node_modules/eslint/node_modules/p-limit/license similarity index 90% rename from node_modules/slice-ansi/node_modules/color-name/LICENSE rename to node_modules/eslint/node_modules/p-limit/license index c6b100125..fa7ceba3e 100644 --- a/node_modules/slice-ansi/node_modules/color-name/LICENSE +++ b/node_modules/eslint/node_modules/p-limit/license @@ -1,8 +1,9 @@ -The MIT License (MIT) -Copyright (c) 2015 Dmitry Ivanov - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/eslint/node_modules/p-limit/package.json b/node_modules/eslint/node_modules/p-limit/package.json new file mode 100644 index 000000000..76514736f --- /dev/null +++ b/node_modules/eslint/node_modules/p-limit/package.json @@ -0,0 +1,52 @@ +{ + "name": "p-limit", + "version": "3.1.0", + "description": "Run multiple promise-returning & async functions with limited concurrency", + "license": "MIT", + "repository": "sindresorhus/p-limit", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "limit", + "limited", + "concurrency", + "throttle", + "throat", + "rate", + "batch", + "ratelimit", + "task", + "queue", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "devDependencies": { + "ava": "^2.4.0", + "delay": "^4.4.0", + "in-range": "^2.0.0", + "random-int": "^2.0.1", + "time-span": "^4.0.0", + "tsd": "^0.13.1", + "xo": "^0.35.0" + } +} diff --git a/node_modules/eslint/node_modules/p-limit/readme.md b/node_modules/eslint/node_modules/p-limit/readme.md new file mode 100644 index 000000000..b283c1e63 --- /dev/null +++ b/node_modules/eslint/node_modules/p-limit/readme.md @@ -0,0 +1,101 @@ +# p-limit + +> Run multiple promise-returning & async functions with limited concurrency + +## Install + +``` +$ npm install p-limit +``` + +## Usage + +```js +const pLimit = require('p-limit'); + +const limit = pLimit(1); + +const input = [ + limit(() => fetchSomething('foo')), + limit(() => fetchSomething('bar')), + limit(() => doSomething()) +]; + +(async () => { + // Only one promise is run at once + const result = await Promise.all(input); + console.log(result); +})(); +``` + +## API + +### pLimit(concurrency) + +Returns a `limit` function. + +#### concurrency + +Type: `number`\ +Minimum: `1`\ +Default: `Infinity` + +Concurrency limit. + +### limit(fn, ...args) + +Returns the promise returned by calling `fn(...args)`. + +#### fn + +Type: `Function` + +Promise-returning/async function. + +#### args + +Any arguments to pass through to `fn`. + +Support for passing arguments on to the `fn` is provided in order to be able to avoid creating unnecessary closures. You probably don't need this optimization unless you're pushing a *lot* of functions. + +### limit.activeCount + +The number of promises that are currently running. + +### limit.pendingCount + +The number of promises that are waiting to run (i.e. their internal `fn` was not called yet). + +### limit.clearQueue() + +Discard pending promises that are waiting to run. + +This might be useful if you want to teardown the queue at the end of your program's lifecycle or discard any function calls referencing an intermediary state of your app. + +Note: This does not cancel promises that are already running. + +## FAQ + +### How is this different from the [`p-queue`](https://github.com/sindresorhus/p-queue) package? + +This package is only about limiting the number of concurrent executions, while `p-queue` is a fully featured queue implementation with lots of different options, introspection, and ability to pause the queue. + +## Related + +- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control +- [p-throttle](https://github.com/sindresorhus/p-throttle) - Throttle promise-returning & async functions +- [p-debounce](https://github.com/sindresorhus/p-debounce) - Debounce promise-returning & async functions +- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency +- [More…](https://github.com/sindresorhus/promise-fun) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/eslint/node_modules/p-locate/index.d.ts b/node_modules/eslint/node_modules/p-locate/index.d.ts new file mode 100644 index 000000000..38c7e578f --- /dev/null +++ b/node_modules/eslint/node_modules/p-locate/index.d.ts @@ -0,0 +1,53 @@ +declare namespace pLocate { + interface Options { + /** + Number of concurrently pending promises returned by `tester`. Minimum: `1`. + + @default Infinity + */ + readonly concurrency?: number; + + /** + Preserve `input` order when searching. + + Disable this to improve performance if you don't care about the order. + + @default true + */ + readonly preserveOrder?: boolean; + } +} + +/** +Get the first fulfilled promise that satisfies the provided testing function. + +@param input - An iterable of promises/values to test. +@param tester - This function will receive resolved values from `input` and is expected to return a `Promise` or `boolean`. +@returns A `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +@example +``` +import pathExists = require('path-exists'); +import pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' +})(); +``` +*/ +declare function pLocate( + input: Iterable | ValueType>, + tester: (element: ValueType) => PromiseLike | boolean, + options?: pLocate.Options +): Promise; + +export = pLocate; diff --git a/node_modules/eslint/node_modules/p-locate/index.js b/node_modules/eslint/node_modules/p-locate/index.js new file mode 100644 index 000000000..641c3dd1e --- /dev/null +++ b/node_modules/eslint/node_modules/p-locate/index.js @@ -0,0 +1,50 @@ +'use strict'; +const pLimit = require('p-limit'); + +class EndError extends Error { + constructor(value) { + super(); + this.value = value; + } +} + +// The input can also be a promise, so we await it +const testElement = async (element, tester) => tester(await element); + +// The input can also be a promise, so we `Promise.all()` them both +const finder = async element => { + const values = await Promise.all(element); + if (values[1] === true) { + throw new EndError(values[0]); + } + + return false; +}; + +const pLocate = async (iterable, tester, options) => { + options = { + concurrency: Infinity, + preserveOrder: true, + ...options + }; + + const limit = pLimit(options.concurrency); + + // Start all the promises concurrently with optional limit + const items = [...iterable].map(element => [element, limit(testElement, element, tester)]); + + // Check the promises either serially or concurrently + const checkLimit = pLimit(options.preserveOrder ? 1 : Infinity); + + try { + await Promise.all(items.map(element => checkLimit(finder, element))); + } catch (error) { + if (error instanceof EndError) { + return error.value; + } + + throw error; + } +}; + +module.exports = pLocate; diff --git a/node_modules/eslint/node_modules/p-locate/license b/node_modules/eslint/node_modules/p-locate/license new file mode 100644 index 000000000..fa7ceba3e --- /dev/null +++ b/node_modules/eslint/node_modules/p-locate/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/eslint/node_modules/p-locate/package.json b/node_modules/eslint/node_modules/p-locate/package.json new file mode 100644 index 000000000..2d5e447f5 --- /dev/null +++ b/node_modules/eslint/node_modules/p-locate/package.json @@ -0,0 +1,54 @@ +{ + "name": "p-locate", + "version": "5.0.0", + "description": "Get the first fulfilled promise that satisfies the provided testing function", + "license": "MIT", + "repository": "sindresorhus/p-locate", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "promise", + "locate", + "find", + "finder", + "search", + "searcher", + "test", + "array", + "collection", + "iterable", + "iterator", + "race", + "fulfilled", + "fastest", + "async", + "await", + "promises", + "bluebird" + ], + "dependencies": { + "p-limit": "^3.0.2" + }, + "devDependencies": { + "ava": "^2.4.0", + "delay": "^4.1.0", + "in-range": "^2.0.0", + "time-span": "^4.0.0", + "tsd": "^0.13.1", + "xo": "^0.32.1" + } +} diff --git a/node_modules/eslint/node_modules/p-locate/readme.md b/node_modules/eslint/node_modules/p-locate/readme.md new file mode 100644 index 000000000..be85ec1d4 --- /dev/null +++ b/node_modules/eslint/node_modules/p-locate/readme.md @@ -0,0 +1,93 @@ +# p-locate [![Build Status](https://travis-ci.com/sindresorhus/p-locate.svg?branch=master)](https://travis-ci.com/github/sindresorhus/p-locate) + +> Get the first fulfilled promise that satisfies the provided testing function + +Think of it like an async version of [`Array#find`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find). + +## Install + +``` +$ npm install p-locate +``` + +## Usage + +Here we find the first file that exists on disk, in array order. + +```js +const pathExists = require('path-exists'); +const pLocate = require('p-locate'); + +const files = [ + 'unicorn.png', + 'rainbow.png', // Only this one actually exists on disk + 'pony.png' +]; + +(async () => { + const foundPath = await pLocate(files, file => pathExists(file)); + + console.log(foundPath); + //=> 'rainbow' +})(); +``` + +*The above is just an example. Use [`locate-path`](https://github.com/sindresorhus/locate-path) if you need this.* + +## API + +### pLocate(input, tester, options?) + +Returns a `Promise` that is fulfilled when `tester` resolves to `true` or the iterable is done, or rejects if any of the promises reject. The fulfilled value is the current iterable value or `undefined` if `tester` never resolved to `true`. + +#### input + +Type: `Iterable` + +An iterable of promises/values to test. + +#### tester(element) + +Type: `Function` + +This function will receive resolved values from `input` and is expected to return a `Promise` or `boolean`. + +#### options + +Type: `object` + +##### concurrency + +Type: `number`\ +Default: `Infinity`\ +Minimum: `1` + +Number of concurrently pending promises returned by `tester`. + +##### preserveOrder + +Type: `boolean`\ +Default: `true` + +Preserve `input` order when searching. + +Disable this to improve performance if you don't care about the order. + +## Related + +- [p-map](https://github.com/sindresorhus/p-map) - Map over promises concurrently +- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently +- [p-any](https://github.com/sindresorhus/p-any) - Wait for any promise to be fulfilled +- [More…](https://github.com/sindresorhus/promise-fun) + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/eslint/package.json b/node_modules/eslint/package.json index 34a6e01f3..a51b58b24 100644 --- a/node_modules/eslint/package.json +++ b/node_modules/eslint/package.json @@ -1,145 +1,170 @@ { - "_from": "eslint@^7.22.0", - "_id": "eslint@7.23.0", - "_inBundle": false, - "_integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", - "_location": "/eslint", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "eslint@^7.22.0", - "name": "eslint", - "escapedName": "eslint", - "rawSpec": "^7.22.0", - "saveSpec": null, - "fetchSpec": "^7.22.0" + "name": "eslint", + "version": "8.57.0", + "author": "Nicholas C. Zakas ", + "description": "An AST-based pattern checker for JavaScript.", + "bin": { + "eslint": "./bin/eslint.js" }, - "_requiredBy": [ - "#DEV:/" - ], - "_resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "_shasum": "8d029d252f6e8cf45894b4bee08f5493f8e94325", - "_spec": "eslint@^7.22.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess", - "author": { - "name": "Nicholas C. Zakas", - "email": "nicholas+npm@nczconsulting.com" + "main": "./lib/api.js", + "exports": { + "./package.json": "./package.json", + ".": "./lib/api.js", + "./use-at-your-own-risk": "./lib/unsupported-api.js" }, - "bin": { - "eslint": "bin/eslint.js" + "scripts": { + "build:docs:update-links": "node tools/fetch-docs-links.js", + "build:site": "node Makefile.js gensite", + "build:webpack": "node Makefile.js webpack", + "build:readme": "node tools/update-readme.js", + "lint": "node Makefile.js lint", + "lint:docs:js": "node Makefile.js lintDocsJS", + "lint:docs:rule-examples": "node Makefile.js checkRuleExamples", + "lint:fix": "node Makefile.js lint -- fix", + "lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix", + "release:generate:alpha": "node Makefile.js generatePrerelease -- alpha", + "release:generate:beta": "node Makefile.js generatePrerelease -- beta", + "release:generate:latest": "node Makefile.js generateRelease", + "release:generate:rc": "node Makefile.js generatePrerelease -- rc", + "release:publish": "node Makefile.js publishRelease", + "test": "node Makefile.js test", + "test:cli": "mocha", + "test:fuzz": "node Makefile.js fuzz", + "test:performance": "node Makefile.js perf" }, - "bugs": { - "url": "https://github.com/eslint/eslint/issues/" + "gitHooks": { + "pre-commit": "lint-staged" }, - "bundleDependencies": false, + "lint-staged": { + "*.js": "eslint --fix", + "*.md": "markdownlint --fix", + "lib/rules/*.js": [ + "node tools/update-eslint-all.js", + "git add packages/js/src/configs/eslint-all.js" + ], + "docs/src/rules/*.md": [ + "node tools/check-rule-examples.js", + "node tools/fetch-docs-links.js", + "git add docs/src/_data/further_reading_links.json" + ], + "docs/**/*.svg": "npx svgo -r --multipass" + }, + "files": [ + "LICENSE", + "README.md", + "bin", + "conf", + "lib", + "messages" + ], + "repository": "eslint/eslint", + "funding": "https://opencollective.com/eslint", + "homepage": "https://eslint.org", + "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", - "ajv": "^6.10.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, - "deprecated": false, - "description": "An AST-based pattern checker for JavaScript.", "devDependencies": { "@babel/core": "^7.4.3", "@babel/preset-env": "^7.4.3", - "acorn": "^7.2.0", + "@wdio/browser-runner": "^8.14.6", + "@wdio/cli": "^8.14.6", + "@wdio/concise-reporter": "^8.14.0", + "@wdio/globals": "^8.14.6", + "@wdio/mocha-framework": "^8.14.0", "babel-loader": "^8.0.5", + "c8": "^7.12.0", "chai": "^4.0.1", "cheerio": "^0.22.0", "common-tags": "^1.8.0", "core-js": "^3.1.3", - "dateformat": "^3.0.3", "ejs": "^3.0.2", - "escape-string-regexp": "^3.0.0", "eslint": "file:.", "eslint-config-eslint": "file:packages/eslint-config-eslint", - "eslint-plugin-eslint-plugin": "^2.2.1", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-eslint-plugin": "^5.2.1", "eslint-plugin-internal-rules": "file:tools/internal-rules", - "eslint-plugin-jsdoc": "^25.4.3", - "eslint-plugin-node": "^11.1.0", - "eslint-release": "^2.0.0", - "eslump": "^2.0.0", + "eslint-plugin-jsdoc": "^46.2.5", + "eslint-plugin-n": "^16.6.0", + "eslint-plugin-unicorn": "^49.0.0", + "eslint-release": "^3.2.0", + "eslump": "^3.0.0", "esprima": "^4.0.1", - "fs-teardown": "^0.1.0", + "fast-glob": "^3.2.11", + "fs-teardown": "^0.1.3", "glob": "^7.1.6", - "jsdoc": "^3.5.5", - "karma": "^6.1.1", - "karma-chrome-launcher": "^3.1.0", - "karma-mocha": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", - "karma-webpack": "^5.0.0", - "lint-staged": "^10.1.2", + "got": "^11.8.3", + "gray-matter": "^4.0.3", + "lint-staged": "^11.0.0", "load-perf": "^0.2.0", - "markdownlint": "^0.19.0", - "markdownlint-cli": "^0.22.0", + "markdown-it": "^12.2.0", + "markdown-it-container": "^3.0.0", + "markdownlint": "^0.32.0", + "markdownlint-cli": "^0.37.0", + "marked": "^4.0.8", "memfs": "^3.0.1", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.23.0", + "metascraper": "^5.25.7", + "metascraper-description": "^5.25.7", + "metascraper-image": "^5.29.3", + "metascraper-logo": "^5.25.7", + "metascraper-logo-favicon": "^5.25.7", + "metascraper-title": "^5.25.7", + "mocha": "^8.3.2", + "mocha-junit-reporter": "^2.0.0", "node-polyfill-webpack-plugin": "^1.0.3", "npm-license": "^0.3.3", - "nyc": "^15.0.1", + "pirates": "^4.0.5", + "progress": "^2.0.3", "proxyquire": "^2.0.1", - "puppeteer": "^7.1.0", - "recast": "^0.19.0", - "regenerator-runtime": "^0.13.2", + "recast": "^0.23.0", + "regenerator-runtime": "^0.14.0", + "rollup-plugin-node-polyfills": "^0.2.1", + "semver": "^7.5.3", "shelljs": "^0.8.2", - "sinon": "^9.0.1", - "temp": "^0.9.0", + "sinon": "^11.0.0", + "vite-plugin-commonjs": "^0.10.0", + "webdriverio": "^8.14.6", "webpack": "^5.23.0", "webpack-cli": "^4.5.0", "yorkie": "^2.0.0" }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "files": [ - "LICENSE", - "README.md", - "bin", - "conf", - "lib", - "messages" - ], - "funding": "https://opencollective.com/eslint", - "gitHooks": { - "pre-commit": "lint-staged" - }, - "homepage": "https://eslint.org", "keywords": [ "ast", "lint", @@ -148,34 +173,7 @@ "espree" ], "license": "MIT", - "lint-staged": { - "*.js": [ - "eslint --fix", - "git add" - ], - "*.md": "markdownlint" - }, - "main": "./lib/api.js", - "name": "eslint", - "repository": { - "type": "git", - "url": "git+https://github.com/eslint/eslint.git" - }, - "scripts": { - "docs": "node Makefile.js docs", - "fix": "node Makefile.js lint -- fix", - "fuzz": "node Makefile.js fuzz", - "generate-alpharelease": "node Makefile.js generatePrerelease -- alpha", - "generate-betarelease": "node Makefile.js generatePrerelease -- beta", - "generate-rcrelease": "node Makefile.js generatePrerelease -- rc", - "generate-release": "node Makefile.js generateRelease", - "gensite": "node Makefile.js gensite", - "lint": "node Makefile.js lint", - "perf": "node Makefile.js perf", - "publish-release": "node Makefile.js publishRelease", - "test": "node Makefile.js test", - "test:cli": "mocha", - "webpack": "node Makefile.js webpack" - }, - "version": "7.23.0" + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } } diff --git a/node_modules/espree/CHANGELOG.md b/node_modules/espree/CHANGELOG.md deleted file mode 100644 index 85409ca47..000000000 --- a/node_modules/espree/CHANGELOG.md +++ /dev/null @@ -1,509 +0,0 @@ -v7.3.1 - December 5, 2020 - -* [`fef6f4a`](https://github.com/eslint/espree/commit/fef6f4a2803d959304c6961527044bd9da39ac92) Upgrade: acorn-jsx@5.3.1 (#459) (Milos Djermanovic) -* [`0e09d9a`](https://github.com/eslint/espree/commit/0e09d9a4f213cb87073a6a87cb7d6317b77d1a23) Chore: Add tests for ecmaVersion default value (#460) (Milos Djermanovic) -* [`4c70052`](https://github.com/eslint/espree/commit/4c70052df0b0ba903602c1f838918cbc07ee5eca) Docs: Fix some minor typos in the READMEs (#455) (Noah Doersing) - -v7.3.0 - August 22, 2020 - -* [`4ba3eef`](https://github.com/eslint/espree/commit/4ba3eefdc4b32784565822b34f11977e99ca1a19) Chore: move to GitHub Actions (#449) (Kai Cataldo) -* [`bd0a405`](https://github.com/eslint/espree/commit/bd0a405ffbe4962bcf5aa225ed3861a6a15cb827) Update: support logical assignment and numeric separators (#448) (Toru Nagashima) - -v7.2.0 - July 17, 2020 - -* [`91c2d58`](https://github.com/eslint/espree/commit/91c2d5896889042058399cd64de4b218c5add0eb) Docs: Add security policy (#447) (Nicholas C. Zakas) -* [`872645c`](https://github.com/eslint/espree/commit/872645cea0bee08960b93c097f84153d44b44d7f) Update: support optional chaining (#446) (Toru Nagashima) -* [`0cc7800`](https://github.com/eslint/espree/commit/0cc78007c933564f32fd849bd8022992845c3ac1) Docs: Clean up LICENSE file (#445) (Nicholas C. Zakas) - -v7.1.0 - June 4, 2020 - -* [`75e80bc`](https://github.com/eslint/espree/commit/75e80bc1b5a100f64b09b2c7bf47c5168417d890) Update: support `??` operator, `import.meta`, and `export * as ns` (#441) (Toru Nagashima) -* [`ad0543c`](https://github.com/eslint/espree/commit/ad0543c8b9f6981857ebebf23a37589a656e61a6) Chore: added fixlint in Makefile.js (#440) (Anix) - -v7.0.0 - May 7, 2020 - -* [`8fe2efc`](https://github.com/eslint/espree/commit/8fe2efc00902e7f1680af00a6279e1aecb3c5b47) Breaking: drop Node v8 support (#429) (Kai Cataldo) -* [`6048bfe`](https://github.com/eslint/espree/commit/6048bfe3939fa7dc162c0b3c4b043bb410736b0b) Docs: documenting public API (fixes #431) (#442) (Anix) -* [`9a4cff3`](https://github.com/eslint/espree/commit/9a4cff3626d50a88428ca1b66610a2bdedd774dd) Chore: added tests for options normalize (#439) (Anix) -* [`99707f3`](https://github.com/eslint/espree/commit/99707f3f9d337ca719dce5720106f98b65bba7b1) Chore: added lockfiles to .gitignore (#438) (Anix) -* [`9b91bcc`](https://github.com/eslint/espree/commit/9b91bccacea15c75025a62bae828f83598aef5fe) Docs: new site for docs (#436) (Anix) - -v6.2.1 - March 10, 2020 - -* [`d6d7480`](https://github.com/eslint/espree/commit/d6d7480e424960159007caea86f209f696138734) Upgrade: acorn 7.1.1, Regex DOS vuln (fixes #435) (#434) (James) - -v6.2.0 - March 2, 2020 - -* [`ced1b68`](https://github.com/eslint/espree/commit/ced1b6810b991531e6d3788ebd5a322fc5c7d463) Update: update acorn-jsx and fix failing test (#432) (Kai Cataldo) -* [`acb8776`](https://github.com/eslint/espree/commit/acb8776d369abf9e02f79142879e9b1a4774f938) Update: add latestEcmaVersion & supportedEcmaVersions (#430) (Kai Cataldo) - -v6.1.2 - October 20, 2019 - -* [`70c4970`](https://github.com/eslint/espree/commit/70c4970e5eba6f060e1e32a22d231647f2d0e0f8) Fix: misuse token types (fixes #393, refs eslint/eslint#11018) (#426) (Toru Nagashima) - -v6.1.1 - August 23, 2019 - -* [`ba81546`](https://github.com/eslint/espree/commit/ba81546e8552ec0f779aae7e03668c334630484e) Upgrade: dev deps to latest (#424) (薛定谔的猫) -* [`bbe0119`](https://github.com/eslint/espree/commit/bbe01195fb57e24634d18825d39b820ed1767e95) Upgrade: acorn-jsx@5.0.2 (#423) (薛定谔的猫) -* [`c0635ba`](https://github.com/eslint/espree/commit/c0635bac4cd891cb612fb81655012e2579f4e2b1) Docs: update readme to mention ES2020 (#422) (Kai Cataldo) - -v6.1.0 - August 18, 2019 - -* [`9870c55`](https://github.com/eslint/espree/commit/9870c553efd3eb1bd22b4b3bb5220896c5cb6933) Update: improve error messaging when validating ecmaVersion (#421) (Kai Cataldo) -* [`3f49224`](https://github.com/eslint/espree/commit/3f49224eb05f6b8cb1b996ce424a99c40978b389) Fix: tokenize the latest right curly brace (fixes #403) (#419) (finico) -* [`f5e58cc`](https://github.com/eslint/espree/commit/f5e58cc5e9030793baca3426366b8d7286ef5b89) Update: support bigint and dynamic import (#415) (Toru Nagashima) - -v6.0.0 - June 21, 2019 - -* [`a988a36`](https://github.com/eslint/espree/commit/a988a36e436a1ab6c84005ba0adb6cf9c262c1ec) Build: add node 12 (#414) (薛定谔的猫) - -v6.0.0-alpha.0 - April 12, 2019 - -* [`493d464`](https://github.com/eslint/espree/commit/493d464e1564aea0ea33000389771d42ddece2cb) Breaking: validate parser options (fixes #384) (#412) (薛定谔的猫) - -v5.0.1 - February 15, 2019 - -* [`c40e2fc`](https://github.com/eslint/espree/commit/c40e2fcedf81ff06151e82bdf655d2d0d29e71b8) Upgrade: acorn@6.0.7 (#407) (Kai Cataldo) - -v5.0.0 - December 5, 2018 - -* [`1bcd563`](https://github.com/eslint/espree/commit/1bcd563d4eb4b4032d2662cc5ccd3bfd841b39d7) Breaking: remove attachComment (#405) (Kai Cataldo) -* [`35623ee`](https://github.com/eslint/espree/commit/35623ee07289c9199eef8b735c97cb3d3d08d5b8) Chore: update linting config (#406) (Kai Cataldo) -* [`4b86a7d`](https://github.com/eslint/espree/commit/4b86a7dc7c447c11bb6530e46dc43428ce2bd372) Build: add node 11 (#400) (薛定谔的猫) -* [`7c278d6`](https://github.com/eslint/espree/commit/7c278d6acc6b5db86b803d0cd21b830deb6f569e) Fix: build failing due to incorrectly super() call (fixes #398) (#399) (薛定谔的猫) -* [`6ebc219`](https://github.com/eslint/espree/commit/6ebc21947166399a0b4918d4a1beb9d610650336) Upgrade: eslint & eslint-config-eslint (#387) (薛定谔的猫) - -v4.1.0 - October 24, 2018 - -* 8eadb88 Upgrade: acorn 6, acorn-jsx 5, and istanbul (#391) (Toru Nagashima) -* 0f2edb8 Upgrade: eslint-release@1.0.0 (#392) (Teddy Katz) -* 560b6f7 Update: VisitorKeys depend on eslint-visitor-keys (#389) (othree) -* 6bf2ebf Docs: Fix some typos in the README (#386) (Hugo Locurcio) - -v4.0.0 - June 21, 2018 - - - -v4.0.0-rc.0 - June 9, 2018 - -* d8224c4 Build: Adding rc release script to package.json (#383) (Kevin Partington) -* 4207773 Build: add node 10 (#381) (薛定谔的猫) -* cd9da7e Update: upgrade acorn to support two ES2019 syntax (#380) (Toru Nagashima) -* 8cb3ceb Chore: remove Object.assign polyfill (#382) (薛定谔的猫) - -v4.0.0-alpha.1 - May 28, 2018 - -* 56c5a9c Fix: remove workarounds for acorn < 4 (#372) (Rouven Weßling) -* fd305e5 Upgrade: eslint-release to v0.11.1 (#376) (Teddy Katz) - -v4.0.0-alpha.0 - March 30, 2018 - -* 95fa890 Build: fix typos in package.json release scripts (#375) (Teddy Katz) -* 6284e09 Breaking: remove experimentalObjectRestSpread option (#374) (Teddy Katz) -* 0df063f Breaking: require Node.js 6+, upgrade acorn-jsx@4.1.1 (fixes #345) (#371) (薛定谔的猫) -* 0252144 Upgrade: acorn 5.5.1 (#370) (Rouven Weßling) - -v3.5.4 - March 4, 2018 - -* 706167b Upgrade: acorn 5.5.0 (#369) (Toru Nagashima) - -v3.5.3 - February 2, 2018 - -* 70f9859 Upgrade: acorn 5.4.0 (#367) (Toru Nagashima) -* cea4823 Chore: Adding .gitattributes file (#366) (Kevin Partington) -* 4160aee Upgrade: acorn v5.3.0 (#365) (Toru Nagashima) - -v3.5.2 - November 10, 2017 - -* 019b70a Fix: Remove blockBindings from docs (fixes #307, fixes #339) (#356) (Jan Pilzer) -* b2016cb Chore: refactoring rest/spread properties (#361) (Toru Nagashima) -* 59c9d06 Chore: upgrade acorn@5.2 (fixes #358) (#360) (Toru Nagashima) -* 06c35c9 Chore: add .npmrc (#359) (Toru Nagashima) - -v3.5.1 - September 15, 2017 - -* 5eb1388 Fix: Fix parsing of async keyword-named object methods (#352) (#353) (Mark Banner) - -v3.5.0 - August 5, 2017 - -* 4d442a1 Update: add initial support for ES2018 (#348) (Teddy Katz) -* d4bdcb6 Fix: Make template token objects adhere to token object structure (#343) (Ian Christian Myers) -* 9ac671a Upgrade: acorn to 5.1.1 (#347) (Teddy Katz) -* 16e1fec Docs: Specify default values of options (fixes #325) (#342) (Jan Pilzer) -* be85b8e Fix: async shorthand properties (fixes #340) (#341) (Toru Nagashima) - -v3.4.3 - May 5, 2017 - -* 343590a Fix: add AwaitExpression to espree.Syntax (fixes #331) (#332) (Teddy Katz) - -v3.4.2 - April 21, 2017 - -* c99e436 Upgrade: eslint to 2.13.1 (#328) (Teddy Katz) -* 628cf3a Fix: don't mutate user-provided configs (fixes #329) (#330) (Teddy Katz) - -v3.4.1 - March 31, 2017 - -* a3ae0bd Upgrade: acorn to 5.0.1 (#327) (Teddy Katz) -* 15ef24f Docs: Add badges (#326) (Jan Pilzer) -* 652990a Fix: raise error for trailing commas after rest properties (fixes #310) (#323) (Teddy Katz) -* 9d86ba5 Upgrade: acorn to ^4.0.11 (#317) (Toru Nagashima) -* a3442b5 Chore: fix tests for Node 6+ (#315) (Teddy Katz) - -v3.4.0 - February 2, 2017 - -* f55fa51 Build: Lock acorn to v4.0.4 (#314) (Kai Cataldo) -* 58f75be Fix:generic error for invalid ecmaVersion(fixes eslint#7405) (#303) (Scott Stern) -* d6b383d Docs: Update license copyright (Nicholas C. Zakas) -* e5df542 Update: To support year in ecmaVersion number (fixes #300) (#301) (Gyandeep Singh) - -v3.3.2 - September 29, 2016 - -* 7d3e2fc Fix: reset `isAsync` flag for each property (fixes #298) (#299) (Toru Nagashima) - -v3.3.1 - September 26, 2016 - -* 80abdce Fix: `}` token followed by template had been lost (fixes #293) (#294) (Toru Nagashima) -* 9810bab Fix: parsing error on `async` as property name. (#295) (Toru Nagashima) - -v3.3.0 - September 20, 2016 - -* 92b04b1 Update: create-test script (fixes #291) (#292) (Jamund Ferguson) - -v3.2.0 - September 16, 2016 - -* 5a37f80 Build: Update release tool (Nicholas C. Zakas) -* 9bbcad8 Update: Upgrade Acorn to support ES2017 (fixes #287) (#290) (Jamund Ferguson) -* 8d9767d Build: Add CI release scripts (Nicholas C. Zakas) - -v3.1.7 - July 29, 2016 - -* 8f6cfbd Build: Add CI release (Nicholas C. Zakas) -* ff15922 Fix: Catch ES2016 invalid syntax (fixes #284) (#285) (Nicholas C. Zakas) - -v3.1.6 - June 15, 2016 - -* a90edc2 Upgrade: acorn 3.2.0 (fixes #279) (#280) (Toru Nagashima) - -v3.1.5 - May 27, 2016 - -* 7df2e4a Fix: Convert ~ and ! prefix tokens to esprima (fixes #274) (#276) (Daniel Tschinder) - -v3.1.4 - April 21, 2016 - -* e044705 Fix: remove extra leading comments at node level (fixes #264) (Kai Cataldo) -* 25c27fb Chore: Remove jQuery copyright from header of each file (Kai Cataldo) -* 10709f0 Chore: Add jQuery Foundation copyright (Nicholas C. Zakas) -* d754b32 Upgrade: Acorn 3.1.0 (fixes #270) (Toru Nagashima) -* 3a90886 Docs: replace a dead link with the correct contributing guide URL (Shinnosuke Watanabe) -* 55184a2 Build: replace optimist with a simple native method (Shinnosuke Watanabe) -* c7e5a13 Fix: Disallow namespaces objects in JSX (fixes #261) (Kai Cataldo) -* 22290b9 Fix: Add test for leading comments (fixes #136) (Kai Cataldo) - -v3.1.3 - March 18, 2016 - -* 98441cb Fix: Fix behavior of ignoring comments within previous nodes (refs #256) (Kai Cataldo) - -v3.1.2 - March 14, 2016 - -* a2b23ca Fix: Ensure 'var let' works (fixes #149) (Nicholas C. Zakas) -* 5783282 Fix: Make obj.await work in modules (fixes #258) (Nicholas C. Zakas) -* d1b4929 Fix: leading comments added from previous node (fixes #256) (Kai Cataldo) - -v3.1.1 - February 26, 2016 - -* 3614e81 Fix: exponentiation operator token (fixes #254) (Nicholas C. Zakas) - -v3.1.0 - February 25, 2016 - -* da35d98 New: Support ecmaVersion 7 (fixes #246) (Nicholas C. Zakas) - -v3.0.2 - February 19, 2016 - -* 0973cda Build: Update release script (Nicholas C. Zakas) -* 106000f Fix: use the plugins feature of acorn (fixes #250) (Toru Nagashima) -* 36d84c7 Build: Add tests (fixes #243) (Nicholas C. Zakas) - -v3.0.1 - February 2, 2016 - -* ecfe4c8 Upgrade: eslint-config-eslint to 3.0.0 (Nicholas C. Zakas) -* ea6261e Fix: Object rest/spread in assign (fixes #247) (Nicholas C. Zakas) -* 7e57ee0 Docs: fix `options.comment` typo (xuezu) -* dd5863e Build: Add prerelease script (Nicholas C. Zakas) -* 0b409ee Upgrade: eslint-release to 0.2.0 (Nicholas C. Zakas) - -v3.0.0 - January 20, 2016 - -* 5ff65f6 Upgrade: Change Esprima version to latest (Nicholas C. Zakas) -* a8badcc Upgrade: eslint-release to 0.1.4 (Nicholas C. Zakas) -* 34d195b Build: Switch to eslint-release (Nicholas C. Zakas) -* a0ddc30 Breaking: Remove binary scripts (Nicholas C. Zakas) -* 02b5284 Build: Fix package.json dependencies (Nicholas C. Zakas) -* b07696f Fix: tests for importing keywords (fixes #225) (Toru Nagashima) -* 2e2808a Build: Add node@5 to CI (fixes #237) (alberto) -* 445c685 Update: Unrecognized license format in package.json (fixes #234) (alberto) -* 61cb5ee Update: Remove duplicated acorn-jsx dep (fixes #232) (alberto) -* df5b71c Upgrade: eslint and eslint-config-eslint (fixes #231) (alberto) -* ef7a06d Fix: lastToken not reset between calls to parse (fixes #229) (alberto) -* cdf8407 New: ecmaFeatures.impliedStrict (fixes: #227) (Nick Evans) - -v3.0.0-alpha-2 - December 9, 2015 - -* 3.0.0-alpha-2 (Nicholas C. Zakas) -* Breaking: move ecmaFeatures into ecmaVersion (fixes #222) (Nicholas C. Zakas) -* New: Export VisitorKeys (fixes #220) (Nicholas C. Zakas) - -v3.0.0-alpha-1 - December 1, 2015 - -* 3.0.0-alpha-1 (Nicholas C. Zakas) -* Fix: parse unicode escapes in identifiers (fixes #181) (Nicholas C. Zakas) -* Fix: Ensur object rest works in destructed arg (fixes #213) (Nicholas C. Zakas) -* Breaking: Switch to Acorn (fixes #200) (Nicholas C. Zakas) -* Update: Add tokens to tests (fixes #203) (Nicholas C. Zakas) -* Docs: Update README (Nicholas C. Zakas) - -v2.2.5 - September 15, 2015 - -* 2.2.5 (Nicholas C. Zakas) -* Fix: Ensure node type is correct for destructured (fixes #195) (Nicholas C. Zakas) - -v2.2.4 - August 13, 2015 - -* 2.2.4 (Nicholas C. Zakas) -* Fix: newlines in arrow functions (fixes #172) (Jamund Ferguson) -* Fix: nested arrow function as default param (fixes #145) (Jamund Ferguson) -* Fix: Rest Params & Arrow Functions (fixes #187) (Jamund Ferguson) -* Fix: trailing commas in import/export (fixes #148) (Jamund Ferguson) -* Build: Added sudo false to Travis to build faster (fixes #177) (KahWee Teng) - -v2.2.3 - July 22, 2015 - -* 2.2.3 (Nicholas C. Zakas) -* Fix: Incorrect error location (fixes #173) (Nicholas C. Zakas) - -v2.2.2 - July 16, 2015 - -* 2.2.2 (Nicholas C. Zakas) -* 2.2.1 (Nicholas C. Zakas) -* Fix: Yield as identifier in arrow func args (fixes #165) (Nicholas C. Zakas) -* Fix: Allow AssignmentExpression in object spread (fixes #167) (Nicholas C. Zakas) - -v2.2.1 - July 16, 2015 - -* 2.2.1 (Nicholas C. Zakas) - -v2.2.0 - July 15, 2015 - -* 2.2.0 (Nicholas C. Zakas) -* New: Add experimental object rest/spread (fixes #163) (Nicholas C. Zakas) -* Fix: npm browserify (fixes #156) (Jason Laster) - -v2.1.0 - July 10, 2015 - -* 2.1.0 (Nicholas C. Zakas) -* Fix: Leading comments for anonymous classes (fixes #155, fixes #158) (Toru Nagashima) -* New: Add newTarget option (fixes #157) (Nicholas C. Zakas) - -v2.0.4 - June 26, 2015 - -* 2.0.4 (Nicholas C. Zakas) -* Docs: added missing `ecmaFeatures.superInFunctions` option from doc (Clément Fiorio) -* Fix: "await" is a future reserved word (fixes #151) (Jose Roberto Vidal) - -v2.0.3 - June 2, 2015 - -* 2.0.3 (Nicholas C. Zakas) -* Fix: Incomplete Switch Statement Hangs (Fixes #146) (Jamund Ferguson) -* Docs: Clarify ecmaFeatures usage (Dan Wolff) - -v2.0.2 - April 28, 2015 - -* 2.0.2 (Nicholas C. Zakas) -* Fix: Allow yield without value as function param (fixes #134) (Nicholas C. Zakas) -* Fix: Allow computed generators in classes (fixes #123) (Nicholas C. Zakas) -* Fix: Don't allow arrow function rest param (fixes #130) (Nicholas C. Zakas) - -v2.0.1 - April 11, 2015 - -* 2.0.1 (Nicholas C. Zakas) -* Fix: Yield should parse without an argument (fixes #121) (Nicholas C. Zakas) - -v2.0.0 - April 4, 2015 - -* 2.0.0 (Nicholas C. Zakas) -* Docs: Update README with latest info (Nicholas C. Zakas) -* Breaking: Use ESTree format for default params (fixes #114) (Nicholas C. Zakas) -* New: Add Super node (fixes #115) (Nicholas C. Zakas) -* Breaking: Switch to RestElement for rest args (fixes #84) (Nicholas C. Zakas) -* Docs: Correct license info on README (fixes #117) (AJ Ortega) -* Breaking: Remove guardedHandlers/handlers from try (fixes #71) (Nicholas C. Zakas) - -v1.12.3 - March 28, 2015 - -* 1.12.3 (Nicholas C. Zakas) -* Fix: Tagged template strings (fixes #110) (Nicholas C. Zakas) - -v1.12.2 - March 21, 2015 - -* 1.12.2 (Nicholas C. Zakas) -* Fix: Destructured arg for catch (fixes #105) (Nicholas C. Zakas) - -v1.12.1 - March 21, 2015 - -* 1.12.1 (Nicholas C. Zakas) -* Fix: Disallow octals in template strings (fixes #96) (Nicholas C. Zakas) -* Fix: Template string parsing (fixes #95) (Nicholas C. Zakas) -* Fix: shorthand properties named get or set (fixes #100) (Brandon Mills) -* Fix: bad error in parsing invalid class setter (fixes #98) (Marsup) - -v1.12.0 - March 14, 2015 - -* 1.12.0 (Nicholas C. Zakas) -* Fix: Update broken tests (Nicholas C. Zakas) -* New: Add sourceType to Program node (fixes #93) (Nicholas C. Zakas) -* Allow spread in more places (fixes #89) (Nicholas C. Zakas) -* Fix: Deeply nested template literals (fixes #86) (Nicholas C. Zakas) -* Fix: Allow super in classes by default (fixes #87) (Nicholas C. Zakas) -* Fix: generator methods in classes (fixes #85) (Jamund Ferguson) -* Remove XJS note from Esprima-FB incompatibilities (Joe Lencioni) - -v1.11.0 - March 7, 2015 - -* 1.11.0 (Nicholas C. Zakas) -* Fix: Don't allow default export class by mistake (fixes #82) (Nicholas C. Zakas) -* Fix: Export default function should be FunctionDeclaration (fixes #81) (Nicholas C. Zakas) -* Fix: Ensure class declarations must have IDs outside of exports (refs #72) (Nicholas C. Zakas) -* Fix: export class expression support (refs #72) (Jamund Ferguson) -* Update: Add tests for sourceType=module (refs #72) (Nicholas C. Zakas) -* Fix: Class name should be id (fixes #78) (Nicholas C. Zakas) -* Fix: disallow import/export in functions (refs #72) (Jamund Ferguson) -* Test: strict mode enforced in modules (refs #72) (Jamund Ferguson) -* New: Add modules feature flag (refs #72) (Nicholas C. Zakas) -* merging upstream and solving conflicts for PR #43 (Caridy Patino) -* New: Add ES6 module support (fixes #35) (Caridy Patino) -* Update: Add TryStatement.handler (fixes #69) (Brandon Mills) -* Fix: Destructured Defaults (fixes #56) (Jamund Ferguson) -* Update: Refactor out comment attachment logic (Nicholas C. Zakas) - -v1.10.0 - March 1, 2015 - -* 1.10.0 (Nicholas C. Zakas) -* New: Support ES6 classes (refs #10) (Nicholas C. Zakas) -* Docs: Update README.md (Jamund Ferguson) - -v1.9.1 - February 21, 2015 - -* 1.9.1 (Nicholas C. Zakas) -* Fix: Allow let/const in switchcase (fixes #54) (Nicholas C. Zakas) - -v1.9.0 - February 21, 2015 - -* 1.9.0 (Nicholas C. Zakas) -* Fix: Extend property method range and loc to include params (fixes #36) (Brandon Mills) -* New: spread operator (refs #10) (Jamund Ferguson) -* Fix: incorrectly parsed arrow fragment (refs #58) (Jamund Ferguson) -* New: Rest Parameter (refs: #10) (Jamund Ferguson) -* New: Destructuring (refs #10) (Jamund Ferguson) - -v1.8.1 - February 7, 2015 - -* 1.8.1 (Nicholas C. Zakas) -* Build: Add Node.js 0.12 testing (Nicholas C. Zakas) -* Fix: Actuall fix tokenization issue with templates (fixes #44) (Nicholas C. Zakas) - -v1.8.0 - February 6, 2015 - -* 1.8.0 (Nicholas C. Zakas) -* New: Support for Arrow Functions (refs #10) (Jamund Ferguson) -* New: Allow super references in functions (refs #10) (Nicholas C. Zakas) -* Update create-test.js (Jamund Ferguson) -* Fix: Tokenization for template strings (fixes #44) (Nicholas C. Zakas) -* New: Allow return in global scope (fixes #46) (Nicholas C. Zakas) - -v1.7.1 - January 23, 2015 - -* 1.7.1 (Nicholas C. Zakas) -* Fix: When ecmaFeatures.forOf is true, check for operater is "undefined" when match keyword is "in" (fixes #39) (Peter Chanthamynavong) - -v1.7.0 - January 23, 2015 - -* 1.7.0 (Nicholas C. Zakas) -* New: Add support for template strings (FredKSchott) -* New: Add support for default parameters (refs #10) (Jamund Ferguson) -* New: Add support for unicode code point escape sequences (FredKSchott) - -v1.6.0 - January 10, 2015 - -* 1.6.0 (Nicholas C. Zakas) -* Update: Make comment attachment tests look at whole AST (Nicholas C. Zakas) -* Docs: Update README to reflect feature flags (Nicholas C. Zakas) -* Docs: Add a couple more FAQs to README (Nicholas C. Zakas) -* New: Add support for duplicate object literal properties (FredKSchott) -* New: Implement generators (refs #10) (Nicholas C. Zakas) - -v1.5.0 - December 29, 2014 - -* 1.5.0 (Nicholas C. Zakas) -* Docs: Update README with compat info (Nicholas C. Zakas) -* Update: Add regex parsing test (Nicholas C. Zakas) -* Update: s/XJS/JSX/g (Nicholas C. Zakas) -* Build: Update release script (Nicholas C. Zakas) -* Update: Move SyntaxTree to ast-node-factory.js (FredKSchott) -* New: Add JSX parsing (fixes #26) (Nicholas C. Zakas) -* Update: Switch location marker logic (fixes #15) (Nicholas C. Zakas) -* 1.4.0 (Nicholas C. Zakas) - -v1.4.0 - December 23, 2014 - -* 1.4.0 (Nicholas C. Zakas) -* Fix: Parsing issues with property methods (fixes #21) (Nicholas C. Zakas) -* New: Add support for shorthand properties (refs #10) (Nicholas C. Zakas) -* New: Add support for object literal method shorthand (refs #10) (Nicholas C. Zakas) -* Fix: Ensure comments are attached for return (fixes #2) (Nicholas C. Zakas) -* Build: Ensure CHANGELOG.md is committed on release (Nicholas C. Zakas) -* 1.3.1 (Nicholas C. Zakas) - -v1.3.1 - December 22, 2014 - -* 1.3.1 (Nicholas C. Zakas) -* Fix: Add all files to npm package (fixes #17) (Nicholas C. Zakas) -* Update: Move Messages to separate file (Nicholas C. Zakas) -* Docs: Removed unnecessary comment (Nicholas C. Zakas) -* 1.3.0 (Nicholas C. Zakas) - -v1.3.0 - December 21, 2014 - -* 1.3.0 (Nicholas C. Zakas) -* Build: Add release scripts (Nicholas C. Zakas) -* New: Add computed object literal properties (refs #10) (Nicholas C. Zakas) -* Build: Fix commands in Makefile.js (Nicholas C. Zakas) -* Docs: Add FAQ to README (Nicholas C. Zakas) -* Fix: Don't allow let/const in for loops (fixes #14) (Nicholas C. Zakas) -* New: Support for-of loops (refs #10) (Nicholas C. Zakas) -* Update: Change .ast.js files to .result.js files (Nicholas C. Zakas) -* New: Support ES6 octal literals (Nicholas C. Zakas) -* New: Ability to parse binary literals (Nicholas C. Zakas) -* Update: More tests for regex u flag (Nicholas C. Zakas) -* Update: Switch to using ecmaFeatures (Nicholas C. Zakas) -* Update: Add comment attachment tests (Nicholas C. Zakas) -* Update README.md (Jamund Ferguson) -* New: Add u and y regex flags (refs #10) (Nicholas C. Zakas) -* Update: Cleanup tests (Nicholas C. Zakas) -* New: Add ecmascript flag (fixes #7) (Nicholas C. Zakas) -* Docs: Update README with build commands (Nicholas C. Zakas) -* Update: Move some things around (Nicholas C. Zakas) -* Update: Read version number from package.json (Nicholas C. Zakas) -* Update: Move AST node types to separate file (Nicholas C. Zakas) -* Update: Remove duplicate file (Nicholas C. Zakas) -* Update: Move token information to a separate file (Nicholas C. Zakas) -* Update: Bring in Makefile.js for linting and browserify (Nicholas C. Zakas) -* Update: Fix ESLint warnings, remove check-version (Nicholas C. Zakas) -* Update: Move Position and SourceLocation to separate file (Nicholas C. Zakas) -* Update: Move syntax checks into separate file (Nicholas C. Zakas) -* Update: Remove UMD format (Nicholas C. Zakas) -* Docs: Update README with more info (Nicholas C. Zakas) -* Update: remove npm-debug.log from tracked files (Brandon Mills) -* Docs: Remove redundant 'features' in readme (Matthias Oßwald) -* Docs: Fix a link to Wikipedia (Ryuichi Okumura) -* Update: Split parsing tests into smaller files (Nicholas C. Zakas) -* Update: Normalize values in tests (Nicholas C. Zakas) -* Update: CommonJSify test file (Nicholas C. Zakas) diff --git a/node_modules/espree/README.md b/node_modules/espree/README.md index 72d88f833..87ace4c18 100644 --- a/node_modules/espree/README.md +++ b/node_modules/espree/README.md @@ -1,6 +1,6 @@ [![npm version](https://img.shields.io/npm/v/espree.svg)](https://www.npmjs.com/package/espree) -[![Build Status](https://travis-ci.org/eslint/espree.svg?branch=master)](https://travis-ci.org/eslint/espree) [![npm downloads](https://img.shields.io/npm/dm/espree.svg)](https://www.npmjs.com/package/espree) +[![Build Status](https://github.com/eslint/espree/workflows/CI/badge.svg)](https://github.com/eslint/espree/actions) [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=9348450)](https://www.bountysource.com/trackers/9348450-eslint?utm_source=9348450&utm_medium=shield&utm_campaign=TRACKER_BADGE) # Espree @@ -15,9 +15,17 @@ Install: npm i espree ``` -And in your Node.js code: +To use in an ESM file: -```javascript +```js +import * as espree from "espree"; + +const ast = espree.parse(code); +``` + +To use in a Common JS file: + +```js const espree = require("espree"); const ast = espree.parse(code); @@ -29,13 +37,13 @@ const ast = espree.parse(code); `parse` parses the given code and returns a abstract syntax tree (AST). It takes two parameters. -- `code` [string]() - the code which needs to be parsed. +- `code` [string]() - the code which needs to be parsed. - `options (Optional)` [Object]() - read more about this [here](#options). -```javascript -const espree = require("espree"); +```js +import * as espree from "espree"; -const ast = espree.parse(code, options); +const ast = espree.parse(code); ``` **Example :** @@ -73,7 +81,7 @@ Node { `tokenize` returns the tokens of a given code. It takes two parameters. -- `code` [string]() - the code which needs to be parsed. +- `code` [string]() - the code which needs to be parsed. - `options (Optional)` [Object]() - read more about this [here](#options). Even if `options` is empty or undefined or `options.tokens` is `false`, it assigns it to `true` in order to get the `tokens` array @@ -81,6 +89,8 @@ Even if `options` is empty or undefined or `options.tokens` is `false`, it assig **Example :** ```js +import * as espree from "espree"; + const tokens = espree.tokenize('let foo = "bar"', { ecmaVersion: 6 }); console.log(tokens); ``` @@ -114,7 +124,7 @@ Returns the latest ECMAScript supported by `espree` Returns an array of all supported ECMAScript versions -## Options +## Options ```js const options = { @@ -130,11 +140,14 @@ const options = { // create a top-level tokens array containing all tokens tokens: false, - // Set to 3, 5 (default), 6, 7, 8, 9, 10, 11, or 12 to specify the version of ECMAScript syntax you want to use. - // You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), or 2021 (same as 12) to use the year-based naming. - ecmaVersion: 5, + // Set to 3, 5 (the default), 6, 7, 8, 9, 10, 11, 12, 13, 14 or 15 to specify the version of ECMAScript syntax you want to use. + // You can also set to 2015 (same as 6), 2016 (same as 7), 2017 (same as 8), 2018 (same as 9), 2019 (same as 10), 2020 (same as 11), 2021 (same as 12), 2022 (same as 13), 2023 (same as 14) or 2024 (same as 15) to use the year-based naming. + // You can also set "latest" to use the most recently supported version. + ecmaVersion: 3, + + allowReserved: true, // only allowed when ecmaVersion is 3 - // specify which type of script you're parsing ("script" or "module") + // specify which type of script you're parsing ("script", "module", or "commonjs") sourceType: "script", // specify additional language features @@ -143,7 +156,7 @@ const options = { // enable JSX parsing jsx: false, - // enable return in global scope + // enable return in global scope (set to true automatically when sourceType is "commonjs") globalReturn: false, // enable implied strict mode (if ecmaVersion >= 5) @@ -172,7 +185,6 @@ We work hard to ensure that Espree is safe for everyone and that security issues * `npm test` - run all linting and tests * `npm run lint` - run all linting -* `npm run browserify` - creates a version of Espree that is usable in a browser ## Differences from Espree 2.x @@ -219,12 +231,11 @@ We are building on top of Acorn, however, so that we can contribute back and hel ### What ECMAScript features do you support? -Espree supports all ECMAScript 2020 features and partially supports ECMAScript 2021 features. +Espree supports all ECMAScript 2023 features and partially supports ECMAScript 2024 features. -Because ECMAScript 2021 is still under development, we are implementing features as they are finalized. Currently, Espree supports: +Because ECMAScript 2024 is still under development, we are implementing features as they are finalized. Currently, Espree supports: -* [Logical Assignment Operators](https://github.com/tc39/proposal-logical-assignment) -* [Numeric Separators](https://github.com/tc39/proposal-numeric-separator) +* [RegExp v flag with set notation + properties of strings](https://github.com/tc39/proposal-regexp-v-flag) See [finished-proposals.md](https://github.com/tc39/proposals/blob/master/finished-proposals.md) to know what features are finalized. diff --git a/node_modules/espree/dist/espree.cjs b/node_modules/espree/dist/espree.cjs new file mode 100644 index 000000000..3fa2870d2 --- /dev/null +++ b/node_modules/espree/dist/espree.cjs @@ -0,0 +1,883 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var acorn = require('acorn'); +var jsx = require('acorn-jsx'); +var visitorKeys = require('eslint-visitor-keys'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var acorn__namespace = /*#__PURE__*/_interopNamespace(acorn); +var jsx__default = /*#__PURE__*/_interopDefaultLegacy(jsx); +var visitorKeys__namespace = /*#__PURE__*/_interopNamespace(visitorKeys); + +/** + * @fileoverview Translates tokens between Acorn format and Esprima format. + * @author Nicholas C. Zakas + */ + +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +// none! + +//------------------------------------------------------------------------------ +// Private +//------------------------------------------------------------------------------ + + +// Esprima Token Types +const Token = { + Boolean: "Boolean", + EOF: "", + Identifier: "Identifier", + PrivateIdentifier: "PrivateIdentifier", + Keyword: "Keyword", + Null: "Null", + Numeric: "Numeric", + Punctuator: "Punctuator", + String: "String", + RegularExpression: "RegularExpression", + Template: "Template", + JSXIdentifier: "JSXIdentifier", + JSXText: "JSXText" +}; + +/** + * Converts part of a template into an Esprima token. + * @param {AcornToken[]} tokens The Acorn tokens representing the template. + * @param {string} code The source code. + * @returns {EsprimaToken} The Esprima equivalent of the template token. + * @private + */ +function convertTemplatePart(tokens, code) { + const firstToken = tokens[0], + lastTemplateToken = tokens[tokens.length - 1]; + + const token = { + type: Token.Template, + value: code.slice(firstToken.start, lastTemplateToken.end) + }; + + if (firstToken.loc) { + token.loc = { + start: firstToken.loc.start, + end: lastTemplateToken.loc.end + }; + } + + if (firstToken.range) { + token.start = firstToken.range[0]; + token.end = lastTemplateToken.range[1]; + token.range = [token.start, token.end]; + } + + return token; +} + +/** + * Contains logic to translate Acorn tokens into Esprima tokens. + * @param {Object} acornTokTypes The Acorn token types. + * @param {string} code The source code Acorn is parsing. This is necessary + * to correct the "value" property of some tokens. + * @constructor + */ +function TokenTranslator(acornTokTypes, code) { + + // token types + this._acornTokTypes = acornTokTypes; + + // token buffer for templates + this._tokens = []; + + // track the last curly brace + this._curlyBrace = null; + + // the source code + this._code = code; + +} + +TokenTranslator.prototype = { + constructor: TokenTranslator, + + /** + * Translates a single Esprima token to a single Acorn token. This may be + * inaccurate due to how templates are handled differently in Esprima and + * Acorn, but should be accurate for all other tokens. + * @param {AcornToken} token The Acorn token to translate. + * @param {Object} extra Espree extra object. + * @returns {EsprimaToken} The Esprima version of the token. + */ + translate(token, extra) { + + const type = token.type, + tt = this._acornTokTypes; + + if (type === tt.name) { + token.type = Token.Identifier; + + // TODO: See if this is an Acorn bug + if (token.value === "static") { + token.type = Token.Keyword; + } + + if (extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let")) { + token.type = Token.Keyword; + } + + } else if (type === tt.privateId) { + token.type = Token.PrivateIdentifier; + + } else if (type === tt.semi || type === tt.comma || + type === tt.parenL || type === tt.parenR || + type === tt.braceL || type === tt.braceR || + type === tt.dot || type === tt.bracketL || + type === tt.colon || type === tt.question || + type === tt.bracketR || type === tt.ellipsis || + type === tt.arrow || type === tt.jsxTagStart || + type === tt.incDec || type === tt.starstar || + type === tt.jsxTagEnd || type === tt.prefix || + type === tt.questionDot || + (type.binop && !type.keyword) || + type.isAssign) { + + token.type = Token.Punctuator; + token.value = this._code.slice(token.start, token.end); + } else if (type === tt.jsxName) { + token.type = Token.JSXIdentifier; + } else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) { + token.type = Token.JSXText; + } else if (type.keyword) { + if (type.keyword === "true" || type.keyword === "false") { + token.type = Token.Boolean; + } else if (type.keyword === "null") { + token.type = Token.Null; + } else { + token.type = Token.Keyword; + } + } else if (type === tt.num) { + token.type = Token.Numeric; + token.value = this._code.slice(token.start, token.end); + } else if (type === tt.string) { + + if (extra.jsxAttrValueToken) { + extra.jsxAttrValueToken = false; + token.type = Token.JSXText; + } else { + token.type = Token.String; + } + + token.value = this._code.slice(token.start, token.end); + } else if (type === tt.regexp) { + token.type = Token.RegularExpression; + const value = token.value; + + token.regex = { + flags: value.flags, + pattern: value.pattern + }; + token.value = `/${value.pattern}/${value.flags}`; + } + + return token; + }, + + /** + * Function to call during Acorn's onToken handler. + * @param {AcornToken} token The Acorn token. + * @param {Object} extra The Espree extra object. + * @returns {void} + */ + onToken(token, extra) { + + const tt = this._acornTokTypes, + tokens = extra.tokens, + templateTokens = this._tokens; + + /** + * Flushes the buffered template tokens and resets the template + * tracking. + * @returns {void} + * @private + */ + const translateTemplateTokens = () => { + tokens.push(convertTemplatePart(this._tokens, this._code)); + this._tokens = []; + }; + + if (token.type === tt.eof) { + + // might be one last curlyBrace + if (this._curlyBrace) { + tokens.push(this.translate(this._curlyBrace, extra)); + } + + return; + } + + if (token.type === tt.backQuote) { + + // if there's already a curly, it's not part of the template + if (this._curlyBrace) { + tokens.push(this.translate(this._curlyBrace, extra)); + this._curlyBrace = null; + } + + templateTokens.push(token); + + // it's the end + if (templateTokens.length > 1) { + translateTemplateTokens(); + } + + return; + } + if (token.type === tt.dollarBraceL) { + templateTokens.push(token); + translateTemplateTokens(); + return; + } + if (token.type === tt.braceR) { + + // if there's already a curly, it's not part of the template + if (this._curlyBrace) { + tokens.push(this.translate(this._curlyBrace, extra)); + } + + // store new curly for later + this._curlyBrace = token; + return; + } + if (token.type === tt.template || token.type === tt.invalidTemplate) { + if (this._curlyBrace) { + templateTokens.push(this._curlyBrace); + this._curlyBrace = null; + } + + templateTokens.push(token); + return; + } + + if (this._curlyBrace) { + tokens.push(this.translate(this._curlyBrace, extra)); + this._curlyBrace = null; + } + + tokens.push(this.translate(token, extra)); + } +}; + +/** + * @fileoverview A collection of methods for processing Espree's options. + * @author Kai Cataldo + */ + +//------------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------------ + +const SUPPORTED_VERSIONS = [ + 3, + 5, + 6, // 2015 + 7, // 2016 + 8, // 2017 + 9, // 2018 + 10, // 2019 + 11, // 2020 + 12, // 2021 + 13, // 2022 + 14, // 2023 + 15 // 2024 +]; + +/** + * Get the latest ECMAScript version supported by Espree. + * @returns {number} The latest ECMAScript version. + */ +function getLatestEcmaVersion() { + return SUPPORTED_VERSIONS[SUPPORTED_VERSIONS.length - 1]; +} + +/** + * Get the list of ECMAScript versions supported by Espree. + * @returns {number[]} An array containing the supported ECMAScript versions. + */ +function getSupportedEcmaVersions() { + return [...SUPPORTED_VERSIONS]; +} + +/** + * Normalize ECMAScript version from the initial config + * @param {(number|"latest")} ecmaVersion ECMAScript version from the initial config + * @throws {Error} throws an error if the ecmaVersion is invalid. + * @returns {number} normalized ECMAScript version + */ +function normalizeEcmaVersion(ecmaVersion = 5) { + + let version = ecmaVersion === "latest" ? getLatestEcmaVersion() : ecmaVersion; + + if (typeof version !== "number") { + throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof ecmaVersion} instead.`); + } + + // Calculate ECMAScript edition number from official year version starting with + // ES2015, which corresponds with ES6 (or a difference of 2009). + if (version >= 2015) { + version -= 2009; + } + + if (!SUPPORTED_VERSIONS.includes(version)) { + throw new Error("Invalid ecmaVersion."); + } + + return version; +} + +/** + * Normalize sourceType from the initial config + * @param {string} sourceType to normalize + * @throws {Error} throw an error if sourceType is invalid + * @returns {string} normalized sourceType + */ +function normalizeSourceType(sourceType = "script") { + if (sourceType === "script" || sourceType === "module") { + return sourceType; + } + + if (sourceType === "commonjs") { + return "script"; + } + + throw new Error("Invalid sourceType."); +} + +/** + * Normalize parserOptions + * @param {Object} options the parser options to normalize + * @throws {Error} throw an error if found invalid option. + * @returns {Object} normalized options + */ +function normalizeOptions(options) { + const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion); + const sourceType = normalizeSourceType(options.sourceType); + const ranges = options.range === true; + const locations = options.loc === true; + + if (ecmaVersion !== 3 && options.allowReserved) { + + // a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed + throw new Error("`allowReserved` is only supported when ecmaVersion is 3"); + } + if (typeof options.allowReserved !== "undefined" && typeof options.allowReserved !== "boolean") { + throw new Error("`allowReserved`, when present, must be `true` or `false`"); + } + const allowReserved = ecmaVersion === 3 ? (options.allowReserved || "never") : false; + const ecmaFeatures = options.ecmaFeatures || {}; + const allowReturnOutsideFunction = options.sourceType === "commonjs" || + Boolean(ecmaFeatures.globalReturn); + + if (sourceType === "module" && ecmaVersion < 6) { + throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options."); + } + + return Object.assign({}, options, { + ecmaVersion, + sourceType, + ranges, + locations, + allowReserved, + allowReturnOutsideFunction + }); +} + +/* eslint no-param-reassign: 0 -- stylistic choice */ + + +const STATE = Symbol("espree's internal state"); +const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); + + +/** + * Converts an Acorn comment to a Esprima comment. + * @param {boolean} block True if it's a block comment, false if not. + * @param {string} text The text of the comment. + * @param {int} start The index at which the comment starts. + * @param {int} end The index at which the comment ends. + * @param {Location} startLoc The location at which the comment starts. + * @param {Location} endLoc The location at which the comment ends. + * @param {string} code The source code being parsed. + * @returns {Object} The comment object. + * @private + */ +function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code) { + let type; + + if (block) { + type = "Block"; + } else if (code.slice(start, start + 2) === "#!") { + type = "Hashbang"; + } else { + type = "Line"; + } + + const comment = { + type, + value: text + }; + + if (typeof start === "number") { + comment.start = start; + comment.end = end; + comment.range = [start, end]; + } + + if (typeof startLoc === "object") { + comment.loc = { + start: startLoc, + end: endLoc + }; + } + + return comment; +} + +var espree = () => Parser => { + const tokTypes = Object.assign({}, Parser.acorn.tokTypes); + + if (Parser.acornJsx) { + Object.assign(tokTypes, Parser.acornJsx.tokTypes); + } + + return class Espree extends Parser { + constructor(opts, code) { + if (typeof opts !== "object" || opts === null) { + opts = {}; + } + if (typeof code !== "string" && !(code instanceof String)) { + code = String(code); + } + + // save original source type in case of commonjs + const originalSourceType = opts.sourceType; + const options = normalizeOptions(opts); + const ecmaFeatures = options.ecmaFeatures || {}; + const tokenTranslator = + options.tokens === true + ? new TokenTranslator(tokTypes, code) + : null; + + /* + * Data that is unique to Espree and is not represented internally + * in Acorn. + * + * For ES2023 hashbangs, Espree will call `onComment()` during the + * constructor, so we must define state before having access to + * `this`. + */ + const state = { + originalSourceType: originalSourceType || options.sourceType, + tokens: tokenTranslator ? [] : null, + comments: options.comment === true ? [] : null, + impliedStrict: ecmaFeatures.impliedStrict === true && options.ecmaVersion >= 5, + ecmaVersion: options.ecmaVersion, + jsxAttrValueToken: false, + lastToken: null, + templateElements: [] + }; + + // Initialize acorn parser. + super({ + + // do not use spread, because we don't want to pass any unknown options to acorn + ecmaVersion: options.ecmaVersion, + sourceType: options.sourceType, + ranges: options.ranges, + locations: options.locations, + allowReserved: options.allowReserved, + + // Truthy value is true for backward compatibility. + allowReturnOutsideFunction: options.allowReturnOutsideFunction, + + // Collect tokens + onToken(token) { + if (tokenTranslator) { + + // Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state. + tokenTranslator.onToken(token, state); + } + if (token.type !== tokTypes.eof) { + state.lastToken = token; + } + }, + + // Collect comments + onComment(block, text, start, end, startLoc, endLoc) { + if (state.comments) { + const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code); + + state.comments.push(comment); + } + } + }, code); + + /* + * We put all of this data into a symbol property as a way to avoid + * potential naming conflicts with future versions of Acorn. + */ + this[STATE] = state; + } + + tokenize() { + do { + this.next(); + } while (this.type !== tokTypes.eof); + + // Consume the final eof token + this.next(); + + const extra = this[STATE]; + const tokens = extra.tokens; + + if (extra.comments) { + tokens.comments = extra.comments; + } + + return tokens; + } + + finishNode(...args) { + const result = super.finishNode(...args); + + return this[ESPRIMA_FINISH_NODE](result); + } + + finishNodeAt(...args) { + const result = super.finishNodeAt(...args); + + return this[ESPRIMA_FINISH_NODE](result); + } + + parse() { + const extra = this[STATE]; + const program = super.parse(); + + program.sourceType = extra.originalSourceType; + + if (extra.comments) { + program.comments = extra.comments; + } + if (extra.tokens) { + program.tokens = extra.tokens; + } + + /* + * Adjust opening and closing position of program to match Esprima. + * Acorn always starts programs at range 0 whereas Esprima starts at the + * first AST node's start (the only real difference is when there's leading + * whitespace or leading comments). Acorn also counts trailing whitespace + * as part of the program whereas Esprima only counts up to the last token. + */ + if (program.body.length) { + const [firstNode] = program.body; + + if (program.range) { + program.range[0] = firstNode.range[0]; + } + if (program.loc) { + program.loc.start = firstNode.loc.start; + } + program.start = firstNode.start; + } + if (extra.lastToken) { + if (program.range) { + program.range[1] = extra.lastToken.range[1]; + } + if (program.loc) { + program.loc.end = extra.lastToken.loc.end; + } + program.end = extra.lastToken.end; + } + + + /* + * https://github.com/eslint/espree/issues/349 + * Ensure that template elements have correct range information. + * This is one location where Acorn produces a different value + * for its start and end properties vs. the values present in the + * range property. In order to avoid confusion, we set the start + * and end properties to the values that are present in range. + * This is done here, instead of in finishNode(), because Acorn + * uses the values of start and end internally while parsing, making + * it dangerous to change those values while parsing is ongoing. + * By waiting until the end of parsing, we can safely change these + * values without affect any other part of the process. + */ + this[STATE].templateElements.forEach(templateElement => { + const startOffset = -1; + const endOffset = templateElement.tail ? 1 : 2; + + templateElement.start += startOffset; + templateElement.end += endOffset; + + if (templateElement.range) { + templateElement.range[0] += startOffset; + templateElement.range[1] += endOffset; + } + + if (templateElement.loc) { + templateElement.loc.start.column += startOffset; + templateElement.loc.end.column += endOffset; + } + }); + + return program; + } + + parseTopLevel(node) { + if (this[STATE].impliedStrict) { + this.strict = true; + } + return super.parseTopLevel(node); + } + + /** + * Overwrites the default raise method to throw Esprima-style errors. + * @param {int} pos The position of the error. + * @param {string} message The error message. + * @throws {SyntaxError} A syntax error. + * @returns {void} + */ + raise(pos, message) { + const loc = Parser.acorn.getLineInfo(this.input, pos); + const err = new SyntaxError(message); + + err.index = pos; + err.lineNumber = loc.line; + err.column = loc.column + 1; // acorn uses 0-based columns + throw err; + } + + /** + * Overwrites the default raise method to throw Esprima-style errors. + * @param {int} pos The position of the error. + * @param {string} message The error message. + * @throws {SyntaxError} A syntax error. + * @returns {void} + */ + raiseRecoverable(pos, message) { + this.raise(pos, message); + } + + /** + * Overwrites the default unexpected method to throw Esprima-style errors. + * @param {int} pos The position of the error. + * @throws {SyntaxError} A syntax error. + * @returns {void} + */ + unexpected(pos) { + let message = "Unexpected token"; + + if (pos !== null && pos !== void 0) { + this.pos = pos; + + if (this.options.locations) { + while (this.pos < this.lineStart) { + this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1; + --this.curLine; + } + } + + this.nextToken(); + } + + if (this.end > this.start) { + message += ` ${this.input.slice(this.start, this.end)}`; + } + + this.raise(this.start, message); + } + + /* + * Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX + * uses regular tt.string without any distinction between this and regular JS + * strings. As such, we intercept an attempt to read a JSX string and set a flag + * on extra so that when tokens are converted, the next token will be switched + * to JSXText via onToken. + */ + jsx_readString(quote) { // eslint-disable-line camelcase -- required by API + const result = super.jsx_readString(quote); + + if (this.type === tokTypes.string) { + this[STATE].jsxAttrValueToken = true; + } + return result; + } + + /** + * Performs last-minute Esprima-specific compatibility checks and fixes. + * @param {ASTNode} result The node to check. + * @returns {ASTNode} The finished node. + */ + [ESPRIMA_FINISH_NODE](result) { + + // Acorn doesn't count the opening and closing backticks as part of templates + // so we have to adjust ranges/locations appropriately. + if (result.type === "TemplateElement") { + + // save template element references to fix start/end later + this[STATE].templateElements.push(result); + } + + if (result.type.includes("Function") && !result.generator) { + result.generator = false; + } + + return result; + } + }; +}; + +const version$1 = "9.6.1"; + +/* eslint-disable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */ + + +// To initialize lazily. +const parsers = { + _regular: null, + _jsx: null, + + get regular() { + if (this._regular === null) { + this._regular = acorn__namespace.Parser.extend(espree()); + } + return this._regular; + }, + + get jsx() { + if (this._jsx === null) { + this._jsx = acorn__namespace.Parser.extend(jsx__default["default"](), espree()); + } + return this._jsx; + }, + + get(options) { + const useJsx = Boolean( + options && + options.ecmaFeatures && + options.ecmaFeatures.jsx + ); + + return useJsx ? this.jsx : this.regular; + } +}; + +//------------------------------------------------------------------------------ +// Tokenizer +//------------------------------------------------------------------------------ + +/** + * Tokenizes the given code. + * @param {string} code The code to tokenize. + * @param {Object} options Options defining how to tokenize. + * @returns {Token[]} An array of tokens. + * @throws {SyntaxError} If the input code is invalid. + * @private + */ +function tokenize(code, options) { + const Parser = parsers.get(options); + + // Ensure to collect tokens. + if (!options || options.tokens !== true) { + options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign -- stylistic choice + } + + return new Parser(options, code).tokenize(); +} + +//------------------------------------------------------------------------------ +// Parser +//------------------------------------------------------------------------------ + +/** + * Parses the given code. + * @param {string} code The code to tokenize. + * @param {Object} options Options defining how to tokenize. + * @returns {ASTNode} The "Program" AST node. + * @throws {SyntaxError} If the input code is invalid. + */ +function parse(code, options) { + const Parser = parsers.get(options); + + return new Parser(options, code).parse(); +} + +//------------------------------------------------------------------------------ +// Public +//------------------------------------------------------------------------------ + +const version = version$1; +const name = "espree"; + +/* istanbul ignore next */ +const VisitorKeys = (function() { + return visitorKeys__namespace.KEYS; +}()); + +// Derive node types from VisitorKeys +/* istanbul ignore next */ +const Syntax = (function() { + let key, + types = {}; + + if (typeof Object.create === "function") { + types = Object.create(null); + } + + for (key in VisitorKeys) { + if (Object.hasOwnProperty.call(VisitorKeys, key)) { + types[key] = key; + } + } + + if (typeof Object.freeze === "function") { + Object.freeze(types); + } + + return types; +}()); + +const latestEcmaVersion = getLatestEcmaVersion(); + +const supportedEcmaVersions = getSupportedEcmaVersions(); + +exports.Syntax = Syntax; +exports.VisitorKeys = VisitorKeys; +exports.latestEcmaVersion = latestEcmaVersion; +exports.name = name; +exports.parse = parse; +exports.supportedEcmaVersions = supportedEcmaVersions; +exports.tokenize = tokenize; +exports.version = version; diff --git a/node_modules/espree/espree.js b/node_modules/espree/espree.js index d8069528b..e9b111885 100644 --- a/node_modules/espree/espree.js +++ b/node_modules/espree/espree.js @@ -1,3 +1,5 @@ +/* eslint-disable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */ + /** * @fileoverview Main Espree file that converts Acorn into Esprima output. * @@ -54,15 +56,16 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* eslint no-undefined:0, no-use-before-define: 0 */ -"use strict"; +/* eslint-enable jsdoc/no-multi-asterisks -- needed to preserve original formatting of licences */ + +import * as acorn from "acorn"; +import jsx from "acorn-jsx"; +import espree from "./lib/espree.js"; +import espreeVersion from "./lib/version.js"; +import * as visitorKeys from "eslint-visitor-keys"; +import { getLatestEcmaVersion, getSupportedEcmaVersions } from "./lib/options.js"; -const acorn = require("acorn"); -const jsx = require("acorn-jsx"); -const astNodeTypes = require("./lib/ast-node-types"); -const espree = require("./lib/espree"); -const { getLatestEcmaVersion, getSupportedEcmaVersions } = require("./lib/options"); // To initialize lazily. const parsers = { @@ -106,12 +109,12 @@ const parsers = { * @throws {SyntaxError} If the input code is invalid. * @private */ -function tokenize(code, options) { +export function tokenize(code, options) { const Parser = parsers.get(options); // Ensure to collect tokens. if (!options || options.tokens !== true) { - options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign + options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign -- stylistic choice } return new Parser(options, code).tokenize(); @@ -128,7 +131,7 @@ function tokenize(code, options) { * @returns {ASTNode} The "Program" AST node. * @throws {SyntaxError} If the input code is invalid. */ -function parse(code, options) { +export function parse(code, options) { const Parser = parsers.get(options); return new Parser(options, code).parse(); @@ -138,25 +141,27 @@ function parse(code, options) { // Public //------------------------------------------------------------------------------ -exports.version = require("./package.json").version; +export const version = espreeVersion; +export const name = "espree"; -exports.tokenize = tokenize; - -exports.parse = parse; +/* istanbul ignore next */ +export const VisitorKeys = (function() { + return visitorKeys.KEYS; +}()); -// Deep copy. +// Derive node types from VisitorKeys /* istanbul ignore next */ -exports.Syntax = (function() { - let name, +export const Syntax = (function() { + let key, types = {}; if (typeof Object.create === "function") { types = Object.create(null); } - for (name in astNodeTypes) { - if (Object.hasOwnProperty.call(astNodeTypes, name)) { - types[name] = astNodeTypes[name]; + for (key in VisitorKeys) { + if (Object.hasOwnProperty.call(VisitorKeys, key)) { + types[key] = key; } } @@ -167,11 +172,6 @@ exports.Syntax = (function() { return types; }()); -/* istanbul ignore next */ -exports.VisitorKeys = (function() { - return require("eslint-visitor-keys").KEYS; -}()); - -exports.latestEcmaVersion = getLatestEcmaVersion(); +export const latestEcmaVersion = getLatestEcmaVersion(); -exports.supportedEcmaVersions = getSupportedEcmaVersions(); +export const supportedEcmaVersions = getSupportedEcmaVersions(); diff --git a/node_modules/espree/lib/ast-node-types.js b/node_modules/espree/lib/ast-node-types.js deleted file mode 100644 index 2844024d5..000000000 --- a/node_modules/espree/lib/ast-node-types.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @fileoverview The AST node types produced by the parser. - * @author Nicholas C. Zakas - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -// None! - -//------------------------------------------------------------------------------ -// Public -//------------------------------------------------------------------------------ - -module.exports = { - AssignmentExpression: "AssignmentExpression", - AssignmentPattern: "AssignmentPattern", - ArrayExpression: "ArrayExpression", - ArrayPattern: "ArrayPattern", - ArrowFunctionExpression: "ArrowFunctionExpression", - AwaitExpression: "AwaitExpression", - BlockStatement: "BlockStatement", - BinaryExpression: "BinaryExpression", - BreakStatement: "BreakStatement", - CallExpression: "CallExpression", - CatchClause: "CatchClause", - ClassBody: "ClassBody", - ClassDeclaration: "ClassDeclaration", - ClassExpression: "ClassExpression", - ConditionalExpression: "ConditionalExpression", - ContinueStatement: "ContinueStatement", - DoWhileStatement: "DoWhileStatement", - DebuggerStatement: "DebuggerStatement", - EmptyStatement: "EmptyStatement", - ExpressionStatement: "ExpressionStatement", - ForStatement: "ForStatement", - ForInStatement: "ForInStatement", - ForOfStatement: "ForOfStatement", - FunctionDeclaration: "FunctionDeclaration", - FunctionExpression: "FunctionExpression", - Identifier: "Identifier", - IfStatement: "IfStatement", - Literal: "Literal", - LabeledStatement: "LabeledStatement", - LogicalExpression: "LogicalExpression", - MemberExpression: "MemberExpression", - MetaProperty: "MetaProperty", - MethodDefinition: "MethodDefinition", - NewExpression: "NewExpression", - ObjectExpression: "ObjectExpression", - ObjectPattern: "ObjectPattern", - Program: "Program", - Property: "Property", - RestElement: "RestElement", - ReturnStatement: "ReturnStatement", - SequenceExpression: "SequenceExpression", - SpreadElement: "SpreadElement", - Super: "Super", - SwitchCase: "SwitchCase", - SwitchStatement: "SwitchStatement", - TaggedTemplateExpression: "TaggedTemplateExpression", - TemplateElement: "TemplateElement", - TemplateLiteral: "TemplateLiteral", - ThisExpression: "ThisExpression", - ThrowStatement: "ThrowStatement", - TryStatement: "TryStatement", - UnaryExpression: "UnaryExpression", - UpdateExpression: "UpdateExpression", - VariableDeclaration: "VariableDeclaration", - VariableDeclarator: "VariableDeclarator", - WhileStatement: "WhileStatement", - WithStatement: "WithStatement", - YieldExpression: "YieldExpression", - JSXIdentifier: "JSXIdentifier", - JSXNamespacedName: "JSXNamespacedName", - JSXMemberExpression: "JSXMemberExpression", - JSXEmptyExpression: "JSXEmptyExpression", - JSXExpressionContainer: "JSXExpressionContainer", - JSXElement: "JSXElement", - JSXClosingElement: "JSXClosingElement", - JSXOpeningElement: "JSXOpeningElement", - JSXAttribute: "JSXAttribute", - JSXSpreadAttribute: "JSXSpreadAttribute", - JSXText: "JSXText", - ExportDefaultDeclaration: "ExportDefaultDeclaration", - ExportNamedDeclaration: "ExportNamedDeclaration", - ExportAllDeclaration: "ExportAllDeclaration", - ExportSpecifier: "ExportSpecifier", - ImportDeclaration: "ImportDeclaration", - ImportSpecifier: "ImportSpecifier", - ImportDefaultSpecifier: "ImportDefaultSpecifier", - ImportNamespaceSpecifier: "ImportNamespaceSpecifier" -}; diff --git a/node_modules/espree/lib/espree.js b/node_modules/espree/lib/espree.js index 50ca6e42f..2be1b56d3 100644 --- a/node_modules/espree/lib/espree.js +++ b/node_modules/espree/lib/espree.js @@ -1,8 +1,8 @@ -"use strict"; +/* eslint no-param-reassign: 0 -- stylistic choice */ + +import TokenTranslator from "./token-translator.js"; +import { normalizeOptions } from "./options.js"; -/* eslint-disable no-param-reassign*/ -const TokenTranslator = require("./token-translator"); -const { normalizeOptions } = require("./options"); const STATE = Symbol("espree's internal state"); const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); @@ -16,12 +16,23 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * @param {int} end The index at which the comment ends. * @param {Location} startLoc The location at which the comment starts. * @param {Location} endLoc The location at which the comment ends. + * @param {string} code The source code being parsed. * @returns {Object} The comment object. * @private */ -function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc) { +function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code) { + let type; + + if (block) { + type = "Block"; + } else if (code.slice(start, start + 2) === "#!") { + type = "Hashbang"; + } else { + type = "Line"; + } + const comment = { - type: block ? "Block" : "Line", + type, value: text }; @@ -41,7 +52,7 @@ function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, return comment; } -module.exports = () => Parser => { +export default () => Parser => { const tokTypes = Object.assign({}, Parser.acorn.tokTypes); if (Parser.acornJsx) { @@ -57,6 +68,8 @@ module.exports = () => Parser => { code = String(code); } + // save original source type in case of commonjs + const originalSourceType = opts.sourceType; const options = normalizeOptions(opts); const ecmaFeatures = options.ecmaFeatures || {}; const tokenTranslator = @@ -64,49 +77,65 @@ module.exports = () => Parser => { ? new TokenTranslator(tokTypes, code) : null; + /* + * Data that is unique to Espree and is not represented internally + * in Acorn. + * + * For ES2023 hashbangs, Espree will call `onComment()` during the + * constructor, so we must define state before having access to + * `this`. + */ + const state = { + originalSourceType: originalSourceType || options.sourceType, + tokens: tokenTranslator ? [] : null, + comments: options.comment === true ? [] : null, + impliedStrict: ecmaFeatures.impliedStrict === true && options.ecmaVersion >= 5, + ecmaVersion: options.ecmaVersion, + jsxAttrValueToken: false, + lastToken: null, + templateElements: [] + }; + // Initialize acorn parser. super({ - // TODO: use {...options} when spread is supported(Node.js >= 8.3.0). + // do not use spread, because we don't want to pass any unknown options to acorn ecmaVersion: options.ecmaVersion, sourceType: options.sourceType, ranges: options.ranges, locations: options.locations, + allowReserved: options.allowReserved, // Truthy value is true for backward compatibility. - allowReturnOutsideFunction: Boolean(ecmaFeatures.globalReturn), + allowReturnOutsideFunction: options.allowReturnOutsideFunction, // Collect tokens - onToken: token => { + onToken(token) { if (tokenTranslator) { // Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state. - tokenTranslator.onToken(token, this[STATE]); + tokenTranslator.onToken(token, state); } if (token.type !== tokTypes.eof) { - this[STATE].lastToken = token; + state.lastToken = token; } }, // Collect comments - onComment: (block, text, start, end, startLoc, endLoc) => { - if (this[STATE].comments) { - const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc); + onComment(block, text, start, end, startLoc, endLoc) { + if (state.comments) { + const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code); - this[STATE].comments.push(comment); + state.comments.push(comment); } } }, code); - // Initialize internal state. - this[STATE] = { - tokens: tokenTranslator ? [] : null, - comments: options.comment === true ? [] : null, - impliedStrict: ecmaFeatures.impliedStrict === true && this.options.ecmaVersion >= 5, - ecmaVersion: this.options.ecmaVersion, - jsxAttrValueToken: false, - lastToken: null - }; + /* + * We put all of this data into a symbol property as a way to avoid + * potential naming conflicts with future versions of Acorn. + */ + this[STATE] = state; } tokenize() { @@ -143,7 +172,7 @@ module.exports = () => Parser => { const extra = this[STATE]; const program = super.parse(); - program.sourceType = this.options.sourceType; + program.sourceType = extra.originalSourceType; if (extra.comments) { program.comments = extra.comments; @@ -159,15 +188,59 @@ module.exports = () => Parser => { * whitespace or leading comments). Acorn also counts trailing whitespace * as part of the program whereas Esprima only counts up to the last token. */ - if (program.range) { - program.range[0] = program.body.length ? program.body[0].range[0] : program.range[0]; - program.range[1] = extra.lastToken ? extra.lastToken.range[1] : program.range[1]; + if (program.body.length) { + const [firstNode] = program.body; + + if (program.range) { + program.range[0] = firstNode.range[0]; + } + if (program.loc) { + program.loc.start = firstNode.loc.start; + } + program.start = firstNode.start; } - if (program.loc) { - program.loc.start = program.body.length ? program.body[0].loc.start : program.loc.start; - program.loc.end = extra.lastToken ? extra.lastToken.loc.end : program.loc.end; + if (extra.lastToken) { + if (program.range) { + program.range[1] = extra.lastToken.range[1]; + } + if (program.loc) { + program.loc.end = extra.lastToken.loc.end; + } + program.end = extra.lastToken.end; } + + /* + * https://github.com/eslint/espree/issues/349 + * Ensure that template elements have correct range information. + * This is one location where Acorn produces a different value + * for its start and end properties vs. the values present in the + * range property. In order to avoid confusion, we set the start + * and end properties to the values that are present in range. + * This is done here, instead of in finishNode(), because Acorn + * uses the values of start and end internally while parsing, making + * it dangerous to change those values while parsing is ongoing. + * By waiting until the end of parsing, we can safely change these + * values without affect any other part of the process. + */ + this[STATE].templateElements.forEach(templateElement => { + const startOffset = -1; + const endOffset = templateElement.tail ? 1 : 2; + + templateElement.start += startOffset; + templateElement.end += endOffset; + + if (templateElement.range) { + templateElement.range[0] += startOffset; + templateElement.range[1] += endOffset; + } + + if (templateElement.loc) { + templateElement.loc.start.column += startOffset; + templateElement.loc.end.column += endOffset; + } + }); + return program; } @@ -242,7 +315,7 @@ module.exports = () => Parser => { * on extra so that when tokens are converted, the next token will be switched * to JSXText via onToken. */ - jsx_readString(quote) { // eslint-disable-line camelcase + jsx_readString(quote) { // eslint-disable-line camelcase -- required by API const result = super.jsx_readString(quote); if (this.type === tokTypes.string) { @@ -262,21 +335,11 @@ module.exports = () => Parser => { // so we have to adjust ranges/locations appropriately. if (result.type === "TemplateElement") { - // additional adjustment needed if ${ is the last token - const terminalDollarBraceL = this.input.slice(result.end, result.end + 2) === "${"; - - if (result.range) { - result.range[0]--; - result.range[1] += (terminalDollarBraceL ? 2 : 1); - } - - if (result.loc) { - result.loc.start.column--; - result.loc.end.column += (terminalDollarBraceL ? 2 : 1); - } + // save template element references to fix start/end later + this[STATE].templateElements.push(result); } - if (result.type.indexOf("Function") > -1 && !result.generator) { + if (result.type.includes("Function") && !result.generator) { result.generator = false; } diff --git a/node_modules/espree/lib/features.js b/node_modules/espree/lib/features.js index d1ad5f851..31467d288 100644 --- a/node_modules/espree/lib/features.js +++ b/node_modules/espree/lib/features.js @@ -4,8 +4,6 @@ * @author Nicholas C. Zakas */ -"use strict"; - //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ @@ -16,7 +14,7 @@ // Public //------------------------------------------------------------------------------ -module.exports = { +export default { // React JSX parsing jsx: false, diff --git a/node_modules/espree/lib/options.js b/node_modules/espree/lib/options.js index eddca200e..1460ac270 100644 --- a/node_modules/espree/lib/options.js +++ b/node_modules/espree/lib/options.js @@ -3,37 +3,54 @@ * @author Kai Cataldo */ -"use strict"; - //------------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------------ -const DEFAULT_ECMA_VERSION = 5; const SUPPORTED_VERSIONS = [ 3, 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12 + 6, // 2015 + 7, // 2016 + 8, // 2017 + 9, // 2018 + 10, // 2019 + 11, // 2020 + 12, // 2021 + 13, // 2022 + 14, // 2023 + 15 // 2024 ]; +/** + * Get the latest ECMAScript version supported by Espree. + * @returns {number} The latest ECMAScript version. + */ +export function getLatestEcmaVersion() { + return SUPPORTED_VERSIONS[SUPPORTED_VERSIONS.length - 1]; +} + +/** + * Get the list of ECMAScript versions supported by Espree. + * @returns {number[]} An array containing the supported ECMAScript versions. + */ +export function getSupportedEcmaVersions() { + return [...SUPPORTED_VERSIONS]; +} + /** * Normalize ECMAScript version from the initial config - * @param {number} ecmaVersion ECMAScript version from the initial config + * @param {(number|"latest")} ecmaVersion ECMAScript version from the initial config * @throws {Error} throws an error if the ecmaVersion is invalid. * @returns {number} normalized ECMAScript version */ -function normalizeEcmaVersion(ecmaVersion = DEFAULT_ECMA_VERSION) { - if (typeof ecmaVersion !== "number") { - throw new Error(`ecmaVersion must be a number. Received value of type ${typeof ecmaVersion} instead.`); - } +function normalizeEcmaVersion(ecmaVersion = 5) { - let version = ecmaVersion; + let version = ecmaVersion === "latest" ? getLatestEcmaVersion() : ecmaVersion; + + if (typeof version !== "number") { + throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof ecmaVersion} instead.`); + } // Calculate ECMAScript edition number from official year version starting with // ES2015, which corresponds with ES6 (or a difference of 2009). @@ -58,6 +75,11 @@ function normalizeSourceType(sourceType = "script") { if (sourceType === "script" || sourceType === "module") { return sourceType; } + + if (sourceType === "commonjs") { + return "script"; + } + throw new Error("Invalid sourceType."); } @@ -67,40 +89,35 @@ function normalizeSourceType(sourceType = "script") { * @throws {Error} throw an error if found invalid option. * @returns {Object} normalized options */ -function normalizeOptions(options) { +export function normalizeOptions(options) { const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion); const sourceType = normalizeSourceType(options.sourceType); const ranges = options.range === true; const locations = options.loc === true; + if (ecmaVersion !== 3 && options.allowReserved) { + + // a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed + throw new Error("`allowReserved` is only supported when ecmaVersion is 3"); + } + if (typeof options.allowReserved !== "undefined" && typeof options.allowReserved !== "boolean") { + throw new Error("`allowReserved`, when present, must be `true` or `false`"); + } + const allowReserved = ecmaVersion === 3 ? (options.allowReserved || "never") : false; + const ecmaFeatures = options.ecmaFeatures || {}; + const allowReturnOutsideFunction = options.sourceType === "commonjs" || + Boolean(ecmaFeatures.globalReturn); + if (sourceType === "module" && ecmaVersion < 6) { throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options."); } - return Object.assign({}, options, { ecmaVersion, sourceType, ranges, locations }); -} -/** - * Get the latest ECMAScript version supported by Espree. - * @returns {number} The latest ECMAScript version. - */ -function getLatestEcmaVersion() { - return SUPPORTED_VERSIONS[SUPPORTED_VERSIONS.length - 1]; + return Object.assign({}, options, { + ecmaVersion, + sourceType, + ranges, + locations, + allowReserved, + allowReturnOutsideFunction + }); } - -/** - * Get the list of ECMAScript versions supported by Espree. - * @returns {number[]} An array containing the supported ECMAScript versions. - */ -function getSupportedEcmaVersions() { - return [...SUPPORTED_VERSIONS]; -} - -//------------------------------------------------------------------------------ -// Public -//------------------------------------------------------------------------------ - -module.exports = { - normalizeOptions, - getLatestEcmaVersion, - getSupportedEcmaVersions -}; diff --git a/node_modules/espree/lib/token-translator.js b/node_modules/espree/lib/token-translator.js index f06c7c072..2a915fb5c 100644 --- a/node_modules/espree/lib/token-translator.js +++ b/node_modules/espree/lib/token-translator.js @@ -2,9 +2,6 @@ * @fileoverview Translates tokens between Acorn format and Esprima format. * @author Nicholas C. Zakas */ -/* eslint no-underscore-dangle: 0 */ - -"use strict"; //------------------------------------------------------------------------------ // Requirements @@ -22,6 +19,7 @@ const Token = { Boolean: "Boolean", EOF: "", Identifier: "Identifier", + PrivateIdentifier: "PrivateIdentifier", Keyword: "Keyword", Null: "Null", Numeric: "Numeric", @@ -116,6 +114,9 @@ TokenTranslator.prototype = { token.type = Token.Keyword; } + } else if (type === tt.privateId) { + token.type = Token.PrivateIdentifier; + } else if (type === tt.semi || type === tt.comma || type === tt.parenL || type === tt.parenR || type === tt.braceL || type === tt.braceR || @@ -178,8 +179,7 @@ TokenTranslator.prototype = { */ onToken(token, extra) { - const that = this, - tt = this._acornTokTypes, + const tt = this._acornTokTypes, tokens = extra.tokens, templateTokens = this._tokens; @@ -189,10 +189,10 @@ TokenTranslator.prototype = { * @returns {void} * @private */ - function translateTemplateTokens() { - tokens.push(convertTemplatePart(that._tokens, that._code)); - that._tokens = []; - } + const translateTemplateTokens = () => { + tokens.push(convertTemplatePart(this._tokens, this._code)); + this._tokens = []; + }; if (token.type === tt.eof) { @@ -260,4 +260,4 @@ TokenTranslator.prototype = { // Public //------------------------------------------------------------------------------ -module.exports = TokenTranslator; +export default TokenTranslator; diff --git a/node_modules/espree/lib/version.js b/node_modules/espree/lib/version.js new file mode 100644 index 000000000..dc73f7715 --- /dev/null +++ b/node_modules/espree/lib/version.js @@ -0,0 +1,3 @@ +const version = "9.6.1"; + +export default version; diff --git a/node_modules/espree/lib/visitor-keys.js b/node_modules/espree/lib/visitor-keys.js deleted file mode 100644 index 4216864f1..000000000 --- a/node_modules/espree/lib/visitor-keys.js +++ /dev/null @@ -1,123 +0,0 @@ -/** - * @fileoverview The visitor keys for the node types Espree supports - * @author Nicholas C. Zakas - * - * This file contains code from estraverse-fb. - * - * The MIT license. Copyright (c) 2014 Ingvar Stepanyan - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -"use strict"; - -//------------------------------------------------------------------------------ -// Requirements -//------------------------------------------------------------------------------ - -// None! - -//------------------------------------------------------------------------------ -// Public -//------------------------------------------------------------------------------ - -module.exports = { - - // ECMAScript - AssignmentExpression: ["left", "right"], - AssignmentPattern: ["left", "right"], - ArrayExpression: ["elements"], - ArrayPattern: ["elements"], - ArrowFunctionExpression: ["params", "body"], - BlockStatement: ["body"], - BinaryExpression: ["left", "right"], - BreakStatement: ["label"], - CallExpression: ["callee", "arguments"], - CatchClause: ["param", "body"], - ClassBody: ["body"], - ClassDeclaration: ["id", "superClass", "body"], - ClassExpression: ["id", "superClass", "body"], - ConditionalExpression: ["test", "consequent", "alternate"], - ContinueStatement: ["label"], - DebuggerStatement: [], - DirectiveStatement: [], - DoWhileStatement: ["body", "test"], - EmptyStatement: [], - ExportAllDeclaration: ["source"], - ExportDefaultDeclaration: ["declaration"], - ExportNamedDeclaration: ["declaration", "specifiers", "source"], - ExportSpecifier: ["exported", "local"], - ExpressionStatement: ["expression"], - ForStatement: ["init", "test", "update", "body"], - ForInStatement: ["left", "right", "body"], - ForOfStatement: ["left", "right", "body"], - FunctionDeclaration: ["id", "params", "body"], - FunctionExpression: ["id", "params", "body"], - Identifier: [], - IfStatement: ["test", "consequent", "alternate"], - ImportDeclaration: ["specifiers", "source"], - ImportDefaultSpecifier: ["local"], - ImportNamespaceSpecifier: ["local"], - ImportSpecifier: ["imported", "local"], - Literal: [], - LabeledStatement: ["label", "body"], - LogicalExpression: ["left", "right"], - MemberExpression: ["object", "property"], - MetaProperty: ["meta", "property"], - MethodDefinition: ["key", "value"], - ModuleSpecifier: [], - NewExpression: ["callee", "arguments"], - ObjectExpression: ["properties"], - ObjectPattern: ["properties"], - Program: ["body"], - Property: ["key", "value"], - RestElement: ["argument"], - ReturnStatement: ["argument"], - SequenceExpression: ["expressions"], - SpreadElement: ["argument"], - Super: [], - SwitchStatement: ["discriminant", "cases"], - SwitchCase: ["test", "consequent"], - TaggedTemplateExpression: ["tag", "quasi"], - TemplateElement: [], - TemplateLiteral: ["quasis", "expressions"], - ThisExpression: [], - ThrowStatement: ["argument"], - TryStatement: ["block", "handler", "finalizer"], - UnaryExpression: ["argument"], - UpdateExpression: ["argument"], - VariableDeclaration: ["declarations"], - VariableDeclarator: ["id", "init"], - WhileStatement: ["test", "body"], - WithStatement: ["object", "body"], - YieldExpression: ["argument"], - - // JSX - JSXIdentifier: [], - JSXNamespacedName: ["namespace", "name"], - JSXMemberExpression: ["object", "property"], - JSXEmptyExpression: [], - JSXExpressionContainer: ["expression"], - JSXElement: ["openingElement", "closingElement", "children"], - JSXClosingElement: ["name"], - JSXOpeningElement: ["name", "attributes"], - JSXAttribute: ["name", "value"], - JSXText: null, - JSXSpreadAttribute: ["argument"] -}; diff --git a/node_modules/espree/node_modules/.bin/acorn b/node_modules/espree/node_modules/.bin/acorn new file mode 120000 index 000000000..cf7676038 --- /dev/null +++ b/node_modules/espree/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/node_modules/espree/node_modules/acorn/CHANGELOG.md b/node_modules/espree/node_modules/acorn/CHANGELOG.md new file mode 100644 index 000000000..eb848a58b --- /dev/null +++ b/node_modules/espree/node_modules/acorn/CHANGELOG.md @@ -0,0 +1,880 @@ +## 8.11.3 (2023-12-29) + +### Bug fixes + +Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. + +Make sure `onToken` get an `import` keyword token when parsing `import.meta`. + +Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes. + +## 8.11.2 (2023-10-27) + +### Bug fixes + +Fix a bug that caused regular expressions after colon tokens to not be properly tokenized in some circumstances. + +## 8.11.1 (2023-10-26) + +### Bug fixes + +Fix a regression where `onToken` would receive 'name' tokens for 'new' keyword tokens. + +## 8.11.0 (2023-10-26) + +### Bug fixes + +Fix an issue where tokenizing (without parsing) an object literal with a property named `class` or `function` could, in some circumstance, put the tokenizer into an invalid state. + +Fix an issue where a slash after a call to a propery named the same as some keywords would be tokenized as a regular expression. + +### New features + +Upgrade to Unicode 15.1. + +Use a set of new, much more precise, TypeScript types. + +## 8.10.0 (2023-07-05) + +### New features + +Add a `checkPrivateFields` option that disables strict checking of private property use. + +## 8.9.0 (2023-06-16) + +### Bug fixes + +Forbid dynamic import after `new`, even when part of a member expression. + +### New features + +Add Unicode properties for ES2023. + +Add support for the `v` flag to regular expressions. + +## 8.8.2 (2023-01-23) + +### Bug fixes + +Fix a bug that caused `allowHashBang` to be set to false when not provided, even with `ecmaVersion >= 14`. + +Fix an exception when passing no option object to `parse` or `new Parser`. + +Fix incorrect parse error on `if (0) let\n[astral identifier char]`. + +## 8.8.1 (2022-10-24) + +### Bug fixes + +Make type for `Comment` compatible with estree types. + +## 8.8.0 (2022-07-21) + +### Bug fixes + +Allow parentheses around spread args in destructuring object assignment. + +Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them. + +### New features + +Support hashbang comments by default in ECMAScript 2023 and later. + +## 8.7.1 (2021-04-26) + +### Bug fixes + +Stop handling `"use strict"` directives in ECMAScript versions before 5. + +Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked. + +Add missing type for `tokTypes`. + +## 8.7.0 (2021-12-27) + +### New features + +Support quoted export names. + +Upgrade to Unicode 14. + +Add support for Unicode 13 properties in regular expressions. + +### Bug fixes + +Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code. + +## 8.6.0 (2021-11-18) + +### Bug fixes + +Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment. + +### New features + +Support class private fields with the `in` operator. + +## 8.5.0 (2021-09-06) + +### Bug fixes + +Improve context-dependent tokenization in a number of corner cases. + +Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number). + +Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators. + +Fix wrong end locations stored on SequenceExpression nodes. + +Implement restriction that `for`/`of` loop LHS can't start with `let`. + +### New features + +Add support for ES2022 class static blocks. + +Allow multiple input files to be passed to the CLI tool. + +## 8.4.1 (2021-06-24) + +### Bug fixes + +Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources. + +## 8.4.0 (2021-06-11) + +### New features + +A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context. + +## 8.3.0 (2021-05-31) + +### New features + +Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher. + +Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag. + +## 8.2.4 (2021-05-04) + +### Bug fixes + +Fix spec conformity in corner case 'for await (async of ...)'. + +## 8.2.3 (2021-05-04) + +### Bug fixes + +Fix an issue where the library couldn't parse 'for (async of ...)'. + +Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances. + +## 8.2.2 (2021-04-29) + +### Bug fixes + +Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield. + +## 8.2.1 (2021-04-24) + +### Bug fixes + +Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse. + +## 8.2.0 (2021-04-24) + +### New features + +Add support for ES2022 class fields and private methods. + +## 8.1.1 (2021-04-12) + +### Various + +Stop shipping source maps in the NPM package. + +## 8.1.0 (2021-03-09) + +### Bug fixes + +Fix a spurious error in nested destructuring arrays. + +### New features + +Expose `allowAwaitOutsideFunction` in CLI interface. + +Make `allowImportExportAnywhere` also apply to `import.meta`. + +## 8.0.5 (2021-01-25) + +### Bug fixes + +Adjust package.json to work with Node 12.16.0 and 13.0-13.6. + +## 8.0.4 (2020-10-05) + +### Bug fixes + +Make `await x ** y` an error, following the spec. + +Fix potentially exponential regular expression. + +## 8.0.3 (2020-10-02) + +### Bug fixes + +Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`. + +## 8.0.2 (2020-09-30) + +### Bug fixes + +Make the TypeScript types reflect the current allowed values for `ecmaVersion`. + +Fix another regexp/division tokenizer issue. + +## 8.0.1 (2020-08-12) + +### Bug fixes + +Provide the correct value in the `version` export. + +## 8.0.0 (2020-08-12) + +### Bug fixes + +Disallow expressions like `(a = b) = c`. + +Make non-octal escape sequences a syntax error in strict mode. + +### New features + +The package can now be loaded directly as an ECMAScript module in node 13+. + +Update to the set of Unicode properties from ES2021. + +### Breaking changes + +The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release. + +Some changes to method signatures that may be used by plugins. + +## 7.4.0 (2020-08-03) + +### New features + +Add support for logical assignment operators. + +Add support for numeric separators. + +## 7.3.1 (2020-06-11) + +### Bug fixes + +Make the string in the `version` export match the actual library version. + +## 7.3.0 (2020-06-11) + +### Bug fixes + +Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail. + +### New features + +Add support for optional chaining (`?.`). + +## 7.2.0 (2020-05-09) + +### Bug fixes + +Fix precedence issue in parsing of async arrow functions. + +### New features + +Add support for nullish coalescing. + +Add support for `import.meta`. + +Support `export * as ...` syntax. + +Upgrade to Unicode 13. + +## 6.4.1 (2020-03-09) + +### Bug fixes + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.1 (2020-03-01) + +### Bug fixes + +Treat `\8` and `\9` as invalid escapes in template strings. + +Allow unicode escapes in property names that are keywords. + +Don't error on an exponential operator expression as argument to `await`. + +More carefully check for valid UTF16 surrogate pairs in regexp validator. + +## 7.1.0 (2019-09-24) + +### Bug fixes + +Disallow trailing object literal commas when ecmaVersion is less than 5. + +### New features + +Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on. + +## 7.0.0 (2019-08-13) + +### Breaking changes + +Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression). + +Makes 10 (ES2019) the default value for the `ecmaVersion` option. + +## 6.3.0 (2019-08-12) + +### New features + +`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard. + +## 6.2.1 (2019-07-21) + +### Bug fixes + +Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such. + +Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances. + +## 6.2.0 (2019-07-04) + +### Bug fixes + +Improve valid assignment checking in `for`/`in` and `for`/`of` loops. + +Disallow binding `let` in patterns. + +### New features + +Support bigint syntax with `ecmaVersion` >= 11. + +Support dynamic `import` syntax with `ecmaVersion` >= 11. + +Upgrade to Unicode version 12. + +## 6.1.1 (2019-02-27) + +### Bug fixes + +Fix bug that caused parsing default exports of with names to fail. + +## 6.1.0 (2019-02-08) + +### Bug fixes + +Fix scope checking when redefining a `var` as a lexical binding. + +### New features + +Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins. + +## 6.0.7 (2019-02-04) + +### Bug fixes + +Check that exported bindings are defined. + +Don't treat `\u180e` as a whitespace character. + +Check for duplicate parameter names in methods. + +Don't allow shorthand properties when they are generators or async methods. + +Forbid binding `await` in async arrow function's parameter list. + +## 6.0.6 (2019-01-30) + +### Bug fixes + +The content of class declarations and expressions is now always parsed in strict mode. + +Don't allow `let` or `const` to bind the variable name `let`. + +Treat class declarations as lexical. + +Don't allow a generator function declaration as the sole body of an `if` or `else`. + +Ignore `"use strict"` when after an empty statement. + +Allow string line continuations with special line terminator characters. + +Treat `for` bodies as part of the `for` scope when checking for conflicting bindings. + +Fix bug with parsing `yield` in a `for` loop initializer. + +Implement special cases around scope checking for functions. + +## 6.0.5 (2019-01-02) + +### Bug fixes + +Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type. + +Don't treat `let` as a keyword when the next token is `{` on the next line. + +Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on. + +## 6.0.4 (2018-11-05) + +### Bug fixes + +Further improvements to tokenizing regular expressions in corner cases. + +## 6.0.3 (2018-11-04) + +### Bug fixes + +Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression. + +Remove stray symlink in the package tarball. + +## 6.0.2 (2018-09-26) + +### Bug fixes + +Fix bug where default expressions could fail to parse inside an object destructuring assignment expression. + +## 6.0.1 (2018-09-14) + +### Bug fixes + +Fix wrong value in `version` export. + +## 6.0.0 (2018-09-14) + +### Bug fixes + +Better handle variable-redefinition checks for catch bindings and functions directly under if statements. + +Forbid `new.target` in top-level arrow functions. + +Fix issue with parsing a regexp after `yield` in some contexts. + +### New features + +The package now comes with TypeScript definitions. + +### Breaking changes + +The default value of the `ecmaVersion` option is now 9 (2018). + +Plugins work differently, and will have to be rewritten to work with this version. + +The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`). + +## 5.7.3 (2018-09-10) + +### Bug fixes + +Fix failure to tokenize regexps after expressions like `x.of`. + +Better error message for unterminated template literals. + +## 5.7.2 (2018-08-24) + +### Bug fixes + +Properly handle `allowAwaitOutsideFunction` in for statements. + +Treat function declarations at the top level of modules like let bindings. + +Don't allow async function declarations as the only statement under a label. + +## 5.7.0 (2018-06-15) + +### New features + +Upgraded to Unicode 11. + +## 5.6.0 (2018-05-31) + +### New features + +Allow U+2028 and U+2029 in string when ECMAVersion >= 10. + +Allow binding-less catch statements when ECMAVersion >= 10. + +Add `allowAwaitOutsideFunction` option for parsing top-level `await`. + +## 5.5.3 (2018-03-08) + +### Bug fixes + +A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps. + +## 5.5.2 (2018-03-08) + +### Bug fixes + +A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0. + +## 5.5.1 (2018-03-06) + +### Bug fixes + +Fix misleading error message for octal escapes in template strings. + +## 5.5.0 (2018-02-27) + +### New features + +The identifier character categorization is now based on Unicode version 10. + +Acorn will now validate the content of regular expressions, including new ES9 features. + +## 5.4.0 (2018-02-01) + +### Bug fixes + +Disallow duplicate or escaped flags on regular expressions. + +Disallow octal escapes in strings in strict mode. + +### New features + +Add support for async iteration. + +Add support for object spread and rest. + +## 5.3.0 (2017-12-28) + +### Bug fixes + +Fix parsing of floating point literals with leading zeroes in loose mode. + +Allow duplicate property names in object patterns. + +Don't allow static class methods named `prototype`. + +Disallow async functions directly under `if` or `else`. + +Parse right-hand-side of `for`/`of` as an assignment expression. + +Stricter parsing of `for`/`in`. + +Don't allow unicode escapes in contextual keywords. + +### New features + +Parsing class members was factored into smaller methods to allow plugins to hook into it. + +## 5.2.1 (2017-10-30) + +### Bug fixes + +Fix a token context corruption bug. + +## 5.2.0 (2017-10-30) + +### Bug fixes + +Fix token context tracking for `class` and `function` in property-name position. + +Make sure `%*` isn't parsed as a valid operator. + +Allow shorthand properties `get` and `set` to be followed by default values. + +Disallow `super` when not in callee or object position. + +### New features + +Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements. + +## 5.1.2 (2017-09-04) + +### Bug fixes + +Disable parsing of legacy HTML-style comments in modules. + +Fix parsing of async methods whose names are keywords. + +## 5.1.1 (2017-07-06) + +### Bug fixes + +Fix problem with disambiguating regexp and division after a class. + +## 5.1.0 (2017-07-05) + +### Bug fixes + +Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`. + +Parse zero-prefixed numbers with non-octal digits as decimal. + +Allow object/array patterns in rest parameters. + +Don't error when `yield` is used as a property name. + +Allow `async` as a shorthand object property. + +### New features + +Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9. + +## 5.0.3 (2017-04-01) + +### Bug fixes + +Fix spurious duplicate variable definition errors for named functions. + +## 5.0.2 (2017-03-30) + +### Bug fixes + +A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error. + +## 5.0.0 (2017-03-28) + +### Bug fixes + +Raise an error for duplicated lexical bindings. + +Fix spurious error when an assignement expression occurred after a spread expression. + +Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions. + +Allow labels in front or `var` declarations, even in strict mode. + +### Breaking changes + +Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`. + +## 4.0.11 (2017-02-07) + +### Bug fixes + +Allow all forms of member expressions to be parenthesized as lvalue. + +## 4.0.10 (2017-02-07) + +### Bug fixes + +Don't expect semicolons after default-exported functions or classes, even when they are expressions. + +Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode. + +## 4.0.9 (2017-02-06) + +### Bug fixes + +Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again. + +## 4.0.8 (2017-02-03) + +### Bug fixes + +Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet. + +## 4.0.7 (2017-02-02) + +### Bug fixes + +Accept invalidly rejected code like `(x).y = 2` again. + +Don't raise an error when a function _inside_ strict code has a non-simple parameter list. + +## 4.0.6 (2017-02-02) + +### Bug fixes + +Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check. + +## 4.0.5 (2017-02-02) + +### Bug fixes + +Disallow parenthesized pattern expressions. + +Allow keywords as export names. + +Don't allow the `async` keyword to be parenthesized. + +Properly raise an error when a keyword contains a character escape. + +Allow `"use strict"` to appear after other string literal expressions. + +Disallow labeled declarations. + +## 4.0.4 (2016-12-19) + +### Bug fixes + +Fix crash when `export` was followed by a keyword that can't be +exported. + +## 4.0.3 (2016-08-16) + +### Bug fixes + +Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode. + +Properly parse properties named `async` in ES2017 mode. + +Fix bug where reserved words were broken in ES2017 mode. + +## 4.0.2 (2016-08-11) + +### Bug fixes + +Don't ignore period or 'e' characters after octal numbers. + +Fix broken parsing for call expressions in default parameter values of arrow functions. + +## 4.0.1 (2016-08-08) + +### Bug fixes + +Fix false positives in duplicated export name errors. + +## 4.0.0 (2016-08-07) + +### Breaking changes + +The default `ecmaVersion` option value is now 7. + +A number of internal method signatures changed, so plugins might need to be updated. + +### Bug fixes + +The parser now raises errors on duplicated export names. + +`arguments` and `eval` can now be used in shorthand properties. + +Duplicate parameter names in non-simple argument lists now always produce an error. + +### New features + +The `ecmaVersion` option now also accepts year-style version numbers +(2015, etc). + +Support for `async`/`await` syntax when `ecmaVersion` is >= 8. + +Support for trailing commas in call expressions when `ecmaVersion` is >= 8. + +## 3.3.0 (2016-07-25) + +### Bug fixes + +Fix bug in tokenizing of regexp operator after a function declaration. + +Fix parser crash when parsing an array pattern with a hole. + +### New features + +Implement check against complex argument lists in functions that enable strict mode in ES7. + +## 3.2.0 (2016-06-07) + +### Bug fixes + +Improve handling of lack of unicode regexp support in host +environment. + +Properly reject shorthand properties whose name is a keyword. + +### New features + +Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object. + +## 3.1.0 (2016-04-18) + +### Bug fixes + +Properly tokenize the division operator directly after a function expression. + +Allow trailing comma in destructuring arrays. + +## 3.0.4 (2016-02-25) + +### Fixes + +Allow update expressions as left-hand-side of the ES7 exponential operator. + +## 3.0.2 (2016-02-10) + +### Fixes + +Fix bug that accidentally made `undefined` a reserved word when parsing ES7. + +## 3.0.0 (2016-02-10) + +### Breaking changes + +The default value of the `ecmaVersion` option is now 6 (used to be 5). + +Support for comprehension syntax (which was dropped from the draft spec) has been removed. + +### Fixes + +`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code. + +A parenthesized class or function expression after `export default` is now parsed correctly. + +### New features + +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`). + +The identifier character ranges are now based on Unicode 8.0.0. + +Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled. + +## 2.7.0 (2016-01-04) + +### Fixes + +Stop allowing rest parameters in setters. + +Disallow `y` rexexp flag in ES5. + +Disallow `\00` and `\000` escapes in strict mode. + +Raise an error when an import name is a reserved word. + +## 2.6.2 (2015-11-10) + +### Fixes + +Don't crash when no options object is passed. + +## 2.6.0 (2015-11-09) + +### Fixes + +Add `await` as a reserved word in module sources. + +Disallow `yield` in a parameter default value for a generator. + +Forbid using a comma after a rest pattern in an array destructuring. + +### New features + +Support parsing stdin in command-line tool. + +## 2.5.0 (2015-10-27) + +### Fixes + +Fix tokenizer support in the command-line tool. + +Stop allowing `new.target` outside of functions. + +Remove legacy `guard` and `guardedHandler` properties from try nodes. + +Stop allowing multiple `__proto__` properties on an object literal in strict mode. + +Don't allow rest parameters to be non-identifier patterns. + +Check for duplicate paramter names in arrow functions. diff --git a/node_modules/require-from-string/license b/node_modules/espree/node_modules/acorn/LICENSE similarity index 90% rename from node_modules/require-from-string/license rename to node_modules/espree/node_modules/acorn/LICENSE index 1aeb74fd2..9d71cc63a 100644 --- a/node_modules/require-from-string/license +++ b/node_modules/espree/node_modules/acorn/LICENSE @@ -1,6 +1,6 @@ -The MIT License (MIT) +MIT License -Copyright (c) Vsevolod Strukchinsky (github.com/floatdrop) +Copyright (C) 2012-2022 by various contributors (see AUTHORS) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/espree/node_modules/acorn/README.md b/node_modules/espree/node_modules/acorn/README.md new file mode 100644 index 000000000..cfc51b384 --- /dev/null +++ b/node_modules/espree/node_modules/acorn/README.md @@ -0,0 +1,283 @@ +# Acorn + +A tiny, fast JavaScript parser written in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE). + +You are welcome to +[report bugs](https://github.com/acornjs/acorn/issues) or create pull +requests on [github](https://github.com/acornjs/acorn). + +## Installation + +The easiest way to install acorn is from [`npm`](https://www.npmjs.com/): + +```sh +npm install acorn +``` + +Alternately, you can download the source and build acorn yourself: + +```sh +git clone https://github.com/acornjs/acorn.git +cd acorn +npm install +``` + +## Interface + +**parse**`(input, options)` is the main interface to the library. The +`input` parameter is a string, `options` must be an object setting +some of the options listed below. The return value will be an abstract +syntax tree object as specified by the [ESTree +spec](https://github.com/estree/estree). + +```javascript +let acorn = require("acorn"); +console.log(acorn.parse("1 + 1", {ecmaVersion: 2020})); +``` + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the string offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +Options are provided by in a second argument, which should be an +object containing any of these fields (only `ecmaVersion` is +required): + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019), + 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the + latest the library supports). This influences support for strict + mode, the set of reserved words, and support for new syntax + features. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being + implemented by Acorn. Other proposed new features must be + implemented through plugins. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. This influences global strict mode + and parsing of `import` and `export` declarations. + + **NOTE**: If set to `"module"`, then static `import` / `export` syntax + will be valid, even if `ecmaVersion` is less than 6. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed, + and also allows `import.meta` expressions to appear in scripts + (when `sourceType` is not `"module"`). + +- **allowAwaitOutsideFunction**: If `false`, `await` expressions can + only appear inside `async` functions. Defaults to `true` in modules + for `ecmaVersion` 2022 and later, `false` for lower versions. + Setting this option to `true` allows to have top-level `await` + expressions. They are still not allowed in non-`async` functions, + though. + +- **allowSuperOutsideMethod**: By default, `super` outside a method + raises an error. Set this to `true` to accept such code. + +- **allowHashBang**: When this is enabled, if the code starts with the + characters `#!` (as in a shellscript), the first line will be + treated as a comment. Defaults to true when `ecmaVersion` >= 2023. + +- **checkPrivateFields**: By default, the parser will verify that + private properties are only used in places where they are valid and + have been declared. Set this to false to turn such checks off. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a + [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678) + `range` property holding a `[start, end]` array with the same + numbers, set the `ranges` option to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +Note that tokenizing JavaScript without parsing it is, in modern +versions of the language, not really possible due to the way syntax is +overloaded in ways that can only be disambiguated by the parse +context. This package applies a bunch of heuristics to try and do a +reasonable job, but you are advised to use `parse` with the `onToken` +option instead of this. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and offset. + +### The `Parser` class + +Instances of the **`Parser`** class contain all the state and logic +that drives a parse. It has static methods `parse`, +`parseExpressionAt`, and `tokenizer` that match the top-level +functions by the same name. + +When extending the parser with plugins, you need to call these methods +on the extended version of the class. To extend a parser with plugins, +you can use its static `extend` method. + +```javascript +var acorn = require("acorn"); +var jsx = require("acorn-jsx"); +var JSXParser = acorn.Parser.extend(jsx()); +JSXParser.parse("foo()", {ecmaVersion: 2020}); +``` + +The `extend` method takes any number of plugin values, and returns a +new `Parser` class that includes the extra parser logic provided by +the plugins. + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version + to parse. Default is version 9. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as + in a shellscript), the first line will be treated as a comment. + +- `--allow-await-outside-function`: Allows top-level `await` expressions. + See the `allowAwaitOutsideFunction` option for more information. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) diff --git a/node_modules/espree/node_modules/acorn/bin/acorn b/node_modules/espree/node_modules/acorn/bin/acorn new file mode 100755 index 000000000..3ef3c124b --- /dev/null +++ b/node_modules/espree/node_modules/acorn/bin/acorn @@ -0,0 +1,4 @@ +#!/usr/bin/env node +"use strict" + +require("../dist/bin.js") diff --git a/node_modules/espree/node_modules/acorn/dist/acorn.d.mts b/node_modules/espree/node_modules/acorn/dist/acorn.d.mts new file mode 100644 index 000000000..6ad581211 --- /dev/null +++ b/node_modules/espree/node_modules/acorn/dist/acorn.d.mts @@ -0,0 +1,857 @@ +export interface Node { + start: number + end: number + type: string + range?: [number, number] + loc?: SourceLocation | null +} + +export interface SourceLocation { + source?: string | null + start: Position + end: Position +} + +export interface Position { + /** 1-based */ + line: number + /** 0-based */ + column: number +} + +export interface Identifier extends Node { + type: "Identifier" + name: string +} + +export interface Literal extends Node { + type: "Literal" + value?: string | boolean | null | number | RegExp | bigint + raw?: string + regex?: { + pattern: string + flags: string + } + bigint?: string +} + +export interface Program extends Node { + type: "Program" + body: Array + sourceType: "script" | "module" +} + +export interface Function extends Node { + id?: Identifier | null + params: Array + body: BlockStatement | Expression + generator: boolean + expression: boolean + async: boolean +} + +export interface ExpressionStatement extends Node { + type: "ExpressionStatement" + expression: Expression | Literal + directive?: string +} + +export interface BlockStatement extends Node { + type: "BlockStatement" + body: Array +} + +export interface EmptyStatement extends Node { + type: "EmptyStatement" +} + +export interface DebuggerStatement extends Node { + type: "DebuggerStatement" +} + +export interface WithStatement extends Node { + type: "WithStatement" + object: Expression + body: Statement +} + +export interface ReturnStatement extends Node { + type: "ReturnStatement" + argument?: Expression | null +} + +export interface LabeledStatement extends Node { + type: "LabeledStatement" + label: Identifier + body: Statement +} + +export interface BreakStatement extends Node { + type: "BreakStatement" + label?: Identifier | null +} + +export interface ContinueStatement extends Node { + type: "ContinueStatement" + label?: Identifier | null +} + +export interface IfStatement extends Node { + type: "IfStatement" + test: Expression + consequent: Statement + alternate?: Statement | null +} + +export interface SwitchStatement extends Node { + type: "SwitchStatement" + discriminant: Expression + cases: Array +} + +export interface SwitchCase extends Node { + type: "SwitchCase" + test?: Expression | null + consequent: Array +} + +export interface ThrowStatement extends Node { + type: "ThrowStatement" + argument: Expression +} + +export interface TryStatement extends Node { + type: "TryStatement" + block: BlockStatement + handler?: CatchClause | null + finalizer?: BlockStatement | null +} + +export interface CatchClause extends Node { + type: "CatchClause" + param?: Pattern | null + body: BlockStatement +} + +export interface WhileStatement extends Node { + type: "WhileStatement" + test: Expression + body: Statement +} + +export interface DoWhileStatement extends Node { + type: "DoWhileStatement" + body: Statement + test: Expression +} + +export interface ForStatement extends Node { + type: "ForStatement" + init?: VariableDeclaration | Expression | null + test?: Expression | null + update?: Expression | null + body: Statement +} + +export interface ForInStatement extends Node { + type: "ForInStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement +} + +export interface FunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: Identifier + body: BlockStatement +} + +export interface VariableDeclaration extends Node { + type: "VariableDeclaration" + declarations: Array + kind: "var" | "let" | "const" +} + +export interface VariableDeclarator extends Node { + type: "VariableDeclarator" + id: Pattern + init?: Expression | null +} + +export interface ThisExpression extends Node { + type: "ThisExpression" +} + +export interface ArrayExpression extends Node { + type: "ArrayExpression" + elements: Array +} + +export interface ObjectExpression extends Node { + type: "ObjectExpression" + properties: Array +} + +export interface Property extends Node { + type: "Property" + key: Expression + value: Expression + kind: "init" | "get" | "set" + method: boolean + shorthand: boolean + computed: boolean +} + +export interface FunctionExpression extends Function { + type: "FunctionExpression" + body: BlockStatement +} + +export interface UnaryExpression extends Node { + type: "UnaryExpression" + operator: UnaryOperator + prefix: boolean + argument: Expression +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" + +export interface UpdateExpression extends Node { + type: "UpdateExpression" + operator: UpdateOperator + argument: Expression + prefix: boolean +} + +export type UpdateOperator = "++" | "--" + +export interface BinaryExpression extends Node { + type: "BinaryExpression" + operator: BinaryOperator + left: Expression | PrivateIdentifier + right: Expression +} + +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**" + +export interface AssignmentExpression extends Node { + type: "AssignmentExpression" + operator: AssignmentOperator + left: Pattern + right: Expression +} + +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=" + +export interface LogicalExpression extends Node { + type: "LogicalExpression" + operator: LogicalOperator + left: Expression + right: Expression +} + +export type LogicalOperator = "||" | "&&" | "??" + +export interface MemberExpression extends Node { + type: "MemberExpression" + object: Expression | Super + property: Expression | PrivateIdentifier + computed: boolean + optional: boolean +} + +export interface ConditionalExpression extends Node { + type: "ConditionalExpression" + test: Expression + alternate: Expression + consequent: Expression +} + +export interface CallExpression extends Node { + type: "CallExpression" + callee: Expression | Super + arguments: Array + optional: boolean +} + +export interface NewExpression extends Node { + type: "NewExpression" + callee: Expression + arguments: Array +} + +export interface SequenceExpression extends Node { + type: "SequenceExpression" + expressions: Array +} + +export interface ForOfStatement extends Node { + type: "ForOfStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement + await: boolean +} + +export interface Super extends Node { + type: "Super" +} + +export interface SpreadElement extends Node { + type: "SpreadElement" + argument: Expression +} + +export interface ArrowFunctionExpression extends Function { + type: "ArrowFunctionExpression" +} + +export interface YieldExpression extends Node { + type: "YieldExpression" + argument?: Expression | null + delegate: boolean +} + +export interface TemplateLiteral extends Node { + type: "TemplateLiteral" + quasis: Array + expressions: Array +} + +export interface TaggedTemplateExpression extends Node { + type: "TaggedTemplateExpression" + tag: Expression + quasi: TemplateLiteral +} + +export interface TemplateElement extends Node { + type: "TemplateElement" + tail: boolean + value: { + cooked?: string | null + raw: string + } +} + +export interface AssignmentProperty extends Node { + type: "Property" + key: Expression + value: Pattern + kind: "init" + method: false + shorthand: boolean + computed: boolean +} + +export interface ObjectPattern extends Node { + type: "ObjectPattern" + properties: Array +} + +export interface ArrayPattern extends Node { + type: "ArrayPattern" + elements: Array +} + +export interface RestElement extends Node { + type: "RestElement" + argument: Pattern +} + +export interface AssignmentPattern extends Node { + type: "AssignmentPattern" + left: Pattern + right: Expression +} + +export interface Class extends Node { + id?: Identifier | null + superClass?: Expression | null + body: ClassBody +} + +export interface ClassBody extends Node { + type: "ClassBody" + body: Array +} + +export interface MethodDefinition extends Node { + type: "MethodDefinition" + key: Expression | PrivateIdentifier + value: FunctionExpression + kind: "constructor" | "method" | "get" | "set" + computed: boolean + static: boolean +} + +export interface ClassDeclaration extends Class { + type: "ClassDeclaration" + id: Identifier +} + +export interface ClassExpression extends Class { + type: "ClassExpression" +} + +export interface MetaProperty extends Node { + type: "MetaProperty" + meta: Identifier + property: Identifier +} + +export interface ImportDeclaration extends Node { + type: "ImportDeclaration" + specifiers: Array + source: Literal +} + +export interface ImportSpecifier extends Node { + type: "ImportSpecifier" + imported: Identifier | Literal + local: Identifier +} + +export interface ImportDefaultSpecifier extends Node { + type: "ImportDefaultSpecifier" + local: Identifier +} + +export interface ImportNamespaceSpecifier extends Node { + type: "ImportNamespaceSpecifier" + local: Identifier +} + +export interface ExportNamedDeclaration extends Node { + type: "ExportNamedDeclaration" + declaration?: Declaration | null + specifiers: Array + source?: Literal | null +} + +export interface ExportSpecifier extends Node { + type: "ExportSpecifier" + exported: Identifier | Literal + local: Identifier | Literal +} + +export interface AnonymousFunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: null + body: BlockStatement +} + +export interface AnonymousClassDeclaration extends Class { + type: "ClassDeclaration" + id: null +} + +export interface ExportDefaultDeclaration extends Node { + type: "ExportDefaultDeclaration" + declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression +} + +export interface ExportAllDeclaration extends Node { + type: "ExportAllDeclaration" + source: Literal + exported?: Identifier | Literal | null +} + +export interface AwaitExpression extends Node { + type: "AwaitExpression" + argument: Expression +} + +export interface ChainExpression extends Node { + type: "ChainExpression" + expression: MemberExpression | CallExpression +} + +export interface ImportExpression extends Node { + type: "ImportExpression" + source: Expression +} + +export interface ParenthesizedExpression extends Node { + type: "ParenthesizedExpression" + expression: Expression +} + +export interface PropertyDefinition extends Node { + type: "PropertyDefinition" + key: Expression | PrivateIdentifier + value?: Expression | null + computed: boolean + static: boolean +} + +export interface PrivateIdentifier extends Node { + type: "PrivateIdentifier" + name: string +} + +export interface StaticBlock extends Node { + type: "StaticBlock" + body: Array +} + +export type Statement = +| ExpressionStatement +| BlockStatement +| EmptyStatement +| DebuggerStatement +| WithStatement +| ReturnStatement +| LabeledStatement +| BreakStatement +| ContinueStatement +| IfStatement +| SwitchStatement +| ThrowStatement +| TryStatement +| WhileStatement +| DoWhileStatement +| ForStatement +| ForInStatement +| ForOfStatement +| Declaration + +export type Declaration = +| FunctionDeclaration +| VariableDeclaration +| ClassDeclaration + +export type Expression = +| Identifier +| Literal +| ThisExpression +| ArrayExpression +| ObjectExpression +| FunctionExpression +| UnaryExpression +| UpdateExpression +| BinaryExpression +| AssignmentExpression +| LogicalExpression +| MemberExpression +| ConditionalExpression +| CallExpression +| NewExpression +| SequenceExpression +| ArrowFunctionExpression +| YieldExpression +| TemplateLiteral +| TaggedTemplateExpression +| ClassExpression +| MetaProperty +| AwaitExpression +| ChainExpression +| ImportExpression +| ParenthesizedExpression + +export type Pattern = +| Identifier +| MemberExpression +| ObjectPattern +| ArrayPattern +| RestElement +| AssignmentPattern + +export type ModuleDeclaration = +| ImportDeclaration +| ExportNamedDeclaration +| ExportDefaultDeclaration +| ExportAllDeclaration + +export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock + +export function parse(input: string, options: Options): Program + +export function parseExpressionAt(input: string, pos: number, options: Options): Expression + +export function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator +} + +export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | "latest" + +export interface Options { + /** + * `ecmaVersion` indicates the ECMAScript version to parse. Must be + * either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + * (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` + * (the latest version the library supports). This influences + * support for strict mode, the set of reserved words, and support + * for new syntax features. + */ + ecmaVersion: ecmaVersion + + /** + * `sourceType` indicates the mode the code should be parsed in. + * Can be either `"script"` or `"module"`. This influences global + * strict mode and parsing of `import` and `export` declarations. + */ + sourceType?: "script" | "module" + + /** + * a callback that will be called when a semicolon is automatically inserted. + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if {@link locations} is enabled + */ + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * similar to `onInsertedSemicolon`, but for trailing commas + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if `locations` is enabled + */ + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * By default, reserved words are only enforced if ecmaVersion >= 5. + * Set `allowReserved` to a boolean value to explicitly turn this on + * an off. When this option has the value "never", reserved words + * and keywords can also not be used as property names. + */ + allowReserved?: boolean | "never" + + /** + * When enabled, a return at the top level is not considered an error. + */ + allowReturnOutsideFunction?: boolean + + /** + * When enabled, import/export statements are not constrained to + * appearing at the top of the program, and an import.meta expression + * in a script isn't considered an error. + */ + allowImportExportEverywhere?: boolean + + /** + * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022. + * When enabled, await identifiers are allowed to appear at the top-level scope, + * but they are still not allowed in non-async functions. + */ + allowAwaitOutsideFunction?: boolean + + /** + * When enabled, super identifiers are not constrained to + * appearing in methods and do not raise an error when they appear elsewhere. + */ + allowSuperOutsideMethod?: boolean + + /** + * When enabled, hashbang directive in the beginning of file is + * allowed and treated as a line comment. Enabled by default when + * {@link ecmaVersion} >= 2023. + */ + allowHashBang?: boolean + + /** + * By default, the parser will verify that private properties are + * only used in places where they are valid and have been declared. + * Set this to false to turn such checks off. + */ + checkPrivateFields?: boolean + + /** + * When `locations` is on, `loc` properties holding objects with + * `start` and `end` properties as {@link Position} objects will be attached to the + * nodes. + */ + locations?: boolean + + /** + * a callback that will cause Acorn to call that export function with object in the same + * format as tokens returned from `tokenizer().getToken()`. Note + * that you are not allowed to call the parser from the + * callback—that will corrupt its internal state. + */ + onToken?: ((token: Token) => void) | Token[] + + + /** + * This takes a export function or an array. + * + * When a export function is passed, Acorn will call that export function with `(block, text, start, + * end)` parameters whenever a comment is skipped. `block` is a + * boolean indicating whether this is a block (`/* *\/`) comment, + * `text` is the content of the comment, and `start` and `end` are + * character offsets that denote the start and end of the comment. + * When the {@link locations} option is on, two more parameters are + * passed, the full locations of {@link Position} export type of the start and + * end of the comments. + * + * When a array is passed, each found comment of {@link Comment} export type is pushed to the array. + * + * Note that you are not allowed to call the + * parser from the callback—that will corrupt its internal state. + */ + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + + /** + * Nodes have their start and end characters offsets recorded in + * `start` and `end` properties (directly on the node, rather than + * the `loc` object, which holds line/column data. To also add a + * [semi-standardized][range] `range` property holding a `[start, + * end]` array with the same numbers, set the `ranges` option to + * `true`. + */ + ranges?: boolean + + /** + * It is possible to parse multiple files into a single AST by + * passing the tree produced by parsing the first file as + * `program` option in subsequent parses. This will add the + * toplevel forms of the parsed file to the `Program` (top) node + * of an existing parse tree. + */ + program?: Node + + /** + * When {@link locations} is on, you can pass this to record the source + * file in every node's `loc` object. + */ + sourceFile?: string + + /** + * This value, if given, is stored in every node, whether {@link locations} is on or off. + */ + directSourceFile?: string + + /** + * When enabled, parenthesized expressions are represented by + * (non-standard) ParenthesizedExpression nodes + */ + preserveParens?: boolean +} + +export class Parser { + options: Options + input: string + + private constructor(options: Options, input: string, startPos?: number) + parse(): Program + + static parse(input: string, options: Options): Program + static parseExpressionAt(input: string, pos: number, options: Options): Expression + static tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser +} + +export const defaultOptions: Options + +export function getLineInfo(input: string, offset: number): Position + +export class TokenType { + label: string + keyword: string | undefined +} + +export const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + privateId: TokenType + eof: TokenType + + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + questionDot: TokenType + arrow: TokenType + template: TokenType + invalidTemplate: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + coalesce: TokenType + + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType +} + +export interface Comment { + type: "Line" | "Block" + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export class Token { + type: TokenType + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export const version: string diff --git a/node_modules/espree/node_modules/acorn/dist/acorn.d.ts b/node_modules/espree/node_modules/acorn/dist/acorn.d.ts new file mode 100644 index 000000000..6ad581211 --- /dev/null +++ b/node_modules/espree/node_modules/acorn/dist/acorn.d.ts @@ -0,0 +1,857 @@ +export interface Node { + start: number + end: number + type: string + range?: [number, number] + loc?: SourceLocation | null +} + +export interface SourceLocation { + source?: string | null + start: Position + end: Position +} + +export interface Position { + /** 1-based */ + line: number + /** 0-based */ + column: number +} + +export interface Identifier extends Node { + type: "Identifier" + name: string +} + +export interface Literal extends Node { + type: "Literal" + value?: string | boolean | null | number | RegExp | bigint + raw?: string + regex?: { + pattern: string + flags: string + } + bigint?: string +} + +export interface Program extends Node { + type: "Program" + body: Array + sourceType: "script" | "module" +} + +export interface Function extends Node { + id?: Identifier | null + params: Array + body: BlockStatement | Expression + generator: boolean + expression: boolean + async: boolean +} + +export interface ExpressionStatement extends Node { + type: "ExpressionStatement" + expression: Expression | Literal + directive?: string +} + +export interface BlockStatement extends Node { + type: "BlockStatement" + body: Array +} + +export interface EmptyStatement extends Node { + type: "EmptyStatement" +} + +export interface DebuggerStatement extends Node { + type: "DebuggerStatement" +} + +export interface WithStatement extends Node { + type: "WithStatement" + object: Expression + body: Statement +} + +export interface ReturnStatement extends Node { + type: "ReturnStatement" + argument?: Expression | null +} + +export interface LabeledStatement extends Node { + type: "LabeledStatement" + label: Identifier + body: Statement +} + +export interface BreakStatement extends Node { + type: "BreakStatement" + label?: Identifier | null +} + +export interface ContinueStatement extends Node { + type: "ContinueStatement" + label?: Identifier | null +} + +export interface IfStatement extends Node { + type: "IfStatement" + test: Expression + consequent: Statement + alternate?: Statement | null +} + +export interface SwitchStatement extends Node { + type: "SwitchStatement" + discriminant: Expression + cases: Array +} + +export interface SwitchCase extends Node { + type: "SwitchCase" + test?: Expression | null + consequent: Array +} + +export interface ThrowStatement extends Node { + type: "ThrowStatement" + argument: Expression +} + +export interface TryStatement extends Node { + type: "TryStatement" + block: BlockStatement + handler?: CatchClause | null + finalizer?: BlockStatement | null +} + +export interface CatchClause extends Node { + type: "CatchClause" + param?: Pattern | null + body: BlockStatement +} + +export interface WhileStatement extends Node { + type: "WhileStatement" + test: Expression + body: Statement +} + +export interface DoWhileStatement extends Node { + type: "DoWhileStatement" + body: Statement + test: Expression +} + +export interface ForStatement extends Node { + type: "ForStatement" + init?: VariableDeclaration | Expression | null + test?: Expression | null + update?: Expression | null + body: Statement +} + +export interface ForInStatement extends Node { + type: "ForInStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement +} + +export interface FunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: Identifier + body: BlockStatement +} + +export interface VariableDeclaration extends Node { + type: "VariableDeclaration" + declarations: Array + kind: "var" | "let" | "const" +} + +export interface VariableDeclarator extends Node { + type: "VariableDeclarator" + id: Pattern + init?: Expression | null +} + +export interface ThisExpression extends Node { + type: "ThisExpression" +} + +export interface ArrayExpression extends Node { + type: "ArrayExpression" + elements: Array +} + +export interface ObjectExpression extends Node { + type: "ObjectExpression" + properties: Array +} + +export interface Property extends Node { + type: "Property" + key: Expression + value: Expression + kind: "init" | "get" | "set" + method: boolean + shorthand: boolean + computed: boolean +} + +export interface FunctionExpression extends Function { + type: "FunctionExpression" + body: BlockStatement +} + +export interface UnaryExpression extends Node { + type: "UnaryExpression" + operator: UnaryOperator + prefix: boolean + argument: Expression +} + +export type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete" + +export interface UpdateExpression extends Node { + type: "UpdateExpression" + operator: UpdateOperator + argument: Expression + prefix: boolean +} + +export type UpdateOperator = "++" | "--" + +export interface BinaryExpression extends Node { + type: "BinaryExpression" + operator: BinaryOperator + left: Expression | PrivateIdentifier + right: Expression +} + +export type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "|" | "^" | "&" | "in" | "instanceof" | "**" + +export interface AssignmentExpression extends Node { + type: "AssignmentExpression" + operator: AssignmentOperator + left: Pattern + right: Expression +} + +export type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "**=" | "||=" | "&&=" | "??=" + +export interface LogicalExpression extends Node { + type: "LogicalExpression" + operator: LogicalOperator + left: Expression + right: Expression +} + +export type LogicalOperator = "||" | "&&" | "??" + +export interface MemberExpression extends Node { + type: "MemberExpression" + object: Expression | Super + property: Expression | PrivateIdentifier + computed: boolean + optional: boolean +} + +export interface ConditionalExpression extends Node { + type: "ConditionalExpression" + test: Expression + alternate: Expression + consequent: Expression +} + +export interface CallExpression extends Node { + type: "CallExpression" + callee: Expression | Super + arguments: Array + optional: boolean +} + +export interface NewExpression extends Node { + type: "NewExpression" + callee: Expression + arguments: Array +} + +export interface SequenceExpression extends Node { + type: "SequenceExpression" + expressions: Array +} + +export interface ForOfStatement extends Node { + type: "ForOfStatement" + left: VariableDeclaration | Pattern + right: Expression + body: Statement + await: boolean +} + +export interface Super extends Node { + type: "Super" +} + +export interface SpreadElement extends Node { + type: "SpreadElement" + argument: Expression +} + +export interface ArrowFunctionExpression extends Function { + type: "ArrowFunctionExpression" +} + +export interface YieldExpression extends Node { + type: "YieldExpression" + argument?: Expression | null + delegate: boolean +} + +export interface TemplateLiteral extends Node { + type: "TemplateLiteral" + quasis: Array + expressions: Array +} + +export interface TaggedTemplateExpression extends Node { + type: "TaggedTemplateExpression" + tag: Expression + quasi: TemplateLiteral +} + +export interface TemplateElement extends Node { + type: "TemplateElement" + tail: boolean + value: { + cooked?: string | null + raw: string + } +} + +export interface AssignmentProperty extends Node { + type: "Property" + key: Expression + value: Pattern + kind: "init" + method: false + shorthand: boolean + computed: boolean +} + +export interface ObjectPattern extends Node { + type: "ObjectPattern" + properties: Array +} + +export interface ArrayPattern extends Node { + type: "ArrayPattern" + elements: Array +} + +export interface RestElement extends Node { + type: "RestElement" + argument: Pattern +} + +export interface AssignmentPattern extends Node { + type: "AssignmentPattern" + left: Pattern + right: Expression +} + +export interface Class extends Node { + id?: Identifier | null + superClass?: Expression | null + body: ClassBody +} + +export interface ClassBody extends Node { + type: "ClassBody" + body: Array +} + +export interface MethodDefinition extends Node { + type: "MethodDefinition" + key: Expression | PrivateIdentifier + value: FunctionExpression + kind: "constructor" | "method" | "get" | "set" + computed: boolean + static: boolean +} + +export interface ClassDeclaration extends Class { + type: "ClassDeclaration" + id: Identifier +} + +export interface ClassExpression extends Class { + type: "ClassExpression" +} + +export interface MetaProperty extends Node { + type: "MetaProperty" + meta: Identifier + property: Identifier +} + +export interface ImportDeclaration extends Node { + type: "ImportDeclaration" + specifiers: Array + source: Literal +} + +export interface ImportSpecifier extends Node { + type: "ImportSpecifier" + imported: Identifier | Literal + local: Identifier +} + +export interface ImportDefaultSpecifier extends Node { + type: "ImportDefaultSpecifier" + local: Identifier +} + +export interface ImportNamespaceSpecifier extends Node { + type: "ImportNamespaceSpecifier" + local: Identifier +} + +export interface ExportNamedDeclaration extends Node { + type: "ExportNamedDeclaration" + declaration?: Declaration | null + specifiers: Array + source?: Literal | null +} + +export interface ExportSpecifier extends Node { + type: "ExportSpecifier" + exported: Identifier | Literal + local: Identifier | Literal +} + +export interface AnonymousFunctionDeclaration extends Function { + type: "FunctionDeclaration" + id: null + body: BlockStatement +} + +export interface AnonymousClassDeclaration extends Class { + type: "ClassDeclaration" + id: null +} + +export interface ExportDefaultDeclaration extends Node { + type: "ExportDefaultDeclaration" + declaration: AnonymousFunctionDeclaration | FunctionDeclaration | AnonymousClassDeclaration | ClassDeclaration | Expression +} + +export interface ExportAllDeclaration extends Node { + type: "ExportAllDeclaration" + source: Literal + exported?: Identifier | Literal | null +} + +export interface AwaitExpression extends Node { + type: "AwaitExpression" + argument: Expression +} + +export interface ChainExpression extends Node { + type: "ChainExpression" + expression: MemberExpression | CallExpression +} + +export interface ImportExpression extends Node { + type: "ImportExpression" + source: Expression +} + +export interface ParenthesizedExpression extends Node { + type: "ParenthesizedExpression" + expression: Expression +} + +export interface PropertyDefinition extends Node { + type: "PropertyDefinition" + key: Expression | PrivateIdentifier + value?: Expression | null + computed: boolean + static: boolean +} + +export interface PrivateIdentifier extends Node { + type: "PrivateIdentifier" + name: string +} + +export interface StaticBlock extends Node { + type: "StaticBlock" + body: Array +} + +export type Statement = +| ExpressionStatement +| BlockStatement +| EmptyStatement +| DebuggerStatement +| WithStatement +| ReturnStatement +| LabeledStatement +| BreakStatement +| ContinueStatement +| IfStatement +| SwitchStatement +| ThrowStatement +| TryStatement +| WhileStatement +| DoWhileStatement +| ForStatement +| ForInStatement +| ForOfStatement +| Declaration + +export type Declaration = +| FunctionDeclaration +| VariableDeclaration +| ClassDeclaration + +export type Expression = +| Identifier +| Literal +| ThisExpression +| ArrayExpression +| ObjectExpression +| FunctionExpression +| UnaryExpression +| UpdateExpression +| BinaryExpression +| AssignmentExpression +| LogicalExpression +| MemberExpression +| ConditionalExpression +| CallExpression +| NewExpression +| SequenceExpression +| ArrowFunctionExpression +| YieldExpression +| TemplateLiteral +| TaggedTemplateExpression +| ClassExpression +| MetaProperty +| AwaitExpression +| ChainExpression +| ImportExpression +| ParenthesizedExpression + +export type Pattern = +| Identifier +| MemberExpression +| ObjectPattern +| ArrayPattern +| RestElement +| AssignmentPattern + +export type ModuleDeclaration = +| ImportDeclaration +| ExportNamedDeclaration +| ExportDefaultDeclaration +| ExportAllDeclaration + +export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock + +export function parse(input: string, options: Options): Program + +export function parseExpressionAt(input: string, pos: number, options: Options): Expression + +export function tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator +} + +export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | "latest" + +export interface Options { + /** + * `ecmaVersion` indicates the ECMAScript version to parse. Must be + * either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + * (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` + * (the latest version the library supports). This influences + * support for strict mode, the set of reserved words, and support + * for new syntax features. + */ + ecmaVersion: ecmaVersion + + /** + * `sourceType` indicates the mode the code should be parsed in. + * Can be either `"script"` or `"module"`. This influences global + * strict mode and parsing of `import` and `export` declarations. + */ + sourceType?: "script" | "module" + + /** + * a callback that will be called when a semicolon is automatically inserted. + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if {@link locations} is enabled + */ + onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * similar to `onInsertedSemicolon`, but for trailing commas + * @param lastTokEnd the position of the comma as an offset + * @param lastTokEndLoc location if `locations` is enabled + */ + onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void + + /** + * By default, reserved words are only enforced if ecmaVersion >= 5. + * Set `allowReserved` to a boolean value to explicitly turn this on + * an off. When this option has the value "never", reserved words + * and keywords can also not be used as property names. + */ + allowReserved?: boolean | "never" + + /** + * When enabled, a return at the top level is not considered an error. + */ + allowReturnOutsideFunction?: boolean + + /** + * When enabled, import/export statements are not constrained to + * appearing at the top of the program, and an import.meta expression + * in a script isn't considered an error. + */ + allowImportExportEverywhere?: boolean + + /** + * By default, `await` identifiers are allowed to appear at the top-level scope only if {@link ecmaVersion} >= 2022. + * When enabled, await identifiers are allowed to appear at the top-level scope, + * but they are still not allowed in non-async functions. + */ + allowAwaitOutsideFunction?: boolean + + /** + * When enabled, super identifiers are not constrained to + * appearing in methods and do not raise an error when they appear elsewhere. + */ + allowSuperOutsideMethod?: boolean + + /** + * When enabled, hashbang directive in the beginning of file is + * allowed and treated as a line comment. Enabled by default when + * {@link ecmaVersion} >= 2023. + */ + allowHashBang?: boolean + + /** + * By default, the parser will verify that private properties are + * only used in places where they are valid and have been declared. + * Set this to false to turn such checks off. + */ + checkPrivateFields?: boolean + + /** + * When `locations` is on, `loc` properties holding objects with + * `start` and `end` properties as {@link Position} objects will be attached to the + * nodes. + */ + locations?: boolean + + /** + * a callback that will cause Acorn to call that export function with object in the same + * format as tokens returned from `tokenizer().getToken()`. Note + * that you are not allowed to call the parser from the + * callback—that will corrupt its internal state. + */ + onToken?: ((token: Token) => void) | Token[] + + + /** + * This takes a export function or an array. + * + * When a export function is passed, Acorn will call that export function with `(block, text, start, + * end)` parameters whenever a comment is skipped. `block` is a + * boolean indicating whether this is a block (`/* *\/`) comment, + * `text` is the content of the comment, and `start` and `end` are + * character offsets that denote the start and end of the comment. + * When the {@link locations} option is on, two more parameters are + * passed, the full locations of {@link Position} export type of the start and + * end of the comments. + * + * When a array is passed, each found comment of {@link Comment} export type is pushed to the array. + * + * Note that you are not allowed to call the + * parser from the callback—that will corrupt its internal state. + */ + onComment?: (( + isBlock: boolean, text: string, start: number, end: number, startLoc?: Position, + endLoc?: Position + ) => void) | Comment[] + + /** + * Nodes have their start and end characters offsets recorded in + * `start` and `end` properties (directly on the node, rather than + * the `loc` object, which holds line/column data. To also add a + * [semi-standardized][range] `range` property holding a `[start, + * end]` array with the same numbers, set the `ranges` option to + * `true`. + */ + ranges?: boolean + + /** + * It is possible to parse multiple files into a single AST by + * passing the tree produced by parsing the first file as + * `program` option in subsequent parses. This will add the + * toplevel forms of the parsed file to the `Program` (top) node + * of an existing parse tree. + */ + program?: Node + + /** + * When {@link locations} is on, you can pass this to record the source + * file in every node's `loc` object. + */ + sourceFile?: string + + /** + * This value, if given, is stored in every node, whether {@link locations} is on or off. + */ + directSourceFile?: string + + /** + * When enabled, parenthesized expressions are represented by + * (non-standard) ParenthesizedExpression nodes + */ + preserveParens?: boolean +} + +export class Parser { + options: Options + input: string + + private constructor(options: Options, input: string, startPos?: number) + parse(): Program + + static parse(input: string, options: Options): Program + static parseExpressionAt(input: string, pos: number, options: Options): Expression + static tokenizer(input: string, options: Options): { + getToken(): Token + [Symbol.iterator](): Iterator + } + static extend(...plugins: ((BaseParser: typeof Parser) => typeof Parser)[]): typeof Parser +} + +export const defaultOptions: Options + +export function getLineInfo(input: string, offset: number): Position + +export class TokenType { + label: string + keyword: string | undefined +} + +export const tokTypes: { + num: TokenType + regexp: TokenType + string: TokenType + name: TokenType + privateId: TokenType + eof: TokenType + + bracketL: TokenType + bracketR: TokenType + braceL: TokenType + braceR: TokenType + parenL: TokenType + parenR: TokenType + comma: TokenType + semi: TokenType + colon: TokenType + dot: TokenType + question: TokenType + questionDot: TokenType + arrow: TokenType + template: TokenType + invalidTemplate: TokenType + ellipsis: TokenType + backQuote: TokenType + dollarBraceL: TokenType + + eq: TokenType + assign: TokenType + incDec: TokenType + prefix: TokenType + logicalOR: TokenType + logicalAND: TokenType + bitwiseOR: TokenType + bitwiseXOR: TokenType + bitwiseAND: TokenType + equality: TokenType + relational: TokenType + bitShift: TokenType + plusMin: TokenType + modulo: TokenType + star: TokenType + slash: TokenType + starstar: TokenType + coalesce: TokenType + + _break: TokenType + _case: TokenType + _catch: TokenType + _continue: TokenType + _debugger: TokenType + _default: TokenType + _do: TokenType + _else: TokenType + _finally: TokenType + _for: TokenType + _function: TokenType + _if: TokenType + _return: TokenType + _switch: TokenType + _throw: TokenType + _try: TokenType + _var: TokenType + _const: TokenType + _while: TokenType + _with: TokenType + _new: TokenType + _this: TokenType + _super: TokenType + _class: TokenType + _extends: TokenType + _export: TokenType + _import: TokenType + _null: TokenType + _true: TokenType + _false: TokenType + _in: TokenType + _instanceof: TokenType + _typeof: TokenType + _void: TokenType + _delete: TokenType +} + +export interface Comment { + type: "Line" | "Block" + value: string + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export class Token { + type: TokenType + start: number + end: number + loc?: SourceLocation + range?: [number, number] +} + +export const version: string diff --git a/node_modules/espree/node_modules/acorn/dist/acorn.js b/node_modules/espree/node_modules/acorn/dist/acorn.js new file mode 100644 index 000000000..3a6a3a2ae --- /dev/null +++ b/node_modules/espree/node_modules/acorn/dist/acorn.js @@ -0,0 +1,6002 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {})); +})(this, (function (exports) { 'use strict'; + + // This file was generated. Do not modify manually! + var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; + + // This file was generated. Do not modify manually! + var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 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, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; + + // This file was generated. Do not modify manually! + var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0cf3\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ece\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\u30fb\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f\uff65"; + + // This file was generated. Do not modify manually! + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + + // These are a run-length and offset encoded representation of the + // >0xffff code points that are a valid part of identifiers. The + // offset starts at 0x10000, and each pair of numbers represents an + // offset to the next range, and then a size of the range. + + // Reserved word lists for various dialects of the language + + var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" + }; + + // And the keywords + + var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; + + var keywords$1 = { + 5: ecma5AndLessKeywords, + "5module": ecma5AndLessKeywords + " export import", + 6: ecma5AndLessKeywords + " const class extends export import super" + }; + + var keywordRelationalOperator = /^in(stanceof)?$/; + + // ## Character categories + + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + // This has a complexity linear to the value of the code. The + // assumption is that looking up astral identifier characters is + // rare. + function isInAstralSet(code, set) { + var pos = 0x10000; + for (var i = 0; i < set.length; i += 2) { + pos += set[i]; + if (pos > code) { return false } + pos += set[i + 1]; + if (pos >= code) { return true } + } + return false + } + + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code, astral) { + if (code < 65) { return code === 36 } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code, astral) { + if (code < 48) { return code === 36 } + if (code < 58) { return true } + if (code < 65) { return false } + if (code < 91) { return true } + if (code < 97) { return code === 95 } + if (code < 123) { return true } + if (code <= 0xffff) { return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) } + if (astral === false) { return false } + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // The `startsExpr` property is used to check if the token ends a + // `yield` expression. It is set on all token types that either can + // directly start an expression (like a quotation mark) or can + // continue an expression (like the body of a string). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label; + this.keyword = conf.keyword; + this.beforeExpr = !!conf.beforeExpr; + this.startsExpr = !!conf.startsExpr; + this.isLoop = !!conf.isLoop; + this.isAssign = !!conf.isAssign; + this.prefix = !!conf.prefix; + this.postfix = !!conf.postfix; + this.binop = conf.binop || null; + this.updateContext = null; + }; + + function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) + } + var beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}; + + // Map keyword names to token types. + + var keywords = {}; + + // Succinct definitions of keyword token types + function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name; + return keywords[name] = new TokenType(name, options) + } + + var types$1 = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + privateId: new TokenType("privateId", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + questionDot: new TokenType("?."), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + invalidTemplate: new TokenType("invalidTemplate"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("!/~", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=/===/!==", 6), + relational: binop("/<=/>=", 7), + bitShift: binop("<>/>>>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + coalesce: binop("??", 1), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class", startsExpr), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import", startsExpr), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) + }; + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n?|\n|\u2028|\u2029/; + var lineBreakG = new RegExp(lineBreak.source, "g"); + + function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029 + } + + function nextLineBreak(code, from, end) { + if ( end === void 0 ) end = code.length; + + for (var i = from; i < end; i++) { + var next = code.charCodeAt(i); + if (isNewLine(next)) + { return i < end - 1 && next === 13 && code.charCodeAt(i + 1) === 10 ? i + 2 : i + 1 } + } + return -1 + } + + var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; + + var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; + + var ref = Object.prototype; + var hasOwnProperty = ref.hasOwnProperty; + var toString = ref.toString; + + var hasOwn = Object.hasOwn || (function (obj, propName) { return ( + hasOwnProperty.call(obj, propName) + ); }); + + var isArray = Array.isArray || (function (obj) { return ( + toString.call(obj) === "[object Array]" + ); }); + + var regexpCache = Object.create(null); + + function wordsRegexp(words) { + return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")) + } + + function codePointToString(code) { + // UTF-16 Decoding + if (code <= 0xFFFF) { return String.fromCharCode(code) } + code -= 0x10000; + return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00) + } + + var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; + + // These are used when `options.locations` is on, for the + // `startLoc` and `endLoc` properties. + + var Position = function Position(line, col) { + this.line = line; + this.column = col; + }; + + Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) + }; + + var SourceLocation = function SourceLocation(p, start, end) { + this.start = start; + this.end = end; + if (p.sourceFile !== null) { this.source = p.sourceFile; } + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + var nextBreak = nextLineBreak(input, cur, offset); + if (nextBreak < 0) { return new Position(line, offset - cur) } + ++line; + cur = nextBreak; + } + } + + // A second argument must be given to configure the parser process. + // These options are recognized (only `ecmaVersion` is required): + + var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must be + // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 + // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` + // (the latest version the library supports). This influences + // support for strict mode, the set of reserved words, and support + // for new syntax features. + ecmaVersion: null, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called when + // a semicolon is automatically inserted. It will be passed the + // position of the inserted semicolon as an offset, and if + // `locations` is enabled, it is given the location as a `{line, + // column}` object as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program, and an import.meta expression + // in a script isn't considered an error. + allowImportExportEverywhere: false, + // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. + // When enabled, await identifiers are allowed to appear at the top-level scope, + // but they are still not allowed in non-async functions. + allowAwaitOutsideFunction: null, + // When enabled, super identifiers are not constrained to + // appearing in methods and do not raise an error when they appear elsewhere. + allowSuperOutsideMethod: null, + // When enabled, hashbang directive in the beginning of file is + // allowed and treated as a line comment. Enabled by default when + // `ecmaVersion` >= 2023. + allowHashBang: false, + // By default, the parser will verify that private properties are + // only used in places where they are valid and have been declared. + // Set this to false to turn such checks off. + checkPrivateFields: true, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + // When this option has an array as value, objects representing the + // comments are pushed to it. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false + }; + + // Interpret and default an options object + + var warnedAboutEcmaVersion = false; + + function getOptions(opts) { + var options = {}; + + for (var opt in defaultOptions) + { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; } + + if (options.ecmaVersion === "latest") { + options.ecmaVersion = 1e8; + } else if (options.ecmaVersion == null) { + if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { + warnedAboutEcmaVersion = true; + console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); + } + options.ecmaVersion = 11; + } else if (options.ecmaVersion >= 2015) { + options.ecmaVersion -= 2009; + } + + if (options.allowReserved == null) + { options.allowReserved = options.ecmaVersion < 5; } + + if (!opts || opts.allowHashBang == null) + { options.allowHashBang = options.ecmaVersion >= 14; } + + if (isArray(options.onToken)) { + var tokens = options.onToken; + options.onToken = function (token) { return tokens.push(token); }; + } + if (isArray(options.onComment)) + { options.onComment = pushComment(options, options.onComment); } + + return options + } + + function pushComment(options, array) { + return function(block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? "Block" : "Line", + value: text, + start: start, + end: end + }; + if (options.locations) + { comment.loc = new SourceLocation(this, startLoc, endLoc); } + if (options.ranges) + { comment.range = [start, end]; } + array.push(comment); + } + } + + // Each scope gets a bitset that may contain these flags + var + SCOPE_TOP = 1, + SCOPE_FUNCTION = 2, + SCOPE_ASYNC = 4, + SCOPE_GENERATOR = 8, + SCOPE_ARROW = 16, + SCOPE_SIMPLE_CATCH = 32, + SCOPE_SUPER = 64, + SCOPE_DIRECT_SUPER = 128, + SCOPE_CLASS_STATIC_BLOCK = 256, + SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; + + function functionFlags(async, generator) { + return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0) + } + + // Used in checkLVal* and declareName to determine the type of a binding + var + BIND_NONE = 0, // Not a binding + BIND_VAR = 1, // Var-style binding + BIND_LEXICAL = 2, // Let- or const-style binding + BIND_FUNCTION = 3, // Function declaration + BIND_SIMPLE_CATCH = 4, // Simple (identifier pattern) catch binding + BIND_OUTSIDE = 5; // Special case for function names as bound inside the function + + var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options); + this.sourceFile = options.sourceFile; + this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); + var reserved = ""; + if (options.allowReserved !== true) { + reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; + if (options.sourceType === "module") { reserved += " await"; } + } + this.reservedWords = wordsRegexp(reserved); + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; + this.reservedWordsStrict = wordsRegexp(reservedStrict); + this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); + this.input = String(input); + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false; + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos; + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; + } else { + this.pos = this.lineStart = 0; + this.curLine = 1; + } + + // Properties of the current token: + // Its type + this.type = types$1.eof; + // For tokens that include more information than their type, the value + this.value = null; + // Its start and end offset + this.start = this.end = this.pos; + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition(); + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null; + this.lastTokStart = this.lastTokEnd = this.pos; + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext(); + this.exprAllowed = true; + + // Figure out if it's a module code. + this.inModule = options.sourceType === "module"; + this.strict = this.inModule || this.strictDirective(this.pos); + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1; + this.potentialArrowInForAwait = false; + + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; + // Labels in scope. + this.labels = []; + // Thus-far undefined exports. + this.undefinedExports = Object.create(null); + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") + { this.skipLineComment(2); } + + // Scope tracking for duplicate variable names (see scope.js) + this.scopeStack = []; + this.enterScope(SCOPE_TOP); + + // For RegExp validation + this.regexpState = null; + + // The stack of private names. + // Each element has two properties: 'declared' and 'used'. + // When it exited from the outermost class definition, all used private names must be declared. + this.privateNameStack = []; + }; + + var prototypeAccessors = { inFunction: { configurable: true },inGenerator: { configurable: true },inAsync: { configurable: true },canAwait: { configurable: true },allowSuper: { configurable: true },allowDirectSuper: { configurable: true },treatFunctionsAsVar: { configurable: true },allowNewDotTarget: { configurable: true },inClassStaticBlock: { configurable: true } }; + + Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode(); + this.nextToken(); + return this.parseTopLevel(node) + }; + + prototypeAccessors.inFunction.get = function () { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0 }; + + prototypeAccessors.inGenerator.get = function () { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit }; + + prototypeAccessors.inAsync.get = function () { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit }; + + prototypeAccessors.canAwait.get = function () { + for (var i = this.scopeStack.length - 1; i >= 0; i--) { + var scope = this.scopeStack[i]; + if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false } + if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0 } + } + return (this.inModule && this.options.ecmaVersion >= 13) || this.options.allowAwaitOutsideFunction + }; + + prototypeAccessors.allowSuper.get = function () { + var ref = this.currentThisScope(); + var flags = ref.flags; + var inClassFieldInit = ref.inClassFieldInit; + return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod + }; + + prototypeAccessors.allowDirectSuper.get = function () { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0 }; + + prototypeAccessors.treatFunctionsAsVar.get = function () { return this.treatFunctionsAsVarInScope(this.currentScope()) }; + + prototypeAccessors.allowNewDotTarget.get = function () { + var ref = this.currentThisScope(); + var flags = ref.flags; + var inClassFieldInit = ref.inClassFieldInit; + return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit + }; + + prototypeAccessors.inClassStaticBlock.get = function () { + return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0 + }; + + Parser.extend = function extend () { + var plugins = [], len = arguments.length; + while ( len-- ) plugins[ len ] = arguments[ len ]; + + var cls = this; + for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); } + return cls + }; + + Parser.parse = function parse (input, options) { + return new this(options, input).parse() + }; + + Parser.parseExpressionAt = function parseExpressionAt (input, pos, options) { + var parser = new this(options, input, pos); + parser.nextToken(); + return parser.parseExpression() + }; + + Parser.tokenizer = function tokenizer (input, options) { + return new this(options, input) + }; + + Object.defineProperties( Parser.prototype, prototypeAccessors ); + + var pp$9 = Parser.prototype; + + // ## Parser utilities + + var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/; + pp$9.strictDirective = function(start) { + if (this.options.ecmaVersion < 5) { return false } + for (;;) { + // Try to find string literal. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + var match = literal.exec(this.input.slice(start)); + if (!match) { return false } + if ((match[1] || match[2]) === "use strict") { + skipWhiteSpace.lastIndex = start + match[0].length; + var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; + var next = this.input.charAt(end); + return next === ";" || next === "}" || + (lineBreak.test(spaceAfter[0]) && + !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=")) + } + start += match[0].length; + + // Skip semicolon, if any. + skipWhiteSpace.lastIndex = start; + start += skipWhiteSpace.exec(this.input)[0].length; + if (this.input[start] === ";") + { start++; } + } + }; + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + pp$9.eat = function(type) { + if (this.type === type) { + this.next(); + return true + } else { + return false + } + }; + + // Tests whether parsed token is a contextual keyword. + + pp$9.isContextual = function(name) { + return this.type === types$1.name && this.value === name && !this.containsEsc + }; + + // Consumes contextual keyword if possible. + + pp$9.eatContextual = function(name) { + if (!this.isContextual(name)) { return false } + this.next(); + return true + }; + + // Asserts that following token is given contextual keyword. + + pp$9.expectContextual = function(name) { + if (!this.eatContextual(name)) { this.unexpected(); } + }; + + // Test whether a semicolon can be inserted at the current position. + + pp$9.canInsertSemicolon = function() { + return this.type === types$1.eof || + this.type === types$1.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + pp$9.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } + return true + } + }; + + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. + + pp$9.semicolon = function() { + if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); } + }; + + pp$9.afterTrailingComma = function(tokType, notNext) { + if (this.type === tokType) { + if (this.options.onTrailingComma) + { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } + if (!notNext) + { this.next(); } + return true + } + }; + + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. + + pp$9.expect = function(type) { + this.eat(type) || this.unexpected(); + }; + + // Raise an unexpected token error. + + pp$9.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token"); + }; + + var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = + this.trailingComma = + this.parenthesizedAssign = + this.parenthesizedBind = + this.doubleProto = + -1; + }; + + pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) { return } + if (refDestructuringErrors.trailingComma > -1) + { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; + if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); } + }; + + pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + if (!refDestructuringErrors) { return false } + var shorthandAssign = refDestructuringErrors.shorthandAssign; + var doubleProto = refDestructuringErrors.doubleProto; + if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0 } + if (shorthandAssign >= 0) + { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } + if (doubleProto >= 0) + { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } + }; + + pp$9.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } + if (this.awaitPos) + { this.raise(this.awaitPos, "Await expression cannot be a default value"); } + }; + + pp$9.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + { return this.isSimpleAssignTarget(expr.expression) } + return expr.type === "Identifier" || expr.type === "MemberExpression" + }; + + var pp$8 = Parser.prototype; + + // ### Statement parsing + + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. + + pp$8.parseTopLevel = function(node) { + var exports = Object.create(null); + if (!node.body) { node.body = []; } + while (this.type !== types$1.eof) { + var stmt = this.parseStatement(null, true, exports); + node.body.push(stmt); + } + if (this.inModule) + { for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) + { + var name = list[i]; + + this.raiseRecoverable(this.undefinedExports[name].start, ("Export '" + name + "' is not defined")); + } } + this.adaptDirectivePrologue(node.body); + this.next(); + node.sourceType = this.options.sourceType; + return this.finishNode(node, "Program") + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + pp$8.isLet = function(context) { + if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false } + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + // For ambiguous cases, determine if a LexicalDeclaration (or only a + // Statement) is allowed here. If context is not empty then only a Statement + // is allowed. However, `let [` is an explicit negative lookahead for + // ExpressionStatement, so special-case it first. + if (nextCh === 91 || nextCh === 92) { return true } // '[', '/' + if (context) { return false } + + if (nextCh === 123 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } // '{', astral + if (isIdentifierStart(nextCh, true)) { + var pos = next + 1; + while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; } + if (nextCh === 92 || nextCh > 0xd7ff && nextCh < 0xdc00) { return true } + var ident = this.input.slice(next, pos); + if (!keywordRelationalOperator.test(ident)) { return true } + } + return false + }; + + // check 'async [no LineTerminator here] function' + // - 'async /*foo*/ function' is OK. + // - 'async /*\n*/ function' is invalid. + pp$8.isAsyncFunction = function() { + if (this.options.ecmaVersion < 8 || !this.isContextual("async")) + { return false } + + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, after; + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 === this.input.length || + !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 0xd7ff && after < 0xdc00)) + }; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo)`, where looking at the previous token + // does not help. + + pp$8.parseStatement = function(context, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind; + + if (this.isLet(context)) { + starttype = types$1._var; + kind = "let"; + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case types$1._debugger: return this.parseDebuggerStatement(node) + case types$1._do: return this.parseDoStatement(node) + case types$1._for: return this.parseForStatement(node) + case types$1._function: + // Function as sole body of either an if statement or a labeled statement + // works, but not when it is part of a labeled statement that is the sole + // body of an if statement. + if ((context && (this.strict || context !== "if" && context !== "label")) && this.options.ecmaVersion >= 6) { this.unexpected(); } + return this.parseFunctionStatement(node, false, !context) + case types$1._class: + if (context) { this.unexpected(); } + return this.parseClass(node, true) + case types$1._if: return this.parseIfStatement(node) + case types$1._return: return this.parseReturnStatement(node) + case types$1._switch: return this.parseSwitchStatement(node) + case types$1._throw: return this.parseThrowStatement(node) + case types$1._try: return this.parseTryStatement(node) + case types$1._const: case types$1._var: + kind = kind || this.value; + if (context && kind !== "var") { this.unexpected(); } + return this.parseVarStatement(node, kind) + case types$1._while: return this.parseWhileStatement(node) + case types$1._with: return this.parseWithStatement(node) + case types$1.braceL: return this.parseBlock(true, node) + case types$1.semi: return this.parseEmptyStatement(node) + case types$1._export: + case types$1._import: + if (this.options.ecmaVersion > 10 && starttype === types$1._import) { + skipWhiteSpace.lastIndex = this.pos; + var skip = skipWhiteSpace.exec(this.input); + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); + if (nextCh === 40 || nextCh === 46) // '(' or '.' + { return this.parseExpressionStatement(node, this.parseExpression()) } + } + + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } + if (!this.inModule) + { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } + } + return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction()) { + if (context) { this.unexpected(); } + this.next(); + return this.parseFunctionStatement(node, true, !context) + } + + var maybeName = this.value, expr = this.parseExpression(); + if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) + { return this.parseLabeledStatement(node, maybeName, expr, context) } + else { return this.parseExpressionStatement(node, expr) } + } + }; + + pp$8.parseBreakContinueStatement = function(node, keyword) { + var isBreak = keyword === "break"; + this.next(); + if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; } + else if (this.type !== types$1.name) { this.unexpected(); } + else { + node.label = this.parseIdent(); + this.semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + var i = 0; + for (; i < this.labels.length; ++i) { + var lab = this.labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) { break } + if (node.label && isBreak) { break } + } + } + if (i === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword); } + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") + }; + + pp$8.parseDebuggerStatement = function(node) { + this.next(); + this.semicolon(); + return this.finishNode(node, "DebuggerStatement") + }; + + pp$8.parseDoStatement = function(node) { + this.next(); + this.labels.push(loopLabel); + node.body = this.parseStatement("do"); + this.labels.pop(); + this.expect(types$1._while); + node.test = this.parseParenExpression(); + if (this.options.ecmaVersion >= 6) + { this.eat(types$1.semi); } + else + { this.semicolon(); } + return this.finishNode(node, "DoWhileStatement") + }; + + // Disambiguating between a `for` and a `for`/`in` or `for`/`of` + // loop is non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in` or `of`. When there is no init + // part (semicolon immediately after the opening parenthesis), it + // is a regular `for` loop. + + pp$8.parseForStatement = function(node) { + this.next(); + var awaitAt = (this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await")) ? this.lastTokStart : -1; + this.labels.push(loopLabel); + this.enterScope(0); + this.expect(types$1.parenL); + if (this.type === types$1.semi) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, null) + } + var isLet = this.isLet(); + if (this.type === types$1._var || this.type === types$1._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value; + this.next(); + this.parseVar(init$1, true, kind); + this.finishNode(init$1, "VariableDeclaration"); + if ((this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types$1._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + return this.parseForIn(node, init$1) + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init$1) + } + var startsWithLet = this.isContextual("let"), isForOf = false; + var refDestructuringErrors = new DestructuringErrors; + var init = this.parseExpression(awaitAt > -1 ? "await" : true, refDestructuringErrors); + if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + if (this.options.ecmaVersion >= 9) { + if (this.type === types$1._in) { + if (awaitAt > -1) { this.unexpected(awaitAt); } + } else { node.await = awaitAt > -1; } + } + if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); } + this.toAssignable(init, false, refDestructuringErrors); + this.checkLValPattern(init); + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true); + } + if (awaitAt > -1) { this.unexpected(awaitAt); } + return this.parseFor(node, init) + }; + + pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) { + this.next(); + return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync) + }; + + pp$8.parseIfStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement("if"); + node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; + return this.finishNode(node, "IfStatement") + }; + + pp$8.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + { this.raise(this.start, "'return' outside of function"); } + this.next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; } + else { node.argument = this.parseExpression(); this.semicolon(); } + return this.finishNode(node, "ReturnStatement") + }; + + pp$8.parseSwitchStatement = function(node) { + this.next(); + node.discriminant = this.parseParenExpression(); + node.cases = []; + this.expect(types$1.braceL); + this.labels.push(switchLabel); + this.enterScope(0); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + var cur; + for (var sawDefault = false; this.type !== types$1.braceR;) { + if (this.type === types$1._case || this.type === types$1._default) { + var isCase = this.type === types$1._case; + if (cur) { this.finishNode(cur, "SwitchCase"); } + node.cases.push(cur = this.startNode()); + cur.consequent = []; + this.next(); + if (isCase) { + cur.test = this.parseExpression(); + } else { + if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } + sawDefault = true; + cur.test = null; + } + this.expect(types$1.colon); + } else { + if (!cur) { this.unexpected(); } + cur.consequent.push(this.parseStatement(null)); + } + } + this.exitScope(); + if (cur) { this.finishNode(cur, "SwitchCase"); } + this.next(); // Closing brace + this.labels.pop(); + return this.finishNode(node, "SwitchStatement") + }; + + pp$8.parseThrowStatement = function(node) { + this.next(); + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + { this.raise(this.lastTokEnd, "Illegal newline after throw"); } + node.argument = this.parseExpression(); + this.semicolon(); + return this.finishNode(node, "ThrowStatement") + }; + + // Reused empty array added for node fields that are always empty. + + var empty$1 = []; + + pp$8.parseCatchClauseParam = function() { + var param = this.parseBindingAtom(); + var simple = param.type === "Identifier"; + this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); + this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); + this.expect(types$1.parenR); + + return param + }; + + pp$8.parseTryStatement = function(node) { + this.next(); + node.block = this.parseBlock(); + node.handler = null; + if (this.type === types$1._catch) { + var clause = this.startNode(); + this.next(); + if (this.eat(types$1.parenL)) { + clause.param = this.parseCatchClauseParam(); + } else { + if (this.options.ecmaVersion < 10) { this.unexpected(); } + clause.param = null; + this.enterScope(0); + } + clause.body = this.parseBlock(false); + this.exitScope(); + node.handler = this.finishNode(clause, "CatchClause"); + } + node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; + if (!node.handler && !node.finalizer) + { this.raise(node.start, "Missing catch or finally clause"); } + return this.finishNode(node, "TryStatement") + }; + + pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) { + this.next(); + this.parseVar(node, false, kind, allowMissingInitializer); + this.semicolon(); + return this.finishNode(node, "VariableDeclaration") + }; + + pp$8.parseWhileStatement = function(node) { + this.next(); + node.test = this.parseParenExpression(); + this.labels.push(loopLabel); + node.body = this.parseStatement("while"); + this.labels.pop(); + return this.finishNode(node, "WhileStatement") + }; + + pp$8.parseWithStatement = function(node) { + if (this.strict) { this.raise(this.start, "'with' in strict mode"); } + this.next(); + node.object = this.parseParenExpression(); + node.body = this.parseStatement("with"); + return this.finishNode(node, "WithStatement") + }; + + pp$8.parseEmptyStatement = function(node) { + this.next(); + return this.finishNode(node, "EmptyStatement") + }; + + pp$8.parseLabeledStatement = function(node, maybeName, expr, context) { + for (var i$1 = 0, list = this.labels; i$1 < list.length; i$1 += 1) + { + var label = list[i$1]; + + if (label.name === maybeName) + { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); + } } + var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; + for (var i = this.labels.length - 1; i >= 0; i--) { + var label$1 = this.labels[i]; + if (label$1.statementStart === node.start) { + // Update information about previous labels on this node + label$1.statementStart = this.start; + label$1.kind = kind; + } else { break } + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}); + node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); + this.labels.pop(); + node.label = expr; + return this.finishNode(node, "LabeledStatement") + }; + + pp$8.parseExpressionStatement = function(node, expr) { + node.expression = expr; + this.semicolon(); + return this.finishNode(node, "ExpressionStatement") + }; + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) { + if ( createNewLexicalScope === void 0 ) createNewLexicalScope = true; + if ( node === void 0 ) node = this.startNode(); + + node.body = []; + this.expect(types$1.braceL); + if (createNewLexicalScope) { this.enterScope(0); } + while (this.type !== types$1.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + if (exitStrict) { this.strict = false; } + this.next(); + if (createNewLexicalScope) { this.exitScope(); } + return this.finishNode(node, "BlockStatement") + }; + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + pp$8.parseFor = function(node, init) { + node.init = init; + this.expect(types$1.semi); + node.test = this.type === types$1.semi ? null : this.parseExpression(); + this.expect(types$1.semi); + node.update = this.type === types$1.parenR ? null : this.parseExpression(); + this.expect(types$1.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, "ForStatement") + }; + + // Parse a `for`/`in` and `for`/`of` loop, which are almost + // same from parser's perspective. + + pp$8.parseForIn = function(node, init) { + var isForIn = this.type === types$1._in; + this.next(); + + if ( + init.type === "VariableDeclaration" && + init.declarations[0].init != null && + ( + !isForIn || + this.options.ecmaVersion < 8 || + this.strict || + init.kind !== "var" || + init.declarations[0].id.type !== "Identifier" + ) + ) { + this.raise( + init.start, + ((isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer") + ); + } + node.left = init; + node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); + this.expect(types$1.parenR); + node.body = this.parseStatement("for"); + this.exitScope(); + this.labels.pop(); + return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement") + }; + + // Parse a list of variable declarations. + + pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) { + node.declarations = []; + node.kind = kind; + for (;;) { + var decl = this.startNode(); + this.parseVarId(decl, kind); + if (this.eat(types$1.eq)) { + decl.init = this.parseMaybeAssign(isFor); + } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) { + this.unexpected(); + } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { + this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); + } else { + decl.init = null; + } + node.declarations.push(this.finishNode(decl, "VariableDeclarator")); + if (!this.eat(types$1.comma)) { break } + } + return node + }; + + pp$8.parseVarId = function(decl, kind) { + decl.id = this.parseBindingAtom(); + this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); + }; + + var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; + + // Parse a function declaration or literal (depending on the + // `statement & FUNC_STATEMENT`). + + // Remove `allowExpressionBody` for 7.0.0, as it is only called with false + pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) { + this.initFunction(node); + if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { + if (this.type === types$1.star && (statement & FUNC_HANGING_STATEMENT)) + { this.unexpected(); } + node.generator = this.eat(types$1.star); + } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + if (statement & FUNC_STATEMENT) { + node.id = (statement & FUNC_NULLABLE_ID) && this.type !== types$1.name ? null : this.parseIdent(); + if (node.id && !(statement & FUNC_HANGING_STATEMENT)) + // If it is a regular function declaration in sloppy mode, then it is + // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding + // mode depends on properties of the current scope (see + // treatFunctionsAsVar). + { this.checkLValSimple(node.id, (this.strict || node.generator || node.async) ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } + } + + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(node.async, node.generator)); + + if (!(statement & FUNC_STATEMENT)) + { node.id = this.type === types$1.name ? this.parseIdent() : null; } + + this.parseFunctionParams(node); + this.parseFunctionBody(node, allowExpressionBody, false, forInit); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, (statement & FUNC_STATEMENT) ? "FunctionDeclaration" : "FunctionExpression") + }; + + pp$8.parseFunctionParams = function(node) { + this.expect(types$1.parenL); + node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + }; + + // Parse a class declaration or literal (depending on the + // `isStatement` parameter). + + pp$8.parseClass = function(node, isStatement) { + this.next(); + + // ecma-262 14.6 Class Definitions + // A class definition is always strict mode code. + var oldStrict = this.strict; + this.strict = true; + + this.parseClassId(node, isStatement); + this.parseClassSuper(node); + var privateNameMap = this.enterClassBody(); + var classBody = this.startNode(); + var hadConstructor = false; + classBody.body = []; + this.expect(types$1.braceL); + while (this.type !== types$1.braceR) { + var element = this.parseClassElement(node.superClass !== null); + if (element) { + classBody.body.push(element); + if (element.type === "MethodDefinition" && element.kind === "constructor") { + if (hadConstructor) { this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); } + hadConstructor = true; + } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { + this.raiseRecoverable(element.key.start, ("Identifier '#" + (element.key.name) + "' has already been declared")); + } + } + } + this.strict = oldStrict; + this.next(); + node.body = this.finishNode(classBody, "ClassBody"); + this.exitClassBody(); + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") + }; + + pp$8.parseClassElement = function(constructorAllowsSuper) { + if (this.eat(types$1.semi)) { return null } + + var ecmaVersion = this.options.ecmaVersion; + var node = this.startNode(); + var keyName = ""; + var isGenerator = false; + var isAsync = false; + var kind = "method"; + var isStatic = false; + + if (this.eatContextual("static")) { + // Parse static init block + if (ecmaVersion >= 13 && this.eat(types$1.braceL)) { + this.parseClassStaticBlock(node); + return node + } + if (this.isClassElementNameStart() || this.type === types$1.star) { + isStatic = true; + } else { + keyName = "static"; + } + } + node.static = isStatic; + if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) { + if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { + isAsync = true; + } else { + keyName = "async"; + } + } + if (!keyName && (ecmaVersion >= 9 || !isAsync) && this.eat(types$1.star)) { + isGenerator = true; + } + if (!keyName && !isAsync && !isGenerator) { + var lastValue = this.value; + if (this.eatContextual("get") || this.eatContextual("set")) { + if (this.isClassElementNameStart()) { + kind = lastValue; + } else { + keyName = lastValue; + } + } + } + + // Parse element name + if (keyName) { + // 'async', 'get', 'set', or 'static' were not a keyword contextually. + // The last token is any of those. Make it the element name. + node.computed = false; + node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); + node.key.name = keyName; + this.finishNode(node.key, "Identifier"); + } else { + this.parseClassElementName(node); + } + + // Parse element value + if (ecmaVersion < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { + var isConstructor = !node.static && checkKeyName(node, "constructor"); + var allowsDirectSuper = isConstructor && constructorAllowsSuper; + // Couldn't move this check into the 'parseClassMethod' method for backward compatibility. + if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); } + node.kind = isConstructor ? "constructor" : kind; + this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); + } else { + this.parseClassField(node); + } + + return node + }; + + pp$8.isClassElementNameStart = function() { + return ( + this.type === types$1.name || + this.type === types$1.privateId || + this.type === types$1.num || + this.type === types$1.string || + this.type === types$1.bracketL || + this.type.keyword + ) + }; + + pp$8.parseClassElementName = function(element) { + if (this.type === types$1.privateId) { + if (this.value === "constructor") { + this.raise(this.start, "Classes can't have an element named '#constructor'"); + } + element.computed = false; + element.key = this.parsePrivateIdent(); + } else { + this.parsePropertyName(element); + } + }; + + pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { + // Check key and flags + var key = method.key; + if (method.kind === "constructor") { + if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } + if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } + } else if (method.static && checkKeyName(method, "prototype")) { + this.raise(key.start, "Classes may not have a static property named prototype"); + } + + // Parse value + var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); + + // Check value + if (method.kind === "get" && value.params.length !== 0) + { this.raiseRecoverable(value.start, "getter should have no params"); } + if (method.kind === "set" && value.params.length !== 1) + { this.raiseRecoverable(value.start, "setter should have exactly one param"); } + if (method.kind === "set" && value.params[0].type === "RestElement") + { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); } + + return this.finishNode(method, "MethodDefinition") + }; + + pp$8.parseClassField = function(field) { + if (checkKeyName(field, "constructor")) { + this.raise(field.key.start, "Classes can't have a field named 'constructor'"); + } else if (field.static && checkKeyName(field, "prototype")) { + this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); + } + + if (this.eat(types$1.eq)) { + // To raise SyntaxError if 'arguments' exists in the initializer. + var scope = this.currentThisScope(); + var inClassFieldInit = scope.inClassFieldInit; + scope.inClassFieldInit = true; + field.value = this.parseMaybeAssign(); + scope.inClassFieldInit = inClassFieldInit; + } else { + field.value = null; + } + this.semicolon(); + + return this.finishNode(field, "PropertyDefinition") + }; + + pp$8.parseClassStaticBlock = function(node) { + node.body = []; + + var oldLabels = this.labels; + this.labels = []; + this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); + while (this.type !== types$1.braceR) { + var stmt = this.parseStatement(null); + node.body.push(stmt); + } + this.next(); + this.exitScope(); + this.labels = oldLabels; + + return this.finishNode(node, "StaticBlock") + }; + + pp$8.parseClassId = function(node, isStatement) { + if (this.type === types$1.name) { + node.id = this.parseIdent(); + if (isStatement) + { this.checkLValSimple(node.id, BIND_LEXICAL, false); } + } else { + if (isStatement === true) + { this.unexpected(); } + node.id = null; + } + }; + + pp$8.parseClassSuper = function(node) { + node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; + }; + + pp$8.enterClassBody = function() { + var element = {declared: Object.create(null), used: []}; + this.privateNameStack.push(element); + return element.declared + }; + + pp$8.exitClassBody = function() { + var ref = this.privateNameStack.pop(); + var declared = ref.declared; + var used = ref.used; + if (!this.options.checkPrivateFields) { return } + var len = this.privateNameStack.length; + var parent = len === 0 ? null : this.privateNameStack[len - 1]; + for (var i = 0; i < used.length; ++i) { + var id = used[i]; + if (!hasOwn(declared, id.name)) { + if (parent) { + parent.used.push(id); + } else { + this.raiseRecoverable(id.start, ("Private field '#" + (id.name) + "' must be declared in an enclosing class")); + } + } + } + }; + + function isPrivateNameConflicted(privateNameMap, element) { + var name = element.key.name; + var curr = privateNameMap[name]; + + var next = "true"; + if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { + next = (element.static ? "s" : "i") + element.kind; + } + + // `class { get #a(){}; static set #a(_){} }` is also conflict. + if ( + curr === "iget" && next === "iset" || + curr === "iset" && next === "iget" || + curr === "sget" && next === "sset" || + curr === "sset" && next === "sget" + ) { + privateNameMap[name] = "true"; + return false + } else if (!curr) { + privateNameMap[name] = next; + return false + } else { + return true + } + } + + function checkKeyName(node, name) { + var computed = node.computed; + var key = node.key; + return !computed && ( + key.type === "Identifier" && key.name === name || + key.type === "Literal" && key.value === name + ) + } + + // Parses module export declaration. + + pp$8.parseExportAllDeclaration = function(node, exports) { + if (this.options.ecmaVersion >= 11) { + if (this.eatContextual("as")) { + node.exported = this.parseModuleExportName(); + this.checkExport(exports, node.exported, this.lastTokStart); + } else { + node.exported = null; + } + } + this.expectContextual("from"); + if (this.type !== types$1.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + this.semicolon(); + return this.finishNode(node, "ExportAllDeclaration") + }; + + pp$8.parseExport = function(node, exports) { + this.next(); + // export * from '...' + if (this.eat(types$1.star)) { + return this.parseExportAllDeclaration(node, exports) + } + if (this.eat(types$1._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart); + node.declaration = this.parseExportDefaultDeclaration(); + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseExportDeclaration(node); + if (node.declaration.type === "VariableDeclaration") + { this.checkVariableExport(exports, node.declaration.declarations); } + else + { this.checkExport(exports, node.declaration.id, node.declaration.id.start); } + node.specifiers = []; + node.source = null; + } else { // export { x, y as z } [from '...'] + node.declaration = null; + node.specifiers = this.parseExportSpecifiers(exports); + if (this.eatContextual("from")) { + if (this.type !== types$1.string) { this.unexpected(); } + node.source = this.parseExprAtom(); + } else { + for (var i = 0, list = node.specifiers; i < list.length; i += 1) { + // check for keywords used as local names + var spec = list[i]; + + this.checkUnreserved(spec.local); + // check if export is defined + this.checkLocalExport(spec.local); + + if (spec.local.type === "Literal") { + this.raise(spec.local.start, "A string literal cannot be used as an exported binding without `from`."); + } + } + + node.source = null; + } + this.semicolon(); + } + return this.finishNode(node, "ExportNamedDeclaration") + }; + + pp$8.parseExportDeclaration = function(node) { + return this.parseStatement(null) + }; + + pp$8.parseExportDefaultDeclaration = function() { + var isAsync; + if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode(); + this.next(); + if (isAsync) { this.next(); } + return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync) + } else if (this.type === types$1._class) { + var cNode = this.startNode(); + return this.parseClass(cNode, "nullableID") + } else { + var declaration = this.parseMaybeAssign(); + this.semicolon(); + return declaration + } + }; + + pp$8.checkExport = function(exports, name, pos) { + if (!exports) { return } + if (typeof name !== "string") + { name = name.type === "Identifier" ? name.name : name.value; } + if (hasOwn(exports, name)) + { this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); } + exports[name] = true; + }; + + pp$8.checkPatternExport = function(exports, pat) { + var type = pat.type; + if (type === "Identifier") + { this.checkExport(exports, pat, pat.start); } + else if (type === "ObjectPattern") + { for (var i = 0, list = pat.properties; i < list.length; i += 1) + { + var prop = list[i]; + + this.checkPatternExport(exports, prop); + } } + else if (type === "ArrayPattern") + { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { + var elt = list$1[i$1]; + + if (elt) { this.checkPatternExport(exports, elt); } + } } + else if (type === "Property") + { this.checkPatternExport(exports, pat.value); } + else if (type === "AssignmentPattern") + { this.checkPatternExport(exports, pat.left); } + else if (type === "RestElement") + { this.checkPatternExport(exports, pat.argument); } + }; + + pp$8.checkVariableExport = function(exports, decls) { + if (!exports) { return } + for (var i = 0, list = decls; i < list.length; i += 1) + { + var decl = list[i]; + + this.checkPatternExport(exports, decl.id); + } + }; + + pp$8.shouldParseExportStatement = function() { + return this.type.keyword === "var" || + this.type.keyword === "const" || + this.type.keyword === "class" || + this.type.keyword === "function" || + this.isLet() || + this.isAsyncFunction() + }; + + // Parses a comma-separated list of module exports. + + pp$8.parseExportSpecifier = function(exports) { + var node = this.startNode(); + node.local = this.parseModuleExportName(); + + node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; + this.checkExport( + exports, + node.exported, + node.exported.start + ); + + return this.finishNode(node, "ExportSpecifier") + }; + + pp$8.parseExportSpecifiers = function(exports) { + var nodes = [], first = true; + // export { x, y as z } [from '...'] + this.expect(types$1.braceL); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + nodes.push(this.parseExportSpecifier(exports)); + } + return nodes + }; + + // Parses import declaration. + + pp$8.parseImport = function(node) { + this.next(); + + // import '...' + if (this.type === types$1.string) { + node.specifiers = empty$1; + node.source = this.parseExprAtom(); + } else { + node.specifiers = this.parseImportSpecifiers(); + this.expectContextual("from"); + node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); + } + this.semicolon(); + return this.finishNode(node, "ImportDeclaration") + }; + + // Parses a comma-separated list of module imports. + + pp$8.parseImportSpecifier = function() { + var node = this.startNode(); + node.imported = this.parseModuleExportName(); + + if (this.eatContextual("as")) { + node.local = this.parseIdent(); + } else { + this.checkUnreserved(node.imported); + node.local = node.imported; + } + this.checkLValSimple(node.local, BIND_LEXICAL); + + return this.finishNode(node, "ImportSpecifier") + }; + + pp$8.parseImportDefaultSpecifier = function() { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode(); + node.local = this.parseIdent(); + this.checkLValSimple(node.local, BIND_LEXICAL); + return this.finishNode(node, "ImportDefaultSpecifier") + }; + + pp$8.parseImportNamespaceSpecifier = function() { + var node = this.startNode(); + this.next(); + this.expectContextual("as"); + node.local = this.parseIdent(); + this.checkLValSimple(node.local, BIND_LEXICAL); + return this.finishNode(node, "ImportNamespaceSpecifier") + }; + + pp$8.parseImportSpecifiers = function() { + var nodes = [], first = true; + if (this.type === types$1.name) { + nodes.push(this.parseImportDefaultSpecifier()); + if (!this.eat(types$1.comma)) { return nodes } + } + if (this.type === types$1.star) { + nodes.push(this.parseImportNamespaceSpecifier()); + return nodes + } + this.expect(types$1.braceL); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + nodes.push(this.parseImportSpecifier()); + } + return nodes + }; + + pp$8.parseModuleExportName = function() { + if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { + var stringLiteral = this.parseLiteral(this.value); + if (loneSurrogate.test(stringLiteral.value)) { + this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); + } + return stringLiteral + } + return this.parseIdent(true) + }; + + // Set `ExpressionStatement#directive` property for directive prologues. + pp$8.adaptDirectivePrologue = function(statements) { + for (var i = 0; i < statements.length && this.isDirectiveCandidate(statements[i]); ++i) { + statements[i].directive = statements[i].expression.raw.slice(1, -1); + } + }; + pp$8.isDirectiveCandidate = function(statement) { + return ( + this.options.ecmaVersion >= 5 && + statement.type === "ExpressionStatement" && + statement.expression.type === "Literal" && + typeof statement.expression.value === "string" && + // Reject parenthesized strings. + (this.input[statement.start] === "\"" || this.input[statement.start] === "'") + ) + }; + + var pp$7 = Parser.prototype; + + // Convert existing expression atom to assignable pattern + // if possible. + + pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) { + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } + break + + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + case "RestElement": + break + + case "ObjectExpression": + node.type = "ObjectPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + for (var i = 0, list = node.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.toAssignable(prop, isBinding); + // Early error: + // AssignmentRestProperty[Yield, Await] : + // `...` DestructuringAssignmentTarget[Yield, Await] + // + // It is a Syntax Error if |DestructuringAssignmentTarget| is an |ArrayLiteral| or an |ObjectLiteral|. + if ( + prop.type === "RestElement" && + (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern") + ) { + this.raise(prop.argument.start, "Unexpected token"); + } + } + break + + case "Property": + // AssignmentProperty has type === "Property" + if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } + this.toAssignable(node.value, isBinding); + break + + case "ArrayExpression": + node.type = "ArrayPattern"; + if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + this.toAssignableList(node.elements, isBinding); + break + + case "SpreadElement": + node.type = "RestElement"; + this.toAssignable(node.argument, isBinding); + if (node.argument.type === "AssignmentPattern") + { this.raise(node.argument.start, "Rest elements cannot have a default value"); } + break + + case "AssignmentExpression": + if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } + node.type = "AssignmentPattern"; + delete node.operator; + this.toAssignable(node.left, isBinding); + break + + case "ParenthesizedExpression": + this.toAssignable(node.expression, isBinding, refDestructuringErrors); + break + + case "ChainExpression": + this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (!isBinding) { break } + + default: + this.raise(node.start, "Assigning to rvalue"); + } + } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } + return node + }; + + // Convert list of expression atoms to binding list. + + pp$7.toAssignableList = function(exprList, isBinding) { + var end = exprList.length; + for (var i = 0; i < end; i++) { + var elt = exprList[i]; + if (elt) { this.toAssignable(elt, isBinding); } + } + if (end) { + var last = exprList[end - 1]; + if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + { this.unexpected(last.argument.start); } + } + return exprList + }; + + // Parses spread element. + + pp$7.parseSpread = function(refDestructuringErrors) { + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeAssign(false, refDestructuringErrors); + return this.finishNode(node, "SpreadElement") + }; + + pp$7.parseRestBinding = function() { + var node = this.startNode(); + this.next(); + + // RestElement inside of a function parameter must be an identifier + if (this.options.ecmaVersion === 6 && this.type !== types$1.name) + { this.unexpected(); } + + node.argument = this.parseBindingAtom(); + + return this.finishNode(node, "RestElement") + }; + + // Parses lvalue (assignable) atom. + + pp$7.parseBindingAtom = function() { + if (this.options.ecmaVersion >= 6) { + switch (this.type) { + case types$1.bracketL: + var node = this.startNode(); + this.next(); + node.elements = this.parseBindingList(types$1.bracketR, true, true); + return this.finishNode(node, "ArrayPattern") + + case types$1.braceL: + return this.parseObj(true) + } + } + return this.parseIdent() + }; + + pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) { + var elts = [], first = true; + while (!this.eat(close)) { + if (first) { first = false; } + else { this.expect(types$1.comma); } + if (allowEmpty && this.type === types$1.comma) { + elts.push(null); + } else if (allowTrailingComma && this.afterTrailingComma(close)) { + break + } else if (this.type === types$1.ellipsis) { + var rest = this.parseRestBinding(); + this.parseBindingListItem(rest); + elts.push(rest); + if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } + this.expect(close); + break + } else { + elts.push(this.parseAssignableListItem(allowModifiers)); + } + } + return elts + }; + + pp$7.parseAssignableListItem = function(allowModifiers) { + var elem = this.parseMaybeDefault(this.start, this.startLoc); + this.parseBindingListItem(elem); + return elem + }; + + pp$7.parseBindingListItem = function(param) { + return param + }; + + // Parses assignment pattern around given atom if possible. + + pp$7.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom(); + if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.right = this.parseMaybeAssign(); + return this.finishNode(node, "AssignmentPattern") + }; + + // The following three functions all verify that a node is an lvalue — + // something that can be bound, or assigned to. In order to do so, they perform + // a variety of checks: + // + // - Check that none of the bound/assigned-to identifiers are reserved words. + // - Record name declarations for bindings in the appropriate scope. + // - Check duplicate argument names, if checkClashes is set. + // + // If a complex binding pattern is encountered (e.g., object and array + // destructuring), the entire pattern is recursively checked. + // + // There are three versions of checkLVal*() appropriate for different + // circumstances: + // + // - checkLValSimple() shall be used if the syntactic construct supports + // nothing other than identifiers and member expressions. Parenthesized + // expressions are also correctly handled. This is generally appropriate for + // constructs for which the spec says + // + // > It is a Syntax Error if AssignmentTargetType of [the production] is not + // > simple. + // + // It is also appropriate for checking if an identifier is valid and not + // defined elsewhere, like import declarations or function/class identifiers. + // + // Examples where this is used include: + // a += …; + // import a from '…'; + // where a is the node to be checked. + // + // - checkLValPattern() shall be used if the syntactic construct supports + // anything checkLValSimple() supports, as well as object and array + // destructuring patterns. This is generally appropriate for constructs for + // which the spec says + // + // > It is a Syntax Error if [the production] is neither an ObjectLiteral nor + // > an ArrayLiteral and AssignmentTargetType of [the production] is not + // > simple. + // + // Examples where this is used include: + // (a = …); + // const a = …; + // try { … } catch (a) { … } + // where a is the node to be checked. + // + // - checkLValInnerPattern() shall be used if the syntactic construct supports + // anything checkLValPattern() supports, as well as default assignment + // patterns, rest elements, and other constructs that may appear within an + // object or array destructuring pattern. + // + // As a special case, function parameters also use checkLValInnerPattern(), + // as they also support defaults and rest constructs. + // + // These functions deliberately support both assignment and binding constructs, + // as the logic for both is exceedingly similar. If the node is the target of + // an assignment, then bindingType should be set to BIND_NONE. Otherwise, it + // should be set to the appropriate BIND_* constant, like BIND_VAR or + // BIND_LEXICAL. + // + // If the function is called with a non-BIND_NONE bindingType, then + // additionally a checkClashes object may be specified to allow checking for + // duplicate argument names. checkClashes is ignored if the provided construct + // is an assignment (i.e., bindingType is BIND_NONE). + + pp$7.checkLValSimple = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + var isBind = bindingType !== BIND_NONE; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } + if (isBind) { + if (bindingType === BIND_LEXICAL && expr.name === "let") + { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } + if (checkClashes) { + if (hasOwn(checkClashes, expr.name)) + { this.raiseRecoverable(expr.start, "Argument name clash"); } + checkClashes[expr.name] = true; + } + if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } + } + break + + case "ChainExpression": + this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); + break + + case "MemberExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } + break + + case "ParenthesizedExpression": + if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } + return this.checkLValSimple(expr.expression, bindingType, checkClashes) + + default: + this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); + } + }; + + pp$7.checkLValPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "ObjectPattern": + for (var i = 0, list = expr.properties; i < list.length; i += 1) { + var prop = list[i]; + + this.checkLValInnerPattern(prop, bindingType, checkClashes); + } + break + + case "ArrayPattern": + for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { + var elem = list$1[i$1]; + + if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } + } + break + + default: + this.checkLValSimple(expr, bindingType, checkClashes); + } + }; + + pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) { + if ( bindingType === void 0 ) bindingType = BIND_NONE; + + switch (expr.type) { + case "Property": + // AssignmentProperty has type === "Property" + this.checkLValInnerPattern(expr.value, bindingType, checkClashes); + break + + case "AssignmentPattern": + this.checkLValPattern(expr.left, bindingType, checkClashes); + break + + case "RestElement": + this.checkLValPattern(expr.argument, bindingType, checkClashes); + break + + default: + this.checkLValPattern(expr, bindingType, checkClashes); + } + }; + + // The algorithm used to determine whether a regexp can appear at a + // given point in the program is loosely based on sweet.js' approach. + // See https://github.com/mozilla/sweet.js/wiki/design + + + var TokContext = function TokContext(token, isExpr, preserveSpace, override, generator) { + this.token = token; + this.isExpr = !!isExpr; + this.preserveSpace = !!preserveSpace; + this.override = override; + this.generator = !!generator; + }; + + var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", false), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.tryReadTemplateToken(); }), + f_stat: new TokContext("function", false), + f_expr: new TokContext("function", true), + f_expr_gen: new TokContext("function", true, false, null, true), + f_gen: new TokContext("function", false, false, null, true) + }; + + var pp$6 = Parser.prototype; + + pp$6.initialContext = function() { + return [types.b_stat] + }; + + pp$6.curContext = function() { + return this.context[this.context.length - 1] + }; + + pp$6.braceIsBlock = function(prevType) { + var parent = this.curContext(); + if (parent === types.f_expr || parent === types.f_stat) + { return true } + if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) + { return !parent.isExpr } + + // The check for `tt.name && exprAllowed` detects whether we are + // after a `yield` or `of` construct. See the `updateContext` for + // `tt.name`. + if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) + { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) } + if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) + { return true } + if (prevType === types$1.braceL) + { return parent === types.b_stat } + if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) + { return false } + return !this.exprAllowed + }; + + pp$6.inGeneratorContext = function() { + for (var i = this.context.length - 1; i >= 1; i--) { + var context = this.context[i]; + if (context.token === "function") + { return context.generator } + } + return false + }; + + pp$6.updateContext = function(prevType) { + var update, type = this.type; + if (type.keyword && prevType === types$1.dot) + { this.exprAllowed = false; } + else if (update = type.updateContext) + { update.call(this, prevType); } + else + { this.exprAllowed = type.beforeExpr; } + }; + + // Used to handle edge cases when token context could not be inferred correctly during tokenization phase + + pp$6.overrideContext = function(tokenCtx) { + if (this.curContext() !== tokenCtx) { + this.context[this.context.length - 1] = tokenCtx; + } + }; + + // Token-specific context update code + + types$1.parenR.updateContext = types$1.braceR.updateContext = function() { + if (this.context.length === 1) { + this.exprAllowed = true; + return + } + var out = this.context.pop(); + if (out === types.b_stat && this.curContext().token === "function") { + out = this.context.pop(); + } + this.exprAllowed = !out.isExpr; + }; + + types$1.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); + this.exprAllowed = true; + }; + + types$1.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl); + this.exprAllowed = true; + }; + + types$1.parenL.updateContext = function(prevType) { + var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; + this.context.push(statementParens ? types.p_stat : types.p_expr); + this.exprAllowed = true; + }; + + types$1.incDec.updateContext = function() { + // tokExprAllowed stays unchanged + }; + + types$1._function.updateContext = types$1._class.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== types$1._else && + !(prevType === types$1.semi && this.curContext() !== types.p_stat) && + !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && + !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) + { this.context.push(types.f_expr); } + else + { this.context.push(types.f_stat); } + this.exprAllowed = false; + }; + + types$1.colon.updateContext = function() { + if (this.curContext().token === "function") { this.context.pop(); } + this.exprAllowed = true; + }; + + types$1.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + { this.context.pop(); } + else + { this.context.push(types.q_tmpl); } + this.exprAllowed = false; + }; + + types$1.star.updateContext = function(prevType) { + if (prevType === types$1._function) { + var index = this.context.length - 1; + if (this.context[index] === types.f_expr) + { this.context[index] = types.f_expr_gen; } + else + { this.context[index] = types.f_gen; } + } + this.exprAllowed = true; + }; + + types$1.name.updateContext = function(prevType) { + var allowed = false; + if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { + if (this.value === "of" && !this.exprAllowed || + this.value === "yield" && this.inGeneratorContext()) + { allowed = true; } + } + this.exprAllowed = allowed; + }; + + // A recursive descent parser operates by defining functions for all + // syntactic elements, and recursively calling those, each function + // advancing the input stream and returning an AST node. Precedence + // of constructs (for example, the fact that `!x[1]` means `!(x[1])` + // instead of `(!x)[1]` is handled by the fact that the parser + // function that parses unary prefix operators is called first, and + // in turn calls the function that parses `[]` subscripts — that + // way, it'll receive the node for `x[1]` already parsed, and wraps + // *that* in the unary operator node. + // + // Acorn uses an [operator precedence parser][opp] to handle binary + // operator precedence, because it is much more compact than using + // the technique outlined above, which uses different, nesting + // functions to specify precedence, for all of the ten binary + // precedence levels that JavaScript defines. + // + // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + + + var pp$5 = Parser.prototype; + + // Check if property name clashes with already added. + // Object/class getters and setters are not allowed to clash — + // either with each other or with an init property — and in + // strict mode, init properties are also not allowed to be repeated. + + pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) { + if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") + { return } + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + { return } + var key = prop.key; + var name; + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) { + if (refDestructuringErrors) { + if (refDestructuringErrors.doubleProto < 0) { + refDestructuringErrors.doubleProto = key.start; + } + } else { + this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); + } + } + propHash.proto = true; + } + return + } + name = "$" + name; + var other = propHash[name]; + if (other) { + var redefinition; + if (kind === "init") { + redefinition = this.strict && other.init || other.get || other.set; + } else { + redefinition = other.init || other[kind]; + } + if (redefinition) + { this.raiseRecoverable(key.start, "Redefinition of property"); } + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + }; + } + other[kind] = true; + }; + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The optional arguments are used to + // forbid the `in` operator (in for loops initalization expressions) + // and provide reference for storing '=' operator inside shorthand + // property assignment in contexts where both object expression + // and object pattern might appear (so it's possible to raise + // delayed syntax error at correct position). + + pp$5.parseExpression = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); + if (this.type === types$1.comma) { + var node = this.startNodeAt(startPos, startLoc); + node.expressions = [expr]; + while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); } + return this.finishNode(node, "SequenceExpression") + } + return expr + }; + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) { + if (this.isContextual("yield")) { + if (this.inGenerator) { return this.parseYield(forInit) } + // The tokenizer will assume an expression is allowed after + // `yield`, but this isn't that kind of yield + else { this.exprAllowed = false; } + } + + var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign; + oldTrailingComma = refDestructuringErrors.trailingComma; + oldDoubleProto = refDestructuringErrors.doubleProto; + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; + } else { + refDestructuringErrors = new DestructuringErrors; + ownDestructuringErrors = true; + } + + var startPos = this.start, startLoc = this.startLoc; + if (this.type === types$1.parenL || this.type === types$1.name) { + this.potentialArrowAt = this.start; + this.potentialArrowInForAwait = forInit === "await"; + } + var left = this.parseMaybeConditional(forInit, refDestructuringErrors); + if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } + if (this.type.isAssign) { + var node = this.startNodeAt(startPos, startLoc); + node.operator = this.value; + if (this.type === types$1.eq) + { left = this.toAssignable(left, false, refDestructuringErrors); } + if (!ownDestructuringErrors) { + refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; + } + if (refDestructuringErrors.shorthandAssign >= left.start) + { refDestructuringErrors.shorthandAssign = -1; } // reset because shorthand default was used correctly + if (this.type === types$1.eq) + { this.checkLValPattern(left); } + else + { this.checkLValSimple(left); } + node.left = left; + this.next(); + node.right = this.parseMaybeAssign(forInit); + if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; } + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } + } + if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } + if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } + return left + }; + + // Parse a ternary conditional (`?:`) operator. + + pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprOps(forInit, refDestructuringErrors); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + if (this.eat(types$1.question)) { + var node = this.startNodeAt(startPos, startLoc); + node.test = expr; + node.consequent = this.parseMaybeAssign(); + this.expect(types$1.colon); + node.alternate = this.parseMaybeAssign(forInit); + return this.finishNode(node, "ConditionalExpression") + } + return expr + }; + + // Start the precedence parser. + + pp$5.parseExprOps = function(forInit, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit) + }; + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) { + var prec = this.type.binop; + if (prec != null && (!forInit || this.type !== types$1._in)) { + if (prec > minPrec) { + var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; + var coalesce = this.type === types$1.coalesce; + if (coalesce) { + // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions. + // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error. + prec = types$1.logicalAND.binop; + } + var op = this.value; + this.next(); + var startPos = this.start, startLoc = this.startLoc; + var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); + if ((logical && this.type === types$1.coalesce) || (coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND))) { + this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); + } + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit) + } + } + return left + }; + + pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) { + if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); } + var node = this.startNodeAt(startPos, startLoc); + node.left = left; + node.operator = op; + node.right = right; + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") + }; + + // Parse unary operators, both prefix and postfix. + + pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) { + var startPos = this.start, startLoc = this.startLoc, expr; + if (this.isContextual("await") && this.canAwait) { + expr = this.parseAwait(forInit); + sawUnary = true; + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === types$1.incDec; + node.operator = this.value; + node.prefix = true; + this.next(); + node.argument = this.parseMaybeUnary(null, true, update, forInit); + this.checkExpressionErrors(refDestructuringErrors, true); + if (update) { this.checkLValSimple(node.argument); } + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } + else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) + { this.raiseRecoverable(node.start, "Private fields can not be deleted"); } + else { sawUnary = true; } + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } else if (!sawUnary && this.type === types$1.privateId) { + if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); } + expr = this.parsePrivateIdent(); + // only could be private fields in 'in', such as #x in obj + if (this.type !== types$1._in) { this.unexpected(); } + } else { + expr = this.parseExprSubscripts(refDestructuringErrors, forInit); + if (this.checkExpressionErrors(refDestructuringErrors)) { return expr } + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.operator = this.value; + node$1.prefix = false; + node$1.argument = expr; + this.checkLValSimple(expr); + this.next(); + expr = this.finishNode(node$1, "UpdateExpression"); + } + } + + if (!incDec && this.eat(types$1.starstar)) { + if (sawUnary) + { this.unexpected(this.lastTokStart); } + else + { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false) } + } else { + return expr + } + }; + + function isPrivateFieldAccess(node) { + return ( + node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || + node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) + ) + } + + // Parse call, dot, and `[]`-subscript expressions. + + pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) { + var startPos = this.start, startLoc = this.startLoc; + var expr = this.parseExprAtom(refDestructuringErrors, forInit); + if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") + { return expr } + var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } + if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } + if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; } + } + return result + }; + + pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) { + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && + this.potentialArrowAt === base.start; + var optionalChained = false; + + while (true) { + var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); + + if (element.optional) { optionalChained = true; } + if (element === base || element.type === "ArrowFunctionExpression") { + if (optionalChained) { + var chainNode = this.startNodeAt(startPos, startLoc); + chainNode.expression = element; + element = this.finishNode(chainNode, "ChainExpression"); + } + return element + } + + base = element; + } + }; + + pp$5.shouldParseAsyncArrow = function() { + return !this.canInsertSemicolon() && this.eat(types$1.arrow) + }; + + pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit) + }; + + pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { + var optionalSupported = this.options.ecmaVersion >= 11; + var optional = optionalSupported && this.eat(types$1.questionDot); + if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } + + var computed = this.eat(types$1.bracketL); + if (computed || (optional && this.type !== types$1.parenL && this.type !== types$1.backQuote) || this.eat(types$1.dot)) { + var node = this.startNodeAt(startPos, startLoc); + node.object = base; + if (computed) { + node.property = this.parseExpression(); + this.expect(types$1.bracketR); + } else if (this.type === types$1.privateId && base.type !== "Super") { + node.property = this.parsePrivateIdent(); + } else { + node.property = this.parseIdent(this.options.allowReserved !== "never"); + } + node.computed = !!computed; + if (optionalSupported) { + node.optional = optional; + } + base = this.finishNode(node, "MemberExpression"); + } else if (!noCalls && this.eat(types$1.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); + if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + if (this.awaitIdentPos > 0) + { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit) + } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; + var node$1 = this.startNodeAt(startPos, startLoc); + node$1.callee = base; + node$1.arguments = exprList; + if (optionalSupported) { + node$1.optional = optional; + } + base = this.finishNode(node$1, "CallExpression"); + } else if (this.type === types$1.backQuote) { + if (optional || optionalChained) { + this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); + } + var node$2 = this.startNodeAt(startPos, startLoc); + node$2.tag = base; + node$2.quasi = this.parseTemplate({isTagged: true}); + base = this.finishNode(node$2, "TaggedTemplateExpression"); + } + return base + }; + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) { + // If a division operator appears in an expression position, the + // tokenizer got confused, and we force it to read a regexp instead. + if (this.type === types$1.slash) { this.readRegexp(); } + + var node, canBeArrow = this.potentialArrowAt === this.start; + switch (this.type) { + case types$1._super: + if (!this.allowSuper) + { this.raise(this.start, "'super' keyword outside a method"); } + node = this.startNode(); + this.next(); + if (this.type === types$1.parenL && !this.allowDirectSuper) + { this.raise(node.start, "super() call outside constructor of a subclass"); } + // The `super` keyword can appear at below: + // SuperProperty: + // super [ Expression ] + // super . IdentifierName + // SuperCall: + // super ( Arguments ) + if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) + { this.unexpected(); } + return this.finishNode(node, "Super") + + case types$1._this: + node = this.startNode(); + this.next(); + return this.finishNode(node, "ThisExpression") + + case types$1.name: + var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; + var id = this.parseIdent(false); + if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { + this.overrideContext(types.f_expr); + return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit) + } + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(types$1.arrow)) + { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit) } + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && + (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { + id = this.parseIdent(false); + if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) + { this.unexpected(); } + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit) + } + } + return id + + case types$1.regexp: + var value = this.value; + node = this.parseLiteral(value.value); + node.regex = {pattern: value.pattern, flags: value.flags}; + return node + + case types$1.num: case types$1.string: + return this.parseLiteral(this.value) + + case types$1._null: case types$1._true: case types$1._false: + node = this.startNode(); + node.value = this.type === types$1._null ? null : this.type === types$1._true; + node.raw = this.type.keyword; + this.next(); + return this.finishNode(node, "Literal") + + case types$1.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + { refDestructuringErrors.parenthesizedAssign = start; } + if (refDestructuringErrors.parenthesizedBind < 0) + { refDestructuringErrors.parenthesizedBind = start; } + } + return expr + + case types$1.bracketL: + node = this.startNode(); + this.next(); + node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); + return this.finishNode(node, "ArrayExpression") + + case types$1.braceL: + this.overrideContext(types.b_expr); + return this.parseObj(false, refDestructuringErrors) + + case types$1._function: + node = this.startNode(); + this.next(); + return this.parseFunction(node, 0) + + case types$1._class: + return this.parseClass(this.startNode(), false) + + case types$1._new: + return this.parseNew() + + case types$1.backQuote: + return this.parseTemplate() + + case types$1._import: + if (this.options.ecmaVersion >= 11) { + return this.parseExprImport(forNew) + } else { + return this.unexpected() + } + + default: + return this.parseExprAtomDefault() + } + }; + + pp$5.parseExprAtomDefault = function() { + this.unexpected(); + }; + + pp$5.parseExprImport = function(forNew) { + var node = this.startNode(); + + // Consume `import` as an identifier for `import.meta`. + // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } + this.next(); + + if (this.type === types$1.parenL && !forNew) { + return this.parseDynamicImport(node) + } else if (this.type === types$1.dot) { + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); + meta.name = "import"; + node.meta = this.finishNode(meta, "Identifier"); + return this.parseImportMeta(node) + } else { + this.unexpected(); + } + }; + + pp$5.parseDynamicImport = function(node) { + this.next(); // skip `(` + + // Parse node.source. + node.source = this.parseMaybeAssign(); + + // Verify ending. + if (!this.eat(types$1.parenR)) { + var errorPos = this.start; + if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { + this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); + } else { + this.unexpected(errorPos); + } + } + + return this.finishNode(node, "ImportExpression") + }; + + pp$5.parseImportMeta = function(node) { + this.next(); // skip `.` + + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + + if (node.property.name !== "meta") + { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } + if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) + { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } + + return this.finishNode(node, "MetaProperty") + }; + + pp$5.parseLiteral = function(value) { + var node = this.startNode(); + node.value = value; + node.raw = this.input.slice(this.start, this.end); + if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } + this.next(); + return this.finishNode(node, "Literal") + }; + + pp$5.parseParenExpression = function() { + this.expect(types$1.parenL); + var val = this.parseExpression(); + this.expect(types$1.parenR); + return val + }; + + pp$5.shouldParseArrow = function(exprList) { + return !this.canInsertSemicolon() + }; + + pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) { + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; + if (this.options.ecmaVersion >= 6) { + this.next(); + + var innerStartPos = this.start, innerStartLoc = this.startLoc; + var exprList = [], first = true, lastIsComma = false; + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; + this.yieldPos = 0; + this.awaitPos = 0; + // Do not save awaitIdentPos to allow checking awaits nested in parameters + while (this.type !== types$1.parenR) { + first ? first = false : this.expect(types$1.comma); + if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { + lastIsComma = true; + break + } else if (this.type === types$1.ellipsis) { + spreadStart = this.start; + exprList.push(this.parseParenItem(this.parseRestBinding())); + if (this.type === types$1.comma) { + this.raiseRecoverable( + this.start, + "Comma is not permitted after the rest element" + ); + } + break + } else { + exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); + } + } + var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; + this.expect(types$1.parenR); + + if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false); + this.checkYieldAwaitInDefaultParams(); + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + return this.parseParenArrowList(startPos, startLoc, exprList, forInit) + } + + if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } + if (spreadStart) { this.unexpected(spreadStart); } + this.checkExpressionErrors(refDestructuringErrors, true); + this.yieldPos = oldYieldPos || this.yieldPos; + this.awaitPos = oldAwaitPos || this.awaitPos; + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc); + val.expressions = exprList; + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); + } else { + val = exprList[0]; + } + } else { + val = this.parseParenExpression(); + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc); + par.expression = val; + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } + }; + + pp$5.parseParenItem = function(item) { + return item + }; + + pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit) + }; + + // New's precedence is slightly tricky. It must allow its argument to + // be a `[]` or dot subscript expression, but not a call — at least, + // not without wrapping it in parentheses. Thus, it uses the noCalls + // argument to parseSubscripts to prevent it from consuming the + // argument list. + + var empty = []; + + pp$5.parseNew = function() { + if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } + var node = this.startNode(); + this.next(); + if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); + meta.name = "new"; + node.meta = this.finishNode(meta, "Identifier"); + this.next(); + var containsEsc = this.containsEsc; + node.property = this.parseIdent(true); + if (node.property.name !== "target") + { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } + if (containsEsc) + { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } + if (!this.allowNewDotTarget) + { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); } + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc; + node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); + if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); } + else { node.arguments = empty; } + return this.finishNode(node, "NewExpression") + }; + + // Parse template expression. + + pp$5.parseTemplateElement = function(ref) { + var isTagged = ref.isTagged; + + var elem = this.startNode(); + if (this.type === types$1.invalidTemplate) { + if (!isTagged) { + this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); + } + elem.value = { + raw: this.value, + cooked: null + }; + } else { + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), + cooked: this.value + }; + } + this.next(); + elem.tail = this.type === types$1.backQuote; + return this.finishNode(elem, "TemplateElement") + }; + + pp$5.parseTemplate = function(ref) { + if ( ref === void 0 ) ref = {}; + var isTagged = ref.isTagged; if ( isTagged === void 0 ) isTagged = false; + + var node = this.startNode(); + this.next(); + node.expressions = []; + var curElt = this.parseTemplateElement({isTagged: isTagged}); + node.quasis = [curElt]; + while (!curElt.tail) { + if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); } + this.expect(types$1.dollarBraceL); + node.expressions.push(this.parseExpression()); + this.expect(types$1.braceR); + node.quasis.push(curElt = this.parseTemplateElement({isTagged: isTagged})); + } + this.next(); + return this.finishNode(node, "TemplateLiteral") + }; + + pp$5.isAsyncProp = function(prop) { + return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && + (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || (this.options.ecmaVersion >= 9 && this.type === types$1.star)) && + !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + }; + + // Parse an object literal or binding pattern. + + pp$5.parseObj = function(isPattern, refDestructuringErrors) { + var node = this.startNode(), first = true, propHash = {}; + node.properties = []; + this.next(); + while (!this.eat(types$1.braceR)) { + if (!first) { + this.expect(types$1.comma); + if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break } + } else { first = false; } + + var prop = this.parseProperty(isPattern, refDestructuringErrors); + if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } + node.properties.push(prop); + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") + }; + + pp$5.parseProperty = function(isPattern, refDestructuringErrors) { + var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; + if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { + if (isPattern) { + prop.argument = this.parseIdent(false); + if (this.type === types$1.comma) { + this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); + } + return this.finishNode(prop, "RestElement") + } + // Parse argument. + prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); + // To disallow trailing comma via `this.toAssignable()`. + if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { + refDestructuringErrors.trailingComma = this.start; + } + // Finish + return this.finishNode(prop, "SpreadElement") + } + if (this.options.ecmaVersion >= 6) { + prop.method = false; + prop.shorthand = false; + if (isPattern || refDestructuringErrors) { + startPos = this.start; + startLoc = this.startLoc; + } + if (!isPattern) + { isGenerator = this.eat(types$1.star); } + } + var containsEsc = this.containsEsc; + this.parsePropertyName(prop); + if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { + isAsync = true; + isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); + this.parsePropertyName(prop); + } else { + isAsync = false; + } + this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); + return this.finishNode(prop, "Property") + }; + + pp$5.parseGetterSetter = function(prop) { + prop.kind = prop.key.name; + this.parsePropertyName(prop); + prop.value = this.parseMethod(false); + var paramCount = prop.kind === "get" ? 0 : 1; + if (prop.value.params.length !== paramCount) { + var start = prop.value.start; + if (prop.kind === "get") + { this.raiseRecoverable(start, "getter should have no params"); } + else + { this.raiseRecoverable(start, "setter should have exactly one param"); } + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } + } + }; + + pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { + if ((isGenerator || isAsync) && this.type === types$1.colon) + { this.unexpected(); } + + if (this.eat(types$1.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); + prop.kind = "init"; + } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { + if (isPattern) { this.unexpected(); } + prop.kind = "init"; + prop.method = true; + prop.value = this.parseMethod(isGenerator, isAsync); + } else if (!isPattern && !containsEsc && + this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) { + if (isGenerator || isAsync) { this.unexpected(); } + this.parseGetterSetter(prop); + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (isGenerator || isAsync) { this.unexpected(); } + this.checkUnreserved(prop.key); + if (prop.key.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = startPos; } + prop.kind = "init"; + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else if (this.type === types$1.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + { refDestructuringErrors.shorthandAssign = this.start; } + prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); + } else { + prop.value = this.copyNode(prop.key); + } + prop.shorthand = true; + } else { this.unexpected(); } + }; + + pp$5.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(types$1.bracketL)) { + prop.computed = true; + prop.key = this.parseMaybeAssign(); + this.expect(types$1.bracketR); + return prop.key + } else { + prop.computed = false; + } + } + return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never") + }; + + // Initialize empty function node. + + pp$5.initFunction = function(node) { + node.id = null; + if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } + if (this.options.ecmaVersion >= 8) { node.async = false; } + }; + + // Parse object or class method. + + pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { + var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.initFunction(node); + if (this.options.ecmaVersion >= 6) + { node.generator = isGenerator; } + if (this.options.ecmaVersion >= 8) + { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); + + this.expect(types$1.parenL); + node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); + this.checkYieldAwaitInDefaultParams(); + this.parseFunctionBody(node, false, true, false); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "FunctionExpression") + }; + + // Parse arrow function expression with given parameters. + + pp$5.parseArrowExpression = function(node, params, isAsync, forInit) { + var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; + + this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); + this.initFunction(node); + if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } + + this.yieldPos = 0; + this.awaitPos = 0; + this.awaitIdentPos = 0; + + node.params = this.toAssignableList(params, true); + this.parseFunctionBody(node, true, false, forInit); + + this.yieldPos = oldYieldPos; + this.awaitPos = oldAwaitPos; + this.awaitIdentPos = oldAwaitIdentPos; + return this.finishNode(node, "ArrowFunctionExpression") + }; + + // Parse function body and check parameters. + + pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) { + var isExpression = isArrowFunction && this.type !== types$1.braceL; + var oldStrict = this.strict, useStrict = false; + + if (isExpression) { + node.body = this.parseMaybeAssign(forInit); + node.expression = true; + this.checkParams(node, false); + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end); + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels; + this.labels = []; + if (useStrict) { this.strict = true; } + + // Add the params to varDeclaredNames to ensure that an error is thrown + // if a let/const declaration in the function clashes with one of the params. + this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); + // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval' + if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } + node.body = this.parseBlock(false, undefined, useStrict && !oldStrict); + node.expression = false; + this.adaptDirectivePrologue(node.body.body); + this.labels = oldLabels; + } + this.exitScope(); + }; + + pp$5.isSimpleParamList = function(params) { + for (var i = 0, list = params; i < list.length; i += 1) + { + var param = list[i]; + + if (param.type !== "Identifier") { return false + } } + return true + }; + + // Checks function params for various disallowed patterns such as using "eval" + // or "arguments" and duplicate parameters. + + pp$5.checkParams = function(node, allowDuplicates) { + var nameHash = Object.create(null); + for (var i = 0, list = node.params; i < list.length; i += 1) + { + var param = list[i]; + + this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); + } + }; + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var elts = [], first = true; + while (!this.eat(close)) { + if (!first) { + this.expect(types$1.comma); + if (allowTrailingComma && this.afterTrailingComma(close)) { break } + } else { first = false; } + + var elt = (void 0); + if (allowEmpty && this.type === types$1.comma) + { elt = null; } + else if (this.type === types$1.ellipsis) { + elt = this.parseSpread(refDestructuringErrors); + if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) + { refDestructuringErrors.trailingComma = this.start; } + } else { + elt = this.parseMaybeAssign(false, refDestructuringErrors); + } + elts.push(elt); + } + return elts + }; + + pp$5.checkUnreserved = function(ref) { + var start = ref.start; + var end = ref.end; + var name = ref.name; + + if (this.inGenerator && name === "yield") + { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } + if (this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } + if (this.currentThisScope().inClassFieldInit && name === "arguments") + { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); } + if (this.inClassStaticBlock && (name === "arguments" || name === "await")) + { this.raise(start, ("Cannot use " + name + " in class static initialization block")); } + if (this.keywords.test(name)) + { this.raise(start, ("Unexpected keyword '" + name + "'")); } + if (this.options.ecmaVersion < 6 && + this.input.slice(start, end).indexOf("\\") !== -1) { return } + var re = this.strict ? this.reservedWordsStrict : this.reservedWords; + if (re.test(name)) { + if (!this.inAsync && name === "await") + { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } + this.raiseRecoverable(start, ("The keyword '" + name + "' is reserved")); + } + }; + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + pp$5.parseIdent = function(liberal) { + var node = this.parseIdentNode(); + this.next(!!liberal); + this.finishNode(node, "Identifier"); + if (!liberal) { + this.checkUnreserved(node); + if (node.name === "await" && !this.awaitIdentPos) + { this.awaitIdentPos = node.start; } + } + return node + }; + + pp$5.parseIdentNode = function() { + var node = this.startNode(); + if (this.type === types$1.name) { + node.name = this.value; + } else if (this.type.keyword) { + node.name = this.type.keyword; + + // To fix https://github.com/acornjs/acorn/issues/575 + // `class` and `function` keywords push new context into this.context. + // But there is no chance to pop the context if the keyword is consumed as an identifier such as a property name. + // If the previous token is a dot, this does not apply because the context-managing code already ignored the keyword + if ((node.name === "class" || node.name === "function") && + (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { + this.context.pop(); + } + this.type = types$1.name; + } else { + this.unexpected(); + } + return node + }; + + pp$5.parsePrivateIdent = function() { + var node = this.startNode(); + if (this.type === types$1.privateId) { + node.name = this.value; + } else { + this.unexpected(); + } + this.next(); + this.finishNode(node, "PrivateIdentifier"); + + // For validating existence + if (this.options.checkPrivateFields) { + if (this.privateNameStack.length === 0) { + this.raise(node.start, ("Private field '#" + (node.name) + "' must be declared in an enclosing class")); + } else { + this.privateNameStack[this.privateNameStack.length - 1].used.push(node); + } + } + + return node + }; + + // Parses yield expression inside generator. + + pp$5.parseYield = function(forInit) { + if (!this.yieldPos) { this.yieldPos = this.start; } + + var node = this.startNode(); + this.next(); + if (this.type === types$1.semi || this.canInsertSemicolon() || (this.type !== types$1.star && !this.type.startsExpr)) { + node.delegate = false; + node.argument = null; + } else { + node.delegate = this.eat(types$1.star); + node.argument = this.parseMaybeAssign(forInit); + } + return this.finishNode(node, "YieldExpression") + }; + + pp$5.parseAwait = function(forInit) { + if (!this.awaitPos) { this.awaitPos = this.start; } + + var node = this.startNode(); + this.next(); + node.argument = this.parseMaybeUnary(null, true, false, forInit); + return this.finishNode(node, "AwaitExpression") + }; + + var pp$4 = Parser.prototype; + + // This function is used to raise exceptions on parse errors. It + // takes an offset integer (into the current `input`) to indicate + // the location of the error, attaches the position to the end + // of the error message, and then raises a `SyntaxError` with that + // message. + + pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos); + message += " (" + loc.line + ":" + loc.column + ")"; + var err = new SyntaxError(message); + err.pos = pos; err.loc = loc; err.raisedAt = this.pos; + throw err + }; + + pp$4.raiseRecoverable = pp$4.raise; + + pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } + }; + + var pp$3 = Parser.prototype; + + var Scope = function Scope(flags) { + this.flags = flags; + // A list of var-declared names in the current lexical scope + this.var = []; + // A list of lexically-declared names in the current lexical scope + this.lexical = []; + // A list of lexically-declared FunctionDeclaration names in the current lexical scope + this.functions = []; + // A switch to disallow the identifier reference 'arguments' + this.inClassFieldInit = false; + }; + + // The functions in this module keep track of declared variables in the current scope in order to detect duplicate variable names. + + pp$3.enterScope = function(flags) { + this.scopeStack.push(new Scope(flags)); + }; + + pp$3.exitScope = function() { + this.scopeStack.pop(); + }; + + // The spec says: + // > At the top level of a function, or script, function declarations are + // > treated like var declarations rather than like lexical declarations. + pp$3.treatFunctionsAsVarInScope = function(scope) { + return (scope.flags & SCOPE_FUNCTION) || !this.inModule && (scope.flags & SCOPE_TOP) + }; + + pp$3.declareName = function(name, bindingType, pos) { + var redeclared = false; + if (bindingType === BIND_LEXICAL) { + var scope = this.currentScope(); + redeclared = scope.lexical.indexOf(name) > -1 || scope.functions.indexOf(name) > -1 || scope.var.indexOf(name) > -1; + scope.lexical.push(name); + if (this.inModule && (scope.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + } else if (bindingType === BIND_SIMPLE_CATCH) { + var scope$1 = this.currentScope(); + scope$1.lexical.push(name); + } else if (bindingType === BIND_FUNCTION) { + var scope$2 = this.currentScope(); + if (this.treatFunctionsAsVar) + { redeclared = scope$2.lexical.indexOf(name) > -1; } + else + { redeclared = scope$2.lexical.indexOf(name) > -1 || scope$2.var.indexOf(name) > -1; } + scope$2.functions.push(name); + } else { + for (var i = this.scopeStack.length - 1; i >= 0; --i) { + var scope$3 = this.scopeStack[i]; + if (scope$3.lexical.indexOf(name) > -1 && !((scope$3.flags & SCOPE_SIMPLE_CATCH) && scope$3.lexical[0] === name) || + !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name) > -1) { + redeclared = true; + break + } + scope$3.var.push(name); + if (this.inModule && (scope$3.flags & SCOPE_TOP)) + { delete this.undefinedExports[name]; } + if (scope$3.flags & SCOPE_VAR) { break } + } + } + if (redeclared) { this.raiseRecoverable(pos, ("Identifier '" + name + "' has already been declared")); } + }; + + pp$3.checkLocalExport = function(id) { + // scope.functions must be empty as Module code is always strict. + if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && + this.scopeStack[0].var.indexOf(id.name) === -1) { + this.undefinedExports[id.name] = id; + } + }; + + pp$3.currentScope = function() { + return this.scopeStack[this.scopeStack.length - 1] + }; + + pp$3.currentVarScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR) { return scope } + } + }; + + // Could be useful for `this`, `new.target`, `super()`, `super.property`, and `super[property]`. + pp$3.currentThisScope = function() { + for (var i = this.scopeStack.length - 1;; i--) { + var scope = this.scopeStack[i]; + if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope } + } + }; + + var Node = function Node(parser, pos, loc) { + this.type = ""; + this.start = pos; + this.end = 0; + if (parser.options.locations) + { this.loc = new SourceLocation(parser, loc); } + if (parser.options.directSourceFile) + { this.sourceFile = parser.options.directSourceFile; } + if (parser.options.ranges) + { this.range = [pos, 0]; } + }; + + // Start an AST node, attaching a start offset. + + var pp$2 = Parser.prototype; + + pp$2.startNode = function() { + return new Node(this, this.start, this.startLoc) + }; + + pp$2.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) + }; + + // Finish an AST node, adding `type` and `end` properties. + + function finishNodeAt(node, type, pos, loc) { + node.type = type; + node.end = pos; + if (this.options.locations) + { node.loc.end = loc; } + if (this.options.ranges) + { node.range[1] = pos; } + return node + } + + pp$2.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) + }; + + // Finish node at given position + + pp$2.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) + }; + + pp$2.copyNode = function(node) { + var newNode = new Node(this, node.start, this.startLoc); + for (var prop in node) { newNode[prop] = node[prop]; } + return newNode + }; + + // This file contains Unicode properties extracted from the ECMAScript specification. + // The lists are extracted like so: + // $$('#table-binary-unicode-properties > figure > table > tbody > tr > td:nth-child(1) code').map(el => el.innerText) + + // #table-binary-unicode-properties + var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; + var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; + var ecma11BinaryProperties = ecma10BinaryProperties; + var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; + var ecma13BinaryProperties = ecma12BinaryProperties; + var ecma14BinaryProperties = ecma13BinaryProperties; + + var unicodeBinaryProperties = { + 9: ecma9BinaryProperties, + 10: ecma10BinaryProperties, + 11: ecma11BinaryProperties, + 12: ecma12BinaryProperties, + 13: ecma13BinaryProperties, + 14: ecma14BinaryProperties + }; + + // #table-binary-unicode-properties-of-strings + var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; + + var unicodeBinaryPropertiesOfStrings = { + 9: "", + 10: "", + 11: "", + 12: "", + 13: "", + 14: ecma14BinaryPropertiesOfStrings + }; + + // #table-unicode-general-category-values + var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; + + // #table-unicode-script-values + var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; + var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; + var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; + var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; + var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; + var ecma14ScriptValues = ecma13ScriptValues + " Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"; + + var unicodeScriptValues = { + 9: ecma9ScriptValues, + 10: ecma10ScriptValues, + 11: ecma11ScriptValues, + 12: ecma12ScriptValues, + 13: ecma13ScriptValues, + 14: ecma14ScriptValues + }; + + var data = {}; + function buildUnicodeData(ecmaVersion) { + var d = data[ecmaVersion] = { + binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion] + " " + unicodeGeneralCategoryValues), + binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion]), + nonBinary: { + General_Category: wordsRegexp(unicodeGeneralCategoryValues), + Script: wordsRegexp(unicodeScriptValues[ecmaVersion]) + } + }; + d.nonBinary.Script_Extensions = d.nonBinary.Script; + + d.nonBinary.gc = d.nonBinary.General_Category; + d.nonBinary.sc = d.nonBinary.Script; + d.nonBinary.scx = d.nonBinary.Script_Extensions; + } + + for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { + var ecmaVersion = list[i]; + + buildUnicodeData(ecmaVersion); + } + + var pp$1 = Parser.prototype; + + var RegExpValidationState = function RegExpValidationState(parser) { + this.parser = parser; + this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); + this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; + this.source = ""; + this.flags = ""; + this.start = 0; + this.switchU = false; + this.switchV = false; + this.switchN = false; + this.pos = 0; + this.lastIntValue = 0; + this.lastStringValue = ""; + this.lastAssertionIsQuantifiable = false; + this.numCapturingParens = 0; + this.maxBackReference = 0; + this.groupNames = []; + this.backReferenceNames = []; + }; + + RegExpValidationState.prototype.reset = function reset (start, pattern, flags) { + var unicodeSets = flags.indexOf("v") !== -1; + var unicode = flags.indexOf("u") !== -1; + this.start = start | 0; + this.source = pattern + ""; + this.flags = flags; + if (unicodeSets && this.parser.options.ecmaVersion >= 15) { + this.switchU = true; + this.switchV = true; + this.switchN = true; + } else { + this.switchU = unicode && this.parser.options.ecmaVersion >= 6; + this.switchV = false; + this.switchN = unicode && this.parser.options.ecmaVersion >= 9; + } + }; + + RegExpValidationState.prototype.raise = function raise (message) { + this.parser.raiseRecoverable(this.start, ("Invalid regular expression: /" + (this.source) + "/: " + message)); + }; + + // If u flag is given, this returns the code point at the index (it combines a surrogate pair). + // Otherwise, this returns the code unit of the index (can be a part of a surrogate pair). + RegExpValidationState.prototype.at = function at (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return -1 + } + var c = s.charCodeAt(i); + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l) { + return c + } + var next = s.charCodeAt(i + 1); + return next >= 0xDC00 && next <= 0xDFFF ? (c << 10) + next - 0x35FDC00 : c + }; + + RegExpValidationState.prototype.nextIndex = function nextIndex (i, forceU) { + if ( forceU === void 0 ) forceU = false; + + var s = this.source; + var l = s.length; + if (i >= l) { + return l + } + var c = s.charCodeAt(i), next; + if (!(forceU || this.switchU) || c <= 0xD7FF || c >= 0xE000 || i + 1 >= l || + (next = s.charCodeAt(i + 1)) < 0xDC00 || next > 0xDFFF) { + return i + 1 + } + return i + 2 + }; + + RegExpValidationState.prototype.current = function current (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.pos, forceU) + }; + + RegExpValidationState.prototype.lookahead = function lookahead (forceU) { + if ( forceU === void 0 ) forceU = false; + + return this.at(this.nextIndex(this.pos, forceU), forceU) + }; + + RegExpValidationState.prototype.advance = function advance (forceU) { + if ( forceU === void 0 ) forceU = false; + + this.pos = this.nextIndex(this.pos, forceU); + }; + + RegExpValidationState.prototype.eat = function eat (ch, forceU) { + if ( forceU === void 0 ) forceU = false; + + if (this.current(forceU) === ch) { + this.advance(forceU); + return true + } + return false + }; + + RegExpValidationState.prototype.eatChars = function eatChars (chs, forceU) { + if ( forceU === void 0 ) forceU = false; + + var pos = this.pos; + for (var i = 0, list = chs; i < list.length; i += 1) { + var ch = list[i]; + + var current = this.at(pos, forceU); + if (current === -1 || current !== ch) { + return false + } + pos = this.nextIndex(pos, forceU); + } + this.pos = pos; + return true + }; + + /** + * Validate the flags part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$1.validateRegExpFlags = function(state) { + var validFlags = state.validFlags; + var flags = state.flags; + + var u = false; + var v = false; + + for (var i = 0; i < flags.length; i++) { + var flag = flags.charAt(i); + if (validFlags.indexOf(flag) === -1) { + this.raise(state.start, "Invalid regular expression flag"); + } + if (flags.indexOf(flag, i + 1) > -1) { + this.raise(state.start, "Duplicate regular expression flag"); + } + if (flag === "u") { u = true; } + if (flag === "v") { v = true; } + } + if (this.options.ecmaVersion >= 15 && u && v) { + this.raise(state.start, "Invalid regular expression flag"); + } + }; + + /** + * Validate the pattern part of a given RegExpLiteral. + * + * @param {RegExpValidationState} state The state to validate RegExp. + * @returns {void} + */ + pp$1.validateRegExpPattern = function(state) { + this.regexp_pattern(state); + + // The goal symbol for the parse is |Pattern[~U, ~N]|. If the result of + // parsing contains a |GroupName|, reparse with the goal symbol + // |Pattern[~U, +N]| and use this result instead. Throw a *SyntaxError* + // exception if _P_ did not conform to the grammar, if any elements of _P_ + // were not matched by the parse, or if any Early Error conditions exist. + if (!state.switchN && this.options.ecmaVersion >= 9 && state.groupNames.length > 0) { + state.switchN = true; + this.regexp_pattern(state); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Pattern + pp$1.regexp_pattern = function(state) { + state.pos = 0; + state.lastIntValue = 0; + state.lastStringValue = ""; + state.lastAssertionIsQuantifiable = false; + state.numCapturingParens = 0; + state.maxBackReference = 0; + state.groupNames.length = 0; + state.backReferenceNames.length = 0; + + this.regexp_disjunction(state); + + if (state.pos !== state.source.length) { + // Make the same messages as V8. + if (state.eat(0x29 /* ) */)) { + state.raise("Unmatched ')'"); + } + if (state.eat(0x5D /* ] */) || state.eat(0x7D /* } */)) { + state.raise("Lone quantifier brackets"); + } + } + if (state.maxBackReference > state.numCapturingParens) { + state.raise("Invalid escape"); + } + for (var i = 0, list = state.backReferenceNames; i < list.length; i += 1) { + var name = list[i]; + + if (state.groupNames.indexOf(name) === -1) { + state.raise("Invalid named capture referenced"); + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction + pp$1.regexp_disjunction = function(state) { + this.regexp_alternative(state); + while (state.eat(0x7C /* | */)) { + this.regexp_alternative(state); + } + + // Make the same message as V8. + if (this.regexp_eatQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + if (state.eat(0x7B /* { */)) { + state.raise("Lone quantifier brackets"); + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Alternative + pp$1.regexp_alternative = function(state) { + while (state.pos < state.source.length && this.regexp_eatTerm(state)) + { } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Term + pp$1.regexp_eatTerm = function(state) { + if (this.regexp_eatAssertion(state)) { + // Handle `QuantifiableAssertion Quantifier` alternative. + // `state.lastAssertionIsQuantifiable` is true if the last eaten Assertion + // is a QuantifiableAssertion. + if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { + // Make the same message as V8. + if (state.switchU) { + state.raise("Invalid quantifier"); + } + } + return true + } + + if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { + this.regexp_eatQuantifier(state); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-Assertion + pp$1.regexp_eatAssertion = function(state) { + var start = state.pos; + state.lastAssertionIsQuantifiable = false; + + // ^, $ + if (state.eat(0x5E /* ^ */) || state.eat(0x24 /* $ */)) { + return true + } + + // \b \B + if (state.eat(0x5C /* \ */)) { + if (state.eat(0x42 /* B */) || state.eat(0x62 /* b */)) { + return true + } + state.pos = start; + } + + // Lookahead / Lookbehind + if (state.eat(0x28 /* ( */) && state.eat(0x3F /* ? */)) { + var lookbehind = false; + if (this.options.ecmaVersion >= 9) { + lookbehind = state.eat(0x3C /* < */); + } + if (state.eat(0x3D /* = */) || state.eat(0x21 /* ! */)) { + this.regexp_disjunction(state); + if (!state.eat(0x29 /* ) */)) { + state.raise("Unterminated group"); + } + state.lastAssertionIsQuantifiable = !lookbehind; + return true + } + } + + state.pos = start; + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Quantifier + pp$1.regexp_eatQuantifier = function(state, noError) { + if ( noError === void 0 ) noError = false; + + if (this.regexp_eatQuantifierPrefix(state, noError)) { + state.eat(0x3F /* ? */); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-QuantifierPrefix + pp$1.regexp_eatQuantifierPrefix = function(state, noError) { + return ( + state.eat(0x2A /* * */) || + state.eat(0x2B /* + */) || + state.eat(0x3F /* ? */) || + this.regexp_eatBracedQuantifier(state, noError) + ) + }; + pp$1.regexp_eatBracedQuantifier = function(state, noError) { + var start = state.pos; + if (state.eat(0x7B /* { */)) { + var min = 0, max = -1; + if (this.regexp_eatDecimalDigits(state)) { + min = state.lastIntValue; + if (state.eat(0x2C /* , */) && this.regexp_eatDecimalDigits(state)) { + max = state.lastIntValue; + } + if (state.eat(0x7D /* } */)) { + // SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-term + if (max !== -1 && max < min && !noError) { + state.raise("numbers out of order in {} quantifier"); + } + return true + } + } + if (state.switchU && !noError) { + state.raise("Incomplete quantifier"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Atom + pp$1.regexp_eatAtom = function(state) { + return ( + this.regexp_eatPatternCharacters(state) || + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) + ) + }; + pp$1.regexp_eatReverseSolidusAtomEscape = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatAtomEscape(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatUncapturingGroup = function(state) { + var start = state.pos; + if (state.eat(0x28 /* ( */)) { + if (state.eat(0x3F /* ? */) && state.eat(0x3A /* : */)) { + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + return true + } + state.raise("Unterminated group"); + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatCapturingGroup = function(state) { + if (state.eat(0x28 /* ( */)) { + if (this.options.ecmaVersion >= 9) { + this.regexp_groupSpecifier(state); + } else if (state.current() === 0x3F /* ? */) { + state.raise("Invalid group"); + } + this.regexp_disjunction(state); + if (state.eat(0x29 /* ) */)) { + state.numCapturingParens += 1; + return true + } + state.raise("Unterminated group"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedAtom + pp$1.regexp_eatExtendedAtom = function(state) { + return ( + state.eat(0x2E /* . */) || + this.regexp_eatReverseSolidusAtomEscape(state) || + this.regexp_eatCharacterClass(state) || + this.regexp_eatUncapturingGroup(state) || + this.regexp_eatCapturingGroup(state) || + this.regexp_eatInvalidBracedQuantifier(state) || + this.regexp_eatExtendedPatternCharacter(state) + ) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-InvalidBracedQuantifier + pp$1.regexp_eatInvalidBracedQuantifier = function(state) { + if (this.regexp_eatBracedQuantifier(state, true)) { + state.raise("Nothing to repeat"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-SyntaxCharacter + pp$1.regexp_eatSyntaxCharacter = function(state) { + var ch = state.current(); + if (isSyntaxCharacter(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + function isSyntaxCharacter(ch) { + return ( + ch === 0x24 /* $ */ || + ch >= 0x28 /* ( */ && ch <= 0x2B /* + */ || + ch === 0x2E /* . */ || + ch === 0x3F /* ? */ || + ch >= 0x5B /* [ */ && ch <= 0x5E /* ^ */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-PatternCharacter + // But eat eager. + pp$1.regexp_eatPatternCharacters = function(state) { + var start = state.pos; + var ch = 0; + while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { + state.advance(); + } + return state.pos !== start + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ExtendedPatternCharacter + pp$1.regexp_eatExtendedPatternCharacter = function(state) { + var ch = state.current(); + if ( + ch !== -1 && + ch !== 0x24 /* $ */ && + !(ch >= 0x28 /* ( */ && ch <= 0x2B /* + */) && + ch !== 0x2E /* . */ && + ch !== 0x3F /* ? */ && + ch !== 0x5B /* [ */ && + ch !== 0x5E /* ^ */ && + ch !== 0x7C /* | */ + ) { + state.advance(); + return true + } + return false + }; + + // GroupSpecifier :: + // [empty] + // `?` GroupName + pp$1.regexp_groupSpecifier = function(state) { + if (state.eat(0x3F /* ? */)) { + if (this.regexp_eatGroupName(state)) { + if (state.groupNames.indexOf(state.lastStringValue) !== -1) { + state.raise("Duplicate capture group name"); + } + state.groupNames.push(state.lastStringValue); + return + } + state.raise("Invalid group"); + } + }; + + // GroupName :: + // `<` RegExpIdentifierName `>` + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$1.regexp_eatGroupName = function(state) { + state.lastStringValue = ""; + if (state.eat(0x3C /* < */)) { + if (this.regexp_eatRegExpIdentifierName(state) && state.eat(0x3E /* > */)) { + return true + } + state.raise("Invalid capture group name"); + } + return false + }; + + // RegExpIdentifierName :: + // RegExpIdentifierStart + // RegExpIdentifierName RegExpIdentifierPart + // Note: this updates `state.lastStringValue` property with the eaten name. + pp$1.regexp_eatRegExpIdentifierName = function(state) { + state.lastStringValue = ""; + if (this.regexp_eatRegExpIdentifierStart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + while (this.regexp_eatRegExpIdentifierPart(state)) { + state.lastStringValue += codePointToString(state.lastIntValue); + } + return true + } + return false + }; + + // RegExpIdentifierStart :: + // UnicodeIDStart + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + pp$1.regexp_eatRegExpIdentifierStart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierStart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierStart(ch) { + return isIdentifierStart(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ + } + + // RegExpIdentifierPart :: + // UnicodeIDContinue + // `$` + // `_` + // `\` RegExpUnicodeEscapeSequence[+U] + // + // + pp$1.regexp_eatRegExpIdentifierPart = function(state) { + var start = state.pos; + var forceU = this.options.ecmaVersion >= 11; + var ch = state.current(forceU); + state.advance(forceU); + + if (ch === 0x5C /* \ */ && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { + ch = state.lastIntValue; + } + if (isRegExpIdentifierPart(ch)) { + state.lastIntValue = ch; + return true + } + + state.pos = start; + return false + }; + function isRegExpIdentifierPart(ch) { + return isIdentifierChar(ch, true) || ch === 0x24 /* $ */ || ch === 0x5F /* _ */ || ch === 0x200C /* */ || ch === 0x200D /* */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-AtomEscape + pp$1.regexp_eatAtomEscape = function(state) { + if ( + this.regexp_eatBackReference(state) || + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) || + (state.switchN && this.regexp_eatKGroupName(state)) + ) { + return true + } + if (state.switchU) { + // Make the same message as V8. + if (state.current() === 0x63 /* c */) { + state.raise("Invalid unicode escape"); + } + state.raise("Invalid escape"); + } + return false + }; + pp$1.regexp_eatBackReference = function(state) { + var start = state.pos; + if (this.regexp_eatDecimalEscape(state)) { + var n = state.lastIntValue; + if (state.switchU) { + // For SyntaxError in https://www.ecma-international.org/ecma-262/8.0/#sec-atomescape + if (n > state.maxBackReference) { + state.maxBackReference = n; + } + return true + } + if (n <= state.numCapturingParens) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatKGroupName = function(state) { + if (state.eat(0x6B /* k */)) { + if (this.regexp_eatGroupName(state)) { + state.backReferenceNames.push(state.lastStringValue); + return true + } + state.raise("Invalid named reference"); + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-CharacterEscape + pp$1.regexp_eatCharacterEscape = function(state) { + return ( + this.regexp_eatControlEscape(state) || + this.regexp_eatCControlLetter(state) || + this.regexp_eatZero(state) || + this.regexp_eatHexEscapeSequence(state) || + this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || + (!state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state)) || + this.regexp_eatIdentityEscape(state) + ) + }; + pp$1.regexp_eatCControlLetter = function(state) { + var start = state.pos; + if (state.eat(0x63 /* c */)) { + if (this.regexp_eatControlLetter(state)) { + return true + } + state.pos = start; + } + return false + }; + pp$1.regexp_eatZero = function(state) { + if (state.current() === 0x30 /* 0 */ && !isDecimalDigit(state.lookahead())) { + state.lastIntValue = 0; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlEscape + pp$1.regexp_eatControlEscape = function(state) { + var ch = state.current(); + if (ch === 0x74 /* t */) { + state.lastIntValue = 0x09; /* \t */ + state.advance(); + return true + } + if (ch === 0x6E /* n */) { + state.lastIntValue = 0x0A; /* \n */ + state.advance(); + return true + } + if (ch === 0x76 /* v */) { + state.lastIntValue = 0x0B; /* \v */ + state.advance(); + return true + } + if (ch === 0x66 /* f */) { + state.lastIntValue = 0x0C; /* \f */ + state.advance(); + return true + } + if (ch === 0x72 /* r */) { + state.lastIntValue = 0x0D; /* \r */ + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ControlLetter + pp$1.regexp_eatControlLetter = function(state) { + var ch = state.current(); + if (isControlLetter(ch)) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + function isControlLetter(ch) { + return ( + (ch >= 0x41 /* A */ && ch <= 0x5A /* Z */) || + (ch >= 0x61 /* a */ && ch <= 0x7A /* z */) + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-RegExpUnicodeEscapeSequence + pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { + if ( forceU === void 0 ) forceU = false; + + var start = state.pos; + var switchU = forceU || state.switchU; + + if (state.eat(0x75 /* u */)) { + if (this.regexp_eatFixedHexDigits(state, 4)) { + var lead = state.lastIntValue; + if (switchU && lead >= 0xD800 && lead <= 0xDBFF) { + var leadSurrogateEnd = state.pos; + if (state.eat(0x5C /* \ */) && state.eat(0x75 /* u */) && this.regexp_eatFixedHexDigits(state, 4)) { + var trail = state.lastIntValue; + if (trail >= 0xDC00 && trail <= 0xDFFF) { + state.lastIntValue = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000; + return true + } + } + state.pos = leadSurrogateEnd; + state.lastIntValue = lead; + } + return true + } + if ( + switchU && + state.eat(0x7B /* { */) && + this.regexp_eatHexDigits(state) && + state.eat(0x7D /* } */) && + isValidUnicode(state.lastIntValue) + ) { + return true + } + if (switchU) { + state.raise("Invalid unicode escape"); + } + state.pos = start; + } + + return false + }; + function isValidUnicode(ch) { + return ch >= 0 && ch <= 0x10FFFF + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-IdentityEscape + pp$1.regexp_eatIdentityEscape = function(state) { + if (state.switchU) { + if (this.regexp_eatSyntaxCharacter(state)) { + return true + } + if (state.eat(0x2F /* / */)) { + state.lastIntValue = 0x2F; /* / */ + return true + } + return false + } + + var ch = state.current(); + if (ch !== 0x63 /* c */ && (!state.switchN || ch !== 0x6B /* k */)) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalEscape + pp$1.regexp_eatDecimalEscape = function(state) { + state.lastIntValue = 0; + var ch = state.current(); + if (ch >= 0x31 /* 1 */ && ch <= 0x39 /* 9 */) { + do { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } while ((ch = state.current()) >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) + return true + } + return false + }; + + // Return values used by character set parsing methods, needed to + // forbid negation of sets that can match strings. + var CharSetNone = 0; // Nothing parsed + var CharSetOk = 1; // Construct parsed, cannot contain strings + var CharSetString = 2; // Construct parsed, can contain strings + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClassEscape + pp$1.regexp_eatCharacterClassEscape = function(state) { + var ch = state.current(); + + if (isCharacterClassEscape(ch)) { + state.lastIntValue = -1; + state.advance(); + return CharSetOk + } + + var negate = false; + if ( + state.switchU && + this.options.ecmaVersion >= 9 && + ((negate = ch === 0x50 /* P */) || ch === 0x70 /* p */) + ) { + state.lastIntValue = -1; + state.advance(); + var result; + if ( + state.eat(0x7B /* { */) && + (result = this.regexp_eatUnicodePropertyValueExpression(state)) && + state.eat(0x7D /* } */) + ) { + if (negate && result === CharSetString) { state.raise("Invalid property name"); } + return result + } + state.raise("Invalid property name"); + } + + return CharSetNone + }; + + function isCharacterClassEscape(ch) { + return ( + ch === 0x64 /* d */ || + ch === 0x44 /* D */ || + ch === 0x73 /* s */ || + ch === 0x53 /* S */ || + ch === 0x77 /* w */ || + ch === 0x57 /* W */ + ) + } + + // UnicodePropertyValueExpression :: + // UnicodePropertyName `=` UnicodePropertyValue + // LoneUnicodePropertyNameOrValue + pp$1.regexp_eatUnicodePropertyValueExpression = function(state) { + var start = state.pos; + + // UnicodePropertyName `=` UnicodePropertyValue + if (this.regexp_eatUnicodePropertyName(state) && state.eat(0x3D /* = */)) { + var name = state.lastStringValue; + if (this.regexp_eatUnicodePropertyValue(state)) { + var value = state.lastStringValue; + this.regexp_validateUnicodePropertyNameAndValue(state, name, value); + return CharSetOk + } + } + state.pos = start; + + // LoneUnicodePropertyNameOrValue + if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { + var nameOrValue = state.lastStringValue; + return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue) + } + return CharSetNone + }; + + pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name, value) { + if (!hasOwn(state.unicodeProperties.nonBinary, name)) + { state.raise("Invalid property name"); } + if (!state.unicodeProperties.nonBinary[name].test(value)) + { state.raise("Invalid property value"); } + }; + + pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { + if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk } + if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString } + state.raise("Invalid property name"); + }; + + // UnicodePropertyName :: + // UnicodePropertyNameCharacters + pp$1.regexp_eatUnicodePropertyName = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyNameCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + + function isUnicodePropertyNameCharacter(ch) { + return isControlLetter(ch) || ch === 0x5F /* _ */ + } + + // UnicodePropertyValue :: + // UnicodePropertyValueCharacters + pp$1.regexp_eatUnicodePropertyValue = function(state) { + var ch = 0; + state.lastStringValue = ""; + while (isUnicodePropertyValueCharacter(ch = state.current())) { + state.lastStringValue += codePointToString(ch); + state.advance(); + } + return state.lastStringValue !== "" + }; + function isUnicodePropertyValueCharacter(ch) { + return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch) + } + + // LoneUnicodePropertyNameOrValue :: + // UnicodePropertyValueCharacters + pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { + return this.regexp_eatUnicodePropertyValue(state) + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-CharacterClass + pp$1.regexp_eatCharacterClass = function(state) { + if (state.eat(0x5B /* [ */)) { + var negate = state.eat(0x5E /* ^ */); + var result = this.regexp_classContents(state); + if (!state.eat(0x5D /* ] */)) + { state.raise("Unterminated character class"); } + if (negate && result === CharSetString) + { state.raise("Negated character class may contain strings"); } + return true + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassContents + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassRanges + pp$1.regexp_classContents = function(state) { + if (state.current() === 0x5D /* ] */) { return CharSetOk } + if (state.switchV) { return this.regexp_classSetExpression(state) } + this.regexp_nonEmptyClassRanges(state); + return CharSetOk + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRanges + // https://www.ecma-international.org/ecma-262/8.0/#prod-NonemptyClassRangesNoDash + pp$1.regexp_nonEmptyClassRanges = function(state) { + while (this.regexp_eatClassAtom(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassAtom(state)) { + var right = state.lastIntValue; + if (state.switchU && (left === -1 || right === -1)) { + state.raise("Invalid character class"); + } + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + } + } + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtom + // https://www.ecma-international.org/ecma-262/8.0/#prod-ClassAtomNoDash + pp$1.regexp_eatClassAtom = function(state) { + var start = state.pos; + + if (state.eat(0x5C /* \ */)) { + if (this.regexp_eatClassEscape(state)) { + return true + } + if (state.switchU) { + // Make the same message as V8. + var ch$1 = state.current(); + if (ch$1 === 0x63 /* c */ || isOctalDigit(ch$1)) { + state.raise("Invalid class escape"); + } + state.raise("Invalid escape"); + } + state.pos = start; + } + + var ch = state.current(); + if (ch !== 0x5D /* ] */) { + state.lastIntValue = ch; + state.advance(); + return true + } + + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassEscape + pp$1.regexp_eatClassEscape = function(state) { + var start = state.pos; + + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + + if (state.switchU && state.eat(0x2D /* - */)) { + state.lastIntValue = 0x2D; /* - */ + return true + } + + if (!state.switchU && state.eat(0x63 /* c */)) { + if (this.regexp_eatClassControlLetter(state)) { + return true + } + state.pos = start; + } + + return ( + this.regexp_eatCharacterClassEscape(state) || + this.regexp_eatCharacterEscape(state) + ) + }; + + // https://tc39.es/ecma262/#prod-ClassSetExpression + // https://tc39.es/ecma262/#prod-ClassUnion + // https://tc39.es/ecma262/#prod-ClassIntersection + // https://tc39.es/ecma262/#prod-ClassSubtraction + pp$1.regexp_classSetExpression = function(state) { + var result = CharSetOk, subResult; + if (this.regexp_eatClassSetRange(state)) ; else if (subResult = this.regexp_eatClassSetOperand(state)) { + if (subResult === CharSetString) { result = CharSetString; } + // https://tc39.es/ecma262/#prod-ClassIntersection + var start = state.pos; + while (state.eatChars([0x26, 0x26] /* && */)) { + if ( + state.current() !== 0x26 /* & */ && + (subResult = this.regexp_eatClassSetOperand(state)) + ) { + if (subResult !== CharSetString) { result = CharSetOk; } + continue + } + state.raise("Invalid character in character class"); + } + if (start !== state.pos) { return result } + // https://tc39.es/ecma262/#prod-ClassSubtraction + while (state.eatChars([0x2D, 0x2D] /* -- */)) { + if (this.regexp_eatClassSetOperand(state)) { continue } + state.raise("Invalid character in character class"); + } + if (start !== state.pos) { return result } + } else { + state.raise("Invalid character in character class"); + } + // https://tc39.es/ecma262/#prod-ClassUnion + for (;;) { + if (this.regexp_eatClassSetRange(state)) { continue } + subResult = this.regexp_eatClassSetOperand(state); + if (!subResult) { return result } + if (subResult === CharSetString) { result = CharSetString; } + } + }; + + // https://tc39.es/ecma262/#prod-ClassSetRange + pp$1.regexp_eatClassSetRange = function(state) { + var start = state.pos; + if (this.regexp_eatClassSetCharacter(state)) { + var left = state.lastIntValue; + if (state.eat(0x2D /* - */) && this.regexp_eatClassSetCharacter(state)) { + var right = state.lastIntValue; + if (left !== -1 && right !== -1 && left > right) { + state.raise("Range out of order in character class"); + } + return true + } + state.pos = start; + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassSetOperand + pp$1.regexp_eatClassSetOperand = function(state) { + if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk } + return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state) + }; + + // https://tc39.es/ecma262/#prod-NestedClass + pp$1.regexp_eatNestedClass = function(state) { + var start = state.pos; + if (state.eat(0x5B /* [ */)) { + var negate = state.eat(0x5E /* ^ */); + var result = this.regexp_classContents(state); + if (state.eat(0x5D /* ] */)) { + if (negate && result === CharSetString) { + state.raise("Negated character class may contain strings"); + } + return result + } + state.pos = start; + } + if (state.eat(0x5C /* \ */)) { + var result$1 = this.regexp_eatCharacterClassEscape(state); + if (result$1) { + return result$1 + } + state.pos = start; + } + return null + }; + + // https://tc39.es/ecma262/#prod-ClassStringDisjunction + pp$1.regexp_eatClassStringDisjunction = function(state) { + var start = state.pos; + if (state.eatChars([0x5C, 0x71] /* \q */)) { + if (state.eat(0x7B /* { */)) { + var result = this.regexp_classStringDisjunctionContents(state); + if (state.eat(0x7D /* } */)) { + return result + } + } else { + // Make the same message as V8. + state.raise("Invalid escape"); + } + state.pos = start; + } + return null + }; + + // https://tc39.es/ecma262/#prod-ClassStringDisjunctionContents + pp$1.regexp_classStringDisjunctionContents = function(state) { + var result = this.regexp_classString(state); + while (state.eat(0x7C /* | */)) { + if (this.regexp_classString(state) === CharSetString) { result = CharSetString; } + } + return result + }; + + // https://tc39.es/ecma262/#prod-ClassString + // https://tc39.es/ecma262/#prod-NonEmptyClassString + pp$1.regexp_classString = function(state) { + var count = 0; + while (this.regexp_eatClassSetCharacter(state)) { count++; } + return count === 1 ? CharSetOk : CharSetString + }; + + // https://tc39.es/ecma262/#prod-ClassSetCharacter + pp$1.regexp_eatClassSetCharacter = function(state) { + var start = state.pos; + if (state.eat(0x5C /* \ */)) { + if ( + this.regexp_eatCharacterEscape(state) || + this.regexp_eatClassSetReservedPunctuator(state) + ) { + return true + } + if (state.eat(0x62 /* b */)) { + state.lastIntValue = 0x08; /* */ + return true + } + state.pos = start; + return false + } + var ch = state.current(); + if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false } + if (isClassSetSyntaxCharacter(ch)) { return false } + state.advance(); + state.lastIntValue = ch; + return true + }; + + // https://tc39.es/ecma262/#prod-ClassSetReservedDoublePunctuator + function isClassSetReservedDoublePunctuatorCharacter(ch) { + return ( + ch === 0x21 /* ! */ || + ch >= 0x23 /* # */ && ch <= 0x26 /* & */ || + ch >= 0x2A /* * */ && ch <= 0x2C /* , */ || + ch === 0x2E /* . */ || + ch >= 0x3A /* : */ && ch <= 0x40 /* @ */ || + ch === 0x5E /* ^ */ || + ch === 0x60 /* ` */ || + ch === 0x7E /* ~ */ + ) + } + + // https://tc39.es/ecma262/#prod-ClassSetSyntaxCharacter + function isClassSetSyntaxCharacter(ch) { + return ( + ch === 0x28 /* ( */ || + ch === 0x29 /* ) */ || + ch === 0x2D /* - */ || + ch === 0x2F /* / */ || + ch >= 0x5B /* [ */ && ch <= 0x5D /* ] */ || + ch >= 0x7B /* { */ && ch <= 0x7D /* } */ + ) + } + + // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator + pp$1.regexp_eatClassSetReservedPunctuator = function(state) { + var ch = state.current(); + if (isClassSetReservedPunctuator(ch)) { + state.lastIntValue = ch; + state.advance(); + return true + } + return false + }; + + // https://tc39.es/ecma262/#prod-ClassSetReservedPunctuator + function isClassSetReservedPunctuator(ch) { + return ( + ch === 0x21 /* ! */ || + ch === 0x23 /* # */ || + ch === 0x25 /* % */ || + ch === 0x26 /* & */ || + ch === 0x2C /* , */ || + ch === 0x2D /* - */ || + ch >= 0x3A /* : */ && ch <= 0x3E /* > */ || + ch === 0x40 /* @ */ || + ch === 0x60 /* ` */ || + ch === 0x7E /* ~ */ + ) + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-ClassControlLetter + pp$1.regexp_eatClassControlLetter = function(state) { + var ch = state.current(); + if (isDecimalDigit(ch) || ch === 0x5F /* _ */) { + state.lastIntValue = ch % 0x20; + state.advance(); + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$1.regexp_eatHexEscapeSequence = function(state) { + var start = state.pos; + if (state.eat(0x78 /* x */)) { + if (this.regexp_eatFixedHexDigits(state, 2)) { + return true + } + if (state.switchU) { + state.raise("Invalid escape"); + } + state.pos = start; + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-DecimalDigits + pp$1.regexp_eatDecimalDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isDecimalDigit(ch = state.current())) { + state.lastIntValue = 10 * state.lastIntValue + (ch - 0x30 /* 0 */); + state.advance(); + } + return state.pos !== start + }; + function isDecimalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigits + pp$1.regexp_eatHexDigits = function(state) { + var start = state.pos; + var ch = 0; + state.lastIntValue = 0; + while (isHexDigit(ch = state.current())) { + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return state.pos !== start + }; + function isHexDigit(ch) { + return ( + (ch >= 0x30 /* 0 */ && ch <= 0x39 /* 9 */) || + (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) || + (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) + ) + } + function hexToInt(ch) { + if (ch >= 0x41 /* A */ && ch <= 0x46 /* F */) { + return 10 + (ch - 0x41 /* A */) + } + if (ch >= 0x61 /* a */ && ch <= 0x66 /* f */) { + return 10 + (ch - 0x61 /* a */) + } + return ch - 0x30 /* 0 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-annexB-LegacyOctalEscapeSequence + // Allows only 0-377(octal) i.e. 0-255(decimal). + pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) { + if (this.regexp_eatOctalDigit(state)) { + var n1 = state.lastIntValue; + if (this.regexp_eatOctalDigit(state)) { + var n2 = state.lastIntValue; + if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { + state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; + } else { + state.lastIntValue = n1 * 8 + n2; + } + } else { + state.lastIntValue = n1; + } + return true + } + return false + }; + + // https://www.ecma-international.org/ecma-262/8.0/#prod-OctalDigit + pp$1.regexp_eatOctalDigit = function(state) { + var ch = state.current(); + if (isOctalDigit(ch)) { + state.lastIntValue = ch - 0x30; /* 0 */ + state.advance(); + return true + } + state.lastIntValue = 0; + return false + }; + function isOctalDigit(ch) { + return ch >= 0x30 /* 0 */ && ch <= 0x37 /* 7 */ + } + + // https://www.ecma-international.org/ecma-262/8.0/#prod-Hex4Digits + // https://www.ecma-international.org/ecma-262/8.0/#prod-HexDigit + // And HexDigit HexDigit in https://www.ecma-international.org/ecma-262/8.0/#prod-HexEscapeSequence + pp$1.regexp_eatFixedHexDigits = function(state, length) { + var start = state.pos; + state.lastIntValue = 0; + for (var i = 0; i < length; ++i) { + var ch = state.current(); + if (!isHexDigit(ch)) { + state.pos = start; + return false + } + state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); + state.advance(); + } + return true + }; + + // Object type used to represent tokens. Note that normally, tokens + // simply exist as properties on the parser object. This is only + // used for the onToken callback and the external tokenizer. + + var Token = function Token(p) { + this.type = p.type; + this.value = p.value; + this.start = p.start; + this.end = p.end; + if (p.options.locations) + { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } + if (p.options.ranges) + { this.range = [p.start, p.end]; } + }; + + // ## Tokenizer + + var pp = Parser.prototype; + + // Move to the next token + + pp.next = function(ignoreEscapeSequenceInKeyword) { + if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) + { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } + if (this.options.onToken) + { this.options.onToken(new Token(this)); } + + this.lastTokEnd = this.end; + this.lastTokStart = this.start; + this.lastTokEndLoc = this.endLoc; + this.lastTokStartLoc = this.startLoc; + this.nextToken(); + }; + + pp.getToken = function() { + this.next(); + return new Token(this) + }; + + // If we're in an ES6 environment, make parsers iterable + if (typeof Symbol !== "undefined") + { pp[Symbol.iterator] = function() { + var this$1$1 = this; + + return { + next: function () { + var token = this$1$1.getToken(); + return { + done: token.type === types$1.eof, + value: token + } + } + } + }; } + + // Toggle strict mode. Re-reads the next number or string to please + // pedantic tests (`"use strict"; 010;` should fail). + + // Read a single token, updating the parser object's token-related + // properties. + + pp.nextToken = function() { + var curContext = this.curContext(); + if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } + + this.start = this.pos; + if (this.options.locations) { this.startLoc = this.curPosition(); } + if (this.pos >= this.input.length) { return this.finishToken(types$1.eof) } + + if (curContext.override) { return curContext.override(this) } + else { this.readToken(this.fullCharCodeAtPos()); } + }; + + pp.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + { return this.readWord() } + + return this.getTokenFromCode(code) + }; + + pp.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos); + if (code <= 0xd7ff || code >= 0xdc00) { return code } + var next = this.input.charCodeAt(this.pos + 1); + return next <= 0xdbff || next >= 0xe000 ? code : (code << 10) + next - 0x35fdc00 + }; + + pp.skipBlockComment = function() { + var startLoc = this.options.onComment && this.curPosition(); + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); + if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } + this.pos = end + 2; + if (this.options.locations) { + for (var nextBreak = (void 0), pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1;) { + ++this.curLine; + pos = this.lineStart = nextBreak; + } + } + if (this.options.onComment) + { this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()); } + }; + + pp.skipLineComment = function(startSkip) { + var start = this.pos; + var startLoc = this.options.onComment && this.curPosition(); + var ch = this.input.charCodeAt(this.pos += startSkip); + while (this.pos < this.input.length && !isNewLine(ch)) { + ch = this.input.charCodeAt(++this.pos); + } + if (this.options.onComment) + { this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()); } + }; + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and. + + pp.skipSpace = function() { + loop: while (this.pos < this.input.length) { + var ch = this.input.charCodeAt(this.pos); + switch (ch) { + case 32: case 160: // ' ' + ++this.pos; + break + case 13: + if (this.input.charCodeAt(this.pos + 1) === 10) { + ++this.pos; + } + case 10: case 8232: case 8233: + ++this.pos; + if (this.options.locations) { + ++this.curLine; + this.lineStart = this.pos; + } + break + case 47: // '/' + switch (this.input.charCodeAt(this.pos + 1)) { + case 42: // '*' + this.skipBlockComment(); + break + case 47: + this.skipLineComment(2); + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this.pos; + } else { + break loop + } + } + } + }; + + // Called at the end of every token. Sets `end`, `val`, and + // maintains `context` and `exprAllowed`, and skips the space after + // the token, so that the next one's `start` will point at the + // right position. + + pp.finishToken = function(type, val) { + this.end = this.pos; + if (this.options.locations) { this.endLoc = this.curPosition(); } + var prevType = this.type; + this.type = type; + this.value = val; + + this.updateContext(prevType); + }; + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + pp.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1); + if (next >= 48 && next <= 57) { return this.readNumber(true) } + var next2 = this.input.charCodeAt(this.pos + 2); + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3; + return this.finishToken(types$1.ellipsis) + } else { + ++this.pos; + return this.finishToken(types$1.dot) + } + }; + + pp.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1); + if (this.exprAllowed) { ++this.pos; return this.readRegexp() } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.slash, 1) + }; + + pp.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + var tokentype = code === 42 ? types$1.star : types$1.modulo; + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && code === 42 && next === 42) { + ++size; + tokentype = types$1.starstar; + next = this.input.charCodeAt(this.pos + 2); + } + + if (next === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(tokentype, size) + }; + + pp.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (this.options.ecmaVersion >= 12) { + var next2 = this.input.charCodeAt(this.pos + 2); + if (next2 === 61) { return this.finishOp(types$1.assign, 3) } + } + return this.finishOp(code === 124 ? types$1.logicalOR : types$1.logicalAND, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(code === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1) + }; + + pp.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1); + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.bitwiseXOR, 1) + }; + + pp.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1); + if (next === code) { + if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && + (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { + // A `-->` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types$1.incDec, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.plusMin, 1) + }; + + pp.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(types$1.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // `` line comment + this.skipLineComment(3); + this.skipSpace(); + return this.nextToken() + } + return this.finishOp(types$1.incDec, 2) + } + if (next === 61) { return this.finishOp(types$1.assign, 2) } + return this.finishOp(types$1.plusMin, 1) +}; + +pp.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1); + var size = 1; + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; + if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1) } + return this.finishOp(types$1.bitShift, size) + } + if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && + this.input.charCodeAt(this.pos + 3) === 45) { + // ` +[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/glob-parent -[npm-image]: https://img.shields.io/npm/v/glob-parent.svg +[npm-image]: https://img.shields.io/npm/v/glob-parent.svg?style=flat-square -[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master -[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master - -[travis-url]: https://travis-ci.org/gulpjs/glob-parent -[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci - -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor +[ci-url]: https://github.com/gulpjs/glob-parent/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/glob-parent/dev?style=flat-square [coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent -[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg +[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg?style=flat-square + -[gitter-url]: https://gitter.im/gulpjs/gulp -[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg + +[expand-braces]: https://github.com/jonschlinkert/expand-braces +[expand-brackets]: https://github.com/jonschlinkert/expand-brackets + diff --git a/node_modules/glob-parent/index.js b/node_modules/glob-parent/index.js index 09e257ea3..09dde64ba 100644 --- a/node_modules/glob-parent/index.js +++ b/node_modules/glob-parent/index.js @@ -6,15 +6,12 @@ var isWin32 = require('os').platform() === 'win32'; var slash = '/'; var backslash = /\\/g; -var enclosure = /[\{\[].*[\}\]]$/; -var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; -var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; +var escaped = /\\([!*?|[\](){}])/g; /** * @param {string} str * @param {Object} opts * @param {boolean} [opts.flipBackslashes=true] - * @returns {string} */ module.exports = function globParent(str, opts) { var options = Object.assign({ flipBackslashes: true }, opts); @@ -25,7 +22,7 @@ module.exports = function globParent(str, opts) { } // special case for strings ending in enclosure containing path separator - if (enclosure.test(str)) { + if (isEnclosure(str)) { str += slash; } @@ -35,8 +32,44 @@ module.exports = function globParent(str, opts) { // remove path parts that are globby do { str = pathPosixDirname(str); - } while (isGlob(str) || globby.test(str)); + } while (isGlobby(str)); // remove escape chars and return result return str.replace(escaped, '$1'); }; + +function isEnclosure(str) { + var lastChar = str.slice(-1); + + var enclosureStart; + switch (lastChar) { + case '}': + enclosureStart = '{'; + break; + case ']': + enclosureStart = '['; + break; + default: + return false; + } + + var foundIndex = str.indexOf(enclosureStart); + if (foundIndex < 0) { + return false; + } + + return str.slice(foundIndex + 1, -1).includes(slash); +} + +function isGlobby(str) { + if (/\([^()]+$/.test(str)) { + return true; + } + if (str[0] === '{' || str[0] === '[') { + return true; + } + if (/[^\\][{[]/.test(str)) { + return true; + } + return isGlob(str); +} diff --git a/node_modules/glob-parent/package.json b/node_modules/glob-parent/package.json index d03f752ce..baeab4217 100644 --- a/node_modules/glob-parent/package.json +++ b/node_modules/glob-parent/package.json @@ -1,67 +1,46 @@ { - "_from": "glob-parent@^5.0.0", - "_id": "glob-parent@5.1.2", - "_inBundle": false, - "_integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "_location": "/glob-parent", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob-parent@^5.0.0", - "name": "glob-parent", - "escapedName": "glob-parent", - "rawSpec": "^5.0.0", - "saveSpec": null, - "fetchSpec": "^5.0.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "_shasum": "869832c58034fe68a4093c17dc15e8340d8401c4", - "_spec": "glob-parent@^5.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Gulp Team", - "email": "team@gulpjs.com", - "url": "https://gulpjs.com/" - }, - "bugs": { - "url": "https://github.com/gulpjs/glob-parent/issues" - }, - "bundleDependencies": false, + "name": "glob-parent", + "version": "6.0.2", + "description": "Extract the non-magic parent path from a glob string.", + "author": "Gulp Team (https://gulpjs.com/)", "contributors": [ - { - "name": "Elan Shanker", - "url": "https://github.com/es128" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com" - } + "Elan Shanker (https://github.com/es128)", + "Blaine Bublitz " ], - "dependencies": { - "is-glob": "^4.0.1" - }, - "deprecated": false, - "description": "Extract the non-magic parent path from a glob string.", - "devDependencies": { - "coveralls": "^3.0.11", - "eslint": "^2.13.1", - "eslint-config-gulp": "^3.0.1", - "expect": "^1.20.2", - "mocha": "^6.0.2", - "nyc": "^13.3.0" - }, + "repository": "gulpjs/glob-parent", + "license": "ISC", "engines": { - "node": ">= 6" + "node": ">=10.13.0" }, + "main": "index.js", "files": [ "LICENSE", "index.js" ], - "homepage": "https://github.com/gulpjs/glob-parent#readme", + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "nyc mocha --async-only" + }, + "dependencies": { + "is-glob": "^4.0.3" + }, + "devDependencies": { + "eslint": "^7.0.0", + "eslint-config-gulp": "^5.0.0", + "expect": "^26.0.1", + "mocha": "^7.1.2", + "nyc": "^15.0.1" + }, + "nyc": { + "reporter": [ + "lcov", + "text-summary" + ] + }, + "prettier": { + "singleQuote": true + }, "keywords": [ "glob", "parent", @@ -71,20 +50,5 @@ "directory", "base", "wildcard" - ], - "license": "ISC", - "main": "index.js", - "name": "glob-parent", - "repository": { - "type": "git", - "url": "git+https://github.com/gulpjs/glob-parent.git" - }, - "scripts": { - "azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "lint": "eslint .", - "pretest": "npm run lint", - "test": "nyc mocha --async-only" - }, - "version": "5.1.2" + ] } diff --git a/node_modules/globals/globals.json b/node_modules/globals/globals.json index 53d2b86fa..44b632f57 100644 --- a/node_modules/globals/globals.json +++ b/node_modules/globals/globals.json @@ -388,7 +388,7 @@ "AudioParam": false, "AudioProcessingEvent": false, "AudioScheduledSourceNode": false, - "AudioWorkletGlobalScope ": false, + "AudioWorkletGlobalScope": false, "AudioWorkletNode": false, "AudioWorkletProcessor": false, "BarProp": false, @@ -419,11 +419,13 @@ "clearTimeout": false, "clientInformation": false, "ClipboardEvent": false, + "ClipboardItem": false, "close": false, "closed": false, "CloseEvent": false, "Comment": false, "CompositionEvent": false, + "CompressionStream": false, "confirm": false, "console": false, "ConstantSourceNode": false, @@ -442,21 +444,31 @@ "CSSImportRule": false, "CSSKeyframeRule": false, "CSSKeyframesRule": false, + "CSSMatrixComponent": false, "CSSMediaRule": false, "CSSNamespaceRule": false, "CSSPageRule": false, + "CSSPerspective": false, + "CSSRotate": false, "CSSRule": false, "CSSRuleList": false, + "CSSScale": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, "CSSStyleDeclaration": false, "CSSStyleRule": false, "CSSStyleSheet": false, "CSSSupportsRule": false, + "CSSTransformValue": false, + "CSSTranslate": false, "CustomElementRegistry": false, "customElements": false, "CustomEvent": false, "DataTransfer": false, "DataTransferItem": false, "DataTransferItemList": false, + "DecompressionStream": false, "defaultstatus": false, "defaultStatus": false, "DelayNode": false, @@ -478,6 +490,7 @@ "DOMPointReadOnly": false, "DOMQuad": false, "DOMRect": false, + "DOMRectList": false, "DOMRectReadOnly": false, "DOMStringList": false, "DOMStringMap": false, @@ -501,6 +514,7 @@ "FontFace": false, "FontFaceSetLoadEvent": false, "FormData": false, + "FormDataEvent": false, "frameElement": false, "frames": false, "GainNode": false, @@ -636,6 +650,7 @@ "MediaKeyStatusMap": false, "MediaKeySystemAccess": false, "MediaList": false, + "MediaMetadata": false, "MediaQueryList": false, "MediaQueryListEvent": false, "MediaRecorder": false, @@ -644,6 +659,7 @@ "MediaStream": false, "MediaStreamAudioDestinationNode": false, "MediaStreamAudioSourceNode": false, + "MediaStreamConstraints": false, "MediaStreamEvent": false, "MediaStreamTrack": false, "MediaStreamTrackEvent": false, @@ -672,6 +688,7 @@ "NavigationPreloadManager": false, "navigator": false, "Navigator": false, + "NavigatorUAData": false, "NetworkInformation": false, "Node": false, "NodeFilter": false, @@ -787,6 +804,7 @@ "OscillatorNode": false, "outerHeight": false, "outerWidth": false, + "OverconstrainedError": false, "PageTransitionEvent": false, "pageXOffset": false, "pageYOffset": false, @@ -839,10 +857,16 @@ "queueMicrotask": false, "RadioNodeList": false, "Range": false, + "ReadableByteStreamController": false, "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, "registerProcessor": false, "RemotePlayback": false, "removeEventListener": false, + "reportError": false, "Request": false, "requestAnimationFrame": false, "requestIdleCallback": false, @@ -905,9 +929,11 @@ "Storage": false, "StorageEvent": false, "StorageManager": false, + "structuredClone": false, "styleMedia": false, "StyleSheet": false, "StyleSheetList": false, + "SubmitEvent": false, "SubtleCrypto": false, "SVGAElement": false, "SVGAngle": false, @@ -1010,7 +1036,9 @@ "TaskAttributionTiming": false, "Text": false, "TextDecoder": false, + "TextDecoderStream": false, "TextEncoder": false, + "TextEncoderStream": false, "TextEvent": false, "TextMetrics": false, "TextTrack": false, @@ -1018,12 +1046,15 @@ "TextTrackCueList": false, "TextTrackList": false, "TimeRanges": false, + "ToggleEvent": false, "toolbar": false, "top": false, "Touch": false, "TouchEvent": false, "TouchList": false, "TrackEvent": false, + "TransformStream": false, + "TransformStreamDefaultController": false, "TransitionEvent": false, "TreeWalker": false, "UIEvent": false, @@ -1058,6 +1089,8 @@ "Window": false, "Worker": false, "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, "XMLDocument": false, "XMLHttpRequest": false, "XMLHttpRequestEventTarget": false, @@ -1066,6 +1099,30 @@ "XPathEvaluator": false, "XPathExpression": false, "XPathResult": false, + "XRAnchor": false, + "XRBoundedReferenceSpace": false, + "XRCPUDepthInformation": false, + "XRDepthInformation": false, + "XRFrame": false, + "XRInputSource": false, + "XRInputSourceArray": false, + "XRInputSourceEvent": false, + "XRInputSourcesChangeEvent": false, + "XRPose": false, + "XRReferenceSpace": false, + "XRReferenceSpaceEvent": false, + "XRRenderState": false, + "XRRigidTransform": false, + "XRSession": false, + "XRSessionEvent": false, + "XRSpace": false, + "XRSystem": false, + "XRView": false, + "XRViewerPose": false, + "XRViewport": false, + "XRWebGLBinding": false, + "XRWebGLDepthInformation": false, + "XRWebGLLayer": false, "XSLTProcessor": false }, "worker": { @@ -1075,13 +1132,24 @@ "Blob": false, "BroadcastChannel": false, "btoa": false, + "ByteLengthQueuingStrategy": false, "Cache": false, "caches": false, "clearInterval": false, "clearTimeout": false, "close": true, + "CompressionStream": false, "console": false, + "CountQueuingStrategy": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CustomEvent": false, + "DecompressionStream": false, + "ErrorEvent": false, + "Event": false, "fetch": false, + "File": false, "FileReaderSync": false, "FormData": false, "Headers": false, @@ -1101,6 +1169,7 @@ "indexedDB": false, "location": false, "MessageChannel": false, + "MessageEvent": false, "MessagePort": false, "name": false, "navigator": false, @@ -1120,69 +1189,183 @@ "PerformanceMark": false, "PerformanceMeasure": false, "PerformanceNavigation": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, "PerformanceResourceTiming": false, "PerformanceTiming": false, "postMessage": true, "Promise": false, "queueMicrotask": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, "removeEventListener": false, + "reportError": false, "Request": false, "Response": false, "self": true, "ServiceWorkerRegistration": false, "setInterval": false, "setTimeout": false, + "SubtleCrypto": false, "TextDecoder": false, + "TextDecoderStream": false, "TextEncoder": false, + "TextEncoderStream": false, + "TransformStream": false, + "TransformStreamDefaultController": false, "URL": false, "URLSearchParams": false, + "WebAssembly": false, "WebSocket": false, "Worker": false, "WorkerGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, "XMLHttpRequest": false }, "node": { "__dirname": false, "__filename": false, "AbortController": false, + "AbortSignal": false, + "atob": false, + "Blob": false, + "BroadcastChannel": false, + "btoa": false, "Buffer": false, + "ByteLengthQueuingStrategy": false, "clearImmediate": false, "clearInterval": false, "clearTimeout": false, + "CompressionStream": false, "console": false, + "CountQueuingStrategy": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CustomEvent": false, + "DecompressionStream": false, + "DOMException": false, + "Event": false, + "EventTarget": false, "exports": true, + "fetch": false, + "File": false, + "FormData": false, "global": false, + "Headers": false, "Intl": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, "module": false, + "performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformanceResourceTiming": false, "process": false, "queueMicrotask": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "Request": false, "require": false, + "Response": false, "setImmediate": false, "setInterval": false, "setTimeout": false, + "structuredClone": false, + "SubtleCrypto": false, "TextDecoder": false, + "TextDecoderStream": false, "TextEncoder": false, + "TextEncoderStream": false, + "TransformStream": false, + "TransformStreamDefaultController": false, "URL": false, - "URLSearchParams": false + "URLSearchParams": false, + "WebAssembly": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false }, "nodeBuiltin": { "AbortController": false, + "AbortSignal": false, + "atob": false, + "Blob": false, + "BroadcastChannel": false, + "btoa": false, "Buffer": false, + "ByteLengthQueuingStrategy": false, "clearImmediate": false, "clearInterval": false, "clearTimeout": false, + "CompressionStream": false, "console": false, + "CountQueuingStrategy": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CustomEvent": false, + "DecompressionStream": false, + "DOMException": false, + "Event": false, + "EventTarget": false, + "fetch": false, + "File": false, + "FormData": false, "global": false, + "Headers": false, "Intl": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformanceResourceTiming": false, "process": false, "queueMicrotask": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "Request": false, + "Response": false, "setImmediate": false, "setInterval": false, "setTimeout": false, + "structuredClone": false, + "SubtleCrypto": false, "TextDecoder": false, + "TextDecoderStream": false, "TextEncoder": false, + "TextEncoderStream": false, + "TransformStream": false, + "TransformStreamDefaultController": false, "URL": false, - "URLSearchParams": false + "URLSearchParams": false, + "WebAssembly": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false }, "commonjs": { "exports": true, @@ -1532,6 +1715,7 @@ "Blob": false, "BroadcastChannel": false, "btoa": false, + "ByteLengthQueuingStrategy": false, "Cache": false, "caches": false, "CacheStorage": false, @@ -1541,11 +1725,21 @@ "clients": false, "Clients": false, "close": true, + "CompressionStream": false, "console": false, + "CountQueuingStrategy": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CustomEvent": false, + "DecompressionStream": false, + "ErrorEvent": false, + "Event": false, "ExtendableEvent": false, "ExtendableMessageEvent": false, "fetch": false, "FetchEvent": false, + "File": false, "FileReaderSync": false, "FormData": false, "Headers": false, @@ -1565,6 +1759,7 @@ "indexedDB": false, "location": false, "MessageChannel": false, + "MessageEvent": false, "MessagePort": false, "name": false, "navigator": false, @@ -1592,11 +1787,19 @@ "PerformanceMark": false, "PerformanceMeasure": false, "PerformanceNavigation": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, "PerformanceResourceTiming": false, "PerformanceTiming": false, "postMessage": true, "Promise": false, "queueMicrotask": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, "registration": false, "removeEventListener": false, "Request": false, @@ -1610,14 +1813,23 @@ "setInterval": false, "setTimeout": false, "skipWaiting": false, + "SubtleCrypto": false, "TextDecoder": false, + "TextDecoderStream": false, "TextEncoder": false, + "TextEncoderStream": false, + "TransformStream": false, + "TransformStreamDefaultController": false, "URL": false, "URLSearchParams": false, + "WebAssembly": false, "WebSocket": false, "WindowClient": false, "Worker": false, "WorkerGlobalScope": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false, "XMLHttpRequest": false }, "atomtest": { @@ -1658,13 +1870,66 @@ "protractor": false }, "shared-node-browser": { + "AbortController": false, + "AbortSignal": false, + "atob": false, + "Blob": false, + "BroadcastChannel": false, + "btoa": false, + "ByteLengthQueuingStrategy": false, "clearInterval": false, "clearTimeout": false, + "CompressionStream": false, "console": false, + "CountQueuingStrategy": false, + "crypto": false, + "Crypto": false, + "CryptoKey": false, + "CustomEvent": false, + "DecompressionStream": false, + "DOMException": false, + "Event": false, + "EventTarget": false, + "fetch": false, + "File": false, + "FormData": false, + "Headers": false, + "Intl": false, + "MessageChannel": false, + "MessageEvent": false, + "MessagePort": false, + "performance": false, + "PerformanceEntry": false, + "PerformanceMark": false, + "PerformanceMeasure": false, + "PerformanceObserver": false, + "PerformanceObserverEntryList": false, + "PerformanceResourceTiming": false, + "queueMicrotask": false, + "ReadableByteStreamController": false, + "ReadableStream": false, + "ReadableStreamBYOBReader": false, + "ReadableStreamBYOBRequest": false, + "ReadableStreamDefaultController": false, + "ReadableStreamDefaultReader": false, + "Request": false, + "Response": false, "setInterval": false, "setTimeout": false, + "structuredClone": false, + "SubtleCrypto": false, + "TextDecoder": false, + "TextDecoderStream": false, + "TextEncoder": false, + "TextEncoderStream": false, + "TransformStream": false, + "TransformStreamDefaultController": false, "URL": false, - "URLSearchParams": false + "URLSearchParams": false, + "WebAssembly": false, + "WritableStream": false, + "WritableStreamDefaultController": false, + "WritableStreamDefaultWriter": false }, "webextensions": { "browser": false, @@ -1676,6 +1941,7 @@ "createObjectIn": false, "exportFunction": false, "GM": false, + "GM_addElement": false, "GM_addStyle": false, "GM_addValueChangeListener": false, "GM_deleteValue": false, diff --git a/node_modules/globals/package.json b/node_modules/globals/package.json index 1d5012b70..78e266498 100644 --- a/node_modules/globals/package.json +++ b/node_modules/globals/package.json @@ -1,87 +1,56 @@ { - "_from": "globals@^13.6.0", - "_id": "globals@13.7.0", - "_inBundle": false, - "_integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", - "_location": "/globals", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "globals@^13.6.0", - "name": "globals", - "escapedName": "globals", - "rawSpec": "^13.6.0", - "saveSpec": null, - "fetchSpec": "^13.6.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", - "_shasum": "aed3bcefd80ad3ec0f0be2cf0c895110c0591795", - "_spec": "globals@^13.6.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/globals/issues" - }, - "bundleDependencies": false, - "dependencies": { - "type-fest": "^0.20.2" - }, - "deprecated": false, - "description": "Global identifiers from different JavaScript environments", - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.14.0", - "xo": "^0.36.1" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts", - "globals.json" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/globals#readme", - "keywords": [ - "globals", - "global", - "identifiers", - "variables", - "vars", - "jshint", - "eslint", - "environments" - ], - "license": "MIT", - "name": "globals", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/globals.git" - }, - "scripts": { - "test": "xo && ava" - }, - "tsd": { - "compilerOptions": { - "resolveJsonModule": true - } - }, - "version": "13.7.0", - "xo": { - "ignores": [ - "get-browser-globals.js" - ], - "rules": { - "node/no-unsupported-features/es-syntax": "off" - } - } + "name": "globals", + "version": "13.24.0", + "description": "Global identifiers from different JavaScript environments", + "license": "MIT", + "repository": "sindresorhus/globals", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "sideEffects": false, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava" + }, + "files": [ + "index.js", + "index.d.ts", + "globals.json" + ], + "keywords": [ + "globals", + "global", + "identifiers", + "variables", + "vars", + "jshint", + "eslint", + "environments" + ], + "dependencies": { + "type-fest": "^0.20.2" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.14.0", + "xo": "^0.36.1" + }, + "xo": { + "ignores": [ + "get-browser-globals.js" + ], + "rules": { + "node/no-unsupported-features/es-syntax": "off" + } + }, + "tsd": { + "compilerOptions": { + "resolveJsonModule": true + } + } } diff --git a/node_modules/globals/readme.md b/node_modules/globals/readme.md index 0ef22c304..29442a855 100644 --- a/node_modules/globals/readme.md +++ b/node_modules/globals/readme.md @@ -10,8 +10,8 @@ This package is used by ESLint. ## Install -``` -$ npm install globals +```sh +npm install globals ``` ## Usage @@ -42,15 +42,3 @@ For Node.js this package provides two sets of globals: See: https://nodejs.org/api/modules.html#modules_the_module_scope When analyzing code that is known to run outside of a CommonJS wrapper, for example, JavaScript modules, `nodeBuiltin` can find accidental CommonJS references. - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/graphemer/CHANGELOG.md b/node_modules/graphemer/CHANGELOG.md new file mode 100644 index 000000000..dc1dd4232 --- /dev/null +++ b/node_modules/graphemer/CHANGELOG.md @@ -0,0 +1,30 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [1.3.0] - 2021-12-13 + +### Added + +- Updated to include support for Unicode 14 + +## [1.2.0] - 2021-01-29 + +### Updated + +- Refactored to increase speed + +## [1.1.0] - 2020-09-14 + +### Added + +- Updated to include support for Unicode 13 + +## [1.0.0] - 2020-09-13 + +- Forked from work by @JLHwung on original `Grapheme-Splitter` library: https://github.com/JLHwung/grapheme-splitter/tree/next +- Converted to Typescript +- Added development and build tooling diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/graphemer/LICENSE similarity index 52% rename from node_modules/get-intrinsic/LICENSE rename to node_modules/graphemer/LICENSE index 48f05d01d..51f383108 100644 --- a/node_modules/get-intrinsic/LICENSE +++ b/node_modules/graphemer/LICENSE @@ -1,6 +1,4 @@ -MIT License - -Copyright (c) 2020 Jordan Harband +Copyright 2020 Filament (Anomalous Technologies Limited) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -9,13 +7,12 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/graphemer/README.md b/node_modules/graphemer/README.md new file mode 100644 index 000000000..0ac98ad36 --- /dev/null +++ b/node_modules/graphemer/README.md @@ -0,0 +1,132 @@ +# Graphemer: Unicode Character Splitter 🪓 + +## Introduction + +This library continues the work of [Grapheme Splitter](https://github.com/orling/grapheme-splitter) and supports the following unicode versions: + +- Unicode 15 and below `[v1.4.0]` +- Unicode 14 and below `[v1.3.0]` +- Unicode 13 and below `[v1.1.0]` +- Unicode 11 and below `[v1.0.0]` (Unicode 10 supported by `grapheme-splitter`) + +In JavaScript there is not always a one-to-one relationship between string characters and what a user would call a separate visual "letter". Some symbols are represented by several characters. This can cause issues when splitting strings and inadvertently cutting a multi-char letter in half, or when you need the actual number of letters in a string. + +For example, emoji characters like "🌷","🎁","💩","😜" and "👍" are represented by two JavaScript characters each (high surrogate and low surrogate). That is, + +```javascript +'🌷'.length == 2; +``` + +The combined emoji are even longer: + +```javascript +'🏳️‍🌈'.length == 6; +``` + +What's more, some languages often include combining marks - characters that are used to modify the letters before them. Common examples are the German letter ü and the Spanish letter ñ. Sometimes they can be represented alternatively both as a single character and as a letter + combining mark, with both forms equally valid: + +```javascript +var two = 'ñ'; // unnormalized two-char n+◌̃, i.e. "\u006E\u0303"; +var one = 'ñ'; // normalized single-char, i.e. "\u00F1" + +console.log(one != two); // prints 'true' +``` + +Unicode normalization, as performed by the popular punycode.js library or ECMAScript 6's String.normalize, can **sometimes** fix those differences and turn two-char sequences into single characters. But it is **not** enough in all cases. Some languages like Hindi make extensive use of combining marks on their letters, that have no dedicated single-codepoint Unicode sequences, due to the sheer number of possible combinations. +For example, the Hindi word "अनुच्छेद" is comprised of 5 letters and 3 combining marks: + +अ + न + ु + च + ् + छ + े + द + +which is in fact just 5 user-perceived letters: + +अ + नु + च् + छे + द + +and which Unicode normalization would not combine properly. +There are also the unusual letter+combining mark combinations which have no dedicated Unicode codepoint. The string Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘ obviously has 5 separate letters, but is in fact comprised of 58 JavaScript characters, most of which are combining marks. + +Enter the `graphemer` library. It can be used to properly split JavaScript strings into what a human user would call separate letters (or "extended grapheme clusters" in Unicode terminology), no matter what their internal representation is. It is an implementation on the [Default Grapheme Cluster Boundary](http://unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table) of [UAX #29](http://www.unicode.org/reports/tr29/). + +## Installation + +Install `graphemer` using the NPM command below: + +``` +$ npm i graphemer +``` + +## Usage + +If you're using [Typescript](https://www.typescriptlang.org/) or a compiler like [Babel](https://babeljs.io/) (or something like Create React App) things are pretty simple; just import, initialize and use! + +```javascript +import Graphemer from 'graphemer'; + +const splitter = new Graphemer(); + +// split the string to an array of grapheme clusters (one string each) +const graphemes = splitter.splitGraphemes(string); + +// iterate the string to an iterable iterator of grapheme clusters (one string each) +const graphemeIterator = splitter.iterateGraphemes(string); + +// or do this if you just need their number +const graphemeCount = splitter.countGraphemes(string); +``` + +If you're using vanilla Node you can use the `require()` method. + +```javascript +const Graphemer = require('graphemer').default; + +const splitter = new Graphemer(); + +const graphemes = splitter.splitGraphemes(string); +``` + +## Examples + +```javascript +import Graphemer from 'graphemer'; + +const splitter = new Graphemer(); + +// plain latin alphabet - nothing spectacular +splitter.splitGraphemes('abcd'); // returns ["a", "b", "c", "d"] + +// two-char emojis and six-char combined emoji +splitter.splitGraphemes('🌷🎁💩😜👍🏳️‍🌈'); // returns ["🌷","🎁","💩","😜","👍","🏳️‍🌈"] + +// diacritics as combining marks, 10 JavaScript chars +splitter.splitGraphemes('Ĺo͂řȩm̅'); // returns ["Ĺ","o͂","ř","ȩ","m̅"] + +// individual Korean characters (Jamo), 4 JavaScript chars +splitter.splitGraphemes('뎌쉐'); // returns ["뎌","쉐"] + +// Hindi text with combining marks, 8 JavaScript chars +splitter.splitGraphemes('अनुच्छेद'); // returns ["अ","नु","च्","छे","द"] + +// demonic multiple combining marks, 75 JavaScript chars +splitter.splitGraphemes('Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞'); // returns ["Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍","A̴̵̜̰͔ͫ͗͢","L̠ͨͧͩ͘","G̴̻͈͍͔̹̑͗̎̅͛́","Ǫ̵̹̻̝̳͂̌̌͘","!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞"] +``` + +## TypeScript + +Graphemer is built with TypeScript and, of course, includes type declarations. + +```javascript +import Graphemer from 'graphemer'; + +const splitter = new Graphemer(); + +const split: string[] = splitter.splitGraphemes('Z͑ͫ̓ͪ̂ͫ̽͏̴̙̤̞͉͚̯̞̠͍A̴̵̜̰͔ͫ͗͢L̠ͨͧͩ͘G̴̻͈͍͔̹̑͗̎̅͛́Ǫ̵̹̻̝̳͂̌̌͘!͖̬̰̙̗̿̋ͥͥ̂ͣ̐́́͜͞'); +``` + +## Contributing + +See [Contribution Guide](./CONTRIBUTING.md). + +## Acknowledgements + +This library is a fork of the incredible work done by Orlin Georgiev and Huáng Jùnliàng at https://github.com/orling/grapheme-splitter. + +The original library was heavily influenced by Devon Govett's excellent [grapheme-breaker](https://github.com/devongovett/grapheme-breaker) CoffeeScript library. diff --git a/node_modules/graphemer/lib/Graphemer.d.ts b/node_modules/graphemer/lib/Graphemer.d.ts new file mode 100644 index 000000000..a89b8cbcc --- /dev/null +++ b/node_modules/graphemer/lib/Graphemer.d.ts @@ -0,0 +1,41 @@ +import GraphemerIterator from './GraphemerIterator'; +export default class Graphemer { + /** + * Returns the next grapheme break in the string after the given index + * @param string {string} + * @param index {number} + * @returns {number} + */ + static nextBreak(string: string, index: number): number; + /** + * Breaks the given string into an array of grapheme clusters + * @param str {string} + * @returns {string[]} + */ + splitGraphemes(str: string): string[]; + /** + * Returns an iterator of grapheme clusters in the given string + * @param str {string} + * @returns {GraphemerIterator} + */ + iterateGraphemes(str: string): GraphemerIterator; + /** + * Returns the number of grapheme clusters in the given string + * @param str {string} + * @returns {number} + */ + countGraphemes(str: string): number; + /** + * Given a Unicode code point, determines this symbol's grapheme break property + * @param code {number} Unicode code point + * @returns {number} + */ + static getGraphemeBreakProperty(code: number): number; + /** + * Given a Unicode code point, returns if symbol is an extended pictographic or some other break + * @param code {number} Unicode code point + * @returns {number} + */ + static getEmojiProperty(code: number): number; +} +//# sourceMappingURL=Graphemer.d.ts.map \ No newline at end of file diff --git a/node_modules/graphemer/lib/Graphemer.d.ts.map b/node_modules/graphemer/lib/Graphemer.d.ts.map new file mode 100644 index 000000000..692b76236 --- /dev/null +++ b/node_modules/graphemer/lib/Graphemer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Graphemer.d.ts","sourceRoot":"","sources":["../src/Graphemer.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IA2CvD;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAcrC;;;;OAIG;IACH,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB;IAIhD;;;;OAIG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAcnC;;;;OAIG;IACH,MAAM,CAAC,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAoySrD;;;;OAIG;IACH,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CA47B9C"} \ No newline at end of file diff --git a/node_modules/graphemer/lib/Graphemer.js b/node_modules/graphemer/lib/Graphemer.js new file mode 100644 index 000000000..8ed00ca56 --- /dev/null +++ b/node_modules/graphemer/lib/Graphemer.js @@ -0,0 +1,11959 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const boundaries_1 = require("./boundaries"); +const GraphemerHelper_1 = __importDefault(require("./GraphemerHelper")); +const GraphemerIterator_1 = __importDefault(require("./GraphemerIterator")); +class Graphemer { + /** + * Returns the next grapheme break in the string after the given index + * @param string {string} + * @param index {number} + * @returns {number} + */ + static nextBreak(string, index) { + if (index === undefined) { + index = 0; + } + if (index < 0) { + return 0; + } + if (index >= string.length - 1) { + return string.length; + } + const prevCP = GraphemerHelper_1.default.codePointAt(string, index); + const prev = Graphemer.getGraphemeBreakProperty(prevCP); + const prevEmoji = Graphemer.getEmojiProperty(prevCP); + const mid = []; + const midEmoji = []; + for (let i = index + 1; i < string.length; i++) { + // check for already processed low surrogates + if (GraphemerHelper_1.default.isSurrogate(string, i - 1)) { + continue; + } + const nextCP = GraphemerHelper_1.default.codePointAt(string, i); + const next = Graphemer.getGraphemeBreakProperty(nextCP); + const nextEmoji = Graphemer.getEmojiProperty(nextCP); + if (GraphemerHelper_1.default.shouldBreak(prev, mid, next, prevEmoji, midEmoji, nextEmoji)) { + return i; + } + mid.push(next); + midEmoji.push(nextEmoji); + } + return string.length; + } + /** + * Breaks the given string into an array of grapheme clusters + * @param str {string} + * @returns {string[]} + */ + splitGraphemes(str) { + const res = []; + let index = 0; + let brk; + while ((brk = Graphemer.nextBreak(str, index)) < str.length) { + res.push(str.slice(index, brk)); + index = brk; + } + if (index < str.length) { + res.push(str.slice(index)); + } + return res; + } + /** + * Returns an iterator of grapheme clusters in the given string + * @param str {string} + * @returns {GraphemerIterator} + */ + iterateGraphemes(str) { + return new GraphemerIterator_1.default(str, Graphemer.nextBreak); + } + /** + * Returns the number of grapheme clusters in the given string + * @param str {string} + * @returns {number} + */ + countGraphemes(str) { + let count = 0; + let index = 0; + let brk; + while ((brk = Graphemer.nextBreak(str, index)) < str.length) { + index = brk; + count++; + } + if (index < str.length) { + count++; + } + return count; + } + /** + * Given a Unicode code point, determines this symbol's grapheme break property + * @param code {number} Unicode code point + * @returns {number} + */ + static getGraphemeBreakProperty(code) { + // Grapheme break property taken from: + // https://www.unicode.org/Public/UCD/latest/ucd/auxiliary/GraphemeBreakProperty.txt + // and generated by + // node ./scripts/generate-grapheme-break.js + if (code < 0xbf09) { + if (code < 0xac54) { + if (code < 0x102d) { + if (code < 0xb02) { + if (code < 0x93b) { + if (code < 0x6df) { + if (code < 0x5bf) { + if (code < 0x7f) { + if (code < 0xb) { + if (code < 0xa) { + // Cc [10] .. + if (0x0 <= code && code <= 0x9) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Cc + if (0xa === code) { + return boundaries_1.CLUSTER_BREAK.LF; + } + } + } + else { + if (code < 0xd) { + // Cc [2] .. + if (0xb <= code && code <= 0xc) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + if (code < 0xe) { + // Cc + if (0xd === code) { + return boundaries_1.CLUSTER_BREAK.CR; + } + } + else { + // Cc [18] .. + if (0xe <= code && code <= 0x1f) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + } + } + } + else { + if (code < 0x300) { + if (code < 0xad) { + // Cc [33] .. + if (0x7f <= code && code <= 0x9f) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Cf SOFT HYPHEN + if (0xad === code) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + } + else { + if (code < 0x483) { + // Mn [112] COMBINING GRAVE ACCENT..COMBINING LATIN SMALL LETTER X + if (0x300 <= code && code <= 0x36f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x591) { + // Mn [5] COMBINING CYRILLIC TITLO..COMBINING CYRILLIC POKRYTIE + // Me [2] COMBINING CYRILLIC HUNDRED THOUSANDS SIGN..COMBINING CYRILLIC MILLIONS SIGN + if (0x483 <= code && code <= 0x489) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [45] HEBREW ACCENT ETNAHTA..HEBREW POINT METEG + if (0x591 <= code && code <= 0x5bd) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x610) { + if (code < 0x5c4) { + if (code < 0x5c1) { + // Mn HEBREW POINT RAFE + if (0x5bf === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] HEBREW POINT SHIN DOT..HEBREW POINT SIN DOT + if (0x5c1 <= code && code <= 0x5c2) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x5c7) { + // Mn [2] HEBREW MARK UPPER DOT..HEBREW MARK LOWER DOT + if (0x5c4 <= code && code <= 0x5c5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x600) { + // Mn HEBREW POINT QAMATS QATAN + if (0x5c7 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf [6] ARABIC NUMBER SIGN..ARABIC NUMBER MARK ABOVE + if (0x600 <= code && code <= 0x605) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + } + } + } + else { + if (code < 0x670) { + if (code < 0x61c) { + // Mn [11] ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM..ARABIC SMALL KASRA + if (0x610 <= code && code <= 0x61a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x64b) { + // Cf ARABIC LETTER MARK + if (0x61c === code) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Mn [21] ARABIC FATHATAN..ARABIC WAVY HAMZA BELOW + if (0x64b <= code && code <= 0x65f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x6d6) { + // Mn ARABIC LETTER SUPERSCRIPT ALEF + if (0x670 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x6dd) { + // Mn [7] ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA..ARABIC SMALL HIGH SEEN + if (0x6d6 <= code && code <= 0x6dc) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf ARABIC END OF AYAH + if (0x6dd === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + } + } + } + } + } + else { + if (code < 0x81b) { + if (code < 0x730) { + if (code < 0x6ea) { + if (code < 0x6e7) { + // Mn [6] ARABIC SMALL HIGH ROUNDED ZERO..ARABIC SMALL HIGH MADDA + if (0x6df <= code && code <= 0x6e4) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] ARABIC SMALL HIGH YEH..ARABIC SMALL HIGH NOON + if (0x6e7 <= code && code <= 0x6e8) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x70f) { + // Mn [4] ARABIC EMPTY CENTRE LOW STOP..ARABIC SMALL LOW MEEM + if (0x6ea <= code && code <= 0x6ed) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf SYRIAC ABBREVIATION MARK + if (0x70f === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + // Mn SYRIAC LETTER SUPERSCRIPT ALAPH + if (0x711 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x7eb) { + if (code < 0x7a6) { + // Mn [27] SYRIAC PTHAHA ABOVE..SYRIAC BARREKH + if (0x730 <= code && code <= 0x74a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [11] THAANA ABAFILI..THAANA SUKUN + if (0x7a6 <= code && code <= 0x7b0) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x7fd) { + // Mn [9] NKO COMBINING SHORT HIGH TONE..NKO COMBINING DOUBLE DOT ABOVE + if (0x7eb <= code && code <= 0x7f3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x816) { + // Mn NKO DANTAYALAN + if (0x7fd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [4] SAMARITAN MARK IN..SAMARITAN MARK DAGESH + if (0x816 <= code && code <= 0x819) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x898) { + if (code < 0x829) { + if (code < 0x825) { + // Mn [9] SAMARITAN MARK EPENTHETIC YUT..SAMARITAN VOWEL SIGN A + if (0x81b <= code && code <= 0x823) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [3] SAMARITAN VOWEL SIGN SHORT A..SAMARITAN VOWEL SIGN U + if (0x825 <= code && code <= 0x827) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x859) { + // Mn [5] SAMARITAN VOWEL SIGN LONG I..SAMARITAN MARK NEQUDAA + if (0x829 <= code && code <= 0x82d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x890) { + // Mn [3] MANDAIC AFFRICATION MARK..MANDAIC GEMINATION MARK + if (0x859 <= code && code <= 0x85b) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf [2] ARABIC POUND MARK ABOVE..ARABIC PIASTRE MARK ABOVE + if (0x890 <= code && code <= 0x891) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + } + } + } + else { + if (code < 0x8e3) { + if (code < 0x8ca) { + // Mn [8] ARABIC SMALL HIGH WORD AL-JUZ..ARABIC HALF MADDA OVER MADDA + if (0x898 <= code && code <= 0x89f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x8e2) { + // Mn [24] ARABIC SMALL HIGH FARSI YEH..ARABIC SMALL HIGH SIGN SAFHA + if (0x8ca <= code && code <= 0x8e1) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf ARABIC DISPUTED END OF AYAH + if (0x8e2 === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + } + } + else { + if (code < 0x903) { + // Mn [32] ARABIC TURNED DAMMA BELOW..DEVANAGARI SIGN ANUSVARA + if (0x8e3 <= code && code <= 0x902) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc DEVANAGARI SIGN VISARGA + if (0x903 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn DEVANAGARI VOWEL SIGN OE + if (0x93a === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0xa01) { + if (code < 0x982) { + if (code < 0x94d) { + if (code < 0x93e) { + // Mc DEVANAGARI VOWEL SIGN OOE + if (0x93b === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn DEVANAGARI SIGN NUKTA + if (0x93c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x941) { + // Mc [3] DEVANAGARI VOWEL SIGN AA..DEVANAGARI VOWEL SIGN II + if (0x93e <= code && code <= 0x940) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x949) { + // Mn [8] DEVANAGARI VOWEL SIGN U..DEVANAGARI VOWEL SIGN AI + if (0x941 <= code && code <= 0x948) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [4] DEVANAGARI VOWEL SIGN CANDRA O..DEVANAGARI VOWEL SIGN AU + if (0x949 <= code && code <= 0x94c) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x951) { + if (code < 0x94e) { + // Mn DEVANAGARI SIGN VIRAMA + if (0x94d === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] DEVANAGARI VOWEL SIGN PRISHTHAMATRA E..DEVANAGARI VOWEL SIGN AW + if (0x94e <= code && code <= 0x94f) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x962) { + // Mn [7] DEVANAGARI STRESS SIGN UDATTA..DEVANAGARI VOWEL SIGN UUE + if (0x951 <= code && code <= 0x957) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x981) { + // Mn [2] DEVANAGARI VOWEL SIGN VOCALIC L..DEVANAGARI VOWEL SIGN VOCALIC LL + if (0x962 <= code && code <= 0x963) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn BENGALI SIGN CANDRABINDU + if (0x981 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x9c7) { + if (code < 0x9be) { + if (code < 0x9bc) { + // Mc [2] BENGALI SIGN ANUSVARA..BENGALI SIGN VISARGA + if (0x982 <= code && code <= 0x983) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn BENGALI SIGN NUKTA + if (0x9bc === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x9bf) { + // Mc BENGALI VOWEL SIGN AA + if (0x9be === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x9c1) { + // Mc [2] BENGALI VOWEL SIGN I..BENGALI VOWEL SIGN II + if (0x9bf <= code && code <= 0x9c0) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] BENGALI VOWEL SIGN U..BENGALI VOWEL SIGN VOCALIC RR + if (0x9c1 <= code && code <= 0x9c4) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x9d7) { + if (code < 0x9cb) { + // Mc [2] BENGALI VOWEL SIGN E..BENGALI VOWEL SIGN AI + if (0x9c7 <= code && code <= 0x9c8) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x9cd) { + // Mc [2] BENGALI VOWEL SIGN O..BENGALI VOWEL SIGN AU + if (0x9cb <= code && code <= 0x9cc) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn BENGALI SIGN VIRAMA + if (0x9cd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x9e2) { + // Mc BENGALI AU LENGTH MARK + if (0x9d7 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x9fe) { + // Mn [2] BENGALI VOWEL SIGN VOCALIC L..BENGALI VOWEL SIGN VOCALIC LL + if (0x9e2 <= code && code <= 0x9e3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn BENGALI SANDHI MARK + if (0x9fe === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0xa83) { + if (code < 0xa47) { + if (code < 0xa3c) { + if (code < 0xa03) { + // Mn [2] GURMUKHI SIGN ADAK BINDI..GURMUKHI SIGN BINDI + if (0xa01 <= code && code <= 0xa02) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc GURMUKHI SIGN VISARGA + if (0xa03 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0xa3e) { + // Mn GURMUKHI SIGN NUKTA + if (0xa3c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xa41) { + // Mc [3] GURMUKHI VOWEL SIGN AA..GURMUKHI VOWEL SIGN II + if (0xa3e <= code && code <= 0xa40) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] GURMUKHI VOWEL SIGN U..GURMUKHI VOWEL SIGN UU + if (0xa41 <= code && code <= 0xa42) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xa70) { + if (code < 0xa4b) { + // Mn [2] GURMUKHI VOWEL SIGN EE..GURMUKHI VOWEL SIGN AI + if (0xa47 <= code && code <= 0xa48) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xa51) { + // Mn [3] GURMUKHI VOWEL SIGN OO..GURMUKHI SIGN VIRAMA + if (0xa4b <= code && code <= 0xa4d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn GURMUKHI SIGN UDAAT + if (0xa51 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xa75) { + // Mn [2] GURMUKHI TIPPI..GURMUKHI ADDAK + if (0xa70 <= code && code <= 0xa71) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xa81) { + // Mn GURMUKHI SIGN YAKASH + if (0xa75 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] GUJARATI SIGN CANDRABINDU..GUJARATI SIGN ANUSVARA + if (0xa81 <= code && code <= 0xa82) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xac9) { + if (code < 0xabe) { + // Mc GUJARATI SIGN VISARGA + if (0xa83 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn GUJARATI SIGN NUKTA + if (0xabc === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xac1) { + // Mc [3] GUJARATI VOWEL SIGN AA..GUJARATI VOWEL SIGN II + if (0xabe <= code && code <= 0xac0) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xac7) { + // Mn [5] GUJARATI VOWEL SIGN U..GUJARATI VOWEL SIGN CANDRA E + if (0xac1 <= code && code <= 0xac5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] GUJARATI VOWEL SIGN E..GUJARATI VOWEL SIGN AI + if (0xac7 <= code && code <= 0xac8) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xae2) { + if (code < 0xacb) { + // Mc GUJARATI VOWEL SIGN CANDRA O + if (0xac9 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xacd) { + // Mc [2] GUJARATI VOWEL SIGN O..GUJARATI VOWEL SIGN AU + if (0xacb <= code && code <= 0xacc) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn GUJARATI SIGN VIRAMA + if (0xacd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xafa) { + // Mn [2] GUJARATI VOWEL SIGN VOCALIC L..GUJARATI VOWEL SIGN VOCALIC LL + if (0xae2 <= code && code <= 0xae3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xb01) { + // Mn [6] GUJARATI SIGN SUKUN..GUJARATI SIGN TWO-CIRCLE NUKTA ABOVE + if (0xafa <= code && code <= 0xaff) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn ORIYA SIGN CANDRABINDU + if (0xb01 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + } + else { + if (code < 0xcf3) { + if (code < 0xc04) { + if (code < 0xb82) { + if (code < 0xb47) { + if (code < 0xb3e) { + if (code < 0xb3c) { + // Mc [2] ORIYA SIGN ANUSVARA..ORIYA SIGN VISARGA + if (0xb02 <= code && code <= 0xb03) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn ORIYA SIGN NUKTA + if (0xb3c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xb40) { + // Mc ORIYA VOWEL SIGN AA + // Mn ORIYA VOWEL SIGN I + if (0xb3e <= code && code <= 0xb3f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xb41) { + // Mc ORIYA VOWEL SIGN II + if (0xb40 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] ORIYA VOWEL SIGN U..ORIYA VOWEL SIGN VOCALIC RR + if (0xb41 <= code && code <= 0xb44) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xb4d) { + if (code < 0xb4b) { + // Mc [2] ORIYA VOWEL SIGN E..ORIYA VOWEL SIGN AI + if (0xb47 <= code && code <= 0xb48) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc [2] ORIYA VOWEL SIGN O..ORIYA VOWEL SIGN AU + if (0xb4b <= code && code <= 0xb4c) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0xb55) { + // Mn ORIYA SIGN VIRAMA + if (0xb4d === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xb62) { + // Mn [2] ORIYA SIGN OVERLINE..ORIYA AI LENGTH MARK + // Mc ORIYA AU LENGTH MARK + if (0xb55 <= code && code <= 0xb57) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] ORIYA VOWEL SIGN VOCALIC L..ORIYA VOWEL SIGN VOCALIC LL + if (0xb62 <= code && code <= 0xb63) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xbc6) { + if (code < 0xbbf) { + // Mn TAMIL SIGN ANUSVARA + if (0xb82 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc TAMIL VOWEL SIGN AA + if (0xbbe === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xbc0) { + // Mc TAMIL VOWEL SIGN I + if (0xbbf === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xbc1) { + // Mn TAMIL VOWEL SIGN II + if (0xbc0 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] TAMIL VOWEL SIGN U..TAMIL VOWEL SIGN UU + if (0xbc1 <= code && code <= 0xbc2) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0xbd7) { + if (code < 0xbca) { + // Mc [3] TAMIL VOWEL SIGN E..TAMIL VOWEL SIGN AI + if (0xbc6 <= code && code <= 0xbc8) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xbcd) { + // Mc [3] TAMIL VOWEL SIGN O..TAMIL VOWEL SIGN AU + if (0xbca <= code && code <= 0xbcc) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn TAMIL SIGN VIRAMA + if (0xbcd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xc00) { + // Mc TAMIL AU LENGTH MARK + if (0xbd7 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xc01) { + // Mn TELUGU SIGN COMBINING CANDRABINDU ABOVE + if (0xc00 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [3] TELUGU SIGN CANDRABINDU..TELUGU SIGN VISARGA + if (0xc01 <= code && code <= 0xc03) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + else { + if (code < 0xcbe) { + if (code < 0xc4a) { + if (code < 0xc3e) { + // Mn TELUGU SIGN COMBINING ANUSVARA ABOVE + if (0xc04 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn TELUGU SIGN NUKTA + if (0xc3c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xc41) { + // Mn [3] TELUGU VOWEL SIGN AA..TELUGU VOWEL SIGN II + if (0xc3e <= code && code <= 0xc40) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xc46) { + // Mc [4] TELUGU VOWEL SIGN U..TELUGU VOWEL SIGN VOCALIC RR + if (0xc41 <= code && code <= 0xc44) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [3] TELUGU VOWEL SIGN E..TELUGU VOWEL SIGN AI + if (0xc46 <= code && code <= 0xc48) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xc81) { + if (code < 0xc55) { + // Mn [4] TELUGU VOWEL SIGN O..TELUGU SIGN VIRAMA + if (0xc4a <= code && code <= 0xc4d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xc62) { + // Mn [2] TELUGU LENGTH MARK..TELUGU AI LENGTH MARK + if (0xc55 <= code && code <= 0xc56) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] TELUGU VOWEL SIGN VOCALIC L..TELUGU VOWEL SIGN VOCALIC LL + if (0xc62 <= code && code <= 0xc63) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xc82) { + // Mn KANNADA SIGN CANDRABINDU + if (0xc81 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xcbc) { + // Mc [2] KANNADA SIGN ANUSVARA..KANNADA SIGN VISARGA + if (0xc82 <= code && code <= 0xc83) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn KANNADA SIGN NUKTA + if (0xcbc === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xcc6) { + if (code < 0xcc0) { + // Mc KANNADA VOWEL SIGN AA + if (0xcbe === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn KANNADA VOWEL SIGN I + if (0xcbf === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xcc2) { + // Mc [2] KANNADA VOWEL SIGN II..KANNADA VOWEL SIGN U + if (0xcc0 <= code && code <= 0xcc1) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xcc3) { + // Mc KANNADA VOWEL SIGN UU + if (0xcc2 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] KANNADA VOWEL SIGN VOCALIC R..KANNADA VOWEL SIGN VOCALIC RR + if (0xcc3 <= code && code <= 0xcc4) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0xccc) { + if (code < 0xcc7) { + // Mn KANNADA VOWEL SIGN E + if (0xcc6 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xcca) { + // Mc [2] KANNADA VOWEL SIGN EE..KANNADA VOWEL SIGN AI + if (0xcc7 <= code && code <= 0xcc8) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc [2] KANNADA VOWEL SIGN O..KANNADA VOWEL SIGN OO + if (0xcca <= code && code <= 0xccb) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0xcd5) { + // Mn [2] KANNADA VOWEL SIGN AU..KANNADA SIGN VIRAMA + if (0xccc <= code && code <= 0xccd) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xce2) { + // Mc [2] KANNADA LENGTH MARK..KANNADA AI LENGTH MARK + if (0xcd5 <= code && code <= 0xcd6) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] KANNADA VOWEL SIGN VOCALIC L..KANNADA VOWEL SIGN VOCALIC LL + if (0xce2 <= code && code <= 0xce3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + else { + if (code < 0xddf) { + if (code < 0xd4e) { + if (code < 0xd3f) { + if (code < 0xd02) { + if (code < 0xd00) { + // Mc KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT + if (0xcf3 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] MALAYALAM SIGN COMBINING ANUSVARA ABOVE..MALAYALAM SIGN CANDRABINDU + if (0xd00 <= code && code <= 0xd01) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xd3b) { + // Mc [2] MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA + if (0xd02 <= code && code <= 0xd03) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xd3e) { + // Mn [2] MALAYALAM SIGN VERTICAL BAR VIRAMA..MALAYALAM SIGN CIRCULAR VIRAMA + if (0xd3b <= code && code <= 0xd3c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc MALAYALAM VOWEL SIGN AA + if (0xd3e === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xd46) { + if (code < 0xd41) { + // Mc [2] MALAYALAM VOWEL SIGN I..MALAYALAM VOWEL SIGN II + if (0xd3f <= code && code <= 0xd40) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] MALAYALAM VOWEL SIGN U..MALAYALAM VOWEL SIGN VOCALIC RR + if (0xd41 <= code && code <= 0xd44) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xd4a) { + // Mc [3] MALAYALAM VOWEL SIGN E..MALAYALAM VOWEL SIGN AI + if (0xd46 <= code && code <= 0xd48) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xd4d) { + // Mc [3] MALAYALAM VOWEL SIGN O..MALAYALAM VOWEL SIGN AU + if (0xd4a <= code && code <= 0xd4c) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn MALAYALAM SIGN VIRAMA + if (0xd4d === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xdca) { + if (code < 0xd62) { + // Lo MALAYALAM LETTER DOT REPH + if (0xd4e === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + // Mc MALAYALAM AU LENGTH MARK + if (0xd57 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xd81) { + // Mn [2] MALAYALAM VOWEL SIGN VOCALIC L..MALAYALAM VOWEL SIGN VOCALIC LL + if (0xd62 <= code && code <= 0xd63) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xd82) { + // Mn SINHALA SIGN CANDRABINDU + if (0xd81 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SINHALA SIGN ANUSVARAYA..SINHALA SIGN VISARGAYA + if (0xd82 <= code && code <= 0xd83) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0xdd2) { + if (code < 0xdcf) { + // Mn SINHALA SIGN AL-LAKUNA + if (0xdca === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xdd0) { + // Mc SINHALA VOWEL SIGN AELA-PILLA + if (0xdcf === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SINHALA VOWEL SIGN KETTI AEDA-PILLA..SINHALA VOWEL SIGN DIGA AEDA-PILLA + if (0xdd0 <= code && code <= 0xdd1) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0xdd6) { + // Mn [3] SINHALA VOWEL SIGN KETTI IS-PILLA..SINHALA VOWEL SIGN KETTI PAA-PILLA + if (0xdd2 <= code && code <= 0xdd4) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xdd8) { + // Mn SINHALA VOWEL SIGN DIGA PAA-PILLA + if (0xdd6 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [7] SINHALA VOWEL SIGN GAETTA-PILLA..SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA + if (0xdd8 <= code && code <= 0xdde) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + else { + if (code < 0xf35) { + if (code < 0xe47) { + if (code < 0xe31) { + if (code < 0xdf2) { + // Mc SINHALA VOWEL SIGN GAYANUKITTA + if (0xddf === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SINHALA VOWEL SIGN DIGA GAETTA-PILLA..SINHALA VOWEL SIGN DIGA GAYANUKITTA + if (0xdf2 <= code && code <= 0xdf3) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0xe33) { + // Mn THAI CHARACTER MAI HAN-AKAT + if (0xe31 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xe34) { + // Lo THAI CHARACTER SARA AM + if (0xe33 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [7] THAI CHARACTER SARA I..THAI CHARACTER PHINTHU + if (0xe34 <= code && code <= 0xe3a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xeb4) { + if (code < 0xeb1) { + // Mn [8] THAI CHARACTER MAITAIKHU..THAI CHARACTER YAMAKKAN + if (0xe47 <= code && code <= 0xe4e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn LAO VOWEL SIGN MAI KAN + if (0xeb1 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Lo LAO VOWEL SIGN AM + if (0xeb3 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0xec8) { + // Mn [9] LAO VOWEL SIGN I..LAO SEMIVOWEL SIGN LO + if (0xeb4 <= code && code <= 0xebc) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xf18) { + // Mn [7] LAO TONE MAI EK..LAO YAMAKKAN + if (0xec8 <= code && code <= 0xece) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] TIBETAN ASTROLOGICAL SIGN -KHYUD PA..TIBETAN ASTROLOGICAL SIGN SDONG TSHUGS + if (0xf18 <= code && code <= 0xf19) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xf7f) { + if (code < 0xf39) { + // Mn TIBETAN MARK NGAS BZUNG NYI ZLA + if (0xf35 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn TIBETAN MARK NGAS BZUNG SGOR RTAGS + if (0xf37 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xf3e) { + // Mn TIBETAN MARK TSA -PHRU + if (0xf39 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xf71) { + // Mc [2] TIBETAN SIGN YAR TSHES..TIBETAN SIGN MAR TSHES + if (0xf3e <= code && code <= 0xf3f) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [14] TIBETAN VOWEL SIGN AA..TIBETAN SIGN RJES SU NGA RO + if (0xf71 <= code && code <= 0xf7e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xf8d) { + if (code < 0xf80) { + // Mc TIBETAN SIGN RNAM BCAD + if (0xf7f === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xf86) { + // Mn [5] TIBETAN VOWEL SIGN REVERSED I..TIBETAN MARK HALANTA + if (0xf80 <= code && code <= 0xf84) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] TIBETAN SIGN LCI RTAGS..TIBETAN SIGN YANG RTAGS + if (0xf86 <= code && code <= 0xf87) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xf99) { + // Mn [11] TIBETAN SUBJOINED SIGN LCE TSA CAN..TIBETAN SUBJOINED LETTER JA + if (0xf8d <= code && code <= 0xf97) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xfc6) { + // Mn [36] TIBETAN SUBJOINED LETTER NYA..TIBETAN SUBJOINED LETTER FIXED-FORM RA + if (0xf99 <= code && code <= 0xfbc) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn TIBETAN SYMBOL PADMA GDAN + if (0xfc6 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0x1c24) { + if (code < 0x1930) { + if (code < 0x1732) { + if (code < 0x1082) { + if (code < 0x103d) { + if (code < 0x1032) { + if (code < 0x1031) { + // Mn [4] MYANMAR VOWEL SIGN I..MYANMAR VOWEL SIGN UU + if (0x102d <= code && code <= 0x1030) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc MYANMAR VOWEL SIGN E + if (0x1031 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x1039) { + // Mn [6] MYANMAR VOWEL SIGN AI..MYANMAR SIGN DOT BELOW + if (0x1032 <= code && code <= 0x1037) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x103b) { + // Mn [2] MYANMAR SIGN VIRAMA..MYANMAR SIGN ASAT + if (0x1039 <= code && code <= 0x103a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] MYANMAR CONSONANT SIGN MEDIAL YA..MYANMAR CONSONANT SIGN MEDIAL RA + if (0x103b <= code && code <= 0x103c) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x1058) { + if (code < 0x1056) { + // Mn [2] MYANMAR CONSONANT SIGN MEDIAL WA..MYANMAR CONSONANT SIGN MEDIAL HA + if (0x103d <= code && code <= 0x103e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] MYANMAR VOWEL SIGN VOCALIC R..MYANMAR VOWEL SIGN VOCALIC RR + if (0x1056 <= code && code <= 0x1057) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x105e) { + // Mn [2] MYANMAR VOWEL SIGN VOCALIC L..MYANMAR VOWEL SIGN VOCALIC LL + if (0x1058 <= code && code <= 0x1059) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1071) { + // Mn [3] MYANMAR CONSONANT SIGN MON MEDIAL NA..MYANMAR CONSONANT SIGN MON MEDIAL LA + if (0x105e <= code && code <= 0x1060) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [4] MYANMAR VOWEL SIGN GEBA KAREN I..MYANMAR VOWEL SIGN KAYAH EE + if (0x1071 <= code && code <= 0x1074) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x1100) { + if (code < 0x1085) { + // Mn MYANMAR CONSONANT SIGN SHAN MEDIAL WA + if (0x1082 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc MYANMAR VOWEL SIGN SHAN E + if (0x1084 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x108d) { + // Mn [2] MYANMAR VOWEL SIGN SHAN E ABOVE..MYANMAR VOWEL SIGN SHAN FINAL Y + if (0x1085 <= code && code <= 0x1086) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn MYANMAR SIGN SHAN COUNCIL EMPHATIC TONE + if (0x108d === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn MYANMAR VOWEL SIGN AITON AI + if (0x109d === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x135d) { + if (code < 0x1160) { + // Lo [96] HANGUL CHOSEONG KIYEOK..HANGUL CHOSEONG FILLER + if (0x1100 <= code && code <= 0x115f) { + return boundaries_1.CLUSTER_BREAK.L; + } + } + else { + if (code < 0x11a8) { + // Lo [72] HANGUL JUNGSEONG FILLER..HANGUL JUNGSEONG O-YAE + if (0x1160 <= code && code <= 0x11a7) { + return boundaries_1.CLUSTER_BREAK.V; + } + } + else { + // Lo [88] HANGUL JONGSEONG KIYEOK..HANGUL JONGSEONG SSANGNIEUN + if (0x11a8 <= code && code <= 0x11ff) { + return boundaries_1.CLUSTER_BREAK.T; + } + } + } + } + else { + if (code < 0x1712) { + // Mn [3] ETHIOPIC COMBINING GEMINATION AND VOWEL LENGTH MARK..ETHIOPIC COMBINING GEMINATION MARK + if (0x135d <= code && code <= 0x135f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1715) { + // Mn [3] TAGALOG VOWEL SIGN I..TAGALOG SIGN VIRAMA + if (0x1712 <= code && code <= 0x1714) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc TAGALOG SIGN PAMUDPOD + if (0x1715 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + else { + if (code < 0x17c9) { + if (code < 0x17b6) { + if (code < 0x1752) { + if (code < 0x1734) { + // Mn [2] HANUNOO VOWEL SIGN I..HANUNOO VOWEL SIGN U + if (0x1732 <= code && code <= 0x1733) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc HANUNOO SIGN PAMUDPOD + if (0x1734 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x1772) { + // Mn [2] BUHID VOWEL SIGN I..BUHID VOWEL SIGN U + if (0x1752 <= code && code <= 0x1753) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x17b4) { + // Mn [2] TAGBANWA VOWEL SIGN I..TAGBANWA VOWEL SIGN U + if (0x1772 <= code && code <= 0x1773) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] KHMER VOWEL INHERENT AQ..KHMER VOWEL INHERENT AA + if (0x17b4 <= code && code <= 0x17b5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x17be) { + if (code < 0x17b7) { + // Mc KHMER VOWEL SIGN AA + if (0x17b6 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [7] KHMER VOWEL SIGN I..KHMER VOWEL SIGN UA + if (0x17b7 <= code && code <= 0x17bd) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x17c6) { + // Mc [8] KHMER VOWEL SIGN OE..KHMER VOWEL SIGN AU + if (0x17be <= code && code <= 0x17c5) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x17c7) { + // Mn KHMER SIGN NIKAHIT + if (0x17c6 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] KHMER SIGN REAHMUK..KHMER SIGN YUUKALEAPINTU + if (0x17c7 <= code && code <= 0x17c8) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + else { + if (code < 0x1885) { + if (code < 0x180b) { + if (code < 0x17dd) { + // Mn [11] KHMER SIGN MUUSIKATOAN..KHMER SIGN BATHAMASAT + if (0x17c9 <= code && code <= 0x17d3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn KHMER SIGN ATTHACAN + if (0x17dd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x180e) { + // Mn [3] MONGOLIAN FREE VARIATION SELECTOR ONE..MONGOLIAN FREE VARIATION SELECTOR THREE + if (0x180b <= code && code <= 0x180d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf MONGOLIAN VOWEL SEPARATOR + if (0x180e === code) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + // Mn MONGOLIAN FREE VARIATION SELECTOR FOUR + if (0x180f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x1923) { + if (code < 0x18a9) { + // Mn [2] MONGOLIAN LETTER ALI GALI BALUDA..MONGOLIAN LETTER ALI GALI THREE BALUDA + if (0x1885 <= code && code <= 0x1886) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1920) { + // Mn MONGOLIAN LETTER ALI GALI DAGALGA + if (0x18a9 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [3] LIMBU VOWEL SIGN A..LIMBU VOWEL SIGN U + if (0x1920 <= code && code <= 0x1922) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x1927) { + // Mc [4] LIMBU VOWEL SIGN EE..LIMBU VOWEL SIGN AU + if (0x1923 <= code && code <= 0x1926) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1929) { + // Mn [2] LIMBU VOWEL SIGN E..LIMBU VOWEL SIGN O + if (0x1927 <= code && code <= 0x1928) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [3] LIMBU SUBJOINED LETTER YA..LIMBU SUBJOINED LETTER WA + if (0x1929 <= code && code <= 0x192b) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + } + else { + if (code < 0x1b3b) { + if (code < 0x1a58) { + if (code < 0x1a19) { + if (code < 0x1933) { + if (code < 0x1932) { + // Mc [2] LIMBU SMALL LETTER KA..LIMBU SMALL LETTER NGA + if (0x1930 <= code && code <= 0x1931) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn LIMBU SMALL LETTER ANUSVARA + if (0x1932 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1939) { + // Mc [6] LIMBU SMALL LETTER TA..LIMBU SMALL LETTER LA + if (0x1933 <= code && code <= 0x1938) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1a17) { + // Mn [3] LIMBU SIGN MUKPHRENG..LIMBU SIGN SA-I + if (0x1939 <= code && code <= 0x193b) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] BUGINESE VOWEL SIGN I..BUGINESE VOWEL SIGN U + if (0x1a17 <= code && code <= 0x1a18) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1a55) { + if (code < 0x1a1b) { + // Mc [2] BUGINESE VOWEL SIGN E..BUGINESE VOWEL SIGN O + if (0x1a19 <= code && code <= 0x1a1a) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn BUGINESE VOWEL SIGN AE + if (0x1a1b === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1a56) { + // Mc TAI THAM CONSONANT SIGN MEDIAL RA + if (0x1a55 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn TAI THAM CONSONANT SIGN MEDIAL LA + if (0x1a56 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc TAI THAM CONSONANT SIGN LA TANG LAI + if (0x1a57 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x1a73) { + if (code < 0x1a62) { + if (code < 0x1a60) { + // Mn [7] TAI THAM SIGN MAI KANG LAI..TAI THAM CONSONANT SIGN SA + if (0x1a58 <= code && code <= 0x1a5e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn TAI THAM SIGN SAKOT + if (0x1a60 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1a65) { + // Mn TAI THAM VOWEL SIGN MAI SAT + if (0x1a62 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1a6d) { + // Mn [8] TAI THAM VOWEL SIGN I..TAI THAM VOWEL SIGN OA BELOW + if (0x1a65 <= code && code <= 0x1a6c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [6] TAI THAM VOWEL SIGN OY..TAI THAM VOWEL SIGN THAM AI + if (0x1a6d <= code && code <= 0x1a72) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x1b00) { + if (code < 0x1a7f) { + // Mn [10] TAI THAM VOWEL SIGN OA ABOVE..TAI THAM SIGN KHUEN-LUE KARAN + if (0x1a73 <= code && code <= 0x1a7c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1ab0) { + // Mn TAI THAM COMBINING CRYPTOGRAMMIC DOT + if (0x1a7f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [14] COMBINING DOUBLED CIRCUMFLEX ACCENT..COMBINING PARENTHESES BELOW + // Me COMBINING PARENTHESES OVERLAY + // Mn [16] COMBINING LATIN SMALL LETTER W BELOW..COMBINING LATIN SMALL LETTER INSULAR T + if (0x1ab0 <= code && code <= 0x1ace) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x1b04) { + // Mn [4] BALINESE SIGN ULU RICEM..BALINESE SIGN SURANG + if (0x1b00 <= code && code <= 0x1b03) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1b34) { + // Mc BALINESE SIGN BISAH + if (0x1b04 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn BALINESE SIGN REREKAN + // Mc BALINESE VOWEL SIGN TEDUNG + // Mn [5] BALINESE VOWEL SIGN ULU..BALINESE VOWEL SIGN RA REPA + if (0x1b34 <= code && code <= 0x1b3a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0x1ba8) { + if (code < 0x1b6b) { + if (code < 0x1b3d) { + // Mc BALINESE VOWEL SIGN RA REPA TEDUNG + if (0x1b3b === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn BALINESE VOWEL SIGN LA LENGA + if (0x1b3c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1b42) { + // Mc [5] BALINESE VOWEL SIGN LA LENGA TEDUNG..BALINESE VOWEL SIGN TALING REPA TEDUNG + if (0x1b3d <= code && code <= 0x1b41) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1b43) { + // Mn BALINESE VOWEL SIGN PEPET + if (0x1b42 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] BALINESE VOWEL SIGN PEPET TEDUNG..BALINESE ADEG ADEG + if (0x1b43 <= code && code <= 0x1b44) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x1ba1) { + if (code < 0x1b80) { + // Mn [9] BALINESE MUSICAL SYMBOL COMBINING TEGEH..BALINESE MUSICAL SYMBOL COMBINING GONG + if (0x1b6b <= code && code <= 0x1b73) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1b82) { + // Mn [2] SUNDANESE SIGN PANYECEK..SUNDANESE SIGN PANGLAYAR + if (0x1b80 <= code && code <= 0x1b81) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc SUNDANESE SIGN PANGWISAD + if (0x1b82 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x1ba2) { + // Mc SUNDANESE CONSONANT SIGN PAMINGKAL + if (0x1ba1 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1ba6) { + // Mn [4] SUNDANESE CONSONANT SIGN PANYAKRA..SUNDANESE VOWEL SIGN PANYUKU + if (0x1ba2 <= code && code <= 0x1ba5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SUNDANESE VOWEL SIGN PANAELAENG..SUNDANESE VOWEL SIGN PANOLONG + if (0x1ba6 <= code && code <= 0x1ba7) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + else { + if (code < 0x1be8) { + if (code < 0x1bab) { + if (code < 0x1baa) { + // Mn [2] SUNDANESE VOWEL SIGN PAMEPET..SUNDANESE VOWEL SIGN PANEULEUNG + if (0x1ba8 <= code && code <= 0x1ba9) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc SUNDANESE SIGN PAMAAEH + if (0x1baa === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x1be6) { + // Mn [3] SUNDANESE SIGN VIRAMA..SUNDANESE CONSONANT SIGN PASANGAN WA + if (0x1bab <= code && code <= 0x1bad) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn BATAK SIGN TOMPI + if (0x1be6 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc BATAK VOWEL SIGN E + if (0x1be7 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x1bee) { + if (code < 0x1bea) { + // Mn [2] BATAK VOWEL SIGN PAKPAK E..BATAK VOWEL SIGN EE + if (0x1be8 <= code && code <= 0x1be9) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1bed) { + // Mc [3] BATAK VOWEL SIGN I..BATAK VOWEL SIGN O + if (0x1bea <= code && code <= 0x1bec) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn BATAK VOWEL SIGN KARO O + if (0x1bed === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x1bef) { + // Mc BATAK VOWEL SIGN U + if (0x1bee === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1bf2) { + // Mn [3] BATAK VOWEL SIGN U FOR SIMALUNGUN SA..BATAK CONSONANT SIGN H + if (0x1bef <= code && code <= 0x1bf1) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] BATAK PANGOLAT..BATAK PANONGONAN + if (0x1bf2 <= code && code <= 0x1bf3) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + } + } + else { + if (code < 0xa952) { + if (code < 0x2d7f) { + if (code < 0x1cf7) { + if (code < 0x1cd4) { + if (code < 0x1c34) { + if (code < 0x1c2c) { + // Mc [8] LEPCHA SUBJOINED LETTER YA..LEPCHA VOWEL SIGN UU + if (0x1c24 <= code && code <= 0x1c2b) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [8] LEPCHA VOWEL SIGN E..LEPCHA CONSONANT SIGN T + if (0x1c2c <= code && code <= 0x1c33) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1c36) { + // Mc [2] LEPCHA CONSONANT SIGN NYIN-DO..LEPCHA CONSONANT SIGN KANG + if (0x1c34 <= code && code <= 0x1c35) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1cd0) { + // Mn [2] LEPCHA SIGN RAN..LEPCHA SIGN NUKTA + if (0x1c36 <= code && code <= 0x1c37) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [3] VEDIC TONE KARSHANA..VEDIC TONE PRENKHA + if (0x1cd0 <= code && code <= 0x1cd2) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1ce2) { + if (code < 0x1ce1) { + // Mn [13] VEDIC SIGN YAJURVEDIC MIDLINE SVARITA..VEDIC TONE RIGVEDIC KASHMIRI INDEPENDENT SVARITA + if (0x1cd4 <= code && code <= 0x1ce0) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc VEDIC TONE ATHARVAVEDIC INDEPENDENT SVARITA + if (0x1ce1 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x1ced) { + // Mn [7] VEDIC SIGN VISARGA SVARITA..VEDIC SIGN VISARGA ANUDATTA WITH TAIL + if (0x1ce2 <= code && code <= 0x1ce8) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn VEDIC SIGN TIRYAK + if (0x1ced === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn VEDIC TONE CANDRA ABOVE + if (0x1cf4 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x200d) { + if (code < 0x1dc0) { + if (code < 0x1cf8) { + // Mc VEDIC SIGN ATIKRAMA + if (0x1cf7 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] VEDIC TONE RING ABOVE..VEDIC TONE DOUBLE RING ABOVE + if (0x1cf8 <= code && code <= 0x1cf9) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x200b) { + // Mn [64] COMBINING DOTTED GRAVE ACCENT..COMBINING RIGHT ARROWHEAD AND DOWN ARROWHEAD BELOW + if (0x1dc0 <= code && code <= 0x1dff) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cf ZERO WIDTH SPACE + if (0x200b === code) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + // Cf ZERO WIDTH NON-JOINER + if (0x200c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x2060) { + if (code < 0x200e) { + // Cf ZERO WIDTH JOINER + if (0x200d === code) { + return boundaries_1.CLUSTER_BREAK.ZWJ; + } + } + else { + if (code < 0x2028) { + // Cf [2] LEFT-TO-RIGHT MARK..RIGHT-TO-LEFT MARK + if (0x200e <= code && code <= 0x200f) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Zl LINE SEPARATOR + // Zp PARAGRAPH SEPARATOR + // Cf [5] LEFT-TO-RIGHT EMBEDDING..RIGHT-TO-LEFT OVERRIDE + if (0x2028 <= code && code <= 0x202e) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + } + } + else { + if (code < 0x20d0) { + // Cf [5] WORD JOINER..INVISIBLE PLUS + // Cn + // Cf [10] LEFT-TO-RIGHT ISOLATE..NOMINAL DIGIT SHAPES + if (0x2060 <= code && code <= 0x206f) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + if (code < 0x2cef) { + // Mn [13] COMBINING LEFT HARPOON ABOVE..COMBINING FOUR DOTS ABOVE + // Me [4] COMBINING ENCLOSING CIRCLE..COMBINING ENCLOSING CIRCLE BACKSLASH + // Mn COMBINING LEFT RIGHT ARROW ABOVE + // Me [3] COMBINING ENCLOSING SCREEN..COMBINING ENCLOSING UPWARD POINTING TRIANGLE + // Mn [12] COMBINING REVERSE SOLIDUS OVERLAY..COMBINING ASTERISK ABOVE + if (0x20d0 <= code && code <= 0x20f0) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [3] COPTIC COMBINING NI ABOVE..COPTIC COMBINING SPIRITUS LENIS + if (0x2cef <= code && code <= 0x2cf1) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0xa823) { + if (code < 0xa674) { + if (code < 0x302a) { + if (code < 0x2de0) { + // Mn TIFINAGH CONSONANT JOINER + if (0x2d7f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [32] COMBINING CYRILLIC LETTER BE..COMBINING CYRILLIC LETTER IOTIFIED BIG YUS + if (0x2de0 <= code && code <= 0x2dff) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x3099) { + // Mn [4] IDEOGRAPHIC LEVEL TONE MARK..IDEOGRAPHIC ENTERING TONE MARK + // Mc [2] HANGUL SINGLE DOT TONE MARK..HANGUL DOUBLE DOT TONE MARK + if (0x302a <= code && code <= 0x302f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xa66f) { + // Mn [2] COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK..COMBINING KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK + if (0x3099 <= code && code <= 0x309a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn COMBINING CYRILLIC VZMET + // Me [3] COMBINING CYRILLIC TEN MILLIONS SIGN..COMBINING CYRILLIC THOUSAND MILLIONS SIGN + if (0xa66f <= code && code <= 0xa672) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xa802) { + if (code < 0xa69e) { + // Mn [10] COMBINING CYRILLIC LETTER UKRAINIAN IE..COMBINING CYRILLIC PAYEROK + if (0xa674 <= code && code <= 0xa67d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xa6f0) { + // Mn [2] COMBINING CYRILLIC LETTER EF..COMBINING CYRILLIC LETTER IOTIFIED E + if (0xa69e <= code && code <= 0xa69f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] BAMUM COMBINING MARK KOQNDON..BAMUM COMBINING MARK TUKWENTIS + if (0xa6f0 <= code && code <= 0xa6f1) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xa806) { + // Mn SYLOTI NAGRI SIGN DVISVARA + if (0xa802 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn SYLOTI NAGRI SIGN HASANTA + if (0xa806 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn SYLOTI NAGRI SIGN ANUSVARA + if (0xa80b === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0xa8b4) { + if (code < 0xa827) { + if (code < 0xa825) { + // Mc [2] SYLOTI NAGRI VOWEL SIGN A..SYLOTI NAGRI VOWEL SIGN I + if (0xa823 <= code && code <= 0xa824) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] SYLOTI NAGRI VOWEL SIGN U..SYLOTI NAGRI VOWEL SIGN E + if (0xa825 <= code && code <= 0xa826) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xa82c) { + // Mc SYLOTI NAGRI VOWEL SIGN OO + if (0xa827 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xa880) { + // Mn SYLOTI NAGRI SIGN ALTERNATE HASANTA + if (0xa82c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SAURASHTRA SIGN ANUSVARA..SAURASHTRA SIGN VISARGA + if (0xa880 <= code && code <= 0xa881) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0xa8ff) { + if (code < 0xa8c4) { + // Mc [16] SAURASHTRA CONSONANT SIGN HAARU..SAURASHTRA VOWEL SIGN AU + if (0xa8b4 <= code && code <= 0xa8c3) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xa8e0) { + // Mn [2] SAURASHTRA SIGN VIRAMA..SAURASHTRA SIGN CANDRABINDU + if (0xa8c4 <= code && code <= 0xa8c5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [18] COMBINING DEVANAGARI DIGIT ZERO..COMBINING DEVANAGARI SIGN AVAGRAHA + if (0xa8e0 <= code && code <= 0xa8f1) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xa926) { + // Mn DEVANAGARI VOWEL SIGN AY + if (0xa8ff === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xa947) { + // Mn [8] KAYAH LI VOWEL UE..KAYAH LI TONE CALYA PLOPHU + if (0xa926 <= code && code <= 0xa92d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [11] REJANG VOWEL SIGN I..REJANG CONSONANT SIGN R + if (0xa947 <= code && code <= 0xa951) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + else { + if (code < 0xaab2) { + if (code < 0xa9e5) { + if (code < 0xa9b4) { + if (code < 0xa980) { + if (code < 0xa960) { + // Mc [2] REJANG CONSONANT SIGN H..REJANG VIRAMA + if (0xa952 <= code && code <= 0xa953) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Lo [29] HANGUL CHOSEONG TIKEUT-MIEUM..HANGUL CHOSEONG SSANGYEORINHIEUH + if (0xa960 <= code && code <= 0xa97c) { + return boundaries_1.CLUSTER_BREAK.L; + } + } + } + else { + if (code < 0xa983) { + // Mn [3] JAVANESE SIGN PANYANGGA..JAVANESE SIGN LAYAR + if (0xa980 <= code && code <= 0xa982) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc JAVANESE SIGN WIGNYAN + if (0xa983 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn JAVANESE SIGN CECAK TELU + if (0xa9b3 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xa9ba) { + if (code < 0xa9b6) { + // Mc [2] JAVANESE VOWEL SIGN TARUNG..JAVANESE VOWEL SIGN TOLONG + if (0xa9b4 <= code && code <= 0xa9b5) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] JAVANESE VOWEL SIGN WULU..JAVANESE VOWEL SIGN SUKU MENDUT + if (0xa9b6 <= code && code <= 0xa9b9) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xa9bc) { + // Mc [2] JAVANESE VOWEL SIGN TALING..JAVANESE VOWEL SIGN DIRGA MURE + if (0xa9ba <= code && code <= 0xa9bb) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xa9be) { + // Mn [2] JAVANESE VOWEL SIGN PEPET..JAVANESE CONSONANT SIGN KERET + if (0xa9bc <= code && code <= 0xa9bd) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [3] JAVANESE CONSONANT SIGN PENGKAL..JAVANESE PANGKON + if (0xa9be <= code && code <= 0xa9c0) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + else { + if (code < 0xaa35) { + if (code < 0xaa2f) { + if (code < 0xaa29) { + // Mn MYANMAR SIGN SHAN SAW + if (0xa9e5 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [6] CHAM VOWEL SIGN AA..CHAM VOWEL SIGN OE + if (0xaa29 <= code && code <= 0xaa2e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xaa31) { + // Mc [2] CHAM VOWEL SIGN O..CHAM VOWEL SIGN AI + if (0xaa2f <= code && code <= 0xaa30) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0xaa33) { + // Mn [2] CHAM VOWEL SIGN AU..CHAM VOWEL SIGN UE + if (0xaa31 <= code && code <= 0xaa32) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] CHAM CONSONANT SIGN YA..CHAM CONSONANT SIGN RA + if (0xaa33 <= code && code <= 0xaa34) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0xaa4d) { + if (code < 0xaa43) { + // Mn [2] CHAM CONSONANT SIGN LA..CHAM CONSONANT SIGN WA + if (0xaa35 <= code && code <= 0xaa36) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn CHAM CONSONANT SIGN FINAL NG + if (0xaa43 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn CHAM CONSONANT SIGN FINAL M + if (0xaa4c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xaa7c) { + // Mc CHAM CONSONANT SIGN FINAL H + if (0xaa4d === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn MYANMAR SIGN TAI LAING TONE-2 + if (0xaa7c === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn TAI VIET MAI KANG + if (0xaab0 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xabe6) { + if (code < 0xaaec) { + if (code < 0xaabe) { + if (code < 0xaab7) { + // Mn [3] TAI VIET VOWEL I..TAI VIET VOWEL U + if (0xaab2 <= code && code <= 0xaab4) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] TAI VIET MAI KHIT..TAI VIET VOWEL IA + if (0xaab7 <= code && code <= 0xaab8) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xaac1) { + // Mn [2] TAI VIET VOWEL AM..TAI VIET TONE MAI EK + if (0xaabe <= code && code <= 0xaabf) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn TAI VIET TONE MAI THO + if (0xaac1 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc MEETEI MAYEK VOWEL SIGN II + if (0xaaeb === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0xaaf6) { + if (code < 0xaaee) { + // Mn [2] MEETEI MAYEK VOWEL SIGN UU..MEETEI MAYEK VOWEL SIGN AAI + if (0xaaec <= code && code <= 0xaaed) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xaaf5) { + // Mc [2] MEETEI MAYEK VOWEL SIGN AU..MEETEI MAYEK VOWEL SIGN AAU + if (0xaaee <= code && code <= 0xaaef) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc MEETEI MAYEK VOWEL SIGN VISARGA + if (0xaaf5 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0xabe3) { + // Mn MEETEI MAYEK VIRAMA + if (0xaaf6 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xabe5) { + // Mc [2] MEETEI MAYEK VOWEL SIGN ONAP..MEETEI MAYEK VOWEL SIGN INAP + if (0xabe3 <= code && code <= 0xabe4) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn MEETEI MAYEK VOWEL SIGN ANAP + if (0xabe5 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0xac00) { + if (code < 0xabe9) { + if (code < 0xabe8) { + // Mc [2] MEETEI MAYEK VOWEL SIGN YENAP..MEETEI MAYEK VOWEL SIGN SOUNAP + if (0xabe6 <= code && code <= 0xabe7) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn MEETEI MAYEK VOWEL SIGN UNAP + if (0xabe8 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0xabec) { + // Mc [2] MEETEI MAYEK VOWEL SIGN CHEINAP..MEETEI MAYEK VOWEL SIGN NUNG + if (0xabe9 <= code && code <= 0xabea) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc MEETEI MAYEK LUM IYEK + if (0xabec === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn MEETEI MAYEK APUN IYEK + if (0xabed === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xac1d) { + if (code < 0xac01) { + // Lo HANGUL SYLLABLE GA + if (0xac00 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xac1c) { + // Lo [27] HANGUL SYLLABLE GAG..HANGUL SYLLABLE GAH + if (0xac01 <= code && code <= 0xac1b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GAE + if (0xac1c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xac38) { + // Lo [27] HANGUL SYLLABLE GAEG..HANGUL SYLLABLE GAEH + if (0xac1d <= code && code <= 0xac37) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xac39) { + // Lo HANGUL SYLLABLE GYA + if (0xac38 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GYAG..HANGUL SYLLABLE GYAH + if (0xac39 <= code && code <= 0xac53) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0xb5a1) { + if (code < 0xb0ed) { + if (code < 0xaea0) { + if (code < 0xad6d) { + if (code < 0xace0) { + if (code < 0xac8d) { + if (code < 0xac70) { + if (code < 0xac55) { + // Lo HANGUL SYLLABLE GYAE + if (0xac54 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GYAEG..HANGUL SYLLABLE GYAEH + if (0xac55 <= code && code <= 0xac6f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xac71) { + // Lo HANGUL SYLLABLE GEO + if (0xac70 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xac8c) { + // Lo [27] HANGUL SYLLABLE GEOG..HANGUL SYLLABLE GEOH + if (0xac71 <= code && code <= 0xac8b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GE + if (0xac8c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xaca9) { + if (code < 0xaca8) { + // Lo [27] HANGUL SYLLABLE GEG..HANGUL SYLLABLE GEH + if (0xac8d <= code && code <= 0xaca7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GYEO + if (0xaca8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xacc4) { + // Lo [27] HANGUL SYLLABLE GYEOG..HANGUL SYLLABLE GYEOH + if (0xaca9 <= code && code <= 0xacc3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xacc5) { + // Lo HANGUL SYLLABLE GYE + if (0xacc4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GYEG..HANGUL SYLLABLE GYEH + if (0xacc5 <= code && code <= 0xacdf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xad19) { + if (code < 0xacfc) { + if (code < 0xace1) { + // Lo HANGUL SYLLABLE GO + if (0xace0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GOG..HANGUL SYLLABLE GOH + if (0xace1 <= code && code <= 0xacfb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xacfd) { + // Lo HANGUL SYLLABLE GWA + if (0xacfc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xad18) { + // Lo [27] HANGUL SYLLABLE GWAG..HANGUL SYLLABLE GWAH + if (0xacfd <= code && code <= 0xad17) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GWAE + if (0xad18 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xad50) { + if (code < 0xad34) { + // Lo [27] HANGUL SYLLABLE GWAEG..HANGUL SYLLABLE GWAEH + if (0xad19 <= code && code <= 0xad33) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xad35) { + // Lo HANGUL SYLLABLE GOE + if (0xad34 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GOEG..HANGUL SYLLABLE GOEH + if (0xad35 <= code && code <= 0xad4f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xad51) { + // Lo HANGUL SYLLABLE GYO + if (0xad50 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xad6c) { + // Lo [27] HANGUL SYLLABLE GYOG..HANGUL SYLLABLE GYOH + if (0xad51 <= code && code <= 0xad6b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GU + if (0xad6c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xadf9) { + if (code < 0xadc0) { + if (code < 0xad89) { + if (code < 0xad88) { + // Lo [27] HANGUL SYLLABLE GUG..HANGUL SYLLABLE GUH + if (0xad6d <= code && code <= 0xad87) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GWEO + if (0xad88 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xada4) { + // Lo [27] HANGUL SYLLABLE GWEOG..HANGUL SYLLABLE GWEOH + if (0xad89 <= code && code <= 0xada3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xada5) { + // Lo HANGUL SYLLABLE GWE + if (0xada4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GWEG..HANGUL SYLLABLE GWEH + if (0xada5 <= code && code <= 0xadbf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xaddc) { + if (code < 0xadc1) { + // Lo HANGUL SYLLABLE GWI + if (0xadc0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GWIG..HANGUL SYLLABLE GWIH + if (0xadc1 <= code && code <= 0xaddb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xaddd) { + // Lo HANGUL SYLLABLE GYU + if (0xaddc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xadf8) { + // Lo [27] HANGUL SYLLABLE GYUG..HANGUL SYLLABLE GYUH + if (0xaddd <= code && code <= 0xadf7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GEU + if (0xadf8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xae4c) { + if (code < 0xae15) { + if (code < 0xae14) { + // Lo [27] HANGUL SYLLABLE GEUG..HANGUL SYLLABLE GEUH + if (0xadf9 <= code && code <= 0xae13) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GYI + if (0xae14 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xae30) { + // Lo [27] HANGUL SYLLABLE GYIG..HANGUL SYLLABLE GYIH + if (0xae15 <= code && code <= 0xae2f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xae31) { + // Lo HANGUL SYLLABLE GI + if (0xae30 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GIG..HANGUL SYLLABLE GIH + if (0xae31 <= code && code <= 0xae4b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xae69) { + if (code < 0xae4d) { + // Lo HANGUL SYLLABLE GGA + if (0xae4c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xae68) { + // Lo [27] HANGUL SYLLABLE GGAG..HANGUL SYLLABLE GGAH + if (0xae4d <= code && code <= 0xae67) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGAE + if (0xae68 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xae84) { + // Lo [27] HANGUL SYLLABLE GGAEG..HANGUL SYLLABLE GGAEH + if (0xae69 <= code && code <= 0xae83) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xae85) { + // Lo HANGUL SYLLABLE GGYA + if (0xae84 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGYAG..HANGUL SYLLABLE GGYAH + if (0xae85 <= code && code <= 0xae9f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + else { + if (code < 0xafb9) { + if (code < 0xaf2c) { + if (code < 0xaed9) { + if (code < 0xaebc) { + if (code < 0xaea1) { + // Lo HANGUL SYLLABLE GGYAE + if (0xaea0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGYAEG..HANGUL SYLLABLE GGYAEH + if (0xaea1 <= code && code <= 0xaebb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xaebd) { + // Lo HANGUL SYLLABLE GGEO + if (0xaebc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xaed8) { + // Lo [27] HANGUL SYLLABLE GGEOG..HANGUL SYLLABLE GGEOH + if (0xaebd <= code && code <= 0xaed7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGE + if (0xaed8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xaef5) { + if (code < 0xaef4) { + // Lo [27] HANGUL SYLLABLE GGEG..HANGUL SYLLABLE GGEH + if (0xaed9 <= code && code <= 0xaef3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGYEO + if (0xaef4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xaf10) { + // Lo [27] HANGUL SYLLABLE GGYEOG..HANGUL SYLLABLE GGYEOH + if (0xaef5 <= code && code <= 0xaf0f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xaf11) { + // Lo HANGUL SYLLABLE GGYE + if (0xaf10 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGYEG..HANGUL SYLLABLE GGYEH + if (0xaf11 <= code && code <= 0xaf2b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xaf65) { + if (code < 0xaf48) { + if (code < 0xaf2d) { + // Lo HANGUL SYLLABLE GGO + if (0xaf2c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGOG..HANGUL SYLLABLE GGOH + if (0xaf2d <= code && code <= 0xaf47) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xaf49) { + // Lo HANGUL SYLLABLE GGWA + if (0xaf48 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xaf64) { + // Lo [27] HANGUL SYLLABLE GGWAG..HANGUL SYLLABLE GGWAH + if (0xaf49 <= code && code <= 0xaf63) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGWAE + if (0xaf64 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xaf9c) { + if (code < 0xaf80) { + // Lo [27] HANGUL SYLLABLE GGWAEG..HANGUL SYLLABLE GGWAEH + if (0xaf65 <= code && code <= 0xaf7f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xaf81) { + // Lo HANGUL SYLLABLE GGOE + if (0xaf80 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGOEG..HANGUL SYLLABLE GGOEH + if (0xaf81 <= code && code <= 0xaf9b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xaf9d) { + // Lo HANGUL SYLLABLE GGYO + if (0xaf9c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xafb8) { + // Lo [27] HANGUL SYLLABLE GGYOG..HANGUL SYLLABLE GGYOH + if (0xaf9d <= code && code <= 0xafb7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGU + if (0xafb8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xb060) { + if (code < 0xb00c) { + if (code < 0xafd5) { + if (code < 0xafd4) { + // Lo [27] HANGUL SYLLABLE GGUG..HANGUL SYLLABLE GGUH + if (0xafb9 <= code && code <= 0xafd3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGWEO + if (0xafd4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xaff0) { + // Lo [27] HANGUL SYLLABLE GGWEOG..HANGUL SYLLABLE GGWEOH + if (0xafd5 <= code && code <= 0xafef) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xaff1) { + // Lo HANGUL SYLLABLE GGWE + if (0xaff0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGWEG..HANGUL SYLLABLE GGWEH + if (0xaff1 <= code && code <= 0xb00b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb029) { + if (code < 0xb00d) { + // Lo HANGUL SYLLABLE GGWI + if (0xb00c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb028) { + // Lo [27] HANGUL SYLLABLE GGWIG..HANGUL SYLLABLE GGWIH + if (0xb00d <= code && code <= 0xb027) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE GGYU + if (0xb028 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb044) { + // Lo [27] HANGUL SYLLABLE GGYUG..HANGUL SYLLABLE GGYUH + if (0xb029 <= code && code <= 0xb043) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb045) { + // Lo HANGUL SYLLABLE GGEU + if (0xb044 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGEUG..HANGUL SYLLABLE GGEUH + if (0xb045 <= code && code <= 0xb05f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xb099) { + if (code < 0xb07c) { + if (code < 0xb061) { + // Lo HANGUL SYLLABLE GGYI + if (0xb060 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE GGYIG..HANGUL SYLLABLE GGYIH + if (0xb061 <= code && code <= 0xb07b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb07d) { + // Lo HANGUL SYLLABLE GGI + if (0xb07c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb098) { + // Lo [27] HANGUL SYLLABLE GGIG..HANGUL SYLLABLE GGIH + if (0xb07d <= code && code <= 0xb097) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NA + if (0xb098 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb0d0) { + if (code < 0xb0b4) { + // Lo [27] HANGUL SYLLABLE NAG..HANGUL SYLLABLE NAH + if (0xb099 <= code && code <= 0xb0b3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb0b5) { + // Lo HANGUL SYLLABLE NAE + if (0xb0b4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NAEG..HANGUL SYLLABLE NAEH + if (0xb0b5 <= code && code <= 0xb0cf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xb0d1) { + // Lo HANGUL SYLLABLE NYA + if (0xb0d0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb0ec) { + // Lo [27] HANGUL SYLLABLE NYAG..HANGUL SYLLABLE NYAH + if (0xb0d1 <= code && code <= 0xb0eb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NYAE + if (0xb0ec === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + } + else { + if (code < 0xb354) { + if (code < 0xb220) { + if (code < 0xb179) { + if (code < 0xb140) { + if (code < 0xb109) { + if (code < 0xb108) { + // Lo [27] HANGUL SYLLABLE NYAEG..HANGUL SYLLABLE NYAEH + if (0xb0ed <= code && code <= 0xb107) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NEO + if (0xb108 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb124) { + // Lo [27] HANGUL SYLLABLE NEOG..HANGUL SYLLABLE NEOH + if (0xb109 <= code && code <= 0xb123) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb125) { + // Lo HANGUL SYLLABLE NE + if (0xb124 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NEG..HANGUL SYLLABLE NEH + if (0xb125 <= code && code <= 0xb13f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb15c) { + if (code < 0xb141) { + // Lo HANGUL SYLLABLE NYEO + if (0xb140 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NYEOG..HANGUL SYLLABLE NYEOH + if (0xb141 <= code && code <= 0xb15b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb15d) { + // Lo HANGUL SYLLABLE NYE + if (0xb15c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb178) { + // Lo [27] HANGUL SYLLABLE NYEG..HANGUL SYLLABLE NYEH + if (0xb15d <= code && code <= 0xb177) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NO + if (0xb178 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xb1cc) { + if (code < 0xb195) { + if (code < 0xb194) { + // Lo [27] HANGUL SYLLABLE NOG..HANGUL SYLLABLE NOH + if (0xb179 <= code && code <= 0xb193) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NWA + if (0xb194 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb1b0) { + // Lo [27] HANGUL SYLLABLE NWAG..HANGUL SYLLABLE NWAH + if (0xb195 <= code && code <= 0xb1af) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb1b1) { + // Lo HANGUL SYLLABLE NWAE + if (0xb1b0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NWAEG..HANGUL SYLLABLE NWAEH + if (0xb1b1 <= code && code <= 0xb1cb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb1e9) { + if (code < 0xb1cd) { + // Lo HANGUL SYLLABLE NOE + if (0xb1cc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb1e8) { + // Lo [27] HANGUL SYLLABLE NOEG..HANGUL SYLLABLE NOEH + if (0xb1cd <= code && code <= 0xb1e7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NYO + if (0xb1e8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb204) { + // Lo [27] HANGUL SYLLABLE NYOG..HANGUL SYLLABLE NYOH + if (0xb1e9 <= code && code <= 0xb203) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb205) { + // Lo HANGUL SYLLABLE NU + if (0xb204 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NUG..HANGUL SYLLABLE NUH + if (0xb205 <= code && code <= 0xb21f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xb2ad) { + if (code < 0xb259) { + if (code < 0xb23c) { + if (code < 0xb221) { + // Lo HANGUL SYLLABLE NWEO + if (0xb220 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NWEOG..HANGUL SYLLABLE NWEOH + if (0xb221 <= code && code <= 0xb23b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb23d) { + // Lo HANGUL SYLLABLE NWE + if (0xb23c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb258) { + // Lo [27] HANGUL SYLLABLE NWEG..HANGUL SYLLABLE NWEH + if (0xb23d <= code && code <= 0xb257) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NWI + if (0xb258 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb290) { + if (code < 0xb274) { + // Lo [27] HANGUL SYLLABLE NWIG..HANGUL SYLLABLE NWIH + if (0xb259 <= code && code <= 0xb273) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb275) { + // Lo HANGUL SYLLABLE NYU + if (0xb274 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE NYUG..HANGUL SYLLABLE NYUH + if (0xb275 <= code && code <= 0xb28f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xb291) { + // Lo HANGUL SYLLABLE NEU + if (0xb290 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb2ac) { + // Lo [27] HANGUL SYLLABLE NEUG..HANGUL SYLLABLE NEUH + if (0xb291 <= code && code <= 0xb2ab) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NYI + if (0xb2ac === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xb300) { + if (code < 0xb2c9) { + if (code < 0xb2c8) { + // Lo [27] HANGUL SYLLABLE NYIG..HANGUL SYLLABLE NYIH + if (0xb2ad <= code && code <= 0xb2c7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE NI + if (0xb2c8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb2e4) { + // Lo [27] HANGUL SYLLABLE NIG..HANGUL SYLLABLE NIH + if (0xb2c9 <= code && code <= 0xb2e3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb2e5) { + // Lo HANGUL SYLLABLE DA + if (0xb2e4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DAG..HANGUL SYLLABLE DAH + if (0xb2e5 <= code && code <= 0xb2ff) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb31d) { + if (code < 0xb301) { + // Lo HANGUL SYLLABLE DAE + if (0xb300 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb31c) { + // Lo [27] HANGUL SYLLABLE DAEG..HANGUL SYLLABLE DAEH + if (0xb301 <= code && code <= 0xb31b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DYA + if (0xb31c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb338) { + // Lo [27] HANGUL SYLLABLE DYAG..HANGUL SYLLABLE DYAH + if (0xb31d <= code && code <= 0xb337) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb339) { + // Lo HANGUL SYLLABLE DYAE + if (0xb338 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DYAEG..HANGUL SYLLABLE DYAEH + if (0xb339 <= code && code <= 0xb353) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + else { + if (code < 0xb46d) { + if (code < 0xb3e0) { + if (code < 0xb38d) { + if (code < 0xb370) { + if (code < 0xb355) { + // Lo HANGUL SYLLABLE DEO + if (0xb354 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DEOG..HANGUL SYLLABLE DEOH + if (0xb355 <= code && code <= 0xb36f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb371) { + // Lo HANGUL SYLLABLE DE + if (0xb370 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb38c) { + // Lo [27] HANGUL SYLLABLE DEG..HANGUL SYLLABLE DEH + if (0xb371 <= code && code <= 0xb38b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DYEO + if (0xb38c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb3a9) { + if (code < 0xb3a8) { + // Lo [27] HANGUL SYLLABLE DYEOG..HANGUL SYLLABLE DYEOH + if (0xb38d <= code && code <= 0xb3a7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DYE + if (0xb3a8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb3c4) { + // Lo [27] HANGUL SYLLABLE DYEG..HANGUL SYLLABLE DYEH + if (0xb3a9 <= code && code <= 0xb3c3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb3c5) { + // Lo HANGUL SYLLABLE DO + if (0xb3c4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DOG..HANGUL SYLLABLE DOH + if (0xb3c5 <= code && code <= 0xb3df) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xb419) { + if (code < 0xb3fc) { + if (code < 0xb3e1) { + // Lo HANGUL SYLLABLE DWA + if (0xb3e0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DWAG..HANGUL SYLLABLE DWAH + if (0xb3e1 <= code && code <= 0xb3fb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb3fd) { + // Lo HANGUL SYLLABLE DWAE + if (0xb3fc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb418) { + // Lo [27] HANGUL SYLLABLE DWAEG..HANGUL SYLLABLE DWAEH + if (0xb3fd <= code && code <= 0xb417) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DOE + if (0xb418 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb450) { + if (code < 0xb434) { + // Lo [27] HANGUL SYLLABLE DOEG..HANGUL SYLLABLE DOEH + if (0xb419 <= code && code <= 0xb433) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb435) { + // Lo HANGUL SYLLABLE DYO + if (0xb434 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DYOG..HANGUL SYLLABLE DYOH + if (0xb435 <= code && code <= 0xb44f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xb451) { + // Lo HANGUL SYLLABLE DU + if (0xb450 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb46c) { + // Lo [27] HANGUL SYLLABLE DUG..HANGUL SYLLABLE DUH + if (0xb451 <= code && code <= 0xb46b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DWEO + if (0xb46c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xb514) { + if (code < 0xb4c0) { + if (code < 0xb489) { + if (code < 0xb488) { + // Lo [27] HANGUL SYLLABLE DWEOG..HANGUL SYLLABLE DWEOH + if (0xb46d <= code && code <= 0xb487) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DWE + if (0xb488 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb4a4) { + // Lo [27] HANGUL SYLLABLE DWEG..HANGUL SYLLABLE DWEH + if (0xb489 <= code && code <= 0xb4a3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb4a5) { + // Lo HANGUL SYLLABLE DWI + if (0xb4a4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DWIG..HANGUL SYLLABLE DWIH + if (0xb4a5 <= code && code <= 0xb4bf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb4dd) { + if (code < 0xb4c1) { + // Lo HANGUL SYLLABLE DYU + if (0xb4c0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb4dc) { + // Lo [27] HANGUL SYLLABLE DYUG..HANGUL SYLLABLE DYUH + if (0xb4c1 <= code && code <= 0xb4db) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DEU + if (0xb4dc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb4f8) { + // Lo [27] HANGUL SYLLABLE DEUG..HANGUL SYLLABLE DEUH + if (0xb4dd <= code && code <= 0xb4f7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb4f9) { + // Lo HANGUL SYLLABLE DYI + if (0xb4f8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DYIG..HANGUL SYLLABLE DYIH + if (0xb4f9 <= code && code <= 0xb513) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xb54d) { + if (code < 0xb530) { + if (code < 0xb515) { + // Lo HANGUL SYLLABLE DI + if (0xb514 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DIG..HANGUL SYLLABLE DIH + if (0xb515 <= code && code <= 0xb52f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb531) { + // Lo HANGUL SYLLABLE DDA + if (0xb530 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb54c) { + // Lo [27] HANGUL SYLLABLE DDAG..HANGUL SYLLABLE DDAH + if (0xb531 <= code && code <= 0xb54b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDAE + if (0xb54c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb584) { + if (code < 0xb568) { + // Lo [27] HANGUL SYLLABLE DDAEG..HANGUL SYLLABLE DDAEH + if (0xb54d <= code && code <= 0xb567) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb569) { + // Lo HANGUL SYLLABLE DDYA + if (0xb568 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDYAG..HANGUL SYLLABLE DDYAH + if (0xb569 <= code && code <= 0xb583) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xb585) { + // Lo HANGUL SYLLABLE DDYAE + if (0xb584 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb5a0) { + // Lo [27] HANGUL SYLLABLE DDYAEG..HANGUL SYLLABLE DDYAEH + if (0xb585 <= code && code <= 0xb59f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDEO + if (0xb5a0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0xba55) { + if (code < 0xb808) { + if (code < 0xb6d4) { + if (code < 0xb62d) { + if (code < 0xb5f4) { + if (code < 0xb5bd) { + if (code < 0xb5bc) { + // Lo [27] HANGUL SYLLABLE DDEOG..HANGUL SYLLABLE DDEOH + if (0xb5a1 <= code && code <= 0xb5bb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDE + if (0xb5bc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb5d8) { + // Lo [27] HANGUL SYLLABLE DDEG..HANGUL SYLLABLE DDEH + if (0xb5bd <= code && code <= 0xb5d7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb5d9) { + // Lo HANGUL SYLLABLE DDYEO + if (0xb5d8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDYEOG..HANGUL SYLLABLE DDYEOH + if (0xb5d9 <= code && code <= 0xb5f3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb610) { + if (code < 0xb5f5) { + // Lo HANGUL SYLLABLE DDYE + if (0xb5f4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDYEG..HANGUL SYLLABLE DDYEH + if (0xb5f5 <= code && code <= 0xb60f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb611) { + // Lo HANGUL SYLLABLE DDO + if (0xb610 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb62c) { + // Lo [27] HANGUL SYLLABLE DDOG..HANGUL SYLLABLE DDOH + if (0xb611 <= code && code <= 0xb62b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDWA + if (0xb62c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xb680) { + if (code < 0xb649) { + if (code < 0xb648) { + // Lo [27] HANGUL SYLLABLE DDWAG..HANGUL SYLLABLE DDWAH + if (0xb62d <= code && code <= 0xb647) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDWAE + if (0xb648 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb664) { + // Lo [27] HANGUL SYLLABLE DDWAEG..HANGUL SYLLABLE DDWAEH + if (0xb649 <= code && code <= 0xb663) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb665) { + // Lo HANGUL SYLLABLE DDOE + if (0xb664 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDOEG..HANGUL SYLLABLE DDOEH + if (0xb665 <= code && code <= 0xb67f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb69d) { + if (code < 0xb681) { + // Lo HANGUL SYLLABLE DDYO + if (0xb680 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb69c) { + // Lo [27] HANGUL SYLLABLE DDYOG..HANGUL SYLLABLE DDYOH + if (0xb681 <= code && code <= 0xb69b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDU + if (0xb69c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb6b8) { + // Lo [27] HANGUL SYLLABLE DDUG..HANGUL SYLLABLE DDUH + if (0xb69d <= code && code <= 0xb6b7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb6b9) { + // Lo HANGUL SYLLABLE DDWEO + if (0xb6b8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDWEOG..HANGUL SYLLABLE DDWEOH + if (0xb6b9 <= code && code <= 0xb6d3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xb761) { + if (code < 0xb70d) { + if (code < 0xb6f0) { + if (code < 0xb6d5) { + // Lo HANGUL SYLLABLE DDWE + if (0xb6d4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDWEG..HANGUL SYLLABLE DDWEH + if (0xb6d5 <= code && code <= 0xb6ef) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb6f1) { + // Lo HANGUL SYLLABLE DDWI + if (0xb6f0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb70c) { + // Lo [27] HANGUL SYLLABLE DDWIG..HANGUL SYLLABLE DDWIH + if (0xb6f1 <= code && code <= 0xb70b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDYU + if (0xb70c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb744) { + if (code < 0xb728) { + // Lo [27] HANGUL SYLLABLE DDYUG..HANGUL SYLLABLE DDYUH + if (0xb70d <= code && code <= 0xb727) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb729) { + // Lo HANGUL SYLLABLE DDEU + if (0xb728 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE DDEUG..HANGUL SYLLABLE DDEUH + if (0xb729 <= code && code <= 0xb743) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xb745) { + // Lo HANGUL SYLLABLE DDYI + if (0xb744 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb760) { + // Lo [27] HANGUL SYLLABLE DDYIG..HANGUL SYLLABLE DDYIH + if (0xb745 <= code && code <= 0xb75f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE DDI + if (0xb760 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xb7b4) { + if (code < 0xb77d) { + if (code < 0xb77c) { + // Lo [27] HANGUL SYLLABLE DDIG..HANGUL SYLLABLE DDIH + if (0xb761 <= code && code <= 0xb77b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RA + if (0xb77c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb798) { + // Lo [27] HANGUL SYLLABLE RAG..HANGUL SYLLABLE RAH + if (0xb77d <= code && code <= 0xb797) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb799) { + // Lo HANGUL SYLLABLE RAE + if (0xb798 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE RAEG..HANGUL SYLLABLE RAEH + if (0xb799 <= code && code <= 0xb7b3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb7d1) { + if (code < 0xb7b5) { + // Lo HANGUL SYLLABLE RYA + if (0xb7b4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb7d0) { + // Lo [27] HANGUL SYLLABLE RYAG..HANGUL SYLLABLE RYAH + if (0xb7b5 <= code && code <= 0xb7cf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RYAE + if (0xb7d0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb7ec) { + // Lo [27] HANGUL SYLLABLE RYAEG..HANGUL SYLLABLE RYAEH + if (0xb7d1 <= code && code <= 0xb7eb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb7ed) { + // Lo HANGUL SYLLABLE REO + if (0xb7ec === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE REOG..HANGUL SYLLABLE REOH + if (0xb7ed <= code && code <= 0xb807) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + else { + if (code < 0xb921) { + if (code < 0xb894) { + if (code < 0xb841) { + if (code < 0xb824) { + if (code < 0xb809) { + // Lo HANGUL SYLLABLE RE + if (0xb808 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE REG..HANGUL SYLLABLE REH + if (0xb809 <= code && code <= 0xb823) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb825) { + // Lo HANGUL SYLLABLE RYEO + if (0xb824 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb840) { + // Lo [27] HANGUL SYLLABLE RYEOG..HANGUL SYLLABLE RYEOH + if (0xb825 <= code && code <= 0xb83f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RYE + if (0xb840 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb85d) { + if (code < 0xb85c) { + // Lo [27] HANGUL SYLLABLE RYEG..HANGUL SYLLABLE RYEH + if (0xb841 <= code && code <= 0xb85b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RO + if (0xb85c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb878) { + // Lo [27] HANGUL SYLLABLE ROG..HANGUL SYLLABLE ROH + if (0xb85d <= code && code <= 0xb877) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb879) { + // Lo HANGUL SYLLABLE RWA + if (0xb878 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE RWAG..HANGUL SYLLABLE RWAH + if (0xb879 <= code && code <= 0xb893) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xb8cd) { + if (code < 0xb8b0) { + if (code < 0xb895) { + // Lo HANGUL SYLLABLE RWAE + if (0xb894 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE RWAEG..HANGUL SYLLABLE RWAEH + if (0xb895 <= code && code <= 0xb8af) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb8b1) { + // Lo HANGUL SYLLABLE ROE + if (0xb8b0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb8cc) { + // Lo [27] HANGUL SYLLABLE ROEG..HANGUL SYLLABLE ROEH + if (0xb8b1 <= code && code <= 0xb8cb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RYO + if (0xb8cc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xb904) { + if (code < 0xb8e8) { + // Lo [27] HANGUL SYLLABLE RYOG..HANGUL SYLLABLE RYOH + if (0xb8cd <= code && code <= 0xb8e7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb8e9) { + // Lo HANGUL SYLLABLE RU + if (0xb8e8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE RUG..HANGUL SYLLABLE RUH + if (0xb8e9 <= code && code <= 0xb903) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xb905) { + // Lo HANGUL SYLLABLE RWEO + if (0xb904 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb920) { + // Lo [27] HANGUL SYLLABLE RWEOG..HANGUL SYLLABLE RWEOH + if (0xb905 <= code && code <= 0xb91f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RWE + if (0xb920 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xb9c8) { + if (code < 0xb974) { + if (code < 0xb93d) { + if (code < 0xb93c) { + // Lo [27] HANGUL SYLLABLE RWEG..HANGUL SYLLABLE RWEH + if (0xb921 <= code && code <= 0xb93b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RWI + if (0xb93c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xb958) { + // Lo [27] HANGUL SYLLABLE RWIG..HANGUL SYLLABLE RWIH + if (0xb93d <= code && code <= 0xb957) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb959) { + // Lo HANGUL SYLLABLE RYU + if (0xb958 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE RYUG..HANGUL SYLLABLE RYUH + if (0xb959 <= code && code <= 0xb973) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xb991) { + if (code < 0xb975) { + // Lo HANGUL SYLLABLE REU + if (0xb974 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xb990) { + // Lo [27] HANGUL SYLLABLE REUG..HANGUL SYLLABLE REUH + if (0xb975 <= code && code <= 0xb98f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE RYI + if (0xb990 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xb9ac) { + // Lo [27] HANGUL SYLLABLE RYIG..HANGUL SYLLABLE RYIH + if (0xb991 <= code && code <= 0xb9ab) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xb9ad) { + // Lo HANGUL SYLLABLE RI + if (0xb9ac === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE RIG..HANGUL SYLLABLE RIH + if (0xb9ad <= code && code <= 0xb9c7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xba01) { + if (code < 0xb9e4) { + if (code < 0xb9c9) { + // Lo HANGUL SYLLABLE MA + if (0xb9c8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MAG..HANGUL SYLLABLE MAH + if (0xb9c9 <= code && code <= 0xb9e3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xb9e5) { + // Lo HANGUL SYLLABLE MAE + if (0xb9e4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xba00) { + // Lo [27] HANGUL SYLLABLE MAEG..HANGUL SYLLABLE MAEH + if (0xb9e5 <= code && code <= 0xb9ff) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE MYA + if (0xba00 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xba38) { + if (code < 0xba1c) { + // Lo [27] HANGUL SYLLABLE MYAG..HANGUL SYLLABLE MYAH + if (0xba01 <= code && code <= 0xba1b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xba1d) { + // Lo HANGUL SYLLABLE MYAE + if (0xba1c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MYAEG..HANGUL SYLLABLE MYAEH + if (0xba1d <= code && code <= 0xba37) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xba39) { + // Lo HANGUL SYLLABLE MEO + if (0xba38 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xba54) { + // Lo [27] HANGUL SYLLABLE MEOG..HANGUL SYLLABLE MEOH + if (0xba39 <= code && code <= 0xba53) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE ME + if (0xba54 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + } + else { + if (code < 0xbcbc) { + if (code < 0xbb88) { + if (code < 0xbae1) { + if (code < 0xbaa8) { + if (code < 0xba71) { + if (code < 0xba70) { + // Lo [27] HANGUL SYLLABLE MEG..HANGUL SYLLABLE MEH + if (0xba55 <= code && code <= 0xba6f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE MYEO + if (0xba70 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xba8c) { + // Lo [27] HANGUL SYLLABLE MYEOG..HANGUL SYLLABLE MYEOH + if (0xba71 <= code && code <= 0xba8b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xba8d) { + // Lo HANGUL SYLLABLE MYE + if (0xba8c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MYEG..HANGUL SYLLABLE MYEH + if (0xba8d <= code && code <= 0xbaa7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xbac4) { + if (code < 0xbaa9) { + // Lo HANGUL SYLLABLE MO + if (0xbaa8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MOG..HANGUL SYLLABLE MOH + if (0xbaa9 <= code && code <= 0xbac3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xbac5) { + // Lo HANGUL SYLLABLE MWA + if (0xbac4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbae0) { + // Lo [27] HANGUL SYLLABLE MWAG..HANGUL SYLLABLE MWAH + if (0xbac5 <= code && code <= 0xbadf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE MWAE + if (0xbae0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xbb34) { + if (code < 0xbafd) { + if (code < 0xbafc) { + // Lo [27] HANGUL SYLLABLE MWAEG..HANGUL SYLLABLE MWAEH + if (0xbae1 <= code && code <= 0xbafb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE MOE + if (0xbafc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xbb18) { + // Lo [27] HANGUL SYLLABLE MOEG..HANGUL SYLLABLE MOEH + if (0xbafd <= code && code <= 0xbb17) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbb19) { + // Lo HANGUL SYLLABLE MYO + if (0xbb18 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MYOG..HANGUL SYLLABLE MYOH + if (0xbb19 <= code && code <= 0xbb33) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xbb51) { + if (code < 0xbb35) { + // Lo HANGUL SYLLABLE MU + if (0xbb34 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbb50) { + // Lo [27] HANGUL SYLLABLE MUG..HANGUL SYLLABLE MUH + if (0xbb35 <= code && code <= 0xbb4f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE MWEO + if (0xbb50 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xbb6c) { + // Lo [27] HANGUL SYLLABLE MWEOG..HANGUL SYLLABLE MWEOH + if (0xbb51 <= code && code <= 0xbb6b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbb6d) { + // Lo HANGUL SYLLABLE MWE + if (0xbb6c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MWEG..HANGUL SYLLABLE MWEH + if (0xbb6d <= code && code <= 0xbb87) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xbc15) { + if (code < 0xbbc1) { + if (code < 0xbba4) { + if (code < 0xbb89) { + // Lo HANGUL SYLLABLE MWI + if (0xbb88 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MWIG..HANGUL SYLLABLE MWIH + if (0xbb89 <= code && code <= 0xbba3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xbba5) { + // Lo HANGUL SYLLABLE MYU + if (0xbba4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbbc0) { + // Lo [27] HANGUL SYLLABLE MYUG..HANGUL SYLLABLE MYUH + if (0xbba5 <= code && code <= 0xbbbf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE MEU + if (0xbbc0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xbbf8) { + if (code < 0xbbdc) { + // Lo [27] HANGUL SYLLABLE MEUG..HANGUL SYLLABLE MEUH + if (0xbbc1 <= code && code <= 0xbbdb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbbdd) { + // Lo HANGUL SYLLABLE MYI + if (0xbbdc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE MYIG..HANGUL SYLLABLE MYIH + if (0xbbdd <= code && code <= 0xbbf7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xbbf9) { + // Lo HANGUL SYLLABLE MI + if (0xbbf8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbc14) { + // Lo [27] HANGUL SYLLABLE MIG..HANGUL SYLLABLE MIH + if (0xbbf9 <= code && code <= 0xbc13) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BA + if (0xbc14 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xbc68) { + if (code < 0xbc31) { + if (code < 0xbc30) { + // Lo [27] HANGUL SYLLABLE BAG..HANGUL SYLLABLE BAH + if (0xbc15 <= code && code <= 0xbc2f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BAE + if (0xbc30 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xbc4c) { + // Lo [27] HANGUL SYLLABLE BAEG..HANGUL SYLLABLE BAEH + if (0xbc31 <= code && code <= 0xbc4b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbc4d) { + // Lo HANGUL SYLLABLE BYA + if (0xbc4c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BYAG..HANGUL SYLLABLE BYAH + if (0xbc4d <= code && code <= 0xbc67) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xbc85) { + if (code < 0xbc69) { + // Lo HANGUL SYLLABLE BYAE + if (0xbc68 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbc84) { + // Lo [27] HANGUL SYLLABLE BYAEG..HANGUL SYLLABLE BYAEH + if (0xbc69 <= code && code <= 0xbc83) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BEO + if (0xbc84 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xbca0) { + // Lo [27] HANGUL SYLLABLE BEOG..HANGUL SYLLABLE BEOH + if (0xbc85 <= code && code <= 0xbc9f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbca1) { + // Lo HANGUL SYLLABLE BE + if (0xbca0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BEG..HANGUL SYLLABLE BEH + if (0xbca1 <= code && code <= 0xbcbb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + else { + if (code < 0xbdd5) { + if (code < 0xbd48) { + if (code < 0xbcf5) { + if (code < 0xbcd8) { + if (code < 0xbcbd) { + // Lo HANGUL SYLLABLE BYEO + if (0xbcbc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BYEOG..HANGUL SYLLABLE BYEOH + if (0xbcbd <= code && code <= 0xbcd7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xbcd9) { + // Lo HANGUL SYLLABLE BYE + if (0xbcd8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbcf4) { + // Lo [27] HANGUL SYLLABLE BYEG..HANGUL SYLLABLE BYEH + if (0xbcd9 <= code && code <= 0xbcf3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BO + if (0xbcf4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xbd11) { + if (code < 0xbd10) { + // Lo [27] HANGUL SYLLABLE BOG..HANGUL SYLLABLE BOH + if (0xbcf5 <= code && code <= 0xbd0f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BWA + if (0xbd10 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xbd2c) { + // Lo [27] HANGUL SYLLABLE BWAG..HANGUL SYLLABLE BWAH + if (0xbd11 <= code && code <= 0xbd2b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbd2d) { + // Lo HANGUL SYLLABLE BWAE + if (0xbd2c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BWAEG..HANGUL SYLLABLE BWAEH + if (0xbd2d <= code && code <= 0xbd47) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xbd81) { + if (code < 0xbd64) { + if (code < 0xbd49) { + // Lo HANGUL SYLLABLE BOE + if (0xbd48 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BOEG..HANGUL SYLLABLE BOEH + if (0xbd49 <= code && code <= 0xbd63) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xbd65) { + // Lo HANGUL SYLLABLE BYO + if (0xbd64 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbd80) { + // Lo [27] HANGUL SYLLABLE BYOG..HANGUL SYLLABLE BYOH + if (0xbd65 <= code && code <= 0xbd7f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BU + if (0xbd80 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xbdb8) { + if (code < 0xbd9c) { + // Lo [27] HANGUL SYLLABLE BUG..HANGUL SYLLABLE BUH + if (0xbd81 <= code && code <= 0xbd9b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbd9d) { + // Lo HANGUL SYLLABLE BWEO + if (0xbd9c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BWEOG..HANGUL SYLLABLE BWEOH + if (0xbd9d <= code && code <= 0xbdb7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xbdb9) { + // Lo HANGUL SYLLABLE BWE + if (0xbdb8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbdd4) { + // Lo [27] HANGUL SYLLABLE BWEG..HANGUL SYLLABLE BWEH + if (0xbdb9 <= code && code <= 0xbdd3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BWI + if (0xbdd4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xbe7c) { + if (code < 0xbe28) { + if (code < 0xbdf1) { + if (code < 0xbdf0) { + // Lo [27] HANGUL SYLLABLE BWIG..HANGUL SYLLABLE BWIH + if (0xbdd5 <= code && code <= 0xbdef) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BYU + if (0xbdf0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xbe0c) { + // Lo [27] HANGUL SYLLABLE BYUG..HANGUL SYLLABLE BYUH + if (0xbdf1 <= code && code <= 0xbe0b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbe0d) { + // Lo HANGUL SYLLABLE BEU + if (0xbe0c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BEUG..HANGUL SYLLABLE BEUH + if (0xbe0d <= code && code <= 0xbe27) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xbe45) { + if (code < 0xbe29) { + // Lo HANGUL SYLLABLE BYI + if (0xbe28 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbe44) { + // Lo [27] HANGUL SYLLABLE BYIG..HANGUL SYLLABLE BYIH + if (0xbe29 <= code && code <= 0xbe43) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BI + if (0xbe44 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xbe60) { + // Lo [27] HANGUL SYLLABLE BIG..HANGUL SYLLABLE BIH + if (0xbe45 <= code && code <= 0xbe5f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbe61) { + // Lo HANGUL SYLLABLE BBA + if (0xbe60 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBAG..HANGUL SYLLABLE BBAH + if (0xbe61 <= code && code <= 0xbe7b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xbeb5) { + if (code < 0xbe98) { + if (code < 0xbe7d) { + // Lo HANGUL SYLLABLE BBAE + if (0xbe7c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBAEG..HANGUL SYLLABLE BBAEH + if (0xbe7d <= code && code <= 0xbe97) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xbe99) { + // Lo HANGUL SYLLABLE BBYA + if (0xbe98 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbeb4) { + // Lo [27] HANGUL SYLLABLE BBYAG..HANGUL SYLLABLE BBYAH + if (0xbe99 <= code && code <= 0xbeb3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBYAE + if (0xbeb4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xbeec) { + if (code < 0xbed0) { + // Lo [27] HANGUL SYLLABLE BBYAEG..HANGUL SYLLABLE BBYAEH + if (0xbeb5 <= code && code <= 0xbecf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbed1) { + // Lo HANGUL SYLLABLE BBEO + if (0xbed0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBEOG..HANGUL SYLLABLE BBEOH + if (0xbed1 <= code && code <= 0xbeeb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xbeed) { + // Lo HANGUL SYLLABLE BBE + if (0xbeec === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbf08) { + // Lo [27] HANGUL SYLLABLE BBEG..HANGUL SYLLABLE BBEH + if (0xbeed <= code && code <= 0xbf07) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBYEO + if (0xbf08 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0xd1d8) { + if (code < 0xc870) { + if (code < 0xc3bc) { + if (code < 0xc155) { + if (code < 0xc03c) { + if (code < 0xbf95) { + if (code < 0xbf5c) { + if (code < 0xbf25) { + if (code < 0xbf24) { + // Lo [27] HANGUL SYLLABLE BBYEOG..HANGUL SYLLABLE BBYEOH + if (0xbf09 <= code && code <= 0xbf23) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBYE + if (0xbf24 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xbf40) { + // Lo [27] HANGUL SYLLABLE BBYEG..HANGUL SYLLABLE BBYEH + if (0xbf25 <= code && code <= 0xbf3f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbf41) { + // Lo HANGUL SYLLABLE BBO + if (0xbf40 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBOG..HANGUL SYLLABLE BBOH + if (0xbf41 <= code && code <= 0xbf5b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xbf78) { + if (code < 0xbf5d) { + // Lo HANGUL SYLLABLE BBWA + if (0xbf5c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBWAG..HANGUL SYLLABLE BBWAH + if (0xbf5d <= code && code <= 0xbf77) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xbf79) { + // Lo HANGUL SYLLABLE BBWAE + if (0xbf78 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xbf94) { + // Lo [27] HANGUL SYLLABLE BBWAEG..HANGUL SYLLABLE BBWAEH + if (0xbf79 <= code && code <= 0xbf93) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBOE + if (0xbf94 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xbfe8) { + if (code < 0xbfb1) { + if (code < 0xbfb0) { + // Lo [27] HANGUL SYLLABLE BBOEG..HANGUL SYLLABLE BBOEH + if (0xbf95 <= code && code <= 0xbfaf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBYO + if (0xbfb0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xbfcc) { + // Lo [27] HANGUL SYLLABLE BBYOG..HANGUL SYLLABLE BBYOH + if (0xbfb1 <= code && code <= 0xbfcb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xbfcd) { + // Lo HANGUL SYLLABLE BBU + if (0xbfcc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBUG..HANGUL SYLLABLE BBUH + if (0xbfcd <= code && code <= 0xbfe7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc005) { + if (code < 0xbfe9) { + // Lo HANGUL SYLLABLE BBWEO + if (0xbfe8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc004) { + // Lo [27] HANGUL SYLLABLE BBWEOG..HANGUL SYLLABLE BBWEOH + if (0xbfe9 <= code && code <= 0xc003) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBWE + if (0xc004 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xc020) { + // Lo [27] HANGUL SYLLABLE BBWEG..HANGUL SYLLABLE BBWEH + if (0xc005 <= code && code <= 0xc01f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc021) { + // Lo HANGUL SYLLABLE BBWI + if (0xc020 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBWIG..HANGUL SYLLABLE BBWIH + if (0xc021 <= code && code <= 0xc03b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xc0c8) { + if (code < 0xc075) { + if (code < 0xc058) { + if (code < 0xc03d) { + // Lo HANGUL SYLLABLE BBYU + if (0xc03c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE BBYUG..HANGUL SYLLABLE BBYUH + if (0xc03d <= code && code <= 0xc057) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc059) { + // Lo HANGUL SYLLABLE BBEU + if (0xc058 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc074) { + // Lo [27] HANGUL SYLLABLE BBEUG..HANGUL SYLLABLE BBEUH + if (0xc059 <= code && code <= 0xc073) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBYI + if (0xc074 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc091) { + if (code < 0xc090) { + // Lo [27] HANGUL SYLLABLE BBYIG..HANGUL SYLLABLE BBYIH + if (0xc075 <= code && code <= 0xc08f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE BBI + if (0xc090 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc0ac) { + // Lo [27] HANGUL SYLLABLE BBIG..HANGUL SYLLABLE BBIH + if (0xc091 <= code && code <= 0xc0ab) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc0ad) { + // Lo HANGUL SYLLABLE SA + if (0xc0ac === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SAG..HANGUL SYLLABLE SAH + if (0xc0ad <= code && code <= 0xc0c7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xc101) { + if (code < 0xc0e4) { + if (code < 0xc0c9) { + // Lo HANGUL SYLLABLE SAE + if (0xc0c8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SAEG..HANGUL SYLLABLE SAEH + if (0xc0c9 <= code && code <= 0xc0e3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc0e5) { + // Lo HANGUL SYLLABLE SYA + if (0xc0e4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc100) { + // Lo [27] HANGUL SYLLABLE SYAG..HANGUL SYLLABLE SYAH + if (0xc0e5 <= code && code <= 0xc0ff) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SYAE + if (0xc100 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc138) { + if (code < 0xc11c) { + // Lo [27] HANGUL SYLLABLE SYAEG..HANGUL SYLLABLE SYAEH + if (0xc101 <= code && code <= 0xc11b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc11d) { + // Lo HANGUL SYLLABLE SEO + if (0xc11c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SEOG..HANGUL SYLLABLE SEOH + if (0xc11d <= code && code <= 0xc137) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xc139) { + // Lo HANGUL SYLLABLE SE + if (0xc138 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc154) { + // Lo [27] HANGUL SYLLABLE SEG..HANGUL SYLLABLE SEH + if (0xc139 <= code && code <= 0xc153) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SYEO + if (0xc154 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + else { + if (code < 0xc288) { + if (code < 0xc1e1) { + if (code < 0xc1a8) { + if (code < 0xc171) { + if (code < 0xc170) { + // Lo [27] HANGUL SYLLABLE SYEOG..HANGUL SYLLABLE SYEOH + if (0xc155 <= code && code <= 0xc16f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SYE + if (0xc170 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc18c) { + // Lo [27] HANGUL SYLLABLE SYEG..HANGUL SYLLABLE SYEH + if (0xc171 <= code && code <= 0xc18b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc18d) { + // Lo HANGUL SYLLABLE SO + if (0xc18c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SOG..HANGUL SYLLABLE SOH + if (0xc18d <= code && code <= 0xc1a7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc1c4) { + if (code < 0xc1a9) { + // Lo HANGUL SYLLABLE SWA + if (0xc1a8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SWAG..HANGUL SYLLABLE SWAH + if (0xc1a9 <= code && code <= 0xc1c3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc1c5) { + // Lo HANGUL SYLLABLE SWAE + if (0xc1c4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc1e0) { + // Lo [27] HANGUL SYLLABLE SWAEG..HANGUL SYLLABLE SWAEH + if (0xc1c5 <= code && code <= 0xc1df) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SOE + if (0xc1e0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xc234) { + if (code < 0xc1fd) { + if (code < 0xc1fc) { + // Lo [27] HANGUL SYLLABLE SOEG..HANGUL SYLLABLE SOEH + if (0xc1e1 <= code && code <= 0xc1fb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SYO + if (0xc1fc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc218) { + // Lo [27] HANGUL SYLLABLE SYOG..HANGUL SYLLABLE SYOH + if (0xc1fd <= code && code <= 0xc217) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc219) { + // Lo HANGUL SYLLABLE SU + if (0xc218 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SUG..HANGUL SYLLABLE SUH + if (0xc219 <= code && code <= 0xc233) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc251) { + if (code < 0xc235) { + // Lo HANGUL SYLLABLE SWEO + if (0xc234 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc250) { + // Lo [27] HANGUL SYLLABLE SWEOG..HANGUL SYLLABLE SWEOH + if (0xc235 <= code && code <= 0xc24f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SWE + if (0xc250 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xc26c) { + // Lo [27] HANGUL SYLLABLE SWEG..HANGUL SYLLABLE SWEH + if (0xc251 <= code && code <= 0xc26b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc26d) { + // Lo HANGUL SYLLABLE SWI + if (0xc26c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SWIG..HANGUL SYLLABLE SWIH + if (0xc26d <= code && code <= 0xc287) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xc315) { + if (code < 0xc2c1) { + if (code < 0xc2a4) { + if (code < 0xc289) { + // Lo HANGUL SYLLABLE SYU + if (0xc288 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SYUG..HANGUL SYLLABLE SYUH + if (0xc289 <= code && code <= 0xc2a3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc2a5) { + // Lo HANGUL SYLLABLE SEU + if (0xc2a4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc2c0) { + // Lo [27] HANGUL SYLLABLE SEUG..HANGUL SYLLABLE SEUH + if (0xc2a5 <= code && code <= 0xc2bf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SYI + if (0xc2c0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc2f8) { + if (code < 0xc2dc) { + // Lo [27] HANGUL SYLLABLE SYIG..HANGUL SYLLABLE SYIH + if (0xc2c1 <= code && code <= 0xc2db) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc2dd) { + // Lo HANGUL SYLLABLE SI + if (0xc2dc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SIG..HANGUL SYLLABLE SIH + if (0xc2dd <= code && code <= 0xc2f7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xc2f9) { + // Lo HANGUL SYLLABLE SSA + if (0xc2f8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc314) { + // Lo [27] HANGUL SYLLABLE SSAG..HANGUL SYLLABLE SSAH + if (0xc2f9 <= code && code <= 0xc313) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSAE + if (0xc314 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xc368) { + if (code < 0xc331) { + if (code < 0xc330) { + // Lo [27] HANGUL SYLLABLE SSAEG..HANGUL SYLLABLE SSAEH + if (0xc315 <= code && code <= 0xc32f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSYA + if (0xc330 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc34c) { + // Lo [27] HANGUL SYLLABLE SSYAG..HANGUL SYLLABLE SSYAH + if (0xc331 <= code && code <= 0xc34b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc34d) { + // Lo HANGUL SYLLABLE SSYAE + if (0xc34c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSYAEG..HANGUL SYLLABLE SSYAEH + if (0xc34d <= code && code <= 0xc367) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc385) { + if (code < 0xc369) { + // Lo HANGUL SYLLABLE SSEO + if (0xc368 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc384) { + // Lo [27] HANGUL SYLLABLE SSEOG..HANGUL SYLLABLE SSEOH + if (0xc369 <= code && code <= 0xc383) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSE + if (0xc384 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xc3a0) { + // Lo [27] HANGUL SYLLABLE SSEG..HANGUL SYLLABLE SSEH + if (0xc385 <= code && code <= 0xc39f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc3a1) { + // Lo HANGUL SYLLABLE SSYEO + if (0xc3a0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSYEOG..HANGUL SYLLABLE SSYEOH + if (0xc3a1 <= code && code <= 0xc3bb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + } + else { + if (code < 0xc609) { + if (code < 0xc4d5) { + if (code < 0xc448) { + if (code < 0xc3f5) { + if (code < 0xc3d8) { + if (code < 0xc3bd) { + // Lo HANGUL SYLLABLE SSYE + if (0xc3bc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSYEG..HANGUL SYLLABLE SSYEH + if (0xc3bd <= code && code <= 0xc3d7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc3d9) { + // Lo HANGUL SYLLABLE SSO + if (0xc3d8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc3f4) { + // Lo [27] HANGUL SYLLABLE SSOG..HANGUL SYLLABLE SSOH + if (0xc3d9 <= code && code <= 0xc3f3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSWA + if (0xc3f4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc411) { + if (code < 0xc410) { + // Lo [27] HANGUL SYLLABLE SSWAG..HANGUL SYLLABLE SSWAH + if (0xc3f5 <= code && code <= 0xc40f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSWAE + if (0xc410 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc42c) { + // Lo [27] HANGUL SYLLABLE SSWAEG..HANGUL SYLLABLE SSWAEH + if (0xc411 <= code && code <= 0xc42b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc42d) { + // Lo HANGUL SYLLABLE SSOE + if (0xc42c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSOEG..HANGUL SYLLABLE SSOEH + if (0xc42d <= code && code <= 0xc447) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xc481) { + if (code < 0xc464) { + if (code < 0xc449) { + // Lo HANGUL SYLLABLE SSYO + if (0xc448 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSYOG..HANGUL SYLLABLE SSYOH + if (0xc449 <= code && code <= 0xc463) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc465) { + // Lo HANGUL SYLLABLE SSU + if (0xc464 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc480) { + // Lo [27] HANGUL SYLLABLE SSUG..HANGUL SYLLABLE SSUH + if (0xc465 <= code && code <= 0xc47f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSWEO + if (0xc480 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc4b8) { + if (code < 0xc49c) { + // Lo [27] HANGUL SYLLABLE SSWEOG..HANGUL SYLLABLE SSWEOH + if (0xc481 <= code && code <= 0xc49b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc49d) { + // Lo HANGUL SYLLABLE SSWE + if (0xc49c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSWEG..HANGUL SYLLABLE SSWEH + if (0xc49d <= code && code <= 0xc4b7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xc4b9) { + // Lo HANGUL SYLLABLE SSWI + if (0xc4b8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc4d4) { + // Lo [27] HANGUL SYLLABLE SSWIG..HANGUL SYLLABLE SSWIH + if (0xc4b9 <= code && code <= 0xc4d3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSYU + if (0xc4d4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xc57c) { + if (code < 0xc528) { + if (code < 0xc4f1) { + if (code < 0xc4f0) { + // Lo [27] HANGUL SYLLABLE SSYUG..HANGUL SYLLABLE SSYUH + if (0xc4d5 <= code && code <= 0xc4ef) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE SSEU + if (0xc4f0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc50c) { + // Lo [27] HANGUL SYLLABLE SSEUG..HANGUL SYLLABLE SSEUH + if (0xc4f1 <= code && code <= 0xc50b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc50d) { + // Lo HANGUL SYLLABLE SSYI + if (0xc50c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE SSYIG..HANGUL SYLLABLE SSYIH + if (0xc50d <= code && code <= 0xc527) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc545) { + if (code < 0xc529) { + // Lo HANGUL SYLLABLE SSI + if (0xc528 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc544) { + // Lo [27] HANGUL SYLLABLE SSIG..HANGUL SYLLABLE SSIH + if (0xc529 <= code && code <= 0xc543) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE A + if (0xc544 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xc560) { + // Lo [27] HANGUL SYLLABLE AG..HANGUL SYLLABLE AH + if (0xc545 <= code && code <= 0xc55f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc561) { + // Lo HANGUL SYLLABLE AE + if (0xc560 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE AEG..HANGUL SYLLABLE AEH + if (0xc561 <= code && code <= 0xc57b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xc5b5) { + if (code < 0xc598) { + if (code < 0xc57d) { + // Lo HANGUL SYLLABLE YA + if (0xc57c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE YAG..HANGUL SYLLABLE YAH + if (0xc57d <= code && code <= 0xc597) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc599) { + // Lo HANGUL SYLLABLE YAE + if (0xc598 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc5b4) { + // Lo [27] HANGUL SYLLABLE YAEG..HANGUL SYLLABLE YAEH + if (0xc599 <= code && code <= 0xc5b3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE EO + if (0xc5b4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc5ec) { + if (code < 0xc5d0) { + // Lo [27] HANGUL SYLLABLE EOG..HANGUL SYLLABLE EOH + if (0xc5b5 <= code && code <= 0xc5cf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc5d1) { + // Lo HANGUL SYLLABLE E + if (0xc5d0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE EG..HANGUL SYLLABLE EH + if (0xc5d1 <= code && code <= 0xc5eb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xc5ed) { + // Lo HANGUL SYLLABLE YEO + if (0xc5ec === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc608) { + // Lo [27] HANGUL SYLLABLE YEOG..HANGUL SYLLABLE YEOH + if (0xc5ed <= code && code <= 0xc607) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE YE + if (0xc608 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + else { + if (code < 0xc73c) { + if (code < 0xc695) { + if (code < 0xc65c) { + if (code < 0xc625) { + if (code < 0xc624) { + // Lo [27] HANGUL SYLLABLE YEG..HANGUL SYLLABLE YEH + if (0xc609 <= code && code <= 0xc623) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE O + if (0xc624 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc640) { + // Lo [27] HANGUL SYLLABLE OG..HANGUL SYLLABLE OH + if (0xc625 <= code && code <= 0xc63f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc641) { + // Lo HANGUL SYLLABLE WA + if (0xc640 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE WAG..HANGUL SYLLABLE WAH + if (0xc641 <= code && code <= 0xc65b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc678) { + if (code < 0xc65d) { + // Lo HANGUL SYLLABLE WAE + if (0xc65c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE WAEG..HANGUL SYLLABLE WAEH + if (0xc65d <= code && code <= 0xc677) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc679) { + // Lo HANGUL SYLLABLE OE + if (0xc678 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc694) { + // Lo [27] HANGUL SYLLABLE OEG..HANGUL SYLLABLE OEH + if (0xc679 <= code && code <= 0xc693) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE YO + if (0xc694 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xc6e8) { + if (code < 0xc6b1) { + if (code < 0xc6b0) { + // Lo [27] HANGUL SYLLABLE YOG..HANGUL SYLLABLE YOH + if (0xc695 <= code && code <= 0xc6af) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE U + if (0xc6b0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc6cc) { + // Lo [27] HANGUL SYLLABLE UG..HANGUL SYLLABLE UH + if (0xc6b1 <= code && code <= 0xc6cb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc6cd) { + // Lo HANGUL SYLLABLE WEO + if (0xc6cc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE WEOG..HANGUL SYLLABLE WEOH + if (0xc6cd <= code && code <= 0xc6e7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc705) { + if (code < 0xc6e9) { + // Lo HANGUL SYLLABLE WE + if (0xc6e8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc704) { + // Lo [27] HANGUL SYLLABLE WEG..HANGUL SYLLABLE WEH + if (0xc6e9 <= code && code <= 0xc703) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE WI + if (0xc704 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xc720) { + // Lo [27] HANGUL SYLLABLE WIG..HANGUL SYLLABLE WIH + if (0xc705 <= code && code <= 0xc71f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc721) { + // Lo HANGUL SYLLABLE YU + if (0xc720 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE YUG..HANGUL SYLLABLE YUH + if (0xc721 <= code && code <= 0xc73b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xc7c9) { + if (code < 0xc775) { + if (code < 0xc758) { + if (code < 0xc73d) { + // Lo HANGUL SYLLABLE EU + if (0xc73c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE EUG..HANGUL SYLLABLE EUH + if (0xc73d <= code && code <= 0xc757) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc759) { + // Lo HANGUL SYLLABLE YI + if (0xc758 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc774) { + // Lo [27] HANGUL SYLLABLE YIG..HANGUL SYLLABLE YIH + if (0xc759 <= code && code <= 0xc773) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE I + if (0xc774 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc7ac) { + if (code < 0xc790) { + // Lo [27] HANGUL SYLLABLE IG..HANGUL SYLLABLE IH + if (0xc775 <= code && code <= 0xc78f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc791) { + // Lo HANGUL SYLLABLE JA + if (0xc790 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JAG..HANGUL SYLLABLE JAH + if (0xc791 <= code && code <= 0xc7ab) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xc7ad) { + // Lo HANGUL SYLLABLE JAE + if (0xc7ac === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc7c8) { + // Lo [27] HANGUL SYLLABLE JAEG..HANGUL SYLLABLE JAEH + if (0xc7ad <= code && code <= 0xc7c7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JYA + if (0xc7c8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xc81c) { + if (code < 0xc7e5) { + if (code < 0xc7e4) { + // Lo [27] HANGUL SYLLABLE JYAG..HANGUL SYLLABLE JYAH + if (0xc7c9 <= code && code <= 0xc7e3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JYAE + if (0xc7e4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc800) { + // Lo [27] HANGUL SYLLABLE JYAEG..HANGUL SYLLABLE JYAEH + if (0xc7e5 <= code && code <= 0xc7ff) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc801) { + // Lo HANGUL SYLLABLE JEO + if (0xc800 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JEOG..HANGUL SYLLABLE JEOH + if (0xc801 <= code && code <= 0xc81b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc839) { + if (code < 0xc81d) { + // Lo HANGUL SYLLABLE JE + if (0xc81c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc838) { + // Lo [27] HANGUL SYLLABLE JEG..HANGUL SYLLABLE JEH + if (0xc81d <= code && code <= 0xc837) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JYEO + if (0xc838 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xc854) { + // Lo [27] HANGUL SYLLABLE JYEOG..HANGUL SYLLABLE JYEOH + if (0xc839 <= code && code <= 0xc853) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc855) { + // Lo HANGUL SYLLABLE JYE + if (0xc854 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JYEG..HANGUL SYLLABLE JYEH + if (0xc855 <= code && code <= 0xc86f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0xcd24) { + if (code < 0xcabd) { + if (code < 0xc989) { + if (code < 0xc8fc) { + if (code < 0xc8a9) { + if (code < 0xc88c) { + if (code < 0xc871) { + // Lo HANGUL SYLLABLE JO + if (0xc870 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JOG..HANGUL SYLLABLE JOH + if (0xc871 <= code && code <= 0xc88b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc88d) { + // Lo HANGUL SYLLABLE JWA + if (0xc88c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc8a8) { + // Lo [27] HANGUL SYLLABLE JWAG..HANGUL SYLLABLE JWAH + if (0xc88d <= code && code <= 0xc8a7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JWAE + if (0xc8a8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc8c5) { + if (code < 0xc8c4) { + // Lo [27] HANGUL SYLLABLE JWAEG..HANGUL SYLLABLE JWAEH + if (0xc8a9 <= code && code <= 0xc8c3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JOE + if (0xc8c4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc8e0) { + // Lo [27] HANGUL SYLLABLE JOEG..HANGUL SYLLABLE JOEH + if (0xc8c5 <= code && code <= 0xc8df) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc8e1) { + // Lo HANGUL SYLLABLE JYO + if (0xc8e0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JYOG..HANGUL SYLLABLE JYOH + if (0xc8e1 <= code && code <= 0xc8fb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xc935) { + if (code < 0xc918) { + if (code < 0xc8fd) { + // Lo HANGUL SYLLABLE JU + if (0xc8fc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JUG..HANGUL SYLLABLE JUH + if (0xc8fd <= code && code <= 0xc917) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xc919) { + // Lo HANGUL SYLLABLE JWEO + if (0xc918 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc934) { + // Lo [27] HANGUL SYLLABLE JWEOG..HANGUL SYLLABLE JWEOH + if (0xc919 <= code && code <= 0xc933) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JWE + if (0xc934 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xc96c) { + if (code < 0xc950) { + // Lo [27] HANGUL SYLLABLE JWEG..HANGUL SYLLABLE JWEH + if (0xc935 <= code && code <= 0xc94f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc951) { + // Lo HANGUL SYLLABLE JWI + if (0xc950 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JWIG..HANGUL SYLLABLE JWIH + if (0xc951 <= code && code <= 0xc96b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xc96d) { + // Lo HANGUL SYLLABLE JYU + if (0xc96c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc988) { + // Lo [27] HANGUL SYLLABLE JYUG..HANGUL SYLLABLE JYUH + if (0xc96d <= code && code <= 0xc987) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JEU + if (0xc988 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xca30) { + if (code < 0xc9dc) { + if (code < 0xc9a5) { + if (code < 0xc9a4) { + // Lo [27] HANGUL SYLLABLE JEUG..HANGUL SYLLABLE JEUH + if (0xc989 <= code && code <= 0xc9a3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JYI + if (0xc9a4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xc9c0) { + // Lo [27] HANGUL SYLLABLE JYIG..HANGUL SYLLABLE JYIH + if (0xc9a5 <= code && code <= 0xc9bf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xc9c1) { + // Lo HANGUL SYLLABLE JI + if (0xc9c0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JIG..HANGUL SYLLABLE JIH + if (0xc9c1 <= code && code <= 0xc9db) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xc9f9) { + if (code < 0xc9dd) { + // Lo HANGUL SYLLABLE JJA + if (0xc9dc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xc9f8) { + // Lo [27] HANGUL SYLLABLE JJAG..HANGUL SYLLABLE JJAH + if (0xc9dd <= code && code <= 0xc9f7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJAE + if (0xc9f8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xca14) { + // Lo [27] HANGUL SYLLABLE JJAEG..HANGUL SYLLABLE JJAEH + if (0xc9f9 <= code && code <= 0xca13) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xca15) { + // Lo HANGUL SYLLABLE JJYA + if (0xca14 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJYAG..HANGUL SYLLABLE JJYAH + if (0xca15 <= code && code <= 0xca2f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xca69) { + if (code < 0xca4c) { + if (code < 0xca31) { + // Lo HANGUL SYLLABLE JJYAE + if (0xca30 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJYAEG..HANGUL SYLLABLE JJYAEH + if (0xca31 <= code && code <= 0xca4b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xca4d) { + // Lo HANGUL SYLLABLE JJEO + if (0xca4c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xca68) { + // Lo [27] HANGUL SYLLABLE JJEOG..HANGUL SYLLABLE JJEOH + if (0xca4d <= code && code <= 0xca67) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJE + if (0xca68 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xcaa0) { + if (code < 0xca84) { + // Lo [27] HANGUL SYLLABLE JJEG..HANGUL SYLLABLE JJEH + if (0xca69 <= code && code <= 0xca83) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xca85) { + // Lo HANGUL SYLLABLE JJYEO + if (0xca84 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJYEOG..HANGUL SYLLABLE JJYEOH + if (0xca85 <= code && code <= 0xca9f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xcaa1) { + // Lo HANGUL SYLLABLE JJYE + if (0xcaa0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcabc) { + // Lo [27] HANGUL SYLLABLE JJYEG..HANGUL SYLLABLE JJYEH + if (0xcaa1 <= code && code <= 0xcabb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJO + if (0xcabc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + else { + if (code < 0xcbf0) { + if (code < 0xcb49) { + if (code < 0xcb10) { + if (code < 0xcad9) { + if (code < 0xcad8) { + // Lo [27] HANGUL SYLLABLE JJOG..HANGUL SYLLABLE JJOH + if (0xcabd <= code && code <= 0xcad7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJWA + if (0xcad8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xcaf4) { + // Lo [27] HANGUL SYLLABLE JJWAG..HANGUL SYLLABLE JJWAH + if (0xcad9 <= code && code <= 0xcaf3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcaf5) { + // Lo HANGUL SYLLABLE JJWAE + if (0xcaf4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJWAEG..HANGUL SYLLABLE JJWAEH + if (0xcaf5 <= code && code <= 0xcb0f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xcb2c) { + if (code < 0xcb11) { + // Lo HANGUL SYLLABLE JJOE + if (0xcb10 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJOEG..HANGUL SYLLABLE JJOEH + if (0xcb11 <= code && code <= 0xcb2b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xcb2d) { + // Lo HANGUL SYLLABLE JJYO + if (0xcb2c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcb48) { + // Lo [27] HANGUL SYLLABLE JJYOG..HANGUL SYLLABLE JJYOH + if (0xcb2d <= code && code <= 0xcb47) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJU + if (0xcb48 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xcb9c) { + if (code < 0xcb65) { + if (code < 0xcb64) { + // Lo [27] HANGUL SYLLABLE JJUG..HANGUL SYLLABLE JJUH + if (0xcb49 <= code && code <= 0xcb63) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJWEO + if (0xcb64 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xcb80) { + // Lo [27] HANGUL SYLLABLE JJWEOG..HANGUL SYLLABLE JJWEOH + if (0xcb65 <= code && code <= 0xcb7f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcb81) { + // Lo HANGUL SYLLABLE JJWE + if (0xcb80 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJWEG..HANGUL SYLLABLE JJWEH + if (0xcb81 <= code && code <= 0xcb9b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xcbb9) { + if (code < 0xcb9d) { + // Lo HANGUL SYLLABLE JJWI + if (0xcb9c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcbb8) { + // Lo [27] HANGUL SYLLABLE JJWIG..HANGUL SYLLABLE JJWIH + if (0xcb9d <= code && code <= 0xcbb7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE JJYU + if (0xcbb8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xcbd4) { + // Lo [27] HANGUL SYLLABLE JJYUG..HANGUL SYLLABLE JJYUH + if (0xcbb9 <= code && code <= 0xcbd3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcbd5) { + // Lo HANGUL SYLLABLE JJEU + if (0xcbd4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJEUG..HANGUL SYLLABLE JJEUH + if (0xcbd5 <= code && code <= 0xcbef) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xcc7d) { + if (code < 0xcc29) { + if (code < 0xcc0c) { + if (code < 0xcbf1) { + // Lo HANGUL SYLLABLE JJYI + if (0xcbf0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE JJYIG..HANGUL SYLLABLE JJYIH + if (0xcbf1 <= code && code <= 0xcc0b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xcc0d) { + // Lo HANGUL SYLLABLE JJI + if (0xcc0c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcc28) { + // Lo [27] HANGUL SYLLABLE JJIG..HANGUL SYLLABLE JJIH + if (0xcc0d <= code && code <= 0xcc27) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CA + if (0xcc28 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xcc60) { + if (code < 0xcc44) { + // Lo [27] HANGUL SYLLABLE CAG..HANGUL SYLLABLE CAH + if (0xcc29 <= code && code <= 0xcc43) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcc45) { + // Lo HANGUL SYLLABLE CAE + if (0xcc44 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE CAEG..HANGUL SYLLABLE CAEH + if (0xcc45 <= code && code <= 0xcc5f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xcc61) { + // Lo HANGUL SYLLABLE CYA + if (0xcc60 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcc7c) { + // Lo [27] HANGUL SYLLABLE CYAG..HANGUL SYLLABLE CYAH + if (0xcc61 <= code && code <= 0xcc7b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CYAE + if (0xcc7c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xccd0) { + if (code < 0xcc99) { + if (code < 0xcc98) { + // Lo [27] HANGUL SYLLABLE CYAEG..HANGUL SYLLABLE CYAEH + if (0xcc7d <= code && code <= 0xcc97) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CEO + if (0xcc98 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xccb4) { + // Lo [27] HANGUL SYLLABLE CEOG..HANGUL SYLLABLE CEOH + if (0xcc99 <= code && code <= 0xccb3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xccb5) { + // Lo HANGUL SYLLABLE CE + if (0xccb4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE CEG..HANGUL SYLLABLE CEH + if (0xccb5 <= code && code <= 0xcccf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xcced) { + if (code < 0xccd1) { + // Lo HANGUL SYLLABLE CYEO + if (0xccd0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xccec) { + // Lo [27] HANGUL SYLLABLE CYEOG..HANGUL SYLLABLE CYEOH + if (0xccd1 <= code && code <= 0xcceb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CYE + if (0xccec === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xcd08) { + // Lo [27] HANGUL SYLLABLE CYEG..HANGUL SYLLABLE CYEH + if (0xcced <= code && code <= 0xcd07) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcd09) { + // Lo HANGUL SYLLABLE CO + if (0xcd08 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE COG..HANGUL SYLLABLE COH + if (0xcd09 <= code && code <= 0xcd23) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + } + else { + if (code < 0xcf71) { + if (code < 0xce3d) { + if (code < 0xcdb0) { + if (code < 0xcd5d) { + if (code < 0xcd40) { + if (code < 0xcd25) { + // Lo HANGUL SYLLABLE CWA + if (0xcd24 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE CWAG..HANGUL SYLLABLE CWAH + if (0xcd25 <= code && code <= 0xcd3f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xcd41) { + // Lo HANGUL SYLLABLE CWAE + if (0xcd40 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcd5c) { + // Lo [27] HANGUL SYLLABLE CWAEG..HANGUL SYLLABLE CWAEH + if (0xcd41 <= code && code <= 0xcd5b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE COE + if (0xcd5c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xcd79) { + if (code < 0xcd78) { + // Lo [27] HANGUL SYLLABLE COEG..HANGUL SYLLABLE COEH + if (0xcd5d <= code && code <= 0xcd77) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CYO + if (0xcd78 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xcd94) { + // Lo [27] HANGUL SYLLABLE CYOG..HANGUL SYLLABLE CYOH + if (0xcd79 <= code && code <= 0xcd93) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcd95) { + // Lo HANGUL SYLLABLE CU + if (0xcd94 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE CUG..HANGUL SYLLABLE CUH + if (0xcd95 <= code && code <= 0xcdaf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xcde9) { + if (code < 0xcdcc) { + if (code < 0xcdb1) { + // Lo HANGUL SYLLABLE CWEO + if (0xcdb0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE CWEOG..HANGUL SYLLABLE CWEOH + if (0xcdb1 <= code && code <= 0xcdcb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xcdcd) { + // Lo HANGUL SYLLABLE CWE + if (0xcdcc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcde8) { + // Lo [27] HANGUL SYLLABLE CWEG..HANGUL SYLLABLE CWEH + if (0xcdcd <= code && code <= 0xcde7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CWI + if (0xcde8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xce20) { + if (code < 0xce04) { + // Lo [27] HANGUL SYLLABLE CWIG..HANGUL SYLLABLE CWIH + if (0xcde9 <= code && code <= 0xce03) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xce05) { + // Lo HANGUL SYLLABLE CYU + if (0xce04 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE CYUG..HANGUL SYLLABLE CYUH + if (0xce05 <= code && code <= 0xce1f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xce21) { + // Lo HANGUL SYLLABLE CEU + if (0xce20 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xce3c) { + // Lo [27] HANGUL SYLLABLE CEUG..HANGUL SYLLABLE CEUH + if (0xce21 <= code && code <= 0xce3b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CYI + if (0xce3c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xcee4) { + if (code < 0xce90) { + if (code < 0xce59) { + if (code < 0xce58) { + // Lo [27] HANGUL SYLLABLE CYIG..HANGUL SYLLABLE CYIH + if (0xce3d <= code && code <= 0xce57) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE CI + if (0xce58 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xce74) { + // Lo [27] HANGUL SYLLABLE CIG..HANGUL SYLLABLE CIH + if (0xce59 <= code && code <= 0xce73) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xce75) { + // Lo HANGUL SYLLABLE KA + if (0xce74 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KAG..HANGUL SYLLABLE KAH + if (0xce75 <= code && code <= 0xce8f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xcead) { + if (code < 0xce91) { + // Lo HANGUL SYLLABLE KAE + if (0xce90 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xceac) { + // Lo [27] HANGUL SYLLABLE KAEG..HANGUL SYLLABLE KAEH + if (0xce91 <= code && code <= 0xceab) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KYA + if (0xceac === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xcec8) { + // Lo [27] HANGUL SYLLABLE KYAG..HANGUL SYLLABLE KYAH + if (0xcead <= code && code <= 0xcec7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcec9) { + // Lo HANGUL SYLLABLE KYAE + if (0xcec8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KYAEG..HANGUL SYLLABLE KYAEH + if (0xcec9 <= code && code <= 0xcee3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xcf1d) { + if (code < 0xcf00) { + if (code < 0xcee5) { + // Lo HANGUL SYLLABLE KEO + if (0xcee4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KEOG..HANGUL SYLLABLE KEOH + if (0xcee5 <= code && code <= 0xceff) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xcf01) { + // Lo HANGUL SYLLABLE KE + if (0xcf00 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcf1c) { + // Lo [27] HANGUL SYLLABLE KEG..HANGUL SYLLABLE KEH + if (0xcf01 <= code && code <= 0xcf1b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KYEO + if (0xcf1c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xcf54) { + if (code < 0xcf38) { + // Lo [27] HANGUL SYLLABLE KYEOG..HANGUL SYLLABLE KYEOH + if (0xcf1d <= code && code <= 0xcf37) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcf39) { + // Lo HANGUL SYLLABLE KYE + if (0xcf38 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KYEG..HANGUL SYLLABLE KYEH + if (0xcf39 <= code && code <= 0xcf53) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xcf55) { + // Lo HANGUL SYLLABLE KO + if (0xcf54 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcf70) { + // Lo [27] HANGUL SYLLABLE KOG..HANGUL SYLLABLE KOH + if (0xcf55 <= code && code <= 0xcf6f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KWA + if (0xcf70 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + else { + if (code < 0xd0a4) { + if (code < 0xcffd) { + if (code < 0xcfc4) { + if (code < 0xcf8d) { + if (code < 0xcf8c) { + // Lo [27] HANGUL SYLLABLE KWAG..HANGUL SYLLABLE KWAH + if (0xcf71 <= code && code <= 0xcf8b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KWAE + if (0xcf8c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xcfa8) { + // Lo [27] HANGUL SYLLABLE KWAEG..HANGUL SYLLABLE KWAEH + if (0xcf8d <= code && code <= 0xcfa7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xcfa9) { + // Lo HANGUL SYLLABLE KOE + if (0xcfa8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KOEG..HANGUL SYLLABLE KOEH + if (0xcfa9 <= code && code <= 0xcfc3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xcfe0) { + if (code < 0xcfc5) { + // Lo HANGUL SYLLABLE KYO + if (0xcfc4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KYOG..HANGUL SYLLABLE KYOH + if (0xcfc5 <= code && code <= 0xcfdf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xcfe1) { + // Lo HANGUL SYLLABLE KU + if (0xcfe0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xcffc) { + // Lo [27] HANGUL SYLLABLE KUG..HANGUL SYLLABLE KUH + if (0xcfe1 <= code && code <= 0xcffb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KWEO + if (0xcffc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xd050) { + if (code < 0xd019) { + if (code < 0xd018) { + // Lo [27] HANGUL SYLLABLE KWEOG..HANGUL SYLLABLE KWEOH + if (0xcffd <= code && code <= 0xd017) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KWE + if (0xd018 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd034) { + // Lo [27] HANGUL SYLLABLE KWEG..HANGUL SYLLABLE KWEH + if (0xd019 <= code && code <= 0xd033) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd035) { + // Lo HANGUL SYLLABLE KWI + if (0xd034 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KWIG..HANGUL SYLLABLE KWIH + if (0xd035 <= code && code <= 0xd04f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd06d) { + if (code < 0xd051) { + // Lo HANGUL SYLLABLE KYU + if (0xd050 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd06c) { + // Lo [27] HANGUL SYLLABLE KYUG..HANGUL SYLLABLE KYUH + if (0xd051 <= code && code <= 0xd06b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE KEU + if (0xd06c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xd088) { + // Lo [27] HANGUL SYLLABLE KEUG..HANGUL SYLLABLE KEUH + if (0xd06d <= code && code <= 0xd087) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd089) { + // Lo HANGUL SYLLABLE KYI + if (0xd088 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KYIG..HANGUL SYLLABLE KYIH + if (0xd089 <= code && code <= 0xd0a3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0xd131) { + if (code < 0xd0dd) { + if (code < 0xd0c0) { + if (code < 0xd0a5) { + // Lo HANGUL SYLLABLE KI + if (0xd0a4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE KIG..HANGUL SYLLABLE KIH + if (0xd0a5 <= code && code <= 0xd0bf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd0c1) { + // Lo HANGUL SYLLABLE TA + if (0xd0c0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd0dc) { + // Lo [27] HANGUL SYLLABLE TAG..HANGUL SYLLABLE TAH + if (0xd0c1 <= code && code <= 0xd0db) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TAE + if (0xd0dc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xd114) { + if (code < 0xd0f8) { + // Lo [27] HANGUL SYLLABLE TAEG..HANGUL SYLLABLE TAEH + if (0xd0dd <= code && code <= 0xd0f7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd0f9) { + // Lo HANGUL SYLLABLE TYA + if (0xd0f8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TYAG..HANGUL SYLLABLE TYAH + if (0xd0f9 <= code && code <= 0xd113) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xd115) { + // Lo HANGUL SYLLABLE TYAE + if (0xd114 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd130) { + // Lo [27] HANGUL SYLLABLE TYAEG..HANGUL SYLLABLE TYAEH + if (0xd115 <= code && code <= 0xd12f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TEO + if (0xd130 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xd184) { + if (code < 0xd14d) { + if (code < 0xd14c) { + // Lo [27] HANGUL SYLLABLE TEOG..HANGUL SYLLABLE TEOH + if (0xd131 <= code && code <= 0xd14b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TE + if (0xd14c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd168) { + // Lo [27] HANGUL SYLLABLE TEG..HANGUL SYLLABLE TEH + if (0xd14d <= code && code <= 0xd167) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd169) { + // Lo HANGUL SYLLABLE TYEO + if (0xd168 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TYEOG..HANGUL SYLLABLE TYEOH + if (0xd169 <= code && code <= 0xd183) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd1a1) { + if (code < 0xd185) { + // Lo HANGUL SYLLABLE TYE + if (0xd184 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd1a0) { + // Lo [27] HANGUL SYLLABLE TYEG..HANGUL SYLLABLE TYEH + if (0xd185 <= code && code <= 0xd19f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TO + if (0xd1a0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xd1bc) { + // Lo [27] HANGUL SYLLABLE TOG..HANGUL SYLLABLE TOH + if (0xd1a1 <= code && code <= 0xd1bb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd1bd) { + // Lo HANGUL SYLLABLE TWA + if (0xd1bc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TWAG..HANGUL SYLLABLE TWAH + if (0xd1bd <= code && code <= 0xd1d7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0x1133b) { + if (code < 0xd671) { + if (code < 0xd424) { + if (code < 0xd2f1) { + if (code < 0xd264) { + if (code < 0xd211) { + if (code < 0xd1f4) { + if (code < 0xd1d9) { + // Lo HANGUL SYLLABLE TWAE + if (0xd1d8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TWAEG..HANGUL SYLLABLE TWAEH + if (0xd1d9 <= code && code <= 0xd1f3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd1f5) { + // Lo HANGUL SYLLABLE TOE + if (0xd1f4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd210) { + // Lo [27] HANGUL SYLLABLE TOEG..HANGUL SYLLABLE TOEH + if (0xd1f5 <= code && code <= 0xd20f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TYO + if (0xd210 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xd22d) { + if (code < 0xd22c) { + // Lo [27] HANGUL SYLLABLE TYOG..HANGUL SYLLABLE TYOH + if (0xd211 <= code && code <= 0xd22b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TU + if (0xd22c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd248) { + // Lo [27] HANGUL SYLLABLE TUG..HANGUL SYLLABLE TUH + if (0xd22d <= code && code <= 0xd247) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd249) { + // Lo HANGUL SYLLABLE TWEO + if (0xd248 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TWEOG..HANGUL SYLLABLE TWEOH + if (0xd249 <= code && code <= 0xd263) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xd29d) { + if (code < 0xd280) { + if (code < 0xd265) { + // Lo HANGUL SYLLABLE TWE + if (0xd264 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TWEG..HANGUL SYLLABLE TWEH + if (0xd265 <= code && code <= 0xd27f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd281) { + // Lo HANGUL SYLLABLE TWI + if (0xd280 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd29c) { + // Lo [27] HANGUL SYLLABLE TWIG..HANGUL SYLLABLE TWIH + if (0xd281 <= code && code <= 0xd29b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TYU + if (0xd29c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xd2d4) { + if (code < 0xd2b8) { + // Lo [27] HANGUL SYLLABLE TYUG..HANGUL SYLLABLE TYUH + if (0xd29d <= code && code <= 0xd2b7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd2b9) { + // Lo HANGUL SYLLABLE TEU + if (0xd2b8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE TEUG..HANGUL SYLLABLE TEUH + if (0xd2b9 <= code && code <= 0xd2d3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xd2d5) { + // Lo HANGUL SYLLABLE TYI + if (0xd2d4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd2f0) { + // Lo [27] HANGUL SYLLABLE TYIG..HANGUL SYLLABLE TYIH + if (0xd2d5 <= code && code <= 0xd2ef) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE TI + if (0xd2f0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xd37d) { + if (code < 0xd344) { + if (code < 0xd30d) { + if (code < 0xd30c) { + // Lo [27] HANGUL SYLLABLE TIG..HANGUL SYLLABLE TIH + if (0xd2f1 <= code && code <= 0xd30b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PA + if (0xd30c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd328) { + // Lo [27] HANGUL SYLLABLE PAG..HANGUL SYLLABLE PAH + if (0xd30d <= code && code <= 0xd327) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd329) { + // Lo HANGUL SYLLABLE PAE + if (0xd328 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PAEG..HANGUL SYLLABLE PAEH + if (0xd329 <= code && code <= 0xd343) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd360) { + if (code < 0xd345) { + // Lo HANGUL SYLLABLE PYA + if (0xd344 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PYAG..HANGUL SYLLABLE PYAH + if (0xd345 <= code && code <= 0xd35f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd361) { + // Lo HANGUL SYLLABLE PYAE + if (0xd360 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd37c) { + // Lo [27] HANGUL SYLLABLE PYAEG..HANGUL SYLLABLE PYAEH + if (0xd361 <= code && code <= 0xd37b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PEO + if (0xd37c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xd3d0) { + if (code < 0xd399) { + if (code < 0xd398) { + // Lo [27] HANGUL SYLLABLE PEOG..HANGUL SYLLABLE PEOH + if (0xd37d <= code && code <= 0xd397) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PE + if (0xd398 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd3b4) { + // Lo [27] HANGUL SYLLABLE PEG..HANGUL SYLLABLE PEH + if (0xd399 <= code && code <= 0xd3b3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd3b5) { + // Lo HANGUL SYLLABLE PYEO + if (0xd3b4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PYEOG..HANGUL SYLLABLE PYEOH + if (0xd3b5 <= code && code <= 0xd3cf) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd3ed) { + if (code < 0xd3d1) { + // Lo HANGUL SYLLABLE PYE + if (0xd3d0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd3ec) { + // Lo [27] HANGUL SYLLABLE PYEG..HANGUL SYLLABLE PYEH + if (0xd3d1 <= code && code <= 0xd3eb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PO + if (0xd3ec === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xd408) { + // Lo [27] HANGUL SYLLABLE POG..HANGUL SYLLABLE POH + if (0xd3ed <= code && code <= 0xd407) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd409) { + // Lo HANGUL SYLLABLE PWA + if (0xd408 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PWAG..HANGUL SYLLABLE PWAH + if (0xd409 <= code && code <= 0xd423) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + } + else { + if (code < 0xd53d) { + if (code < 0xd4b0) { + if (code < 0xd45d) { + if (code < 0xd440) { + if (code < 0xd425) { + // Lo HANGUL SYLLABLE PWAE + if (0xd424 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PWAEG..HANGUL SYLLABLE PWAEH + if (0xd425 <= code && code <= 0xd43f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd441) { + // Lo HANGUL SYLLABLE POE + if (0xd440 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd45c) { + // Lo [27] HANGUL SYLLABLE POEG..HANGUL SYLLABLE POEH + if (0xd441 <= code && code <= 0xd45b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PYO + if (0xd45c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xd479) { + if (code < 0xd478) { + // Lo [27] HANGUL SYLLABLE PYOG..HANGUL SYLLABLE PYOH + if (0xd45d <= code && code <= 0xd477) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PU + if (0xd478 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd494) { + // Lo [27] HANGUL SYLLABLE PUG..HANGUL SYLLABLE PUH + if (0xd479 <= code && code <= 0xd493) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd495) { + // Lo HANGUL SYLLABLE PWEO + if (0xd494 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PWEOG..HANGUL SYLLABLE PWEOH + if (0xd495 <= code && code <= 0xd4af) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xd4e9) { + if (code < 0xd4cc) { + if (code < 0xd4b1) { + // Lo HANGUL SYLLABLE PWE + if (0xd4b0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PWEG..HANGUL SYLLABLE PWEH + if (0xd4b1 <= code && code <= 0xd4cb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd4cd) { + // Lo HANGUL SYLLABLE PWI + if (0xd4cc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd4e8) { + // Lo [27] HANGUL SYLLABLE PWIG..HANGUL SYLLABLE PWIH + if (0xd4cd <= code && code <= 0xd4e7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PYU + if (0xd4e8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xd520) { + if (code < 0xd504) { + // Lo [27] HANGUL SYLLABLE PYUG..HANGUL SYLLABLE PYUH + if (0xd4e9 <= code && code <= 0xd503) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd505) { + // Lo HANGUL SYLLABLE PEU + if (0xd504 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE PEUG..HANGUL SYLLABLE PEUH + if (0xd505 <= code && code <= 0xd51f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xd521) { + // Lo HANGUL SYLLABLE PYI + if (0xd520 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd53c) { + // Lo [27] HANGUL SYLLABLE PYIG..HANGUL SYLLABLE PYIH + if (0xd521 <= code && code <= 0xd53b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE PI + if (0xd53c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + else { + if (code < 0xd5e4) { + if (code < 0xd590) { + if (code < 0xd559) { + if (code < 0xd558) { + // Lo [27] HANGUL SYLLABLE PIG..HANGUL SYLLABLE PIH + if (0xd53d <= code && code <= 0xd557) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HA + if (0xd558 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd574) { + // Lo [27] HANGUL SYLLABLE HAG..HANGUL SYLLABLE HAH + if (0xd559 <= code && code <= 0xd573) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd575) { + // Lo HANGUL SYLLABLE HAE + if (0xd574 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HAEG..HANGUL SYLLABLE HAEH + if (0xd575 <= code && code <= 0xd58f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd5ad) { + if (code < 0xd591) { + // Lo HANGUL SYLLABLE HYA + if (0xd590 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd5ac) { + // Lo [27] HANGUL SYLLABLE HYAG..HANGUL SYLLABLE HYAH + if (0xd591 <= code && code <= 0xd5ab) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HYAE + if (0xd5ac === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xd5c8) { + // Lo [27] HANGUL SYLLABLE HYAEG..HANGUL SYLLABLE HYAEH + if (0xd5ad <= code && code <= 0xd5c7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd5c9) { + // Lo HANGUL SYLLABLE HEO + if (0xd5c8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HEOG..HANGUL SYLLABLE HEOH + if (0xd5c9 <= code && code <= 0xd5e3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + else { + if (code < 0xd61d) { + if (code < 0xd600) { + if (code < 0xd5e5) { + // Lo HANGUL SYLLABLE HE + if (0xd5e4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HEG..HANGUL SYLLABLE HEH + if (0xd5e5 <= code && code <= 0xd5ff) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd601) { + // Lo HANGUL SYLLABLE HYEO + if (0xd600 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd61c) { + // Lo [27] HANGUL SYLLABLE HYEOG..HANGUL SYLLABLE HYEOH + if (0xd601 <= code && code <= 0xd61b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HYE + if (0xd61c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + else { + if (code < 0xd654) { + if (code < 0xd638) { + // Lo [27] HANGUL SYLLABLE HYEG..HANGUL SYLLABLE HYEH + if (0xd61d <= code && code <= 0xd637) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd639) { + // Lo HANGUL SYLLABLE HO + if (0xd638 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HOG..HANGUL SYLLABLE HOH + if (0xd639 <= code && code <= 0xd653) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + else { + if (code < 0xd655) { + // Lo HANGUL SYLLABLE HWA + if (0xd654 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd670) { + // Lo [27] HANGUL SYLLABLE HWAG..HANGUL SYLLABLE HWAH + if (0xd655 <= code && code <= 0xd66f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HWAE + if (0xd670 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + } + } + } + else { + if (code < 0x11000) { + if (code < 0xd7b0) { + if (code < 0xd6fd) { + if (code < 0xd6c4) { + if (code < 0xd68d) { + if (code < 0xd68c) { + // Lo [27] HANGUL SYLLABLE HWAEG..HANGUL SYLLABLE HWAEH + if (0xd671 <= code && code <= 0xd68b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HOE + if (0xd68c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd6a8) { + // Lo [27] HANGUL SYLLABLE HOEG..HANGUL SYLLABLE HOEH + if (0xd68d <= code && code <= 0xd6a7) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd6a9) { + // Lo HANGUL SYLLABLE HYO + if (0xd6a8 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HYOG..HANGUL SYLLABLE HYOH + if (0xd6a9 <= code && code <= 0xd6c3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd6e0) { + if (code < 0xd6c5) { + // Lo HANGUL SYLLABLE HU + if (0xd6c4 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HUG..HANGUL SYLLABLE HUH + if (0xd6c5 <= code && code <= 0xd6df) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + else { + if (code < 0xd6e1) { + // Lo HANGUL SYLLABLE HWEO + if (0xd6e0 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd6fc) { + // Lo [27] HANGUL SYLLABLE HWEOG..HANGUL SYLLABLE HWEOH + if (0xd6e1 <= code && code <= 0xd6fb) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HWE + if (0xd6fc === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + } + } + else { + if (code < 0xd750) { + if (code < 0xd719) { + if (code < 0xd718) { + // Lo [27] HANGUL SYLLABLE HWEG..HANGUL SYLLABLE HWEH + if (0xd6fd <= code && code <= 0xd717) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HWI + if (0xd718 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + else { + if (code < 0xd734) { + // Lo [27] HANGUL SYLLABLE HWIG..HANGUL SYLLABLE HWIH + if (0xd719 <= code && code <= 0xd733) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd735) { + // Lo HANGUL SYLLABLE HYU + if (0xd734 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HYUG..HANGUL SYLLABLE HYUH + if (0xd735 <= code && code <= 0xd74f) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + else { + if (code < 0xd76d) { + if (code < 0xd751) { + // Lo HANGUL SYLLABLE HEU + if (0xd750 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + if (code < 0xd76c) { + // Lo [27] HANGUL SYLLABLE HEUG..HANGUL SYLLABLE HEUH + if (0xd751 <= code && code <= 0xd76b) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + // Lo HANGUL SYLLABLE HYI + if (0xd76c === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + } + } + else { + if (code < 0xd788) { + // Lo [27] HANGUL SYLLABLE HYIG..HANGUL SYLLABLE HYIH + if (0xd76d <= code && code <= 0xd787) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + else { + if (code < 0xd789) { + // Lo HANGUL SYLLABLE HI + if (0xd788 === code) { + return boundaries_1.CLUSTER_BREAK.LV; + } + } + else { + // Lo [27] HANGUL SYLLABLE HIG..HANGUL SYLLABLE HIH + if (0xd789 <= code && code <= 0xd7a3) { + return boundaries_1.CLUSTER_BREAK.LVT; + } + } + } + } + } + } + } + else { + if (code < 0x10a01) { + if (code < 0xfeff) { + if (code < 0xfb1e) { + if (code < 0xd7cb) { + // Lo [23] HANGUL JUNGSEONG O-YEO..HANGUL JUNGSEONG ARAEA-E + if (0xd7b0 <= code && code <= 0xd7c6) { + return boundaries_1.CLUSTER_BREAK.V; + } + } + else { + // Lo [49] HANGUL JONGSEONG NIEUN-RIEUL..HANGUL JONGSEONG PHIEUPH-THIEUTH + if (0xd7cb <= code && code <= 0xd7fb) { + return boundaries_1.CLUSTER_BREAK.T; + } + } + } + else { + if (code < 0xfe00) { + // Mn HEBREW POINT JUDEO-SPANISH VARIKA + if (0xfb1e === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xfe20) { + // Mn [16] VARIATION SELECTOR-1..VARIATION SELECTOR-16 + if (0xfe00 <= code && code <= 0xfe0f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [16] COMBINING LIGATURE LEFT HALF..COMBINING CYRILLIC TITLO RIGHT HALF + if (0xfe20 <= code && code <= 0xfe2f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x101fd) { + if (code < 0xff9e) { + // Cf ZERO WIDTH NO-BREAK SPACE + if (0xfeff === code) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + if (code < 0xfff0) { + // Lm [2] HALFWIDTH KATAKANA VOICED SOUND MARK..HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK + if (0xff9e <= code && code <= 0xff9f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cn [9] .. + // Cf [3] INTERLINEAR ANNOTATION ANCHOR..INTERLINEAR ANNOTATION TERMINATOR + if (0xfff0 <= code && code <= 0xfffb) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + } + } + else { + if (code < 0x102e0) { + // Mn PHAISTOS DISC SIGN COMBINING OBLIQUE STROKE + if (0x101fd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x10376) { + // Mn COPTIC EPACT THOUSANDS MARK + if (0x102e0 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [5] COMBINING OLD PERMIC LETTER AN..COMBINING OLD PERMIC LETTER SII + if (0x10376 <= code && code <= 0x1037a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x10ae5) { + if (code < 0x10a0c) { + if (code < 0x10a05) { + // Mn [3] KHAROSHTHI VOWEL SIGN I..KHAROSHTHI VOWEL SIGN VOCALIC R + if (0x10a01 <= code && code <= 0x10a03) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] KHAROSHTHI VOWEL SIGN E..KHAROSHTHI VOWEL SIGN O + if (0x10a05 <= code && code <= 0x10a06) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x10a38) { + // Mn [4] KHAROSHTHI VOWEL LENGTH MARK..KHAROSHTHI SIGN VISARGA + if (0x10a0c <= code && code <= 0x10a0f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x10a3f) { + // Mn [3] KHAROSHTHI SIGN BAR ABOVE..KHAROSHTHI SIGN DOT BELOW + if (0x10a38 <= code && code <= 0x10a3a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn KHAROSHTHI VIRAMA + if (0x10a3f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x10efd) { + if (code < 0x10d24) { + // Mn [2] MANICHAEAN ABBREVIATION MARK ABOVE..MANICHAEAN ABBREVIATION MARK BELOW + if (0x10ae5 <= code && code <= 0x10ae6) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x10eab) { + // Mn [4] HANIFI ROHINGYA SIGN HARBAHAY..HANIFI ROHINGYA SIGN TASSI + if (0x10d24 <= code && code <= 0x10d27) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] YEZIDI COMBINING HAMZA MARK..YEZIDI COMBINING MADDA MARK + if (0x10eab <= code && code <= 0x10eac) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x10f46) { + // Mn [3] ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA + if (0x10efd <= code && code <= 0x10eff) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x10f82) { + // Mn [11] SOGDIAN COMBINING DOT BELOW..SOGDIAN COMBINING STROKE BELOW + if (0x10f46 <= code && code <= 0x10f50) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [4] OLD UYGHUR COMBINING DOT ABOVE..OLD UYGHUR COMBINING TWO DOTS BELOW + if (0x10f82 <= code && code <= 0x10f85) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + else { + if (code < 0x11180) { + if (code < 0x110b7) { + if (code < 0x11073) { + if (code < 0x11002) { + // Mc BRAHMI SIGN CANDRABINDU + if (0x11000 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn BRAHMI SIGN ANUSVARA + if (0x11001 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11038) { + // Mc BRAHMI SIGN VISARGA + if (0x11002 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x11070) { + // Mn [15] BRAHMI VOWEL SIGN AA..BRAHMI VIRAMA + if (0x11038 <= code && code <= 0x11046) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn BRAHMI SIGN OLD TAMIL VIRAMA + if (0x11070 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x11082) { + if (code < 0x1107f) { + // Mn [2] BRAHMI VOWEL SIGN OLD TAMIL SHORT E..BRAHMI VOWEL SIGN OLD TAMIL SHORT O + if (0x11073 <= code && code <= 0x11074) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [3] BRAHMI NUMBER JOINER..KAITHI SIGN ANUSVARA + if (0x1107f <= code && code <= 0x11081) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x110b0) { + // Mc KAITHI SIGN VISARGA + if (0x11082 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x110b3) { + // Mc [3] KAITHI VOWEL SIGN AA..KAITHI VOWEL SIGN II + if (0x110b0 <= code && code <= 0x110b2) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] KAITHI VOWEL SIGN U..KAITHI VOWEL SIGN AI + if (0x110b3 <= code && code <= 0x110b6) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x11100) { + if (code < 0x110bd) { + if (code < 0x110b9) { + // Mc [2] KAITHI VOWEL SIGN O..KAITHI VOWEL SIGN AU + if (0x110b7 <= code && code <= 0x110b8) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] KAITHI SIGN VIRAMA..KAITHI SIGN NUKTA + if (0x110b9 <= code && code <= 0x110ba) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x110c2) { + // Cf KAITHI NUMBER SIGN + if (0x110bd === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + // Mn KAITHI VOWEL SIGN VOCALIC R + if (0x110c2 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Cf KAITHI NUMBER SIGN ABOVE + if (0x110cd === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + } + } + else { + if (code < 0x1112d) { + if (code < 0x11127) { + // Mn [3] CHAKMA SIGN CANDRABINDU..CHAKMA SIGN VISARGA + if (0x11100 <= code && code <= 0x11102) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1112c) { + // Mn [5] CHAKMA VOWEL SIGN A..CHAKMA VOWEL SIGN UU + if (0x11127 <= code && code <= 0x1112b) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc CHAKMA VOWEL SIGN E + if (0x1112c === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x11145) { + // Mn [8] CHAKMA VOWEL SIGN AI..CHAKMA MAAYYAA + if (0x1112d <= code && code <= 0x11134) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11173) { + // Mc [2] CHAKMA VOWEL SIGN AA..CHAKMA VOWEL SIGN EI + if (0x11145 <= code && code <= 0x11146) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn MAHAJANI SIGN NUKTA + if (0x11173 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0x11232) { + if (code < 0x111c2) { + if (code < 0x111b3) { + if (code < 0x11182) { + // Mn [2] SHARADA SIGN CANDRABINDU..SHARADA SIGN ANUSVARA + if (0x11180 <= code && code <= 0x11181) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc SHARADA SIGN VISARGA + if (0x11182 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x111b6) { + // Mc [3] SHARADA VOWEL SIGN AA..SHARADA VOWEL SIGN II + if (0x111b3 <= code && code <= 0x111b5) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x111bf) { + // Mn [9] SHARADA VOWEL SIGN U..SHARADA VOWEL SIGN O + if (0x111b6 <= code && code <= 0x111be) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SHARADA VOWEL SIGN AU..SHARADA SIGN VIRAMA + if (0x111bf <= code && code <= 0x111c0) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x111cf) { + if (code < 0x111c9) { + // Lo [2] SHARADA SIGN JIHVAMULIYA..SHARADA SIGN UPADHMANIYA + if (0x111c2 <= code && code <= 0x111c3) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + if (code < 0x111ce) { + // Mn [4] SHARADA SANDHI MARK..SHARADA EXTRA SHORT VOWEL MARK + if (0x111c9 <= code && code <= 0x111cc) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc SHARADA VOWEL SIGN PRISHTHAMATRA E + if (0x111ce === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x1122c) { + // Mn SHARADA SIGN INVERTED CANDRABINDU + if (0x111cf === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1122f) { + // Mc [3] KHOJKI VOWEL SIGN AA..KHOJKI VOWEL SIGN II + if (0x1122c <= code && code <= 0x1122e) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [3] KHOJKI VOWEL SIGN U..KHOJKI VOWEL SIGN AI + if (0x1122f <= code && code <= 0x11231) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x11241) { + if (code < 0x11235) { + if (code < 0x11234) { + // Mc [2] KHOJKI VOWEL SIGN O..KHOJKI VOWEL SIGN AU + if (0x11232 <= code && code <= 0x11233) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn KHOJKI SIGN ANUSVARA + if (0x11234 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x11236) { + // Mc KHOJKI SIGN VIRAMA + if (0x11235 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1123e) { + // Mn [2] KHOJKI SIGN NUKTA..KHOJKI SIGN SHADDA + if (0x11236 <= code && code <= 0x11237) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn KHOJKI SIGN SUKUN + if (0x1123e === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x112e3) { + if (code < 0x112df) { + // Mn KHOJKI VOWEL SIGN VOCALIC R + if (0x11241 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x112e0) { + // Mn KHUDAWADI SIGN ANUSVARA + if (0x112df === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [3] KHUDAWADI VOWEL SIGN AA..KHUDAWADI VOWEL SIGN II + if (0x112e0 <= code && code <= 0x112e2) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x11300) { + // Mn [8] KHUDAWADI VOWEL SIGN U..KHUDAWADI SIGN VIRAMA + if (0x112e3 <= code && code <= 0x112ea) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11302) { + // Mn [2] GRANTHA SIGN COMBINING ANUSVARA ABOVE..GRANTHA SIGN CANDRABINDU + if (0x11300 <= code && code <= 0x11301) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] GRANTHA SIGN ANUSVARA..GRANTHA SIGN VISARGA + if (0x11302 <= code && code <= 0x11303) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + } + } + } + else { + if (code < 0x11a97) { + if (code < 0x116ab) { + if (code < 0x114b9) { + if (code < 0x11370) { + if (code < 0x11347) { + if (code < 0x1133f) { + if (code < 0x1133e) { + // Mn [2] COMBINING BINDU BELOW..GRANTHA SIGN NUKTA + if (0x1133b <= code && code <= 0x1133c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc GRANTHA VOWEL SIGN AA + if (0x1133e === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x11340) { + // Mc GRANTHA VOWEL SIGN I + if (0x1133f === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x11341) { + // Mn GRANTHA VOWEL SIGN II + if (0x11340 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [4] GRANTHA VOWEL SIGN U..GRANTHA VOWEL SIGN VOCALIC RR + if (0x11341 <= code && code <= 0x11344) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x11357) { + if (code < 0x1134b) { + // Mc [2] GRANTHA VOWEL SIGN EE..GRANTHA VOWEL SIGN AI + if (0x11347 <= code && code <= 0x11348) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc [3] GRANTHA VOWEL SIGN OO..GRANTHA SIGN VIRAMA + if (0x1134b <= code && code <= 0x1134d) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x11362) { + // Mc GRANTHA AU LENGTH MARK + if (0x11357 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11366) { + // Mc [2] GRANTHA VOWEL SIGN VOCALIC L..GRANTHA VOWEL SIGN VOCALIC LL + if (0x11362 <= code && code <= 0x11363) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [7] COMBINING GRANTHA DIGIT ZERO..COMBINING GRANTHA DIGIT SIX + if (0x11366 <= code && code <= 0x1136c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x11445) { + if (code < 0x11438) { + if (code < 0x11435) { + // Mn [5] COMBINING GRANTHA LETTER A..COMBINING GRANTHA LETTER PA + if (0x11370 <= code && code <= 0x11374) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [3] NEWA VOWEL SIGN AA..NEWA VOWEL SIGN II + if (0x11435 <= code && code <= 0x11437) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x11440) { + // Mn [8] NEWA VOWEL SIGN U..NEWA VOWEL SIGN AI + if (0x11438 <= code && code <= 0x1143f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11442) { + // Mc [2] NEWA VOWEL SIGN O..NEWA VOWEL SIGN AU + if (0x11440 <= code && code <= 0x11441) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [3] NEWA SIGN VIRAMA..NEWA SIGN ANUSVARA + if (0x11442 <= code && code <= 0x11444) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x114b0) { + if (code < 0x11446) { + // Mc NEWA SIGN VISARGA + if (0x11445 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn NEWA SIGN NUKTA + if (0x11446 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mn NEWA SANDHI MARK + if (0x1145e === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x114b1) { + // Mc TIRHUTA VOWEL SIGN AA + if (0x114b0 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x114b3) { + // Mc [2] TIRHUTA VOWEL SIGN I..TIRHUTA VOWEL SIGN II + if (0x114b1 <= code && code <= 0x114b2) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [6] TIRHUTA VOWEL SIGN U..TIRHUTA VOWEL SIGN VOCALIC LL + if (0x114b3 <= code && code <= 0x114b8) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0x115b8) { + if (code < 0x114bf) { + if (code < 0x114bb) { + // Mc TIRHUTA VOWEL SIGN E + if (0x114b9 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn TIRHUTA VOWEL SIGN SHORT E + if (0x114ba === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x114bd) { + // Mc [2] TIRHUTA VOWEL SIGN AI..TIRHUTA VOWEL SIGN O + if (0x114bb <= code && code <= 0x114bc) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc TIRHUTA VOWEL SIGN SHORT O + if (0x114bd === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc TIRHUTA VOWEL SIGN AU + if (0x114be === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x115af) { + if (code < 0x114c1) { + // Mn [2] TIRHUTA SIGN CANDRABINDU..TIRHUTA SIGN ANUSVARA + if (0x114bf <= code && code <= 0x114c0) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x114c2) { + // Mc TIRHUTA SIGN VISARGA + if (0x114c1 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] TIRHUTA SIGN VIRAMA..TIRHUTA SIGN NUKTA + if (0x114c2 <= code && code <= 0x114c3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x115b0) { + // Mc SIDDHAM VOWEL SIGN AA + if (0x115af === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x115b2) { + // Mc [2] SIDDHAM VOWEL SIGN I..SIDDHAM VOWEL SIGN II + if (0x115b0 <= code && code <= 0x115b1) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] SIDDHAM VOWEL SIGN U..SIDDHAM VOWEL SIGN VOCALIC RR + if (0x115b2 <= code && code <= 0x115b5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x11630) { + if (code < 0x115be) { + if (code < 0x115bc) { + // Mc [4] SIDDHAM VOWEL SIGN E..SIDDHAM VOWEL SIGN AU + if (0x115b8 <= code && code <= 0x115bb) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] SIDDHAM SIGN CANDRABINDU..SIDDHAM SIGN ANUSVARA + if (0x115bc <= code && code <= 0x115bd) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x115bf) { + // Mc SIDDHAM SIGN VISARGA + if (0x115be === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x115dc) { + // Mn [2] SIDDHAM SIGN VIRAMA..SIDDHAM SIGN NUKTA + if (0x115bf <= code && code <= 0x115c0) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] SIDDHAM VOWEL SIGN ALTERNATE U..SIDDHAM VOWEL SIGN ALTERNATE UU + if (0x115dc <= code && code <= 0x115dd) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1163d) { + if (code < 0x11633) { + // Mc [3] MODI VOWEL SIGN AA..MODI VOWEL SIGN II + if (0x11630 <= code && code <= 0x11632) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x1163b) { + // Mn [8] MODI VOWEL SIGN U..MODI VOWEL SIGN AI + if (0x11633 <= code && code <= 0x1163a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] MODI VOWEL SIGN O..MODI VOWEL SIGN AU + if (0x1163b <= code && code <= 0x1163c) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x1163e) { + // Mn MODI SIGN ANUSVARA + if (0x1163d === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1163f) { + // Mc MODI SIGN VISARGA + if (0x1163e === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] MODI SIGN VIRAMA..MODI SIGN ARDHACANDRA + if (0x1163f <= code && code <= 0x11640) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + else { + if (code < 0x1193f) { + if (code < 0x11727) { + if (code < 0x116b6) { + if (code < 0x116ad) { + // Mn TAKRI SIGN ANUSVARA + if (0x116ab === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc TAKRI SIGN VISARGA + if (0x116ac === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x116ae) { + // Mn TAKRI VOWEL SIGN AA + if (0x116ad === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x116b0) { + // Mc [2] TAKRI VOWEL SIGN I..TAKRI VOWEL SIGN II + if (0x116ae <= code && code <= 0x116af) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [6] TAKRI VOWEL SIGN U..TAKRI VOWEL SIGN AU + if (0x116b0 <= code && code <= 0x116b5) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1171d) { + // Mc TAKRI SIGN VIRAMA + if (0x116b6 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn TAKRI SIGN NUKTA + if (0x116b7 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11722) { + // Mn [3] AHOM CONSONANT SIGN MEDIAL LA..AHOM CONSONANT SIGN MEDIAL LIGATING RA + if (0x1171d <= code && code <= 0x1171f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11726) { + // Mn [4] AHOM VOWEL SIGN I..AHOM VOWEL SIGN UU + if (0x11722 <= code && code <= 0x11725) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc AHOM VOWEL SIGN E + if (0x11726 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + else { + if (code < 0x11930) { + if (code < 0x1182f) { + if (code < 0x1182c) { + // Mn [5] AHOM VOWEL SIGN AW..AHOM SIGN KILLER + if (0x11727 <= code && code <= 0x1172b) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [3] DOGRA VOWEL SIGN AA..DOGRA VOWEL SIGN II + if (0x1182c <= code && code <= 0x1182e) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x11838) { + // Mn [9] DOGRA VOWEL SIGN U..DOGRA SIGN ANUSVARA + if (0x1182f <= code && code <= 0x11837) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11839) { + // Mc DOGRA SIGN VISARGA + if (0x11838 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] DOGRA SIGN VIRAMA..DOGRA SIGN NUKTA + if (0x11839 <= code && code <= 0x1183a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1193b) { + if (code < 0x11931) { + // Mc DIVES AKURU VOWEL SIGN AA + if (0x11930 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11937) { + // Mc [5] DIVES AKURU VOWEL SIGN I..DIVES AKURU VOWEL SIGN E + if (0x11931 <= code && code <= 0x11935) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc [2] DIVES AKURU VOWEL SIGN AI..DIVES AKURU VOWEL SIGN O + if (0x11937 <= code && code <= 0x11938) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x1193d) { + // Mn [2] DIVES AKURU SIGN ANUSVARA..DIVES AKURU SIGN CANDRABINDU + if (0x1193b <= code && code <= 0x1193c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc DIVES AKURU SIGN HALANTA + if (0x1193d === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn DIVES AKURU VIRAMA + if (0x1193e === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x11a01) { + if (code < 0x119d1) { + if (code < 0x11941) { + // Lo DIVES AKURU PREFIXED NASAL SIGN + if (0x1193f === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + // Mc DIVES AKURU MEDIAL YA + if (0x11940 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x11942) { + // Lo DIVES AKURU INITIAL RA + if (0x11941 === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + // Mc DIVES AKURU MEDIAL RA + if (0x11942 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn DIVES AKURU SIGN NUKTA + if (0x11943 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x119dc) { + if (code < 0x119d4) { + // Mc [3] NANDINAGARI VOWEL SIGN AA..NANDINAGARI VOWEL SIGN II + if (0x119d1 <= code && code <= 0x119d3) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x119da) { + // Mn [4] NANDINAGARI VOWEL SIGN U..NANDINAGARI VOWEL SIGN VOCALIC RR + if (0x119d4 <= code && code <= 0x119d7) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [2] NANDINAGARI VOWEL SIGN E..NANDINAGARI VOWEL SIGN AI + if (0x119da <= code && code <= 0x119db) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x119e0) { + // Mc [4] NANDINAGARI VOWEL SIGN O..NANDINAGARI SIGN VISARGA + if (0x119dc <= code && code <= 0x119df) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn NANDINAGARI SIGN VIRAMA + if (0x119e0 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc NANDINAGARI VOWEL SIGN PRISHTHAMATRA E + if (0x119e4 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x11a47) { + if (code < 0x11a39) { + if (code < 0x11a33) { + // Mn [10] ZANABAZAR SQUARE VOWEL SIGN I..ZANABAZAR SQUARE VOWEL LENGTH MARK + if (0x11a01 <= code && code <= 0x11a0a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [6] ZANABAZAR SQUARE FINAL CONSONANT MARK..ZANABAZAR SQUARE SIGN ANUSVARA + if (0x11a33 <= code && code <= 0x11a38) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x11a3a) { + // Mc ZANABAZAR SQUARE SIGN VISARGA + if (0x11a39 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x11a3b) { + // Lo ZANABAZAR SQUARE CLUSTER-INITIAL LETTER RA + if (0x11a3a === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + // Mn [4] ZANABAZAR SQUARE CLUSTER-FINAL LETTER YA..ZANABAZAR SQUARE CLUSTER-FINAL LETTER VA + if (0x11a3b <= code && code <= 0x11a3e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x11a59) { + if (code < 0x11a51) { + // Mn ZANABAZAR SQUARE SUBJOINER + if (0x11a47 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11a57) { + // Mn [6] SOYOMBO VOWEL SIGN I..SOYOMBO VOWEL SIGN OE + if (0x11a51 <= code && code <= 0x11a56) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] SOYOMBO VOWEL SIGN AI..SOYOMBO VOWEL SIGN AU + if (0x11a57 <= code && code <= 0x11a58) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + else { + if (code < 0x11a84) { + // Mn [3] SOYOMBO VOWEL SIGN VOCALIC R..SOYOMBO VOWEL LENGTH MARK + if (0x11a59 <= code && code <= 0x11a5b) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11a8a) { + // Lo [6] SOYOMBO SIGN JIHVAMULIYA..SOYOMBO CLUSTER-INITIAL LETTER SA + if (0x11a84 <= code && code <= 0x11a89) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + // Mn [13] SOYOMBO FINAL CONSONANT SIGN G..SOYOMBO SIGN ANUSVARA + if (0x11a8a <= code && code <= 0x11a96) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + } + else { + if (code < 0x16f51) { + if (code < 0x11d90) { + if (code < 0x11cb1) { + if (code < 0x11c3e) { + if (code < 0x11c2f) { + if (code < 0x11a98) { + // Mc SOYOMBO SIGN VISARGA + if (0x11a97 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] SOYOMBO GEMINATION MARK..SOYOMBO SUBJOINER + if (0x11a98 <= code && code <= 0x11a99) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x11c30) { + // Mc BHAIKSUKI VOWEL SIGN AA + if (0x11c2f === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x11c38) { + // Mn [7] BHAIKSUKI VOWEL SIGN I..BHAIKSUKI VOWEL SIGN VOCALIC L + if (0x11c30 <= code && code <= 0x11c36) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [6] BHAIKSUKI VOWEL SIGN E..BHAIKSUKI SIGN ANUSVARA + if (0x11c38 <= code && code <= 0x11c3d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x11c92) { + // Mc BHAIKSUKI SIGN VISARGA + if (0x11c3e === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn BHAIKSUKI SIGN VIRAMA + if (0x11c3f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11ca9) { + // Mn [22] MARCHEN SUBJOINED LETTER KA..MARCHEN SUBJOINED LETTER ZA + if (0x11c92 <= code && code <= 0x11ca7) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11caa) { + // Mc MARCHEN SUBJOINED LETTER YA + if (0x11ca9 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [7] MARCHEN SUBJOINED LETTER RA..MARCHEN VOWEL SIGN AA + if (0x11caa <= code && code <= 0x11cb0) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x11d3a) { + if (code < 0x11cb4) { + if (code < 0x11cb2) { + // Mc MARCHEN VOWEL SIGN I + if (0x11cb1 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] MARCHEN VOWEL SIGN U..MARCHEN VOWEL SIGN E + if (0x11cb2 <= code && code <= 0x11cb3) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x11cb5) { + // Mc MARCHEN VOWEL SIGN O + if (0x11cb4 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + if (code < 0x11d31) { + // Mn [2] MARCHEN SIGN ANUSVARA..MARCHEN SIGN CANDRABINDU + if (0x11cb5 <= code && code <= 0x11cb6) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [6] MASARAM GONDI VOWEL SIGN AA..MASARAM GONDI VOWEL SIGN VOCALIC R + if (0x11d31 <= code && code <= 0x11d36) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x11d46) { + if (code < 0x11d3c) { + // Mn MASARAM GONDI VOWEL SIGN E + if (0x11d3a === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11d3f) { + // Mn [2] MASARAM GONDI VOWEL SIGN AI..MASARAM GONDI VOWEL SIGN O + if (0x11d3c <= code && code <= 0x11d3d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [7] MASARAM GONDI VOWEL SIGN AU..MASARAM GONDI VIRAMA + if (0x11d3f <= code && code <= 0x11d45) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x11d47) { + // Lo MASARAM GONDI REPHA + if (0x11d46 === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + if (code < 0x11d8a) { + // Mn MASARAM GONDI RA-KARA + if (0x11d47 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [5] GUNJALA GONDI VOWEL SIGN AA..GUNJALA GONDI VOWEL SIGN UU + if (0x11d8a <= code && code <= 0x11d8e) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + } + else { + if (code < 0x11f36) { + if (code < 0x11ef3) { + if (code < 0x11d95) { + if (code < 0x11d93) { + // Mn [2] GUNJALA GONDI VOWEL SIGN EE..GUNJALA GONDI VOWEL SIGN AI + if (0x11d90 <= code && code <= 0x11d91) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] GUNJALA GONDI VOWEL SIGN OO..GUNJALA GONDI VOWEL SIGN AU + if (0x11d93 <= code && code <= 0x11d94) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x11d96) { + // Mn GUNJALA GONDI SIGN ANUSVARA + if (0x11d95 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc GUNJALA GONDI SIGN VISARGA + if (0x11d96 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn GUNJALA GONDI VIRAMA + if (0x11d97 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x11f02) { + if (code < 0x11ef5) { + // Mn [2] MAKASAR VOWEL SIGN I..MAKASAR VOWEL SIGN U + if (0x11ef3 <= code && code <= 0x11ef4) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x11f00) { + // Mc [2] MAKASAR VOWEL SIGN E..MAKASAR VOWEL SIGN O + if (0x11ef5 <= code && code <= 0x11ef6) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] KAWI SIGN CANDRABINDU..KAWI SIGN ANUSVARA + if (0x11f00 <= code && code <= 0x11f01) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x11f03) { + // Lo KAWI SIGN REPHA + if (0x11f02 === code) { + return boundaries_1.CLUSTER_BREAK.PREPEND; + } + } + else { + if (code < 0x11f34) { + // Mc KAWI SIGN VISARGA + if (0x11f03 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mc [2] KAWI VOWEL SIGN AA..KAWI VOWEL SIGN ALTERNATE AA + if (0x11f34 <= code && code <= 0x11f35) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + } + else { + if (code < 0x13430) { + if (code < 0x11f40) { + if (code < 0x11f3e) { + // Mn [5] KAWI VOWEL SIGN I..KAWI VOWEL SIGN VOCALIC R + if (0x11f36 <= code && code <= 0x11f3a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc [2] KAWI VOWEL SIGN E..KAWI VOWEL SIGN AI + if (0x11f3e <= code && code <= 0x11f3f) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x11f41) { + // Mn KAWI VOWEL SIGN EU + if (0x11f40 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc KAWI SIGN KILLER + if (0x11f41 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + // Mn KAWI CONJOINER + if (0x11f42 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x16af0) { + if (code < 0x13440) { + // Cf [16] EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE + if (0x13430 <= code && code <= 0x1343f) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + if (code < 0x13447) { + // Mn EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY + if (0x13440 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [15] EGYPTIAN HIEROGLYPH MODIFIER DAMAGED AT TOP START..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED + if (0x13447 <= code && code <= 0x13455) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x16b30) { + // Mn [5] BASSA VAH COMBINING HIGH TONE..BASSA VAH COMBINING HIGH-LOW TONE + if (0x16af0 <= code && code <= 0x16af4) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x16f4f) { + // Mn [7] PAHAWH HMONG MARK CIM TUB..PAHAWH HMONG MARK CIM TAUM + if (0x16b30 <= code && code <= 0x16b36) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn MIAO SIGN CONSONANT MODIFIER BAR + if (0x16f4f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + } + else { + if (code < 0x1da84) { + if (code < 0x1d167) { + if (code < 0x1bca0) { + if (code < 0x16fe4) { + if (code < 0x16f8f) { + // Mc [55] MIAO SIGN ASPIRATION..MIAO VOWEL SIGN UI + if (0x16f51 <= code && code <= 0x16f87) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [4] MIAO TONE RIGHT..MIAO TONE BELOW + if (0x16f8f <= code && code <= 0x16f92) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x16ff0) { + // Mn KHITAN SMALL SCRIPT FILLER + if (0x16fe4 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1bc9d) { + // Mc [2] VIETNAMESE ALTERNATE READING MARK CA..VIETNAMESE ALTERNATE READING MARK NHAY + if (0x16ff0 <= code && code <= 0x16ff1) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + else { + // Mn [2] DUPLOYAN THICK LETTER SELECTOR..DUPLOYAN DOUBLE MARK + if (0x1bc9d <= code && code <= 0x1bc9e) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1cf30) { + if (code < 0x1cf00) { + // Cf [4] SHORTHAND FORMAT LETTER OVERLAP..SHORTHAND FORMAT UP STEP + if (0x1bca0 <= code && code <= 0x1bca3) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Mn [46] ZNAMENNY COMBINING MARK GORAZDO NIZKO S KRYZHEM ON LEFT..ZNAMENNY COMBINING MARK KRYZH ON LEFT + if (0x1cf00 <= code && code <= 0x1cf2d) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1d165) { + // Mn [23] ZNAMENNY COMBINING TONAL RANGE MARK MRACHNO..ZNAMENNY PRIZNAK MODIFIER ROG + if (0x1cf30 <= code && code <= 0x1cf46) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc MUSICAL SYMBOL COMBINING STEM + if (0x1d165 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + // Mc MUSICAL SYMBOL COMBINING SPRECHGESANG STEM + if (0x1d166 === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + } + } + else { + if (code < 0x1d185) { + if (code < 0x1d16e) { + if (code < 0x1d16d) { + // Mn [3] MUSICAL SYMBOL COMBINING TREMOLO-1..MUSICAL SYMBOL COMBINING TREMOLO-3 + if (0x1d167 <= code && code <= 0x1d169) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mc MUSICAL SYMBOL COMBINING AUGMENTATION DOT + if (0x1d16d === code) { + return boundaries_1.CLUSTER_BREAK.SPACINGMARK; + } + } + } + else { + if (code < 0x1d173) { + // Mc [5] MUSICAL SYMBOL COMBINING FLAG-1..MUSICAL SYMBOL COMBINING FLAG-5 + if (0x1d16e <= code && code <= 0x1d172) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1d17b) { + // Cf [8] MUSICAL SYMBOL BEGIN BEAM..MUSICAL SYMBOL END PHRASE + if (0x1d173 <= code && code <= 0x1d17a) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Mn [8] MUSICAL SYMBOL COMBINING ACCENT..MUSICAL SYMBOL COMBINING LOURE + if (0x1d17b <= code && code <= 0x1d182) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1da00) { + if (code < 0x1d1aa) { + // Mn [7] MUSICAL SYMBOL COMBINING DOIT..MUSICAL SYMBOL COMBINING TRIPLE TONGUE + if (0x1d185 <= code && code <= 0x1d18b) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1d242) { + // Mn [4] MUSICAL SYMBOL COMBINING DOWN BOW..MUSICAL SYMBOL COMBINING SNAP PIZZICATO + if (0x1d1aa <= code && code <= 0x1d1ad) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [3] COMBINING GREEK MUSICAL TRISEME..COMBINING GREEK MUSICAL PENTASEME + if (0x1d242 <= code && code <= 0x1d244) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x1da3b) { + // Mn [55] SIGNWRITING HEAD RIM..SIGNWRITING AIR SUCKING IN + if (0x1da00 <= code && code <= 0x1da36) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1da75) { + // Mn [50] SIGNWRITING MOUTH CLOSED NEUTRAL..SIGNWRITING EXCITEMENT + if (0x1da3b <= code && code <= 0x1da6c) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn SIGNWRITING UPPER BODY TILTING FROM HIP JOINTS + if (0x1da75 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + } + else { + if (code < 0x1e2ec) { + if (code < 0x1e01b) { + if (code < 0x1daa1) { + if (code < 0x1da9b) { + // Mn SIGNWRITING LOCATION HEAD NECK + if (0x1da84 === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [5] SIGNWRITING FILL MODIFIER-2..SIGNWRITING FILL MODIFIER-6 + if (0x1da9b <= code && code <= 0x1da9f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1e000) { + // Mn [15] SIGNWRITING ROTATION MODIFIER-2..SIGNWRITING ROTATION MODIFIER-16 + if (0x1daa1 <= code && code <= 0x1daaf) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1e008) { + // Mn [7] COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE + if (0x1e000 <= code && code <= 0x1e006) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [17] COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU + if (0x1e008 <= code && code <= 0x1e018) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + else { + if (code < 0x1e08f) { + if (code < 0x1e023) { + // Mn [7] COMBINING GLAGOLITIC LETTER SHTA..COMBINING GLAGOLITIC LETTER YATI + if (0x1e01b <= code && code <= 0x1e021) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1e026) { + // Mn [2] COMBINING GLAGOLITIC LETTER YU..COMBINING GLAGOLITIC LETTER SMALL YUS + if (0x1e023 <= code && code <= 0x1e024) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [5] COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA + if (0x1e026 <= code && code <= 0x1e02a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0x1e130) { + // Mn COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + if (0x1e08f === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1e2ae) { + // Mn [7] NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG TONE-D + if (0x1e130 <= code && code <= 0x1e136) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn TOTO SIGN RISING TONE + if (0x1e2ae === code) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + } + } + else { + if (code < 0x1f3fb) { + if (code < 0x1e8d0) { + if (code < 0x1e4ec) { + // Mn [4] WANCHO TONE TUP..WANCHO TONE KOINI + if (0x1e2ec <= code && code <= 0x1e2ef) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Mn [4] NAG MUNDARI SIGN MUHOR..NAG MUNDARI SIGN SUTUH + if (0x1e4ec <= code && code <= 0x1e4ef) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + else { + if (code < 0x1e944) { + // Mn [7] MENDE KIKAKUI COMBINING NUMBER TEENS..MENDE KIKAKUI COMBINING NUMBER MILLIONS + if (0x1e8d0 <= code && code <= 0x1e8d6) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0x1f1e6) { + // Mn [7] ADLAM ALIF LENGTHENER..ADLAM NUKTA + if (0x1e944 <= code && code <= 0x1e94a) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // So [26] REGIONAL INDICATOR SYMBOL LETTER A..REGIONAL INDICATOR SYMBOL LETTER Z + if (0x1f1e6 <= code && code <= 0x1f1ff) { + return boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR; + } + } + } + } + } + else { + if (code < 0xe0080) { + if (code < 0xe0000) { + // Sk [5] EMOJI MODIFIER FITZPATRICK TYPE-1-2..EMOJI MODIFIER FITZPATRICK TYPE-6 + if (0x1f3fb <= code && code <= 0x1f3ff) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + if (code < 0xe0020) { + // Cn + // Cf LANGUAGE TAG + // Cn [30] .. + if (0xe0000 <= code && code <= 0xe001f) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + // Cf [96] TAG SPACE..CANCEL TAG + if (0xe0020 <= code && code <= 0xe007f) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + } + } + else { + if (code < 0xe0100) { + // Cn [128] .. + if (0xe0080 <= code && code <= 0xe00ff) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + else { + if (code < 0xe01f0) { + // Mn [240] VARIATION SELECTOR-17..VARIATION SELECTOR-256 + if (0xe0100 <= code && code <= 0xe01ef) { + return boundaries_1.CLUSTER_BREAK.EXTEND; + } + } + else { + // Cn [3600] .. + if (0xe01f0 <= code && code <= 0xe0fff) { + return boundaries_1.CLUSTER_BREAK.CONTROL; + } + } + } + } + } + } + } + } + } + } + } + } + // unlisted code points are treated as a break property of "Other" + return boundaries_1.CLUSTER_BREAK.OTHER; + } + /** + * Given a Unicode code point, returns if symbol is an extended pictographic or some other break + * @param code {number} Unicode code point + * @returns {number} + */ + static getEmojiProperty(code) { + // emoji property taken from: + // https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt + // and generated by + // node ./scripts/generate-emoji-extended-pictographic.js + if (code < 0x27b0) { + if (code < 0x2600) { + if (code < 0x2328) { + if (code < 0x2122) { + if (code < 0x203c) { + // E0.6 [1] (©️) copyright + if (0xa9 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (®️) registered + if (0xae === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (‼️) double exclamation mark + if (0x203c === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (⁉️) exclamation question mark + if (0x2049 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x2194) { + // E0.6 [1] (™️) trade mark + if (0x2122 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (ℹ️) information + if (0x2139 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x21a9) { + // E0.6 [6] (↔️..↙️) left-right arrow..down-left arrow + if (0x2194 <= code && code <= 0x2199) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x231a) { + // E0.6 [2] (↩️..↪️) right arrow curving left..left arrow curving right + if (0x21a9 <= code && code <= 0x21aa) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [2] (⌚..⌛) watch..hourglass done + if (0x231a <= code && code <= 0x231b) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + } + else { + if (code < 0x24c2) { + if (code < 0x23cf) { + // E1.0 [1] (⌨️) keyboard + if (0x2328 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.0 [1] (⎈) HELM SYMBOL + if (0x2388 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x23e9) { + // E1.0 [1] (⏏️) eject button + if (0x23cf === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x23f8) { + // E0.6 [4] (⏩..⏬) fast-forward button..fast down button + // E0.7 [2] (⏭️..⏮️) next track button..last track button + // E1.0 [1] (⏯️) play or pause button + // E0.6 [1] (⏰) alarm clock + // E1.0 [2] (⏱️..⏲️) stopwatch..timer clock + // E0.6 [1] (⏳) hourglass not done + if (0x23e9 <= code && code <= 0x23f3) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.7 [3] (⏸️..⏺️) pause button..record button + if (0x23f8 <= code && code <= 0x23fa) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x25b6) { + if (code < 0x25aa) { + // E0.6 [1] (Ⓜ️) circled M + if (0x24c2 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [2] (▪️..▫️) black small square..white small square + if (0x25aa <= code && code <= 0x25ab) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x25c0) { + // E0.6 [1] (▶️) play button + if (0x25b6 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x25fb) { + // E0.6 [1] (◀️) reverse button + if (0x25c0 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [4] (◻️..◾) white medium square..black medium-small square + if (0x25fb <= code && code <= 0x25fe) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + } + } + else { + if (code < 0x2733) { + if (code < 0x2714) { + if (code < 0x2614) { + if (code < 0x2607) { + // E0.6 [2] (☀️..☁️) sun..cloud + // E0.7 [2] (☂️..☃️) umbrella..snowman + // E1.0 [1] (☄️) comet + // E0.0 [1] (★) BLACK STAR + if (0x2600 <= code && code <= 0x2605) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [7] (☇..☍) LIGHTNING..OPPOSITION + // E0.6 [1] (☎️) telephone + // E0.0 [2] (☏..☐) WHITE TELEPHONE..BALLOT BOX + // E0.6 [1] (☑️) check box with check + // E0.0 [1] (☒) BALLOT BOX WITH X + if (0x2607 <= code && code <= 0x2612) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x2690) { + // E0.6 [2] (☔..☕) umbrella with rain drops..hot beverage + // E0.0 [2] (☖..☗) WHITE SHOGI PIECE..BLACK SHOGI PIECE + // E1.0 [1] (☘️) shamrock + // E0.0 [4] (☙..☜) REVERSED ROTATED FLORAL HEART BULLET..WHITE LEFT POINTING INDEX + // E0.6 [1] (☝️) index pointing up + // E0.0 [2] (☞..☟) WHITE RIGHT POINTING INDEX..WHITE DOWN POINTING INDEX + // E1.0 [1] (☠️) skull and crossbones + // E0.0 [1] (☡) CAUTION SIGN + // E1.0 [2] (☢️..☣️) radioactive..biohazard + // E0.0 [2] (☤..☥) CADUCEUS..ANKH + // E1.0 [1] (☦️) orthodox cross + // E0.0 [3] (☧..☩) CHI RHO..CROSS OF JERUSALEM + // E0.7 [1] (☪️) star and crescent + // E0.0 [3] (☫..☭) FARSI SYMBOL..HAMMER AND SICKLE + // E1.0 [1] (☮️) peace symbol + // E0.7 [1] (☯️) yin yang + // E0.0 [8] (☰..☷) TRIGRAM FOR HEAVEN..TRIGRAM FOR EARTH + // E0.7 [2] (☸️..☹️) wheel of dharma..frowning face + // E0.6 [1] (☺️) smiling face + // E0.0 [5] (☻..☿) BLACK SMILING FACE..MERCURY + // E4.0 [1] (♀️) female sign + // E0.0 [1] (♁) EARTH + // E4.0 [1] (♂️) male sign + // E0.0 [5] (♃..♇) JUPITER..PLUTO + // E0.6 [12] (♈..♓) Aries..Pisces + // E0.0 [11] (♔..♞) WHITE CHESS KING..BLACK CHESS KNIGHT + // E11.0 [1] (♟️) chess pawn + // E0.6 [1] (♠️) spade suit + // E0.0 [2] (♡..♢) WHITE HEART SUIT..WHITE DIAMOND SUIT + // E0.6 [1] (♣️) club suit + // E0.0 [1] (♤) WHITE SPADE SUIT + // E0.6 [2] (♥️..♦️) heart suit..diamond suit + // E0.0 [1] (♧) WHITE CLUB SUIT + // E0.6 [1] (♨️) hot springs + // E0.0 [18] (♩..♺) QUARTER NOTE..RECYCLING SYMBOL FOR GENERIC MATERIALS + // E0.6 [1] (♻️) recycling symbol + // E0.0 [2] (♼..♽) RECYCLED PAPER SYMBOL..PARTIALLY-RECYCLED PAPER SYMBOL + // E11.0 [1] (♾️) infinity + // E0.6 [1] (♿) wheelchair symbol + // E0.0 [6] (⚀..⚅) DIE FACE-1..DIE FACE-6 + if (0x2614 <= code && code <= 0x2685) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x2708) { + // E0.0 [2] (⚐..⚑) WHITE FLAG..BLACK FLAG + // E1.0 [1] (⚒️) hammer and pick + // E0.6 [1] (⚓) anchor + // E1.0 [1] (⚔️) crossed swords + // E4.0 [1] (⚕️) medical symbol + // E1.0 [2] (⚖️..⚗️) balance scale..alembic + // E0.0 [1] (⚘) FLOWER + // E1.0 [1] (⚙️) gear + // E0.0 [1] (⚚) STAFF OF HERMES + // E1.0 [2] (⚛️..⚜️) atom symbol..fleur-de-lis + // E0.0 [3] (⚝..⚟) OUTLINED WHITE STAR..THREE LINES CONVERGING LEFT + // E0.6 [2] (⚠️..⚡) warning..high voltage + // E0.0 [5] (⚢..⚦) DOUBLED FEMALE SIGN..MALE WITH STROKE SIGN + // E13.0 [1] (⚧️) transgender symbol + // E0.0 [2] (⚨..⚩) VERTICAL MALE WITH STROKE SIGN..HORIZONTAL MALE WITH STROKE SIGN + // E0.6 [2] (⚪..⚫) white circle..black circle + // E0.0 [4] (⚬..⚯) MEDIUM SMALL WHITE CIRCLE..UNMARRIED PARTNERSHIP SYMBOL + // E1.0 [2] (⚰️..⚱️) coffin..funeral urn + // E0.0 [11] (⚲..⚼) NEUTER..SESQUIQUADRATE + // E0.6 [2] (⚽..⚾) soccer ball..baseball + // E0.0 [5] (⚿..⛃) SQUARED KEY..BLACK DRAUGHTS KING + // E0.6 [2] (⛄..⛅) snowman without snow..sun behind cloud + // E0.0 [2] (⛆..⛇) RAIN..BLACK SNOWMAN + // E0.7 [1] (⛈️) cloud with lightning and rain + // E0.0 [5] (⛉..⛍) TURNED WHITE SHOGI PIECE..DISABLED CAR + // E0.6 [1] (⛎) Ophiuchus + // E0.7 [1] (⛏️) pick + // E0.0 [1] (⛐) CAR SLIDING + // E0.7 [1] (⛑️) rescue worker’s helmet + // E0.0 [1] (⛒) CIRCLED CROSSING LANES + // E0.7 [1] (⛓️) chains + // E0.6 [1] (⛔) no entry + // E0.0 [20] (⛕..⛨) ALTERNATE ONE-WAY LEFT WAY TRAFFIC..BLACK CROSS ON SHIELD + // E0.7 [1] (⛩️) shinto shrine + // E0.6 [1] (⛪) church + // E0.0 [5] (⛫..⛯) CASTLE..MAP SYMBOL FOR LIGHTHOUSE + // E0.7 [2] (⛰️..⛱️) mountain..umbrella on ground + // E0.6 [2] (⛲..⛳) fountain..flag in hole + // E0.7 [1] (⛴️) ferry + // E0.6 [1] (⛵) sailboat + // E0.0 [1] (⛶) SQUARE FOUR CORNERS + // E0.7 [3] (⛷️..⛹️) skier..person bouncing ball + // E0.6 [1] (⛺) tent + // E0.0 [2] (⛻..⛼) JAPANESE BANK SYMBOL..HEADSTONE GRAVEYARD SYMBOL + // E0.6 [1] (⛽) fuel pump + // E0.0 [4] (⛾..✁) CUP ON BLACK SQUARE..UPPER BLADE SCISSORS + // E0.6 [1] (✂️) scissors + // E0.0 [2] (✃..✄) LOWER BLADE SCISSORS..WHITE SCISSORS + // E0.6 [1] (✅) check mark button + if (0x2690 <= code && code <= 0x2705) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [5] (✈️..✌️) airplane..victory hand + // E0.7 [1] (✍️) writing hand + // E0.0 [1] (✎) LOWER RIGHT PENCIL + // E0.6 [1] (✏️) pencil + // E0.0 [2] (✐..✑) UPPER RIGHT PENCIL..WHITE NIB + // E0.6 [1] (✒️) black nib + if (0x2708 <= code && code <= 0x2712) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x271d) { + // E0.6 [1] (✔️) check mark + if (0x2714 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (✖️) multiply + if (0x2716 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x2721) { + // E0.7 [1] (✝️) latin cross + if (0x271d === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.7 [1] (✡️) star of David + if (0x2721 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (✨) sparkles + if (0x2728 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x2753) { + if (code < 0x2747) { + if (code < 0x2744) { + // E0.6 [2] (✳️..✴️) eight-spoked asterisk..eight-pointed star + if (0x2733 <= code && code <= 0x2734) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (❄️) snowflake + if (0x2744 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x274c) { + // E0.6 [1] (❇️) sparkle + if (0x2747 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (❌) cross mark + if (0x274c === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (❎) cross mark button + if (0x274e === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + else { + if (code < 0x2763) { + if (code < 0x2757) { + // E0.6 [3] (❓..❕) red question mark..white exclamation mark + if (0x2753 <= code && code <= 0x2755) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (❗) red exclamation mark + if (0x2757 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x2795) { + // E1.0 [1] (❣️) heart exclamation + // E0.6 [1] (❤️) red heart + // E0.0 [3] (❥..❧) ROTATED HEAVY BLACK HEART BULLET..ROTATED FLORAL HEART BULLET + if (0x2763 <= code && code <= 0x2767) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x27a1) { + // E0.6 [3] (➕..➗) plus..divide + if (0x2795 <= code && code <= 0x2797) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (➡️) right arrow + if (0x27a1 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + } + } + } + else { + if (code < 0x1f201) { + if (code < 0x3297) { + if (code < 0x2b1b) { + if (code < 0x2934) { + // E0.6 [1] (➰) curly loop + if (0x27b0 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E1.0 [1] (➿) double curly loop + if (0x27bf === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x2b05) { + // E0.6 [2] (⤴️..⤵️) right arrow curving up..right arrow curving down + if (0x2934 <= code && code <= 0x2935) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [3] (⬅️..⬇️) left arrow..down arrow + if (0x2b05 <= code && code <= 0x2b07) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + else { + if (code < 0x2b55) { + if (code < 0x2b50) { + // E0.6 [2] (⬛..⬜) black large square..white large square + if (0x2b1b <= code && code <= 0x2b1c) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (⭐) star + if (0x2b50 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x3030) { + // E0.6 [1] (⭕) hollow red circle + if (0x2b55 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (〰️) wavy dash + if (0x3030 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (〽️) part alternation mark + if (0x303d === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x1f16c) { + if (code < 0x1f000) { + // E0.6 [1] (㊗️) Japanese “congratulations” button + if (0x3297 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + // E0.6 [1] (㊙️) Japanese “secret” button + if (0x3299 === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1f10d) { + // E0.0 [4] (🀀..🀃) MAHJONG TILE EAST WIND..MAHJONG TILE NORTH WIND + // E0.6 [1] (🀄) mahjong red dragon + // E0.0 [202] (🀅..🃎) MAHJONG TILE GREEN DRAGON..PLAYING CARD KING OF DIAMONDS + // E0.6 [1] (🃏) joker + // E0.0 [48] (🃐..🃿) .. + if (0x1f000 <= code && code <= 0x1f0ff) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1f12f) { + // E0.0 [3] (🄍..🄏) CIRCLED ZERO WITH SLASH..CIRCLED DOLLAR SIGN WITH OVERLAID BACKSLASH + if (0x1f10d <= code && code <= 0x1f10f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [1] (🄯) COPYLEFT SYMBOL + if (0x1f12f === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x1f18e) { + if (code < 0x1f17e) { + // E0.0 [4] (🅬..🅯) RAISED MR SIGN..CIRCLED HUMAN FIGURE + // E0.6 [2] (🅰️..🅱️) A button (blood type)..B button (blood type) + if (0x1f16c <= code && code <= 0x1f171) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [2] (🅾️..🅿️) O button (blood type)..P button + if (0x1f17e <= code && code <= 0x1f17f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x1f191) { + // E0.6 [1] (🆎) AB button (blood type) + if (0x1f18e === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1f1ad) { + // E0.6 [10] (🆑..🆚) CL button..VS button + if (0x1f191 <= code && code <= 0x1f19a) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [57] (🆭..🇥) MASK WORK SYMBOL.. + if (0x1f1ad <= code && code <= 0x1f1e5) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + } + } + else { + if (code < 0x1f7d5) { + if (code < 0x1f249) { + if (code < 0x1f22f) { + if (code < 0x1f21a) { + // E0.6 [2] (🈁..🈂️) Japanese “here” button..Japanese “service charge” button + // E0.0 [13] (🈃..🈏) .. + if (0x1f201 <= code && code <= 0x1f20f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.6 [1] (🈚) Japanese “free of charge” button + if (0x1f21a === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x1f232) { + // E0.6 [1] (🈯) Japanese “reserved” button + if (0x1f22f === code) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1f23c) { + // E0.6 [9] (🈲..🈺) Japanese “prohibited” button..Japanese “open for business” button + if (0x1f232 <= code && code <= 0x1f23a) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [4] (🈼..🈿) .. + if (0x1f23c <= code && code <= 0x1f23f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x1f546) { + if (code < 0x1f400) { + // E0.0 [7] (🉉..🉏) .. + // E0.6 [2] (🉐..🉑) Japanese “bargain” button..Japanese “acceptable” button + // E0.0 [174] (🉒..🋿) .. + // E0.6 [13] (🌀..🌌) cyclone..milky way + // E0.7 [2] (🌍..🌎) globe showing Europe-Africa..globe showing Americas + // E0.6 [1] (🌏) globe showing Asia-Australia + // E1.0 [1] (🌐) globe with meridians + // E0.6 [1] (🌑) new moon + // E1.0 [1] (🌒) waxing crescent moon + // E0.6 [3] (🌓..🌕) first quarter moon..full moon + // E1.0 [3] (🌖..🌘) waning gibbous moon..waning crescent moon + // E0.6 [1] (🌙) crescent moon + // E1.0 [1] (🌚) new moon face + // E0.6 [1] (🌛) first quarter moon face + // E0.7 [1] (🌜) last quarter moon face + // E1.0 [2] (🌝..🌞) full moon face..sun with face + // E0.6 [2] (🌟..🌠) glowing star..shooting star + // E0.7 [1] (🌡️) thermometer + // E0.0 [2] (🌢..🌣) BLACK DROPLET..WHITE SUN + // E0.7 [9] (🌤️..🌬️) sun behind small cloud..wind face + // E1.0 [3] (🌭..🌯) hot dog..burrito + // E0.6 [2] (🌰..🌱) chestnut..seedling + // E1.0 [2] (🌲..🌳) evergreen tree..deciduous tree + // E0.6 [2] (🌴..🌵) palm tree..cactus + // E0.7 [1] (🌶️) hot pepper + // E0.6 [20] (🌷..🍊) tulip..tangerine + // E1.0 [1] (🍋) lemon + // E0.6 [4] (🍌..🍏) banana..green apple + // E1.0 [1] (🍐) pear + // E0.6 [43] (🍑..🍻) peach..clinking beer mugs + // E1.0 [1] (🍼) baby bottle + // E0.7 [1] (🍽️) fork and knife with plate + // E1.0 [2] (🍾..🍿) bottle with popping cork..popcorn + // E0.6 [20] (🎀..🎓) ribbon..graduation cap + // E0.0 [2] (🎔..🎕) HEART WITH TIP ON THE LEFT..BOUQUET OF FLOWERS + // E0.7 [2] (🎖️..🎗️) military medal..reminder ribbon + // E0.0 [1] (🎘) MUSICAL KEYBOARD WITH JACKS + // E0.7 [3] (🎙️..🎛️) studio microphone..control knobs + // E0.0 [2] (🎜..🎝) BEAMED ASCENDING MUSICAL NOTES..BEAMED DESCENDING MUSICAL NOTES + // E0.7 [2] (🎞️..🎟️) film frames..admission tickets + // E0.6 [37] (🎠..🏄) carousel horse..person surfing + // E1.0 [1] (🏅) sports medal + // E0.6 [1] (🏆) trophy + // E1.0 [1] (🏇) horse racing + // E0.6 [1] (🏈) american football + // E1.0 [1] (🏉) rugby football + // E0.6 [1] (🏊) person swimming + // E0.7 [4] (🏋️..🏎️) person lifting weights..racing car + // E1.0 [5] (🏏..🏓) cricket game..ping pong + // E0.7 [12] (🏔️..🏟️) snow-capped mountain..stadium + // E0.6 [4] (🏠..🏣) house..Japanese post office + // E1.0 [1] (🏤) post office + // E0.6 [12] (🏥..🏰) hospital..castle + // E0.0 [2] (🏱..🏲) WHITE PENNANT..BLACK PENNANT + // E0.7 [1] (🏳️) white flag + // E1.0 [1] (🏴) black flag + // E0.7 [1] (🏵️) rosette + // E0.0 [1] (🏶) BLACK ROSETTE + // E0.7 [1] (🏷️) label + // E1.0 [3] (🏸..🏺) badminton..amphora + if (0x1f249 <= code && code <= 0x1f3fa) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E1.0 [8] (🐀..🐇) rat..rabbit + // E0.7 [1] (🐈) cat + // E1.0 [3] (🐉..🐋) dragon..whale + // E0.6 [3] (🐌..🐎) snail..horse + // E1.0 [2] (🐏..🐐) ram..goat + // E0.6 [2] (🐑..🐒) ewe..monkey + // E1.0 [1] (🐓) rooster + // E0.6 [1] (🐔) chicken + // E0.7 [1] (🐕) dog + // E1.0 [1] (🐖) pig + // E0.6 [19] (🐗..🐩) boar..poodle + // E1.0 [1] (🐪) camel + // E0.6 [20] (🐫..🐾) two-hump camel..paw prints + // E0.7 [1] (🐿️) chipmunk + // E0.6 [1] (👀) eyes + // E0.7 [1] (👁️) eye + // E0.6 [35] (👂..👤) ear..bust in silhouette + // E1.0 [1] (👥) busts in silhouette + // E0.6 [6] (👦..👫) boy..woman and man holding hands + // E1.0 [2] (👬..👭) men holding hands..women holding hands + // E0.6 [63] (👮..💬) police officer..speech balloon + // E1.0 [1] (💭) thought balloon + // E0.6 [8] (💮..💵) white flower..dollar banknote + // E1.0 [2] (💶..💷) euro banknote..pound banknote + // E0.6 [52] (💸..📫) money with wings..closed mailbox with raised flag + // E0.7 [2] (📬..📭) open mailbox with raised flag..open mailbox with lowered flag + // E0.6 [1] (📮) postbox + // E1.0 [1] (📯) postal horn + // E0.6 [5] (📰..📴) newspaper..mobile phone off + // E1.0 [1] (📵) no mobile phones + // E0.6 [2] (📶..📷) antenna bars..camera + // E1.0 [1] (📸) camera with flash + // E0.6 [4] (📹..📼) video camera..videocassette + // E0.7 [1] (📽️) film projector + // E0.0 [1] (📾) PORTABLE STEREO + // E1.0 [4] (📿..🔂) prayer beads..repeat single button + // E0.6 [1] (🔃) clockwise vertical arrows + // E1.0 [4] (🔄..🔇) counterclockwise arrows button..muted speaker + // E0.7 [1] (🔈) speaker low volume + // E1.0 [1] (🔉) speaker medium volume + // E0.6 [11] (🔊..🔔) speaker high volume..bell + // E1.0 [1] (🔕) bell with slash + // E0.6 [22] (🔖..🔫) bookmark..water pistol + // E1.0 [2] (🔬..🔭) microscope..telescope + // E0.6 [16] (🔮..🔽) crystal ball..downwards button + if (0x1f400 <= code && code <= 0x1f53d) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x1f680) { + // E0.0 [3] (🕆..🕈) WHITE LATIN CROSS..CELTIC CROSS + // E0.7 [2] (🕉️..🕊️) om..dove + // E1.0 [4] (🕋..🕎) kaaba..menorah + // E0.0 [1] (🕏) BOWL OF HYGIEIA + // E0.6 [12] (🕐..🕛) one o’clock..twelve o’clock + // E0.7 [12] (🕜..🕧) one-thirty..twelve-thirty + // E0.0 [7] (🕨..🕮) RIGHT SPEAKER..BOOK + // E0.7 [2] (🕯️..🕰️) candle..mantelpiece clock + // E0.0 [2] (🕱..🕲) BLACK SKULL AND CROSSBONES..NO PIRACY + // E0.7 [7] (🕳️..🕹️) hole..joystick + // E3.0 [1] (🕺) man dancing + // E0.0 [12] (🕻..🖆) LEFT HAND TELEPHONE RECEIVER..PEN OVER STAMPED ENVELOPE + // E0.7 [1] (🖇️) linked paperclips + // E0.0 [2] (🖈..🖉) BLACK PUSHPIN..LOWER LEFT PENCIL + // E0.7 [4] (🖊️..🖍️) pen..crayon + // E0.0 [2] (🖎..🖏) LEFT WRITING HAND..TURNED OK HAND SIGN + // E0.7 [1] (🖐️) hand with fingers splayed + // E0.0 [4] (🖑..🖔) REVERSED RAISED HAND WITH FINGERS SPLAYED..REVERSED VICTORY HAND + // E1.0 [2] (🖕..🖖) middle finger..vulcan salute + // E0.0 [13] (🖗..🖣) WHITE DOWN POINTING LEFT HAND INDEX..BLACK DOWN POINTING BACKHAND INDEX + // E3.0 [1] (🖤) black heart + // E0.7 [1] (🖥️) desktop computer + // E0.0 [2] (🖦..🖧) KEYBOARD AND MOUSE..THREE NETWORKED COMPUTERS + // E0.7 [1] (🖨️) printer + // E0.0 [8] (🖩..🖰) POCKET CALCULATOR..TWO BUTTON MOUSE + // E0.7 [2] (🖱️..🖲️) computer mouse..trackball + // E0.0 [9] (🖳..🖻) OLD PERSONAL COMPUTER..DOCUMENT WITH PICTURE + // E0.7 [1] (🖼️) framed picture + // E0.0 [5] (🖽..🗁) FRAME WITH TILES..OPEN FOLDER + // E0.7 [3] (🗂️..🗄️) card index dividers..file cabinet + // E0.0 [12] (🗅..🗐) EMPTY NOTE..PAGES + // E0.7 [3] (🗑️..🗓️) wastebasket..spiral calendar + // E0.0 [8] (🗔..🗛) DESKTOP WINDOW..DECREASE FONT SIZE SYMBOL + // E0.7 [3] (🗜️..🗞️) clamp..rolled-up newspaper + // E0.0 [2] (🗟..🗠) PAGE WITH CIRCLED TEXT..STOCK CHART + // E0.7 [1] (🗡️) dagger + // E0.0 [1] (🗢) LIPS + // E0.7 [1] (🗣️) speaking head + // E0.0 [4] (🗤..🗧) THREE RAYS ABOVE..THREE RAYS RIGHT + // E2.0 [1] (🗨️) left speech bubble + // E0.0 [6] (🗩..🗮) RIGHT SPEECH BUBBLE..LEFT ANGER BUBBLE + // E0.7 [1] (🗯️) right anger bubble + // E0.0 [3] (🗰..🗲) MOOD BUBBLE..LIGHTNING MOOD + // E0.7 [1] (🗳️) ballot box with ballot + // E0.0 [6] (🗴..🗹) BALLOT SCRIPT X..BALLOT BOX WITH BOLD CHECK + // E0.7 [1] (🗺️) world map + // E0.6 [5] (🗻..🗿) mount fuji..moai + // E1.0 [1] (😀) grinning face + // E0.6 [6] (😁..😆) beaming face with smiling eyes..grinning squinting face + // E1.0 [2] (😇..😈) smiling face with halo..smiling face with horns + // E0.6 [5] (😉..😍) winking face..smiling face with heart-eyes + // E1.0 [1] (😎) smiling face with sunglasses + // E0.6 [1] (😏) smirking face + // E0.7 [1] (😐) neutral face + // E1.0 [1] (😑) expressionless face + // E0.6 [3] (😒..😔) unamused face..pensive face + // E1.0 [1] (😕) confused face + // E0.6 [1] (😖) confounded face + // E1.0 [1] (😗) kissing face + // E0.6 [1] (😘) face blowing a kiss + // E1.0 [1] (😙) kissing face with smiling eyes + // E0.6 [1] (😚) kissing face with closed eyes + // E1.0 [1] (😛) face with tongue + // E0.6 [3] (😜..😞) winking face with tongue..disappointed face + // E1.0 [1] (😟) worried face + // E0.6 [6] (😠..😥) angry face..sad but relieved face + // E1.0 [2] (😦..😧) frowning face with open mouth..anguished face + // E0.6 [4] (😨..😫) fearful face..tired face + // E1.0 [1] (😬) grimacing face + // E0.6 [1] (😭) loudly crying face + // E1.0 [2] (😮..😯) face with open mouth..hushed face + // E0.6 [4] (😰..😳) anxious face with sweat..flushed face + // E1.0 [1] (😴) sleeping face + // E0.6 [1] (😵) face with crossed-out eyes + // E1.0 [1] (😶) face without mouth + // E0.6 [10] (😷..🙀) face with medical mask..weary cat + // E1.0 [4] (🙁..🙄) slightly frowning face..face with rolling eyes + // E0.6 [11] (🙅..🙏) person gesturing NO..folded hands + if (0x1f546 <= code && code <= 0x1f64f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1f774) { + // E0.6 [1] (🚀) rocket + // E1.0 [2] (🚁..🚂) helicopter..locomotive + // E0.6 [3] (🚃..🚅) railway car..bullet train + // E1.0 [1] (🚆) train + // E0.6 [1] (🚇) metro + // E1.0 [1] (🚈) light rail + // E0.6 [1] (🚉) station + // E1.0 [2] (🚊..🚋) tram..tram car + // E0.6 [1] (🚌) bus + // E0.7 [1] (🚍) oncoming bus + // E1.0 [1] (🚎) trolleybus + // E0.6 [1] (🚏) bus stop + // E1.0 [1] (🚐) minibus + // E0.6 [3] (🚑..🚓) ambulance..police car + // E0.7 [1] (🚔) oncoming police car + // E0.6 [1] (🚕) taxi + // E1.0 [1] (🚖) oncoming taxi + // E0.6 [1] (🚗) automobile + // E0.7 [1] (🚘) oncoming automobile + // E0.6 [2] (🚙..🚚) sport utility vehicle..delivery truck + // E1.0 [7] (🚛..🚡) articulated lorry..aerial tramway + // E0.6 [1] (🚢) ship + // E1.0 [1] (🚣) person rowing boat + // E0.6 [2] (🚤..🚥) speedboat..horizontal traffic light + // E1.0 [1] (🚦) vertical traffic light + // E0.6 [7] (🚧..🚭) construction..no smoking + // E1.0 [4] (🚮..🚱) litter in bin sign..non-potable water + // E0.6 [1] (🚲) bicycle + // E1.0 [3] (🚳..🚵) no bicycles..person mountain biking + // E0.6 [1] (🚶) person walking + // E1.0 [2] (🚷..🚸) no pedestrians..children crossing + // E0.6 [6] (🚹..🚾) men’s room..water closet + // E1.0 [1] (🚿) shower + // E0.6 [1] (🛀) person taking bath + // E1.0 [5] (🛁..🛅) bathtub..left luggage + // E0.0 [5] (🛆..🛊) TRIANGLE WITH ROUNDED CORNERS..GIRLS SYMBOL + // E0.7 [1] (🛋️) couch and lamp + // E1.0 [1] (🛌) person in bed + // E0.7 [3] (🛍️..🛏️) shopping bags..bed + // E1.0 [1] (🛐) place of worship + // E3.0 [2] (🛑..🛒) stop sign..shopping cart + // E0.0 [2] (🛓..🛔) STUPA..PAGODA + // E12.0 [1] (🛕) hindu temple + // E13.0 [2] (🛖..🛗) hut..elevator + // E0.0 [4] (🛘..🛛) .. + // E15.0 [1] (🛜) wireless + // E14.0 [3] (🛝..🛟) playground slide..ring buoy + // E0.7 [6] (🛠️..🛥️) hammer and wrench..motor boat + // E0.0 [3] (🛦..🛨) UP-POINTING MILITARY AIRPLANE..UP-POINTING SMALL AIRPLANE + // E0.7 [1] (🛩️) small airplane + // E0.0 [1] (🛪) NORTHEAST-POINTING AIRPLANE + // E1.0 [2] (🛫..🛬) airplane departure..airplane arrival + // E0.0 [3] (🛭..🛯) .. + // E0.7 [1] (🛰️) satellite + // E0.0 [2] (🛱..🛲) ONCOMING FIRE ENGINE..DIESEL LOCOMOTIVE + // E0.7 [1] (🛳️) passenger ship + // E3.0 [3] (🛴..🛶) kick scooter..canoe + // E5.0 [2] (🛷..🛸) sled..flying saucer + // E11.0 [1] (🛹) skateboard + // E12.0 [1] (🛺) auto rickshaw + // E13.0 [2] (🛻..🛼) pickup truck..roller skate + // E0.0 [3] (🛽..🛿) .. + if (0x1f680 <= code && code <= 0x1f6ff) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [12] (🝴..🝿) LOT OF FORTUNE..ORCUS + if (0x1f774 <= code && code <= 0x1f77f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + } + else { + if (code < 0x1f8ae) { + if (code < 0x1f848) { + if (code < 0x1f80c) { + // E0.0 [11] (🟕..🟟) CIRCLED TRIANGLE.. + // E12.0 [12] (🟠..🟫) orange circle..brown square + // E0.0 [4] (🟬..🟯) .. + // E14.0 [1] (🟰) heavy equals sign + // E0.0 [15] (🟱..🟿) .. + if (0x1f7d5 <= code && code <= 0x1f7ff) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [4] (🠌..🠏) .. + if (0x1f80c <= code && code <= 0x1f80f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x1f85a) { + // E0.0 [8] (🡈..🡏) .. + if (0x1f848 <= code && code <= 0x1f84f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1f888) { + // E0.0 [6] (🡚..🡟) .. + if (0x1f85a <= code && code <= 0x1f85f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0 [8] (🢈..🢏) .. + if (0x1f888 <= code && code <= 0x1f88f) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + else { + if (code < 0x1f93c) { + if (code < 0x1f90c) { + // E0.0 [82] (🢮..🣿) .. + if (0x1f8ae <= code && code <= 0x1f8ff) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E13.0 [1] (🤌) pinched fingers + // E12.0 [3] (🤍..🤏) white heart..pinching hand + // E1.0 [9] (🤐..🤘) zipper-mouth face..sign of the horns + // E3.0 [6] (🤙..🤞) call me hand..crossed fingers + // E5.0 [1] (🤟) love-you gesture + // E3.0 [8] (🤠..🤧) cowboy hat face..sneezing face + // E5.0 [8] (🤨..🤯) face with raised eyebrow..exploding head + // E3.0 [1] (🤰) pregnant woman + // E5.0 [2] (🤱..🤲) breast-feeding..palms up together + // E3.0 [8] (🤳..🤺) selfie..person fencing + if (0x1f90c <= code && code <= 0x1f93a) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + else { + if (code < 0x1f947) { + // E3.0 [3] (🤼..🤾) people wrestling..person playing handball + // E12.0 [1] (🤿) diving mask + // E3.0 [6] (🥀..🥅) wilted flower..goal net + if (0x1f93c <= code && code <= 0x1f945) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + if (code < 0x1fc00) { + // E3.0 [5] (🥇..🥋) 1st place medal..martial arts uniform + // E5.0 [1] (🥌) curling stone + // E11.0 [3] (🥍..🥏) lacrosse..flying disc + // E3.0 [15] (🥐..🥞) croissant..pancakes + // E5.0 [13] (🥟..🥫) dumpling..canned food + // E11.0 [5] (🥬..🥰) leafy green..smiling face with hearts + // E12.0 [1] (🥱) yawning face + // E13.0 [1] (🥲) smiling face with tear + // E11.0 [4] (🥳..🥶) partying face..cold face + // E13.0 [2] (🥷..🥸) ninja..disguised face + // E14.0 [1] (🥹) face holding back tears + // E11.0 [1] (🥺) pleading face + // E12.0 [1] (🥻) sari + // E11.0 [4] (🥼..🥿) lab coat..flat shoe + // E1.0 [5] (🦀..🦄) crab..unicorn + // E3.0 [13] (🦅..🦑) eagle..squid + // E5.0 [6] (🦒..🦗) giraffe..cricket + // E11.0 [11] (🦘..🦢) kangaroo..swan + // E13.0 [2] (🦣..🦤) mammoth..dodo + // E12.0 [6] (🦥..🦪) sloth..oyster + // E13.0 [3] (🦫..🦭) beaver..seal + // E12.0 [2] (🦮..🦯) guide dog..white cane + // E11.0 [10] (🦰..🦹) red hair..supervillain + // E12.0 [6] (🦺..🦿) safety vest..mechanical leg + // E1.0 [1] (🧀) cheese wedge + // E11.0 [2] (🧁..🧂) cupcake..salt + // E12.0 [8] (🧃..🧊) beverage box..ice + // E13.0 [1] (🧋) bubble tea + // E14.0 [1] (🧌) troll + // E12.0 [3] (🧍..🧏) person standing..deaf person + // E5.0 [23] (🧐..🧦) face with monocle..socks + // E11.0 [25] (🧧..🧿) red envelope..nazar amulet + // E0.0 [112] (🨀..🩯) NEUTRAL CHESS KING.. + // E12.0 [4] (🩰..🩳) ballet shoes..shorts + // E13.0 [1] (🩴) thong sandal + // E15.0 [3] (🩵..🩷) light blue heart..pink heart + // E12.0 [3] (🩸..🩺) drop of blood..stethoscope + // E14.0 [2] (🩻..🩼) x-ray..crutch + // E0.0 [3] (🩽..🩿) .. + // E12.0 [3] (🪀..🪂) yo-yo..parachute + // E13.0 [4] (🪃..🪆) boomerang..nesting dolls + // E15.0 [2] (🪇..🪈) maracas..flute + // E0.0 [7] (🪉..🪏) .. + // E12.0 [6] (🪐..🪕) ringed planet..banjo + // E13.0 [19] (🪖..🪨) military helmet..rock + // E14.0 [4] (🪩..🪬) mirror ball..hamsa + // E15.0 [3] (🪭..🪯) folding hand fan..khanda + // E13.0 [7] (🪰..🪶) fly..feather + // E14.0 [4] (🪷..🪺) lotus..nest with eggs + // E15.0 [3] (🪻..🪽) hyacinth..wing + // E0.0 [1] (🪾) + // E15.0 [1] (🪿) goose + // E13.0 [3] (🫀..🫂) anatomical heart..people hugging + // E14.0 [3] (🫃..🫅) pregnant man..person with crown + // E0.0 [8] (🫆..🫍) .. + // E15.0 [2] (🫎..🫏) moose..donkey + // E13.0 [7] (🫐..🫖) blueberries..teapot + // E14.0 [3] (🫗..🫙) pouring liquid..jar + // E15.0 [2] (🫚..🫛) ginger root..pea pod + // E0.0 [4] (🫜..🫟) .. + // E14.0 [8] (🫠..🫧) melting face..bubbles + // E15.0 [1] (🫨) shaking face + // E0.0 [7] (🫩..🫯) .. + // E14.0 [7] (🫰..🫶) hand with index finger and thumb crossed..heart hands + // E15.0 [2] (🫷..🫸) leftwards pushing hand..rightwards pushing hand + // E0.0 [7] (🫹..🫿) .. + if (0x1f947 <= code && code <= 0x1faff) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + else { + // E0.0[1022] (🰀..🿽) .. + if (0x1fc00 <= code && code <= 0x1fffd) { + return boundaries_1.EXTENDED_PICTOGRAPHIC; + } + } + } + } + } + } + } + } + // unlisted code points are treated as a break property of "Other" + return boundaries_1.CLUSTER_BREAK.OTHER; + } +} +exports.default = Graphemer; diff --git a/node_modules/graphemer/lib/GraphemerHelper.d.ts b/node_modules/graphemer/lib/GraphemerHelper.d.ts new file mode 100644 index 000000000..64f6c35cb --- /dev/null +++ b/node_modules/graphemer/lib/GraphemerHelper.d.ts @@ -0,0 +1,32 @@ +declare class GraphemerHelper { + /** + * Check if the the character at the position {pos} of the string is surrogate + * @param str {string} + * @param pos {number} + * @returns {boolean} + */ + static isSurrogate(str: string, pos: number): boolean; + /** + * The String.prototype.codePointAt polyfill + * Private function, gets a Unicode code point from a JavaScript UTF-16 string + * handling surrogate pairs appropriately + * @param str {string} + * @param idx {number} + * @returns {number} + */ + static codePointAt(str: string, idx: number): number; + /** + * Private function, returns whether a break is allowed between the two given grapheme breaking classes + * Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters + * @param start {number} + * @param mid {Array} + * @param end {number} + * @param startEmoji {number} + * @param midEmoji {Array} + * @param endEmoji {number} + * @returns {number} + */ + static shouldBreak(start: number, mid: number[], end: number, startEmoji: number, midEmoji: number[], endEmoji: number): number; +} +export default GraphemerHelper; +//# sourceMappingURL=GraphemerHelper.d.ts.map \ No newline at end of file diff --git a/node_modules/graphemer/lib/GraphemerHelper.d.ts.map b/node_modules/graphemer/lib/GraphemerHelper.d.ts.map new file mode 100644 index 000000000..369421a1f --- /dev/null +++ b/node_modules/graphemer/lib/GraphemerHelper.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GraphemerHelper.d.ts","sourceRoot":"","sources":["../src/GraphemerHelper.ts"],"names":[],"mappings":"AAUA,cAAM,eAAe;IACnB;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IASrD;;;;;;;OAOG;IACH,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAgCpD;;;;;;;;;;OAUG;IACH,MAAM,CAAC,WAAW,CAChB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EAAE,EACb,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,GACf,MAAM;CAyHV;AAED,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/node_modules/graphemer/lib/GraphemerHelper.js b/node_modules/graphemer/lib/GraphemerHelper.js new file mode 100644 index 000000000..9bc71ebd9 --- /dev/null +++ b/node_modules/graphemer/lib/GraphemerHelper.js @@ -0,0 +1,169 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const boundaries_1 = require("./boundaries"); +// BreakTypes +// @type {BreakType} +const NotBreak = 0; +const BreakStart = 1; +const Break = 2; +const BreakLastRegional = 3; +const BreakPenultimateRegional = 4; +class GraphemerHelper { + /** + * Check if the the character at the position {pos} of the string is surrogate + * @param str {string} + * @param pos {number} + * @returns {boolean} + */ + static isSurrogate(str, pos) { + return (0xd800 <= str.charCodeAt(pos) && + str.charCodeAt(pos) <= 0xdbff && + 0xdc00 <= str.charCodeAt(pos + 1) && + str.charCodeAt(pos + 1) <= 0xdfff); + } + /** + * The String.prototype.codePointAt polyfill + * Private function, gets a Unicode code point from a JavaScript UTF-16 string + * handling surrogate pairs appropriately + * @param str {string} + * @param idx {number} + * @returns {number} + */ + static codePointAt(str, idx) { + if (idx === undefined) { + idx = 0; + } + const code = str.charCodeAt(idx); + // if a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < str.length - 1) { + const hi = code; + const low = str.charCodeAt(idx + 1); + if (0xdc00 <= low && low <= 0xdfff) { + return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000; + } + return hi; + } + // if a low surrogate + if (0xdc00 <= code && code <= 0xdfff && idx >= 1) { + const hi = str.charCodeAt(idx - 1); + const low = code; + if (0xd800 <= hi && hi <= 0xdbff) { + return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000; + } + return low; + } + // just return the char if an unmatched surrogate half or a + // single-char codepoint + return code; + } + // + /** + * Private function, returns whether a break is allowed between the two given grapheme breaking classes + * Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters + * @param start {number} + * @param mid {Array} + * @param end {number} + * @param startEmoji {number} + * @param midEmoji {Array} + * @param endEmoji {number} + * @returns {number} + */ + static shouldBreak(start, mid, end, startEmoji, midEmoji, endEmoji) { + const all = [start].concat(mid).concat([end]); + const allEmoji = [startEmoji].concat(midEmoji).concat([endEmoji]); + const previous = all[all.length - 2]; + const next = end; + const nextEmoji = endEmoji; + // Lookahead terminator for: + // GB12. ^ (RI RI)* RI ? RI + // GB13. [^RI] (RI RI)* RI ? RI + const rIIndex = all.lastIndexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR); + if (rIIndex > 0 && + all.slice(1, rIIndex).every(function (c) { + return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR; + }) && + [boundaries_1.CLUSTER_BREAK.PREPEND, boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(previous) === -1) { + if (all.filter(function (c) { + return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR; + }).length % + 2 === + 1) { + return BreakLastRegional; + } + else { + return BreakPenultimateRegional; + } + } + // GB3. CR × LF + if (previous === boundaries_1.CLUSTER_BREAK.CR && next === boundaries_1.CLUSTER_BREAK.LF) { + return NotBreak; + } + // GB4. (Control|CR|LF) ÷ + else if (previous === boundaries_1.CLUSTER_BREAK.CONTROL || + previous === boundaries_1.CLUSTER_BREAK.CR || + previous === boundaries_1.CLUSTER_BREAK.LF) { + return BreakStart; + } + // GB5. ÷ (Control|CR|LF) + else if (next === boundaries_1.CLUSTER_BREAK.CONTROL || + next === boundaries_1.CLUSTER_BREAK.CR || + next === boundaries_1.CLUSTER_BREAK.LF) { + return BreakStart; + } + // GB6. L × (L|V|LV|LVT) + else if (previous === boundaries_1.CLUSTER_BREAK.L && + (next === boundaries_1.CLUSTER_BREAK.L || + next === boundaries_1.CLUSTER_BREAK.V || + next === boundaries_1.CLUSTER_BREAK.LV || + next === boundaries_1.CLUSTER_BREAK.LVT)) { + return NotBreak; + } + // GB7. (LV|V) × (V|T) + else if ((previous === boundaries_1.CLUSTER_BREAK.LV || previous === boundaries_1.CLUSTER_BREAK.V) && + (next === boundaries_1.CLUSTER_BREAK.V || next === boundaries_1.CLUSTER_BREAK.T)) { + return NotBreak; + } + // GB8. (LVT|T) × (T) + else if ((previous === boundaries_1.CLUSTER_BREAK.LVT || previous === boundaries_1.CLUSTER_BREAK.T) && + next === boundaries_1.CLUSTER_BREAK.T) { + return NotBreak; + } + // GB9. × (Extend|ZWJ) + else if (next === boundaries_1.CLUSTER_BREAK.EXTEND || next === boundaries_1.CLUSTER_BREAK.ZWJ) { + return NotBreak; + } + // GB9a. × SpacingMark + else if (next === boundaries_1.CLUSTER_BREAK.SPACINGMARK) { + return NotBreak; + } + // GB9b. Prepend × + else if (previous === boundaries_1.CLUSTER_BREAK.PREPEND) { + return NotBreak; + } + // GB11. \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic} + const previousNonExtendIndex = allEmoji + .slice(0, -1) + .lastIndexOf(boundaries_1.EXTENDED_PICTOGRAPHIC); + if (previousNonExtendIndex !== -1 && + allEmoji[previousNonExtendIndex] === boundaries_1.EXTENDED_PICTOGRAPHIC && + all.slice(previousNonExtendIndex + 1, -2).every(function (c) { + return c === boundaries_1.CLUSTER_BREAK.EXTEND; + }) && + previous === boundaries_1.CLUSTER_BREAK.ZWJ && + nextEmoji === boundaries_1.EXTENDED_PICTOGRAPHIC) { + return NotBreak; + } + // GB12. ^ (RI RI)* RI × RI + // GB13. [^RI] (RI RI)* RI × RI + if (mid.indexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) !== -1) { + return Break; + } + if (previous === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR && + next === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) { + return NotBreak; + } + // GB999. Any ? Any + return BreakStart; + } +} +exports.default = GraphemerHelper; diff --git a/node_modules/graphemer/lib/GraphemerIterator.d.ts b/node_modules/graphemer/lib/GraphemerIterator.d.ts new file mode 100644 index 000000000..4c52d91f0 --- /dev/null +++ b/node_modules/graphemer/lib/GraphemerIterator.d.ts @@ -0,0 +1,22 @@ +/** + * GraphemerIterator + * + * Takes a string and a "BreakHandler" method during initialisation + * and creates an iterable object that returns individual graphemes. + * + * @param str {string} + * @return GraphemerIterator + */ +declare class GraphemerIterator implements Iterator { + private _index; + private _str; + private _nextBreak; + constructor(str: string, nextBreak: (str: string, index: number) => number); + [Symbol.iterator](): this; + next(): { + value: string; + done: boolean; + }; +} +export default GraphemerIterator; +//# sourceMappingURL=GraphemerIterator.d.ts.map \ No newline at end of file diff --git a/node_modules/graphemer/lib/GraphemerIterator.d.ts.map b/node_modules/graphemer/lib/GraphemerIterator.d.ts.map new file mode 100644 index 000000000..c65f0eecb --- /dev/null +++ b/node_modules/graphemer/lib/GraphemerIterator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"GraphemerIterator.d.ts","sourceRoot":"","sources":["../src/GraphemerIterator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAM,iBAAkB,YAAW,QAAQ,CAAC,MAAM,CAAC;IACjD,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,UAAU,CAAyC;gBAE/C,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM;IAK1E,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB,IAAI;;;;CAcL;AAED,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/node_modules/graphemer/lib/GraphemerIterator.js b/node_modules/graphemer/lib/GraphemerIterator.js new file mode 100644 index 000000000..dd21ce54d --- /dev/null +++ b/node_modules/graphemer/lib/GraphemerIterator.js @@ -0,0 +1,36 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * GraphemerIterator + * + * Takes a string and a "BreakHandler" method during initialisation + * and creates an iterable object that returns individual graphemes. + * + * @param str {string} + * @return GraphemerIterator + */ +class GraphemerIterator { + constructor(str, nextBreak) { + this._index = 0; + this._str = str; + this._nextBreak = nextBreak; + } + [Symbol.iterator]() { + return this; + } + next() { + let brk; + if ((brk = this._nextBreak(this._str, this._index)) < this._str.length) { + const value = this._str.slice(this._index, brk); + this._index = brk; + return { value: value, done: false }; + } + if (this._index < this._str.length) { + const value = this._str.slice(this._index); + this._index = this._str.length; + return { value: value, done: false }; + } + return { value: undefined, done: true }; + } +} +exports.default = GraphemerIterator; diff --git a/node_modules/graphemer/lib/boundaries.d.ts b/node_modules/graphemer/lib/boundaries.d.ts new file mode 100644 index 000000000..330aed10c --- /dev/null +++ b/node_modules/graphemer/lib/boundaries.d.ts @@ -0,0 +1,35 @@ +/** + * The Grapheme_Cluster_Break property value + * @see https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table + */ +export declare enum CLUSTER_BREAK { + CR = 0, + LF = 1, + CONTROL = 2, + EXTEND = 3, + REGIONAL_INDICATOR = 4, + SPACINGMARK = 5, + L = 6, + V = 7, + T = 8, + LV = 9, + LVT = 10, + OTHER = 11, + PREPEND = 12, + E_BASE = 13, + E_MODIFIER = 14, + ZWJ = 15, + GLUE_AFTER_ZWJ = 16, + E_BASE_GAZ = 17 +} +/** + * The Emoji character property is an extension of UCD but shares the same namespace and structure + * @see http://www.unicode.org/reports/tr51/tr51-14.html#Emoji_Properties_and_Data_Files + * + * Here we model Extended_Pictograhpic only to implement UAX #29 GB11 + * \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic} + * + * The Emoji character property should not be mixed with Grapheme_Cluster_Break since they are not exclusive + */ +export declare const EXTENDED_PICTOGRAPHIC = 101; +//# sourceMappingURL=boundaries.d.ts.map \ No newline at end of file diff --git a/node_modules/graphemer/lib/boundaries.d.ts.map b/node_modules/graphemer/lib/boundaries.d.ts.map new file mode 100644 index 000000000..5bc59bae2 --- /dev/null +++ b/node_modules/graphemer/lib/boundaries.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"boundaries.d.ts","sourceRoot":"","sources":["../src/boundaries.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,aAAa;IACvB,EAAE,IAAI;IACN,EAAE,IAAI;IACN,OAAO,IAAI;IACX,MAAM,IAAI;IACV,kBAAkB,IAAI;IACtB,WAAW,IAAI;IACf,CAAC,IAAI;IACL,CAAC,IAAI;IACL,CAAC,IAAI;IACL,EAAE,IAAI;IACN,GAAG,KAAK;IACR,KAAK,KAAK;IACV,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,UAAU,KAAK;IACf,GAAG,KAAK;IACR,cAAc,KAAK;IACnB,UAAU,KAAK;CAChB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/graphemer/lib/boundaries.js b/node_modules/graphemer/lib/boundaries.js new file mode 100644 index 000000000..2c98c1456 --- /dev/null +++ b/node_modules/graphemer/lib/boundaries.js @@ -0,0 +1,38 @@ +"use strict"; +/** + * The Grapheme_Cluster_Break property value + * @see https://www.unicode.org/reports/tr29/#Default_Grapheme_Cluster_Table + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EXTENDED_PICTOGRAPHIC = exports.CLUSTER_BREAK = void 0; +var CLUSTER_BREAK; +(function (CLUSTER_BREAK) { + CLUSTER_BREAK[CLUSTER_BREAK["CR"] = 0] = "CR"; + CLUSTER_BREAK[CLUSTER_BREAK["LF"] = 1] = "LF"; + CLUSTER_BREAK[CLUSTER_BREAK["CONTROL"] = 2] = "CONTROL"; + CLUSTER_BREAK[CLUSTER_BREAK["EXTEND"] = 3] = "EXTEND"; + CLUSTER_BREAK[CLUSTER_BREAK["REGIONAL_INDICATOR"] = 4] = "REGIONAL_INDICATOR"; + CLUSTER_BREAK[CLUSTER_BREAK["SPACINGMARK"] = 5] = "SPACINGMARK"; + CLUSTER_BREAK[CLUSTER_BREAK["L"] = 6] = "L"; + CLUSTER_BREAK[CLUSTER_BREAK["V"] = 7] = "V"; + CLUSTER_BREAK[CLUSTER_BREAK["T"] = 8] = "T"; + CLUSTER_BREAK[CLUSTER_BREAK["LV"] = 9] = "LV"; + CLUSTER_BREAK[CLUSTER_BREAK["LVT"] = 10] = "LVT"; + CLUSTER_BREAK[CLUSTER_BREAK["OTHER"] = 11] = "OTHER"; + CLUSTER_BREAK[CLUSTER_BREAK["PREPEND"] = 12] = "PREPEND"; + CLUSTER_BREAK[CLUSTER_BREAK["E_BASE"] = 13] = "E_BASE"; + CLUSTER_BREAK[CLUSTER_BREAK["E_MODIFIER"] = 14] = "E_MODIFIER"; + CLUSTER_BREAK[CLUSTER_BREAK["ZWJ"] = 15] = "ZWJ"; + CLUSTER_BREAK[CLUSTER_BREAK["GLUE_AFTER_ZWJ"] = 16] = "GLUE_AFTER_ZWJ"; + CLUSTER_BREAK[CLUSTER_BREAK["E_BASE_GAZ"] = 17] = "E_BASE_GAZ"; +})(CLUSTER_BREAK = exports.CLUSTER_BREAK || (exports.CLUSTER_BREAK = {})); +/** + * The Emoji character property is an extension of UCD but shares the same namespace and structure + * @see http://www.unicode.org/reports/tr51/tr51-14.html#Emoji_Properties_and_Data_Files + * + * Here we model Extended_Pictograhpic only to implement UAX #29 GB11 + * \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic} + * + * The Emoji character property should not be mixed with Grapheme_Cluster_Break since they are not exclusive + */ +exports.EXTENDED_PICTOGRAPHIC = 101; diff --git a/node_modules/graphemer/lib/index.d.ts b/node_modules/graphemer/lib/index.d.ts new file mode 100644 index 000000000..c7c39af11 --- /dev/null +++ b/node_modules/graphemer/lib/index.d.ts @@ -0,0 +1,3 @@ +import Graphemer from './Graphemer'; +export default Graphemer; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/graphemer/lib/index.d.ts.map b/node_modules/graphemer/lib/index.d.ts.map new file mode 100644 index 000000000..a6bacf990 --- /dev/null +++ b/node_modules/graphemer/lib/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/node_modules/graphemer/lib/index.js b/node_modules/graphemer/lib/index.js new file mode 100644 index 000000000..548bdd017 --- /dev/null +++ b/node_modules/graphemer/lib/index.js @@ -0,0 +1,7 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const Graphemer_1 = __importDefault(require("./Graphemer")); +exports.default = Graphemer_1.default; diff --git a/node_modules/graphemer/package.json b/node_modules/graphemer/package.json new file mode 100644 index 000000000..cf0315ddc --- /dev/null +++ b/node_modules/graphemer/package.json @@ -0,0 +1,54 @@ +{ + "name": "graphemer", + "version": "1.4.0", + "description": "A JavaScript library that breaks strings into their individual user-perceived characters (including emojis!)", + "homepage": "https://github.com/flmnt/graphemer", + "author": "Matt Davies (https://github.com/mattpauldavies)", + "contributors": [ + "Orlin Georgiev (https://github.com/orling)", + "Huáng Jùnliàng (https://github.com/JLHwung)" + ], + "main": "./lib/index.js", + "types": "./lib/index.d.ts", + "files": [ + "lib" + ], + "license": "MIT", + "keywords": [ + "utf-8", + "strings", + "emoji", + "split" + ], + "scripts": { + "prepublishOnly": "npm run build", + "build": "tsc --project tsconfig.json", + "pretest": "npm run build", + "test": "ts-node node_modules/tape/bin/tape tests/**.ts", + "prettier:check": "prettier --check .", + "prettier:fix": "prettier --write ." + }, + "repository": { + "type": "git", + "url": "https://github.com/flmnt/graphemer.git" + }, + "bugs": "https://github.com/flmnt/graphemer/issues", + "devDependencies": { + "@types/tape": "^4.13.0", + "husky": "^4.3.0", + "lint-staged": "^10.3.0", + "prettier": "^2.1.1", + "tape": "^4.6.3", + "ts-node": "^9.0.0", + "typescript": "^4.0.2" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged", + "pre-push": "npm test" + } + }, + "lint-staged": { + "*.{js,ts,md,json}": "prettier --write" + } +} diff --git a/node_modules/has-symbols/.eslintignore b/node_modules/has-symbols/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/has-symbols/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc deleted file mode 100644 index 2d9a66a8a..000000000 --- a/node_modules/has-symbols/.eslintrc +++ /dev/null @@ -1,11 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-statements-per-line": [2, { "max": 2 }], - "no-magic-numbers": 0, - "multiline-comment-style": 0, - } -} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml deleted file mode 100644 index 04cf87e66..000000000 --- a/node_modules/has-symbols/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/has-symbols -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc deleted file mode 100644 index 1826526e0..000000000 --- a/node_modules/has-symbols/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md deleted file mode 100644 index 852ca0420..000000000 --- a/node_modules/has-symbols/CHANGELOG.md +++ /dev/null @@ -1,58 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 - -### Fixed - -- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) - -### Commits - -- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) -- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) -- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) -- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) -- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) -- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) -- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) -- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) -- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) -- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) -- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) - -## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 - -### Commits - -- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) -- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) -- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) -- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) -- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) -- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) -- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) - -## v1.0.0 - 2016-09-19 - -### Commits - -- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) -- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) -- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) -- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) -- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE deleted file mode 100644 index df31cbf3c..000000000 --- a/node_modules/has-symbols/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jordan Harband - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md deleted file mode 100644 index 3875d7e58..000000000 --- a/node_modules/has-symbols/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# has-symbols [![Version Badge][2]][1] - -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Determine if the JS environment has Symbol support. Supports spec, or shams. - -## Example - -```js -var hasSymbols = require('has-symbols'); - -hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. - -var hasSymbolsKinda = require('has-symbols/shams'); -hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. -``` - -## Supported Symbol shams - - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) - - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/has-symbols -[2]: https://versionbadg.es/inspect-js/has-symbols.svg -[5]: https://david-dm.org/inspect-js/has-symbols.svg -[6]: https://david-dm.org/inspect-js/has-symbols -[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg -[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies -[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true -[license-image]: https://img.shields.io/npm/l/has-symbols.svg -[license-url]: LICENSE -[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg -[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js deleted file mode 100644 index 17044fa21..000000000 --- a/node_modules/has-symbols/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; - -var origSymbol = typeof Symbol !== 'undefined' && Symbol; -var hasSymbolSham = require('./shams'); - -module.exports = function hasNativeSymbols() { - if (typeof origSymbol !== 'function') { return false; } - if (typeof Symbol !== 'function') { return false; } - if (typeof origSymbol('foo') !== 'symbol') { return false; } - if (typeof Symbol('bar') !== 'symbol') { return false; } - - return hasSymbolSham(); -}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json deleted file mode 100644 index 2ac891fa7..000000000 --- a/node_modules/has-symbols/package.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "_from": "has-symbols@^1.0.1", - "_id": "has-symbols@1.0.2", - "_inBundle": false, - "_integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "_location": "/has-symbols", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "has-symbols@^1.0.1", - "name": "has-symbols", - "escapedName": "has-symbols", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/get-intrinsic" - ], - "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "_shasum": "165d3070c00309752a1236a479331e3ac56f1423", - "_spec": "has-symbols@^1.0.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/get-intrinsic", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "bugs": { - "url": "https://github.com/inspect-js/has-symbols/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "deprecated": false, - "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", - "devDependencies": { - "@ljharb/eslint-config": "^17.5.1", - "aud": "^1.1.4", - "auto-changelog": "^2.2.1", - "core-js": "^2.6.12", - "eslint": "^7.20.0", - "get-own-property-symbols": "^0.9.5", - "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.2.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "greenkeeper": { - "ignore": [ - "core-js" - ] - }, - "homepage": "https://github.com/inspect-js/has-symbols#readme", - "keywords": [ - "Symbol", - "symbols", - "typeof", - "sham", - "polyfill", - "native", - "core-js", - "ES6" - ], - "license": "MIT", - "main": "index.js", - "name": "has-symbols", - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/has-symbols.git" - }, - "scripts": { - "lint": "eslint --ext=js,mjs .", - "posttest": "aud --production", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run --silent lint", - "test": "npm run tests-only", - "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", - "test:shams:corejs": "nyc node test/shams/core-js.js", - "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", - "test:staging": "nyc node --harmony --es-staging test", - "test:stock": "nyc node test", - "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.2" -} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js deleted file mode 100644 index 1285210ef..000000000 --- a/node_modules/has-symbols/shams.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/* eslint complexity: [2, 18], max-statements: [2, 33] */ -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - // temp disabled per https://github.com/ljharb/object.assign/issues/17 - // if (sym instanceof Symbol) { return false; } - // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - // if (!(symObj instanceof Symbol)) { return false; } - - // if (typeof Symbol.prototype.toString !== 'function') { return false; } - // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js deleted file mode 100644 index 352129ca3..000000000 --- a/node_modules/has-symbols/test/index.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -var test = require('tape'); -var hasSymbols = require('../'); -var runSymbolTests = require('./tests'); - -test('interface', function (t) { - t.equal(typeof hasSymbols, 'function', 'is a function'); - t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); - t.end(); -}); - -test('Symbols are supported', { skip: !hasSymbols() }, function (t) { - runSymbolTests(t); - t.end(); -}); - -test('Symbols are not supported', { skip: hasSymbols() }, function (t) { - t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); - t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js deleted file mode 100644 index df5365c23..000000000 --- a/node_modules/has-symbols/test/shams/core-js.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - require('core-js/fn/symbol'); - require('core-js/fn/symbol/to-string-tag'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js deleted file mode 100644 index 9191b248b..000000000 --- a/node_modules/has-symbols/test/shams/get-own-property-symbols.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict'; - -var test = require('tape'); - -if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { - test('has native Symbol support', function (t) { - t.equal(typeof Symbol, 'function'); - t.equal(typeof Symbol(), 'symbol'); - t.end(); - }); - return; -} - -var hasSymbols = require('../../shams'); - -test('polyfilled Symbols', function (t) { - /* eslint-disable global-require */ - t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); - - require('get-own-property-symbols'); - - require('../tests')(t); - - var hasSymbolsAfter = hasSymbols(); - t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); - /* eslint-enable global-require */ - t.end(); -}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js deleted file mode 100644 index 89edd1291..000000000 --- a/node_modules/has-symbols/test/tests.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict'; - -// eslint-disable-next-line consistent-return -module.exports = function runSymbolTests(t) { - t.equal(typeof Symbol, 'function', 'global Symbol is a function'); - - if (typeof Symbol !== 'function') { return false; } - - t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); - - /* - t.equal( - Symbol.prototype.toString.call(Symbol('foo')), - Symbol.prototype.toString.call(Symbol('foo')), - 'two symbols with the same description stringify the same' - ); - */ - - /* - var foo = Symbol('foo'); - - t.notEqual( - String(foo), - String(Symbol('bar')), - 'two symbols with different descriptions do not stringify the same' - ); - */ - - t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); - // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); - - t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - t.notEqual(typeof sym, 'string', 'Symbol is not a string'); - t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); - - var symVal = 42; - obj[sym] = symVal; - // eslint-disable-next-line no-restricted-syntax - for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } - - t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); - t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); - t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); - t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); - t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { - configurable: true, - enumerable: true, - value: 42, - writable: true - }, 'property descriptor is correct'); -}; diff --git a/node_modules/ignore/CHANGELOG.md b/node_modules/ignore/CHANGELOG.md deleted file mode 100644 index 2b250132c..000000000 --- a/node_modules/ignore/CHANGELOG.md +++ /dev/null @@ -1,19 +0,0 @@ -# `node-ignore` 4 ChangeLog - -# 4.x - -## 2018-06-22, Version 4.0.0 - -- **SEMVER-MAJOR**: Drop support for node < 6 by default. -- **FEATURE**: supports the missing character ranges and sets, such as `*.[a-z]` and `*.[jJ][pP][gG]` -- **FEATURE**: new option: `ignorecase` to make `ignore` case sensitive. -- **FEATURE**: supports question mark which matches a single character. -- **PATCH**: fixes typescript declaration. - -## ~ 2018-08-09, Version 4.0.1 - 4.0.5 - -- **PATCH**: updates README.md about frequent asked quesions from github issues. - -## 2018-08-12, Version 4.0.6 - -- **PATCH**: `Object.prototype` methods will not ruin the result any more. diff --git a/node_modules/ignore/LICENSE-MIT b/node_modules/ignore/LICENSE-MIT old mode 100755 new mode 100644 diff --git a/node_modules/ignore/README.md b/node_modules/ignore/README.md old mode 100755 new mode 100644 index c4d8230cc..50d88822a --- a/node_modules/ignore/README.md +++ b/node_modules/ignore/README.md @@ -8,9 +8,9 @@ - + Build Status @@ -35,11 +35,19 @@ # ignore -`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the .gitignore [spec](http://git-scm.com/docs/gitignore). +`ignore` is a manager, filter and parser which implemented in pure JavaScript according to the [.gitignore spec 2.22.1](http://git-scm.com/docs/gitignore). -Pay attention that [`minimatch`](https://www.npmjs.org/package/minimatch) does not work in the gitignore way. To filter filenames according to .gitignore file, I recommend this module. +`ignore` is used by eslint, gitbook and [many others](https://www.npmjs.com/browse/depended/ignore). -##### Tested on +Pay **ATTENTION** that [`minimatch`](https://www.npmjs.org/package/minimatch) (which used by `fstream-ignore`) does not follow the gitignore spec. + +To filter filenames according to a .gitignore file, I recommend this npm package, `ignore`. + +To parse an `.npmignore` file, you should use `minimatch`, because an `.npmignore` file is parsed by npm using `minimatch` and it does not work in the .gitignore way. + +### Tested on + +`ignore` is fully tested, and has more than **five hundreds** of unit tests. - Linux + Node: `0.8` - `7.x` - Windows + Node: `0.10` - `7.x`, node < `0.10` is not tested due to the lack of support of appveyor. @@ -52,10 +60,15 @@ Since `4.0.0`, ignore will no longer support `node < 6` by default, to use in no - [Usage](#usage) - [`Pathname` Conventions](#pathname-conventions) -- [Guide for 2.x -> 3.x](#upgrade-2x---3x) -- [Guide for 3.x -> 4.x](#upgrade-3x---4x) - See Also: - [`glob-gitignore`](https://www.npmjs.com/package/glob-gitignore) matches files using patterns and filters them according to gitignore rules. +- [Upgrade Guide](#upgrade-guide) + +## Install + +```sh +npm i ignore +``` ## Usage @@ -123,7 +136,7 @@ Notice that a line starting with `'#'`(hash) is treated as a comment. Put a back ```js ignore().add('#abc').ignores('#abc') // false -ignore().add('\#abc').ignores('#abc') // true +ignore().add('\\#abc').ignores('#abc') // true ``` `pattern` could either be a line of ignore pattern or a string of multiple ignore patterns, which means we could just `ignore().add()` the content of a ignore file: @@ -152,7 +165,7 @@ if (fs.existsSync(filename)) { instead. -## .filter(paths: Array): Array +## .filter(paths: Array<Pathname>): Array<Pathname> ```ts type Pathname = string @@ -166,13 +179,13 @@ Filters the given array of pathnames, and returns the filtered array. #### 1. `Pathname` should be a `path.relative()`d pathname -`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory. +`Pathname` should be a string that have been `path.join()`ed, or the return value of `path.relative()` to the current directory, ```js -// WRONG +// WRONG, an error will be thrown ig.ignores('./abc') -// WRONG, for it will never happen. +// WRONG, for it will never happen, and an error will be thrown // If the gitignore rule locates at the root directory, // `'/abc'` should be changed to `'abc'`. // ``` @@ -180,6 +193,9 @@ ig.ignores('./abc') // ``` ig.ignores('/abc') +// WRONG, that it is an absolute path on Windows, an error will be thrown +ig.ignores('C:\\abc') + // Right ig.ignores('abc') @@ -212,6 +228,26 @@ Then the `paths` might be like this: ] ``` +#### 2. filenames and dirnames + +`node-ignore` does NO `fs.stat` during path matching, so for the example below: + +```js +// First, we add a ignore pattern to ignore a directory +ig.add('config/') + +// `ig` does NOT know if 'config', in the real world, +// is a normal file, directory or something. + +ig.ignores('config') +// `ig` treats `config` as a file, so it returns `false` + +ig.ignores('config/') +// returns `true` +``` + +Specially for people who develop some library based on `node-ignore`, it is important to understand that. + Usually, you could use [`glob`](http://npmjs.org/package/glob) with `option.mark = true` to fetch the structure of the current directory: ```js @@ -230,21 +266,6 @@ glob('**', { }) ``` -#### 2. filenames and dirnames - -`node-ignore` does NO `fs.stat` during path matching, so for the example below: - -```js -ig.add('config/') - -// `ig` does NOT know if 'config' is a normal file, directory or something -ig.ignores('config') // And it returns `false` - -ig.ignores('config/') // returns `true` -``` - -Specially for people who develop some library based on `node-ignore`, it is important to understand that. - ## .ignores(pathname: Pathname): boolean > new in 3.2.0 @@ -261,9 +282,37 @@ Creates a filter function which could filter an array of paths with `Array.proto Returns `function(path)` the filter function. -## `options.ignorecase` since 4.0.0 +## .test(pathname: Pathname) since 5.0.0 + +Returns `TestResult` + +```ts +interface TestResult { + ignored: boolean + // true if the `pathname` is finally unignored by some negative pattern + unignored: boolean +} +``` + +- `{ignored: true, unignored: false}`: the `pathname` is ignored +- `{ignored: false, unignored: true}`: the `pathname` is unignored +- `{ignored: false, unignored: false}`: the `pathname` is never matched by any ignore rules. + +## static `ignore.isPathValid(pathname): boolean` since 5.0.0 + +Check whether the `pathname` is an valid `path.relative()`d path according to the [convention](#1-pathname-should-be-a-pathrelatived-pathname). -Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (default value), otherwise case sensitive. +This method is **NOT** used to check if an ignore pattern is valid. + +```js +ignore.isPathValid('./foo') // false +``` + +## ignore(options) + +### `options.ignorecase` since 4.0.0 + +Similar as the `core.ignorecase` option of [git-config](https://git-scm.com/docs/git-config), `node-ignore` will be case insensitive if `options.ignorecase` is set to `true` (the default value), otherwise case sensitive. ```js const ig = ignore({ @@ -275,15 +324,65 @@ ig.add('*.png') ig.ignores('*.PNG') // false ``` +### `options.ignoreCase?: boolean` since 5.2.0 + +Which is alternative to `options.ignoreCase` + +### `options.allowRelativePaths?: boolean` since 5.2.0 + +This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions). + +However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior + +```js +ignore({ + allowRelativePaths: true +}).ignores('../foo/bar.js') // And it will not throw +``` + **** # Upgrade Guide -## Upgrade 2.x -> 3.x +## Upgrade 4.x -> 5.x -- All `options` of 2.x are unnecessary and removed, so just remove them. -- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. -- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. +Since `5.0.0`, if an invalid `Pathname` passed into `ig.ignores()`, an error will be thrown, unless `options.allowRelative = true` is passed to the `Ignore` factory. + +While `ignore < 5.0.0` did not make sure what the return value was, as well as + +```ts +.ignores(pathname: Pathname): boolean + +.filter(pathnames: Array): Array + +.createFilter(): (pathname: Pathname) => boolean + +.test(pathname: Pathname): {ignored: boolean, unignored: boolean} +``` + +See the convention [here](#1-pathname-should-be-a-pathrelatived-pathname) for details. + +If there are invalid pathnames, the conversion and filtration should be done by users. + +```js +import {isPathValid} from 'ignore' // introduced in 5.0.0 + +const paths = [ + // invalid + ////////////////// + '', + false, + '../foo', + '.', + ////////////////// + + // valid + 'foo' +] +.filter(isValidPath) + +ig.filter(paths) +``` ## Upgrade 3.x -> 4.x @@ -293,6 +392,12 @@ Since `4.0.0`, `ignore` will no longer support node < 6, to use `ignore` in node var ignore = require('ignore/legacy') ``` +## Upgrade 2.x -> 3.x + +- All `options` of 2.x are unnecessary and removed, so just remove them. +- `ignore()` instance is no longer an [`EventEmitter`](nodejs.org/api/events.html), and all events are unnecessary and removed. +- `.addIgnoreFile()` is removed, see the [.addIgnoreFile](#addignorefilepath) section for details. + **** # Collaborators diff --git a/node_modules/ignore/index.d.ts b/node_modules/ignore/index.d.ts index be9d5f8ea..970631e26 100644 --- a/node_modules/ignore/index.d.ts +++ b/node_modules/ignore/index.d.ts @@ -1,16 +1,17 @@ -interface Ignore { - /** - * Adds a rule rules to the current manager. - * @param {string | Ignore} pattern - * @returns IgnoreBase - */ - add(pattern: string | Ignore): Ignore +type Pathname = string + +interface TestResult { + ignored: boolean + unignored: boolean +} + +export interface Ignore { /** - * Adds several rules to the current manager. + * Adds one or several rules to the current manager. * @param {string[]} patterns * @returns IgnoreBase */ - add(patterns: (string | Ignore)[]): Ignore + add(patterns: string | Ignore | readonly (string | Ignore)[]): this /** * Filters the given array of pathnames, and returns the filtered array. @@ -18,23 +19,34 @@ interface Ignore { * @param paths the array of paths to be filtered. * @returns The filtered array of paths */ - filter(paths: string[]): string[] + filter(pathnames: readonly Pathname[]): Pathname[] + /** * Creates a filter function which could filter * an array of paths with Array.prototype.filter. */ - createFilter(): (path: string) => boolean + createFilter(): (pathname: Pathname) => boolean /** * Returns Boolean whether pathname should be ignored. * @param {string} pathname a path to check * @returns boolean */ - ignores(pathname: string): boolean + ignores(pathname: Pathname): boolean + + /** + * Returns whether pathname should be ignored or unignored + * @param {string} pathname a path to check + * @returns TestResult + */ + test(pathname: Pathname): TestResult } -interface Options { +export interface Options { ignorecase?: boolean + // For compatibility + ignoreCase?: boolean + allowRelativePaths?: boolean } /** @@ -42,4 +54,8 @@ interface Options { */ declare function ignore(options?: Options): Ignore +declare namespace ignore { + export function isPathValid (pathname: string): boolean +} + export default ignore diff --git a/node_modules/ignore/index.js b/node_modules/ignore/index.js old mode 100755 new mode 100644 index 62c5cf71e..c55980645 --- a/node_modules/ignore/index.js +++ b/node_modules/ignore/index.js @@ -1,24 +1,42 @@ // A simple implementation of make-array -function make_array (subject) { +function makeArray (subject) { return Array.isArray(subject) ? subject : [subject] } -const REGEX_BLANK_LINE = /^\s+$/ -const REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\!/ -const REGEX_LEADING_EXCAPED_HASH = /^\\#/ +const EMPTY = '' +const SPACE = ' ' +const ESCAPE = '\\' +const REGEX_TEST_BLANK_LINE = /^\s+$/ +const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/ +const REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/ +const REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/ +const REGEX_SPLITALL_CRLF = /\r?\n/g +// /foo, +// ./foo, +// ../foo, +// . +// .. +const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/ + const SLASH = '/' -const KEY_IGNORE = typeof Symbol !== 'undefined' - ? Symbol.for('node-ignore') - /* istanbul ignore next */ - : 'node-ignore' + +// Do not use ternary expression here, since "istanbul ignore next" is buggy +let TMP_KEY_IGNORE = 'node-ignore' +/* istanbul ignore else */ +if (typeof Symbol !== 'undefined') { + TMP_KEY_IGNORE = Symbol.for('node-ignore') +} +const KEY_IGNORE = TMP_KEY_IGNORE const define = (object, key, value) => Object.defineProperty(object, key, {value}) const REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g +const RETURN_FALSE = () => false + // Sanitize the range of a regular expression // The cases are complicated, see test cases for details const sanitizeRange = range => range.replace( @@ -27,9 +45,15 @@ const sanitizeRange = range => range.replace( ? match // Invalid range (out of order) which is ok for gitignore rules but // fatal for JavaScript regular expression, so eliminate it. - : '' + : EMPTY ) +// See fixtures #59 +const cleanRangeBackSlash = slashes => { + const {length} = slashes + return slashes.slice(0, length - length % 2) +} + // > If the pattern ends with a slash, // > it is removed for the purpose of the following description, // > but it would only find a match with a directory. @@ -41,7 +65,15 @@ const sanitizeRange = range => range.replace( // you could use option `mark: true` with `glob` // '`foo/`' should not continue with the '`..`' -const DEFAULT_REPLACER_PREFIX = [ +const REPLACERS = [ + + [ + // remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ @@ -50,14 +82,14 @@ const DEFAULT_REPLACER_PREFIX = [ // (a \ ) -> (a ) /\\?\s+$/, match => match.indexOf('\\') === 0 - ? ' ' - : '' + ? SPACE + : EMPTY ], // replace (\ ) with ' ' [ /\\\s/g, - () => ' ' + () => SPACE ], // Escape metacharacters @@ -78,19 +110,10 @@ const DEFAULT_REPLACER_PREFIX = [ // > - the opening curly brace {, // > These special characters are often called "metacharacters". [ - /[\\^$.|*+(){]/g, + /[\\$.|*+(){^]/g, match => `\\${match}` ], - [ - // > [abc] matches any character inside the brackets - // > (in this case a, b, or c); - /\[([^\]/]*)($|\])/g, - (match, p1, p2) => p2 === ']' - ? `[${sanitizeRange(p1)}]` - : `\\${match}` - ], - [ // > a question mark (?) matches a single character /(?!\\)\?/g, @@ -124,10 +147,8 @@ const DEFAULT_REPLACER_PREFIX = [ // '**/foo' <-> 'foo' () => '^(?:.*\\/)?' - ] -] + ], -const DEFAULT_REPLACER_SUFFIX = [ // starting [ // there will be no leading '/' @@ -135,11 +156,20 @@ const DEFAULT_REPLACER_SUFFIX = [ // If starts with '**', adding a '^' to the regular expression also works /^(?=[^^])/, function startingReplacer () { + // If has a slash `/` at the beginning or middle return !/\/(?!$)/.test(this) + // > Prior to 2.22.1 // > If the pattern does not contain a slash /, // > Git treats it as a shell glob pattern // Actually, if there is only a trailing slash, // git also treats it as a shell glob pattern + + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for @@ -157,7 +187,7 @@ const DEFAULT_REPLACER_SUFFIX = [ // should not use '*', or it will be replaced by the next replacer // Check if it is not the last `'/**'` - (match, index, str) => index + 6 < str.length + (_, index, str) => index + 6 < str.length // case: /**/ // > A slash followed by two consecutive asterisks then a slash matches @@ -173,130 +203,159 @@ const DEFAULT_REPLACER_SUFFIX = [ : '\\/.+' ], - // intermediate wildcards + // normal intermediate wildcards [ // Never replace escaped '*' // ignore rule '\*' will match the path '*' // 'abc.*/' -> go - // 'abc.*' -> skip this rule - /(^|[^\\]+)\\\*(?=.+)/g, + // 'abc.*' -> skip this rule, + // coz trailing single wildcard will be handed by [trailing wildcard] + /(^|[^\\]+)(\\\*)+(?=.+)/g, // '*.js' matches '.js' // '*.js' doesn't match 'abc' - (match, p1) => `${p1}[^\\/]*` + (_, p1, p2) => { + // 1. + // > An asterisk "*" matches anything except a slash. + // 2. + // > Other consecutive asterisks are considered regular asterisks + // > and will match according to the previous rules. + const unescaped = p2.replace(/\\\*/g, '[^\\/]*') + return p1 + unescaped + } ], - // trailing wildcard [ - /(\^|\\\/)?\\\*$/, - (match, p1) => { - const prefix = p1 - // '\^': - // '/*' does not match '' - // '/*' does not match everything - - // '\\\/': - // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' - // 'a*' matches 'aa' - : '[^/]*' - - return `${prefix}(?=$|\\/$)` - } + // unescape, revert step 3 except for back slash + // For example, if a user escape a '\\*', + // after step 3, the result will be '\\\\\\*' + /\\\\\\(?=[$.|*+(){^])/g, + () => ESCAPE ], [ - // unescape - /\\\\\\/g, - () => '\\' - ] -] + // '\\\\' -> '\\' + /\\\\/g, + () => ESCAPE + ], -const POSITIVE_REPLACERS = [ - ...DEFAULT_REPLACER_PREFIX, - - // 'f' - // matches - // - /f(end) - // - /f/ - // - (start)f(end) - // - (start)f/ - // doesn't match - // - oof - // - foo - // pseudo: - // -> (^|/)f(/|$) + [ + // > The range notation, e.g. [a-zA-Z], + // > can be used to match one of the characters in a range. + + // `\` is escaped by step 3 + /(\\)?\[([^\]/]*?)(\\*)($|\])/g, + (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE + // '\\[bar]' -> '\\\\[bar\\]' + ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` + : close === ']' + ? endEscape.length % 2 === 0 + // A normal case, and it is a range notation + // '[bar]' + // '[bar\\\\]' + ? `[${sanitizeRange(range)}${endEscape}]` + // Invalid range notaton + // '[bar\\]' -> '[bar\\\\]' + : '[]' + : '[]' + ], // ending [ // 'js' will not match 'js.' // 'ab' will not match 'abc' - /(?:[^*/])$/, + /(?:[^*])$/, + + // WTF! + // https://git-scm.com/docs/gitignore + // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) + // which re-fixes #24, #38 + + // > If there is a separator at the end of the pattern then the pattern + // > will only match directories, otherwise the pattern can match both + // > files and directories. // 'js*' will not match 'a.js' // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' - match => `${match}(?=$|\\/)` + match => /\/$/.test(match) + // foo/ will not match 'foo' + ? `${match}$` + // foo matches 'foo' and 'foo/' + : `${match}(?=$|\\/$)` ], - ...DEFAULT_REPLACER_SUFFIX -] + // trailing wildcard + [ + /(\^|\\\/)?\\\*$/, + (_, p1) => { + const prefix = p1 + // '\^': + // '/*' does not match EMPTY + // '/*' does not match everything -const NEGATIVE_REPLACERS = [ - ...DEFAULT_REPLACER_PREFIX, + // '\\\/': + // 'abc/*' does not match 'abc/' + ? `${p1}[^/]+` - // #24, #38 - // The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) - // A negative pattern without a trailing wildcard should not - // re-include the things inside that directory. + // 'a*' matches 'a' + // 'a*' matches 'aa' + : '[^/]*' - // eg: - // ['node_modules/*', '!node_modules'] - // should ignore `node_modules/a.js` - [ - /(?:[^*])$/, - match => `${match}(?=$|\\/$)` + return `${prefix}(?=$|\\/$)` + } ], - - ...DEFAULT_REPLACER_SUFFIX ] // A simple cache, because an ignore rule only has only one certain meaning -const cache = Object.create(null) +const regexCache = Object.create(null) // @param {pattern} -const make_regex = (pattern, negative, ignorecase) => { - const r = cache[pattern] - if (r) { - return r +const makeRegex = (pattern, ignoreCase) => { + let source = regexCache[pattern] + + if (!source) { + source = REPLACERS.reduce( + (prev, current) => prev.replace(current[0], current[1].bind(pattern)), + pattern + ) + regexCache[pattern] = source } - const replacers = negative - ? NEGATIVE_REPLACERS - : POSITIVE_REPLACERS - - const source = replacers.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ) - - return cache[pattern] = ignorecase + return ignoreCase ? new RegExp(source, 'i') : new RegExp(source) } +const isString = subject => typeof subject === 'string' + // > A blank line matches no files, so it can serve as a separator for readability. const checkPattern = pattern => pattern - && typeof pattern === 'string' - && !REGEX_BLANK_LINE.test(pattern) + && isString(pattern) + && !REGEX_TEST_BLANK_LINE.test(pattern) + && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) // > A line starting with # serves as a comment. && pattern.indexOf('#') !== 0 -const createRule = (pattern, ignorecase) => { +const splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF) + +class IgnoreRule { + constructor ( + origin, + pattern, + negative, + regex + ) { + this.origin = origin + this.pattern = pattern + this.negative = negative + this.regex = regex + } +} + +const createRule = (pattern, ignoreCase) => { const origin = pattern let negative = false @@ -309,44 +368,98 @@ const createRule = (pattern, ignorecase) => { pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that // > begin with a hash. - .replace(REGEX_LEADING_EXCAPED_HASH, '#') + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#') - const regex = make_regex(pattern, negative, ignorecase) + const regex = makeRegex(pattern, ignoreCase) - return { + return new IgnoreRule( origin, pattern, negative, regex + ) +} + +const throwError = (message, Ctor) => { + throw new Ctor(message) +} + +const checkPath = (path, originalPath, doThrow) => { + if (!isString(path)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ) } + + // We don't know if we should ignore EMPTY, so throw + if (!path) { + return doThrow(`path must not be empty`, TypeError) + } + + // Check if it is a relative path + if (checkPath.isNotRelative(path)) { + const r = '`path.relative()`d' + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ) + } + + return true } -class IgnoreBase { +const isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path) + +checkPath.isNotRelative = isNotRelative +checkPath.convert = p => p + +class Ignore { constructor ({ - ignorecase = true + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false } = {}) { - this._rules = [] - this._ignorecase = ignorecase define(this, KEY_IGNORE, true) + + this._rules = [] + this._ignoreCase = ignoreCase + this._allowRelativePaths = allowRelativePaths this._initCache() } _initCache () { - this._cache = Object.create(null) + this._ignoreCache = Object.create(null) + this._testCache = Object.create(null) } - // @param {Array.|string|Ignore} pattern - add (pattern) { - this._added = false + _addPattern (pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules) + this._added = true + return + } - if (typeof pattern === 'string') { - pattern = pattern.split(/\r?\n/g) + if (checkPattern(pattern)) { + const rule = createRule(pattern, this._ignoreCase) + this._added = true + this._rules.push(rule) } + } - make_array(pattern).forEach(this._addPattern, this) + // @param {Array | string | Ignore} pattern + add (pattern) { + this._added = false + + makeArray( + isString(pattern) + ? splitPattern(pattern) + : pattern + ).forEach(this._addPattern, this) // Some rules have just added to the ignore, // making the behavior changed. @@ -362,41 +475,69 @@ class IgnoreBase { return this.add(pattern) } - _addPattern (pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules) - this._added = true - return - } + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignorecase) - this._added = true - this._rules.push(rule) - } - } + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen - filter (paths) { - return make_array(paths).filter(path => this._filter(path)) - } + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. - createFilter () { - return path => this._filter(path) - } + // @returns {TestResult} true if a file is ignored + _testOne (path, checkUnignored) { + let ignored = false + let unignored = false - ignores (path) { - return !this._filter(path) - } + this._rules.forEach(rule => { + const {negative} = rule + if ( + unignored === negative && ignored !== unignored + || negative && !ignored && !unignored && !checkUnignored + ) { + return + } + + const matched = rule.regex.test(path) - // @returns `Boolean` true if the `path` is NOT ignored - _filter (path, slices) { - if (!path) { - return false + if (matched) { + ignored = !negative + unignored = negative + } + }) + + return { + ignored, + unignored } + } - if (path in this._cache) { - return this._cache[path] + // @returns {TestResult} + _test (originalPath, cache, checkUnignored, slices) { + const path = originalPath + // Supports nullable path + && checkPath.convert(originalPath) + + checkPath( + path, + originalPath, + this._allowRelativePaths + ? RETURN_FALSE + : throwError + ) + + return this._t(path, cache, checkUnignored, slices) + } + + _t (path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path] } if (!slices) { @@ -407,37 +548,59 @@ class IgnoreBase { slices.pop() - return this._cache[path] = slices.length + // If the path has no parent directory, just test it + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored) + } + + const parent = this._t( + slices.join(SLASH) + SLASH, + cache, + checkUnignored, + slices + ) + + // If the path contains a parent directory, check the parent first + return cache[path] = parent.ignored // > It is not possible to re-include a file if a parent directory of // > that file is excluded. - // If the path contains a parent directory, check the parent first - ? this._filter(slices.join(SLASH) + SLASH, slices) - && this._test(path) + ? parent + : this._testOne(path, checkUnignored) + } - // Or only test the path - : this._test(path) + ignores (path) { + return this._test(path, this._ignoreCache, false).ignored } - // @returns {Boolean} true if a file is NOT ignored - _test (path) { - // Explicitly define variable type by setting matched to `0` - let matched = 0 + createFilter () { + return path => !this.ignores(path) + } - this._rules.forEach(rule => { - // if matched = true, then we only test negative rules - // if matched = false, then we test non-negative rules - if (!(matched ^ rule.negative)) { - matched = rule.negative ^ rule.regex.test(path) - } - }) + filter (paths) { + return makeArray(paths).filter(this.createFilter()) + } - return !matched + // @returns {TestResult} + test (path) { + return this._test(path, this._testCache, true) } } +const factory = options => new Ignore(options) + +const isPathValid = path => + checkPath(path && checkPath.convert(path), path, RETURN_FALSE) + +factory.isPathValid = isPathValid + +// Fixes typescript +factory.default = factory + +module.exports = factory + // Windows // -------------------------------------------------------------- -/* istanbul ignore if */ +/* istanbul ignore if */ if ( // Detect `process` so that it can run in browsers. typeof process !== 'undefined' @@ -446,18 +609,18 @@ if ( || process.platform === 'win32' ) ) { - const filter = IgnoreBase.prototype._filter - /* eslint no-control-regex: "off" */ - const make_posix = str => /^\\\\\?\\/.test(str) - || /[^\x00-\x80]+/.test(str) + const makePosix = str => /^\\\\\?\\/.test(str) + || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, '/') - IgnoreBase.prototype._filter = function filterWin32 (path, slices) { - path = make_posix(path) - return filter.call(this, path, slices) - } -} + checkPath.convert = makePosix -module.exports = options => new IgnoreBase(options) + // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i + checkPath.isNotRelative = path => + REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) + || isNotRelative(path) +} diff --git a/node_modules/ignore/legacy.js b/node_modules/ignore/legacy.js index 14f377d77..e97047187 100644 --- a/node_modules/ignore/legacy.js +++ b/node_modules/ignore/legacy.js @@ -1,27 +1,47 @@ -'use strict'; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +"use strict"; +function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } +function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } +function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - // A simple implementation of make-array -function make_array(subject) { +function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } - -var REGEX_BLANK_LINE = /^\s+$/; -var REGEX_LEADING_EXCAPED_EXCLAMATION = /^\\!/; -var REGEX_LEADING_EXCAPED_HASH = /^\\#/; +var EMPTY = ''; +var SPACE = ' '; +var ESCAPE = '\\'; +var REGEX_TEST_BLANK_LINE = /^\s+$/; +var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; +var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; +var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; +var REGEX_SPLITALL_CRLF = /\r?\n/g; +// /foo, +// ./foo, +// ../foo, +// . +// .. +var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; var SLASH = '/'; -var KEY_IGNORE = typeof Symbol !== 'undefined' ? Symbol.for('node-ignore') -/* istanbul ignore next */ -: 'node-ignore'; +// Do not use ternary expression here, since "istanbul ignore next" is buggy +var TMP_KEY_IGNORE = 'node-ignore'; +/* istanbul ignore else */ +if (typeof Symbol !== 'undefined') { + TMP_KEY_IGNORE = Symbol["for"]('node-ignore'); +} +var KEY_IGNORE = TMP_KEY_IGNORE; var define = function define(object, key, value) { - return Object.defineProperty(object, key, { value }); + return Object.defineProperty(object, key, { + value: value + }); }; - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; +var RETURN_FALSE = function RETURN_FALSE() { + return false; +}; // Sanitize the range of a regular expression // The cases are complicated, see test cases for details @@ -30,10 +50,16 @@ var sanitizeRange = function sanitizeRange(range) { return from.charCodeAt(0) <= to.charCodeAt(0) ? match // Invalid range (out of order) which is ok for gitignore rules but // fatal for JavaScript regular expression, so eliminate it. - : ''; + : EMPTY; }); }; +// See fixtures #59 +var cleanRangeBackSlash = function cleanRangeBackSlash(slashes) { + var length = slashes.length; + return slashes.slice(0, length - length % 2); +}; + // > If the pattern ends with a slash, // > it is removed for the purpose of the following description, // > but it would only find a match with a directory. @@ -45,22 +71,25 @@ var sanitizeRange = function sanitizeRange(range) { // you could use option `mark: true` with `glob` // '`foo/`' should not continue with the '`..`' -var DEFAULT_REPLACER_PREFIX = [ - +var REPLACERS = [[ +// remove BOM +// TODO: +// Other similar zero-width characters? +/^\uFEFF/, function () { + return EMPTY; +}], // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ // (a\ ) -> (a ) // (a ) -> (a) // (a \ ) -> (a ) /\\?\s+$/, function (match) { - return match.indexOf('\\') === 0 ? ' ' : ''; + return match.indexOf('\\') === 0 ? SPACE : EMPTY; }], - // replace (\ ) with ' ' [/\\\s/g, function () { - return ' '; + return SPACE; }], - // Escape metacharacters // which is written down by users but means special for regular expressions. @@ -78,29 +107,21 @@ var DEFAULT_REPLACER_PREFIX = [ // > - and the opening square bracket [, // > - the opening curly brace {, // > These special characters are often called "metacharacters". -[/[\\^$.|*+(){]/g, function (match) { - return `\\${match}`; -}], [ -// > [abc] matches any character inside the brackets -// > (in this case a, b, or c); -/\[([^\]/]*)($|\])/g, function (match, p1, p2) { - return p2 === ']' ? `[${sanitizeRange(p1)}]` : `\\${match}`; +[/[\\$.|*+(){^]/g, function (match) { + return "\\".concat(match); }], [ // > a question mark (?) matches a single character /(?!\\)\?/g, function () { return '[^/]'; }], - // leading slash [ - // > A leading slash matches the beginning of the pathname. // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". // A leading slash matches the beginning of the pathname /^\//, function () { return '^'; }], - // replace special metacharacter slash after the leading slash [/\//g, function () { return '\\/'; @@ -112,41 +133,45 @@ var DEFAULT_REPLACER_PREFIX = [ // > under directory "foo". // Notice that the '*'s have been replaced as '\\*' /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' function () { return '^(?:.*\\/)?'; -}]]; - -var DEFAULT_REPLACER_SUFFIX = [ +}], // starting [ // there will be no leading '/' // (which has been replaced by section "leading slash") // If starts with '**', adding a '^' to the regular expression also works /^(?=[^^])/, function startingReplacer() { + // If has a slash `/` at the beginning or middle return !/\/(?!$)/.test(this) + // > Prior to 2.22.1 // > If the pattern does not contain a slash /, // > Git treats it as a shell glob pattern // Actually, if there is only a trailing slash, // git also treats it as a shell glob pattern + + // After 2.22.1 (compatible but clearer) + // > If there is a separator at the beginning or middle (or both) + // > of the pattern, then the pattern is relative to the directory + // > level of the particular .gitignore file itself. + // > Otherwise the pattern may also match at any level below + // > the .gitignore level. ? '(?:^|\\/)' // > Otherwise, Git treats the pattern as a shell glob suitable for // > consumption by fnmatch(3) : '^'; }], - // two globstars [ // Use lookahead assertions so that we could match more than one `'/**'` /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories // should not use '*', or it will be replaced by the next replacer // Check if it is not the last `'/**'` -function (match, index, str) { +function (_, index, str) { return index + 6 < str.length // case: /**/ @@ -162,113 +187,125 @@ function (match, index, str) { // #21: everything inside but it should not include the current folder : '\\/.+'; }], - -// intermediate wildcards +// normal intermediate wildcards [ // Never replace escaped '*' // ignore rule '\*' will match the path '*' // 'abc.*/' -> go -// 'abc.*' -> skip this rule -/(^|[^\\]+)\\\*(?=.+)/g, - +// 'abc.*' -> skip this rule, +// coz trailing single wildcard will be handed by [trailing wildcard] +/(^|[^\\]+)(\\\*)+(?=.+)/g, // '*.js' matches '.js' // '*.js' doesn't match 'abc' -function (match, p1) { - return `${p1}[^\\/]*`; +function (_, p1, p2) { + // 1. + // > An asterisk "*" matches anything except a slash. + // 2. + // > Other consecutive asterisks are considered regular asterisks + // > and will match according to the previous rules. + var unescaped = p2.replace(/\\\*/g, '[^\\/]*'); + return p1 + unescaped; +}], [ +// unescape, revert step 3 except for back slash +// For example, if a user escape a '\\*', +// after step 3, the result will be '\\\\\\*' +/\\\\\\(?=[$.|*+(){^])/g, function () { + return ESCAPE; +}], [ +// '\\\\' -> '\\' +/\\\\/g, function () { + return ESCAPE; +}], [ +// > The range notation, e.g. [a-zA-Z], +// > can be used to match one of the characters in a range. + +// `\` is escaped by step 3 +/(\\)?\[([^\]/]*?)(\\*)($|\])/g, function (match, leadEscape, range, endEscape, close) { + return leadEscape === ESCAPE + // '\\[bar]' -> '\\\\[bar\\]' + ? "\\[".concat(range).concat(cleanRangeBackSlash(endEscape)).concat(close) : close === ']' ? endEscape.length % 2 === 0 + // A normal case, and it is a range notation + // '[bar]' + // '[bar\\\\]' + ? "[".concat(sanitizeRange(range)).concat(endEscape, "]") // Invalid range notaton + // '[bar\\]' -> '[bar\\\\]' + : '[]' : '[]'; }], +// ending +[ +// 'js' will not match 'js.' +// 'ab' will not match 'abc' +/(?:[^*])$/, +// WTF! +// https://git-scm.com/docs/gitignore +// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) +// which re-fixes #24, #38 + +// > If there is a separator at the end of the pattern then the pattern +// > will only match directories, otherwise the pattern can match both +// > files and directories. +// 'js*' will not match 'a.js' +// 'js/' will not match 'a.js' +// 'js' will match 'a.js' and 'a.js/' +function (match) { + return /\/$/.test(match) + // foo/ will not match 'foo' + ? "".concat(match, "$") // foo matches 'foo' and 'foo/' + : "".concat(match, "(?=$|\\/$)"); +}], // trailing wildcard -[/(\^|\\\/)?\\\*$/, function (match, p1) { +[/(\^|\\\/)?\\\*$/, function (_, p1) { var prefix = p1 // '\^': - // '/*' does not match '' + // '/*' does not match EMPTY // '/*' does not match everything // '\\\/': // 'abc/*' does not match 'abc/' - ? `${p1}[^/]+` - - // 'a*' matches 'a' + ? "".concat(p1, "[^/]+") // 'a*' matches 'a' // 'a*' matches 'aa' : '[^/]*'; - - return `${prefix}(?=$|\\/$)`; -}], [ -// unescape -/\\\\\\/g, function () { - return '\\'; + return "".concat(prefix, "(?=$|\\/$)"); }]]; -var POSITIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ - -// 'f' -// matches -// - /f(end) -// - /f/ -// - (start)f(end) -// - (start)f/ -// doesn't match -// - oof -// - foo -// pseudo: -// -> (^|/)f(/|$) - -// ending -[ -// 'js' will not match 'js.' -// 'ab' will not match 'abc' -/(?:[^*/])$/, - -// 'js*' will not match 'a.js' -// 'js/' will not match 'a.js' -// 'js' will match 'a.js' and 'a.js/' -function (match) { - return `${match}(?=$|\\/)`; -}]], DEFAULT_REPLACER_SUFFIX); - -var NEGATIVE_REPLACERS = [].concat(DEFAULT_REPLACER_PREFIX, [ - -// #24, #38 -// The MISSING rule of [gitignore docs](https://git-scm.com/docs/gitignore) -// A negative pattern without a trailing wildcard should not -// re-include the things inside that directory. - -// eg: -// ['node_modules/*', '!node_modules'] -// should ignore `node_modules/a.js` -[/(?:[^*])$/, function (match) { - return `${match}(?=$|\\/$)`; -}]], DEFAULT_REPLACER_SUFFIX); - // A simple cache, because an ignore rule only has only one certain meaning -var cache = Object.create(null); +var regexCache = Object.create(null); // @param {pattern} -var make_regex = function make_regex(pattern, negative, ignorecase) { - var r = cache[pattern]; - if (r) { - return r; +var makeRegex = function makeRegex(pattern, ignoreCase) { + var source = regexCache[pattern]; + if (!source) { + source = REPLACERS.reduce(function (prev, current) { + return prev.replace(current[0], current[1].bind(pattern)); + }, pattern); + regexCache[pattern] = source; } - - var replacers = negative ? NEGATIVE_REPLACERS : POSITIVE_REPLACERS; - - var source = replacers.reduce(function (prev, current) { - return prev.replace(current[0], current[1].bind(pattern)); - }, pattern); - - return cache[pattern] = ignorecase ? new RegExp(source, 'i') : new RegExp(source); + return ignoreCase ? new RegExp(source, 'i') : new RegExp(source); +}; +var isString = function isString(subject) { + return typeof subject === 'string'; }; // > A blank line matches no files, so it can serve as a separator for readability. var checkPattern = function checkPattern(pattern) { - return pattern && typeof pattern === 'string' && !REGEX_BLANK_LINE.test(pattern) + return pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) // > A line starting with # serves as a comment. && pattern.indexOf('#') !== 0; }; - -var createRule = function createRule(pattern, ignorecase) { +var splitPattern = function splitPattern(pattern) { + return pattern.split(REGEX_SPLITALL_CRLF); +}; +var IgnoreRule = /*#__PURE__*/_createClass(function IgnoreRule(origin, pattern, negative, regex) { + _classCallCheck(this, IgnoreRule); + this.origin = origin; + this.pattern = pattern; + this.negative = negative; + this.regex = regex; +}); +var createRule = function createRule(pattern, ignoreCase) { var origin = pattern; var negative = false; @@ -277,190 +314,232 @@ var createRule = function createRule(pattern, ignorecase) { negative = true; pattern = pattern.substr(1); } - pattern = pattern // > Put a backslash ("\") in front of the first "!" for patterns that // > begin with a literal "!", for example, `"\!important!.txt"`. - .replace(REGEX_LEADING_EXCAPED_EXCLAMATION, '!') + .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!') // > Put a backslash ("\") in front of the first hash for patterns that // > begin with a hash. - .replace(REGEX_LEADING_EXCAPED_HASH, '#'); + .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#'); + var regex = makeRegex(pattern, ignoreCase); + return new IgnoreRule(origin, pattern, negative, regex); +}; +var throwError = function throwError(message, Ctor) { + throw new Ctor(message); +}; +var checkPath = function checkPath(path, originalPath, doThrow) { + if (!isString(path)) { + return doThrow("path must be a string, but got `".concat(originalPath, "`"), TypeError); + } - var regex = make_regex(pattern, negative, ignorecase); + // We don't know if we should ignore EMPTY, so throw + if (!path) { + return doThrow("path must not be empty", TypeError); + } - return { - origin, - pattern, - negative, - regex - }; + // Check if it is a relative path + if (checkPath.isNotRelative(path)) { + var r = '`path.relative()`d'; + return doThrow("path should be a ".concat(r, " string, but got \"").concat(originalPath, "\""), RangeError); + } + return true; }; - -var IgnoreBase = function () { - function IgnoreBase() { +var isNotRelative = function isNotRelative(path) { + return REGEX_TEST_INVALID_PATH.test(path); +}; +checkPath.isNotRelative = isNotRelative; +checkPath.convert = function (p) { + return p; +}; +var Ignore = /*#__PURE__*/function () { + function Ignore() { var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$ignorecase = _ref.ignorecase, - ignorecase = _ref$ignorecase === undefined ? true : _ref$ignorecase; - - _classCallCheck(this, IgnoreBase); - - this._rules = []; - this._ignorecase = ignorecase; + _ref$ignorecase = _ref.ignorecase, + ignorecase = _ref$ignorecase === void 0 ? true : _ref$ignorecase, + _ref$ignoreCase = _ref.ignoreCase, + ignoreCase = _ref$ignoreCase === void 0 ? ignorecase : _ref$ignoreCase, + _ref$allowRelativePat = _ref.allowRelativePaths, + allowRelativePaths = _ref$allowRelativePat === void 0 ? false : _ref$allowRelativePat; + _classCallCheck(this, Ignore); define(this, KEY_IGNORE, true); + this._rules = []; + this._ignoreCase = ignoreCase; + this._allowRelativePaths = allowRelativePaths; this._initCache(); } - - _createClass(IgnoreBase, [{ - key: '_initCache', + _createClass(Ignore, [{ + key: "_initCache", value: function _initCache() { - this._cache = Object.create(null); + this._ignoreCache = Object.create(null); + this._testCache = Object.create(null); + } + }, { + key: "_addPattern", + value: function _addPattern(pattern) { + // #32 + if (pattern && pattern[KEY_IGNORE]) { + this._rules = this._rules.concat(pattern._rules); + this._added = true; + return; + } + if (checkPattern(pattern)) { + var rule = createRule(pattern, this._ignoreCase); + this._added = true; + this._rules.push(rule); + } } - // @param {Array.|string|Ignore} pattern - + // @param {Array | string | Ignore} pattern }, { - key: 'add', + key: "add", value: function add(pattern) { this._added = false; - - if (typeof pattern === 'string') { - pattern = pattern.split(/\r?\n/g); - } - - make_array(pattern).forEach(this._addPattern, this); + makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._addPattern, this); // Some rules have just added to the ignore, // making the behavior changed. if (this._added) { this._initCache(); } - return this; } // legacy - }, { - key: 'addPattern', + key: "addPattern", value: function addPattern(pattern) { return this.add(pattern); } - }, { - key: '_addPattern', - value: function _addPattern(pattern) { - // #32 - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - var rule = createRule(pattern, this._ignorecase); - this._added = true; - this._rules.push(rule); - } - } - }, { - key: 'filter', - value: function filter(paths) { - var _this = this; + // | ignored : unignored + // negative | 0:0 | 0:1 | 1:0 | 1:1 + // -------- | ------- | ------- | ------- | -------- + // 0 | TEST | TEST | SKIP | X + // 1 | TESTIF | SKIP | TEST | X - return make_array(paths).filter(function (path) { - return _this._filter(path); - }); - } - }, { - key: 'createFilter', - value: function createFilter() { - var _this2 = this; + // - SKIP: always skip + // - TEST: always test + // - TESTIF: only test if checkUnignored + // - X: that never happen - return function (path) { - return _this2._filter(path); + // @param {boolean} whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + + // @returns {TestResult} true if a file is ignored + }, { + key: "_testOne", + value: function _testOne(path, checkUnignored) { + var ignored = false; + var unignored = false; + this._rules.forEach(function (rule) { + var negative = rule.negative; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + var matched = rule.regex.test(path); + if (matched) { + ignored = !negative; + unignored = negative; + } + }); + return { + ignored: ignored, + unignored: unignored }; } + + // @returns {TestResult} }, { - key: 'ignores', - value: function ignores(path) { - return !this._filter(path); + key: "_test", + value: function _test(originalPath, cache, checkUnignored, slices) { + var path = originalPath + // Supports nullable path + && checkPath.convert(originalPath); + checkPath(path, originalPath, this._allowRelativePaths ? RETURN_FALSE : throwError); + return this._t(path, cache, checkUnignored, slices); } - - // @returns `Boolean` true if the `path` is NOT ignored - }, { - key: '_filter', - value: function _filter(path, slices) { - if (!path) { - return false; + key: "_t", + value: function _t(path, cache, checkUnignored, slices) { + if (path in cache) { + return cache[path]; } - - if (path in this._cache) { - return this._cache[path]; - } - if (!slices) { // path/to/a.js // ['path', 'to', 'a.js'] slices = path.split(SLASH); } - slices.pop(); - return this._cache[path] = slices.length + // If the path has no parent directory, just test it + if (!slices.length) { + return cache[path] = this._testOne(path, checkUnignored); + } + var parent = this._t(slices.join(SLASH) + SLASH, cache, checkUnignored, slices); + + // If the path contains a parent directory, check the parent first + return cache[path] = parent.ignored // > It is not possible to re-include a file if a parent directory of // > that file is excluded. - // If the path contains a parent directory, check the parent first - ? this._filter(slices.join(SLASH) + SLASH, slices) && this._test(path) - - // Or only test the path - : this._test(path); + ? parent : this._testOne(path, checkUnignored); } - - // @returns {Boolean} true if a file is NOT ignored - }, { - key: '_test', - value: function _test(path) { - // Explicitly define variable type by setting matched to `0` - var matched = 0; - - this._rules.forEach(function (rule) { - // if matched = true, then we only test negative rules - // if matched = false, then we test non-negative rules - if (!(matched ^ rule.negative)) { - matched = rule.negative ^ rule.regex.test(path); - } - }); + key: "ignores", + value: function ignores(path) { + return this._test(path, this._ignoreCache, false).ignored; + } + }, { + key: "createFilter", + value: function createFilter() { + var _this = this; + return function (path) { + return !_this.ignores(path); + }; + } + }, { + key: "filter", + value: function filter(paths) { + return makeArray(paths).filter(this.createFilter()); + } - return !matched; + // @returns {TestResult} + }, { + key: "test", + value: function test(path) { + return this._test(path, this._testCache, true); } }]); - - return IgnoreBase; + return Ignore; }(); +var factory = function factory(options) { + return new Ignore(options); +}; +var isPathValid = function isPathValid(path) { + return checkPath(path && checkPath.convert(path), path, RETURN_FALSE); +}; +factory.isPathValid = isPathValid; + +// Fixes typescript +factory["default"] = factory; +module.exports = factory; // Windows // -------------------------------------------------------------- -/* istanbul ignore if */ - - +/* istanbul ignore if */ if ( // Detect `process` so that it can run in browsers. typeof process !== 'undefined' && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === 'win32')) { - var filter = IgnoreBase.prototype._filter; - /* eslint no-control-regex: "off" */ - var make_posix = function make_posix(str) { - return (/^\\\\\?\\/.test(str) || /[^\x00-\x80]+/.test(str) ? str : str.replace(/\\/g, '/') - ); + var makePosix = function makePosix(str) { + return /^\\\\\?\\/.test(str) || /[\0-\x1F"<>\|]+/.test(str) ? str : str.replace(/\\/g, '/'); }; + checkPath.convert = makePosix; - IgnoreBase.prototype._filter = function filterWin32(path, slices) { - path = make_posix(path); - return filter.call(this, path, slices); + // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/' + // 'd:\\foo' + var REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = function (path) { + return REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path) || isNotRelative(path); }; } - -module.exports = function (options) { - return new IgnoreBase(options); -}; diff --git a/node_modules/ignore/package.json b/node_modules/ignore/package.json index e9c37dc89..edc78d3c6 100644 --- a/node_modules/ignore/package.json +++ b/node_modules/ignore/package.json @@ -1,62 +1,35 @@ { - "_from": "ignore@^4.0.6", - "_id": "ignore@4.0.6", - "_inBundle": false, - "_integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "_location": "/ignore", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ignore@^4.0.6", - "name": "ignore", - "escapedName": "ignore", - "rawSpec": "^4.0.6", - "saveSpec": null, - "fetchSpec": "^4.0.6" - }, - "_requiredBy": [ - "/@eslint/eslintrc", - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "_shasum": "750e3db5862087b4737ebac8207ffd1ef27b25fc", - "_spec": "ignore@^4.0.6", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "kael" - }, - "bugs": { - "url": "https://github.com/kaelzhang/node-ignore/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Ignore is a manager and filter for .gitignore rules.", - "devDependencies": { - "babel-cli": "^6.26.0", - "babel-preset-env": "^1.7.0", - "codecov": "^3.0.4", - "eslint": "^5.3.0", - "eslint-config-ostai": "^1.3.2", - "eslint-plugin-import": "^2.13.0", - "mkdirp": "^0.5.1", - "pre-suf": "^1.1.0", - "rimraf": "^2.6.2", - "spawn-sync": "^2.0.0", - "tap": "^12.0.1", - "tmp": "0.0.33", - "typescript": "^3.0.1" - }, - "engines": { - "node": ">= 4" - }, + "name": "ignore", + "version": "5.3.1", + "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", "files": [ "legacy.js", "index.js", "index.d.ts", "LICENSE-MIT" ], - "homepage": "https://github.com/kaelzhang/node-ignore#readme", + "scripts": { + "prepublishOnly": "npm run build", + "build": "babel -o legacy.js index.js", + "test:lint": "eslint .", + "test:tsc": "tsc ./test/ts/simple.ts --lib ES6", + "test:ts": "node ./test/ts/simple.js", + "tap": "tap --reporter classic", + "test:git": "npm run tap test/git-check-ignore.js", + "test:ignore": "npm run tap test/ignore.js", + "test:others": "npm run tap test/others.js", + "test:cases": "npm run tap test/*.js -- --coverage", + "test:no-coverage": "npm run tap test/*.js -- --no-check-coverage", + "test:only": "npm run test:lint && npm run test:tsc && npm run test:ts && npm run test:cases", + "test": "npm run test:only", + "test:win32": "IGNORE_TEST_WIN32=1 npm run test", + "report": "tap --coverage-report=html", + "posttest": "npm run report && codecov" + }, + "repository": { + "type": "git", + "url": "git@github.com:kaelzhang/node-ignore.git" + }, "keywords": [ "ignore", ".gitignore", @@ -72,22 +45,29 @@ "asterisks", "regular-expression" ], + "author": "kael", "license": "MIT", - "name": "ignore", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/kaelzhang/node-ignore.git" + "bugs": { + "url": "https://github.com/kaelzhang/node-ignore/issues" }, - "scripts": { - "build": "babel -o legacy.js index.js", - "posttest": "tap --coverage-report=html && codecov", - "prepublish": "npm run build", - "test": "npm run test-no-cov", - "test-no-cov": "npm run test:lint && npm run test:tsc && tap test/*.js --coverage", - "test:git": "tap test/git-check-ignore.js", - "test:ignore": "tap test/ignore.js --coverage", - "test:lint": "eslint .", - "test:tsc": "tsc ./test/ts/simple.ts" + "devDependencies": { + "@babel/cli": "^7.22.9", + "@babel/core": "^7.22.9", + "@babel/preset-env": "^7.22.9", + "codecov": "^3.8.2", + "debug": "^4.3.4", + "eslint": "^8.46.0", + "eslint-config-ostai": "^3.0.0", + "eslint-plugin-import": "^2.28.0", + "mkdirp": "^3.0.1", + "pre-suf": "^1.1.1", + "rimraf": "^5.0.1", + "spawn-sync": "^2.0.0", + "tap": "^16.3.9", + "tmp": "0.2.1", + "typescript": "^5.1.6" }, - "version": "4.0.6" + "engines": { + "node": ">= 4" + } } diff --git a/node_modules/is-boolean-object/.editorconfig b/node_modules/is-boolean-object/.editorconfig deleted file mode 100644 index 8d93cc1d1..000000000 --- a/node_modules/is-boolean-object/.editorconfig +++ /dev/null @@ -1,22 +0,0 @@ -root = true - -[*] -indent_style = tab -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -max_line_length = 150 - -[CHANGELOG.md] -indent_style = space -indent_size = 2 - -[.github/workflows/*.yml] -indent_style = off -indent_size = off -max_line_length = off - -[{CHANGELOG.md,*.json}] -max_line_length = off diff --git a/node_modules/is-boolean-object/.eslintignore b/node_modules/is-boolean-object/.eslintignore deleted file mode 100644 index 404abb221..000000000 --- a/node_modules/is-boolean-object/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -coverage/ diff --git a/node_modules/is-boolean-object/.eslintrc b/node_modules/is-boolean-object/.eslintrc deleted file mode 100644 index 53e6c45ef..000000000 --- a/node_modules/is-boolean-object/.eslintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "max-nested-callbacks": [2, 3] - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "prefer-regex-literals": 0, - }, - }, - ], -} diff --git a/node_modules/is-boolean-object/.github/FUNDING.yml b/node_modules/is-boolean-object/.github/FUNDING.yml deleted file mode 100644 index fd049965b..000000000 --- a/node_modules/is-boolean-object/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/is-boolean-object -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-boolean-object/.github/workflows/node-4+.yml b/node_modules/is-boolean-object/.github/workflows/node-4+.yml deleted file mode 100644 index ba174e1d6..000000000 --- a/node_modules/is-boolean-object/.github/workflows/node-4+.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: 'Tests: node.js' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - latest: ${{ steps.set-matrix.outputs.requireds }} - minors: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - preset: '>=4' - - latest: - needs: [matrix] - name: 'latest minors' - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.latest) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - minors: - needs: [matrix, latest] - name: 'non-latest minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.minors) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - - node: - name: 'node 4+' - needs: [latest, minors] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-boolean-object/.github/workflows/node-harmony.yml b/node_modules/is-boolean-object/.github/workflows/node-harmony.yml deleted file mode 100644 index 06a937d16..000000000 --- a/node_modules/is-boolean-object/.github/workflows/node-harmony.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: 'Tests: node.js (harmony)' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - stable: ${{ steps.set-matrix.outputs.requireds }} - unstable: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - versionsAsRoot: true - preset: '>= 0.4' - - stable: - needs: [matrix] - name: 'stable minors' - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: ${{ fromJson(needs.matrix.outputs.stable) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run test:harmony' - with: - node-version: ${{ matrix.node-version }} - command: 'test:harmony' - cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - skip-ls-check: true - - unstable: - needs: [matrix, stable] - name: 'unstable minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: ${{ fromJson(needs.matrix.outputs.unstable) }} - exclude: - - node-version: 0.7 - - node-version: 0.4 - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run test:harmony' - with: - node-version: ${{ matrix.node-version }} - command: 'test:harmony' - cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - skip-ls-check: true - - node: - name: 'node: harmony' - needs: [stable, unstable] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-boolean-object/.github/workflows/node-iojs.yml b/node_modules/is-boolean-object/.github/workflows/node-iojs.yml deleted file mode 100644 index f707c3cfc..000000000 --- a/node_modules/is-boolean-object/.github/workflows/node-iojs.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: 'Tests: node.js (io.js)' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - latest: ${{ steps.set-matrix.outputs.requireds }} - minors: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - preset: 'iojs' - - latest: - needs: [matrix] - name: 'latest minors' - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.latest) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - skip-ls-check: true - - minors: - needs: [matrix, latest] - name: 'non-latest minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.minors) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - skip-ls-check: true - - node: - name: 'io.js' - needs: [latest, minors] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-boolean-object/.github/workflows/node-pretest.yml b/node_modules/is-boolean-object/.github/workflows/node-pretest.yml deleted file mode 100644 index 3921e0ae6..000000000 --- a/node_modules/is-boolean-object/.github/workflows/node-pretest.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: 'Tests: pretest/posttest' - -on: [pull_request, push] - -jobs: - pretest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run pretest' - with: - node-version: 'lts/*' - command: 'pretest' - - posttest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run posttest' - with: - node-version: 'lts/*' - command: 'posttest' diff --git a/node_modules/is-boolean-object/.github/workflows/node-zero.yml b/node_modules/is-boolean-object/.github/workflows/node-zero.yml deleted file mode 100644 index 2435bf2cc..000000000 --- a/node_modules/is-boolean-object/.github/workflows/node-zero.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: 'Tests: node.js (0.x)' - -on: [pull_request, push] - -jobs: - matrix: - runs-on: ubuntu-latest - outputs: - stable: ${{ steps.set-matrix.outputs.requireds }} - unstable: ${{ steps.set-matrix.outputs.optionals }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - preset: '0.x' - - stable: - needs: [matrix] - name: 'stable minors' - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.stable) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - skip-ls-check: true - - unstable: - needs: [matrix, stable] - name: 'unstable minors' - continue-on-error: true - if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} - runs-on: ubuntu-latest - - strategy: - matrix: ${{ fromJson(needs.matrix.outputs.unstable) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/run@main - name: 'npm install && npm run tests-only' - with: - node-version: ${{ matrix.node-version }} - command: 'tests-only' - cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} - skip-ls-check: true - - node: - name: 'node 0.x' - needs: [stable, unstable] - runs-on: ubuntu-latest - steps: - - run: 'echo tests completed' diff --git a/node_modules/is-boolean-object/.github/workflows/rebase.yml b/node_modules/is-boolean-object/.github/workflows/rebase.yml deleted file mode 100644 index 027aed079..000000000 --- a/node_modules/is-boolean-object/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request_target] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/is-boolean-object/.github/workflows/require-allow-edits.yml b/node_modules/is-boolean-object/.github/workflows/require-allow-edits.yml deleted file mode 100644 index 549d7b482..000000000 --- a/node_modules/is-boolean-object/.github/workflows/require-allow-edits.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Require “Allow Edits” - -on: [pull_request_target] - -jobs: - _: - name: "Require “Allow Edits”" - - runs-on: ubuntu-latest - - steps: - - uses: ljharb/require-allow-edits@main diff --git a/node_modules/is-boolean-object/.nycrc b/node_modules/is-boolean-object/.nycrc deleted file mode 100644 index 1826526e0..000000000 --- a/node_modules/is-boolean-object/.nycrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "all": true, - "check-coverage": false, - "reporter": ["text-summary", "text", "html", "json"], - "lines": 86, - "statements": 85.93, - "functions": 82.43, - "branches": 76.06, - "exclude": [ - "coverage", - "test" - ] -} diff --git a/node_modules/is-boolean-object/CHANGELOG.md b/node_modules/is-boolean-object/CHANGELOG.md deleted file mode 100644 index fa8b06313..000000000 --- a/node_modules/is-boolean-object/CHANGELOG.md +++ /dev/null @@ -1,82 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [v1.1.0](https://github.com/inspect-js/is-boolean-object/compare/v1.0.1...v1.1.0) - 2020-12-05 - -### Commits - -- [Tests] migrate tests to Github Actions [`6cdb652`](https://github.com/inspect-js/is-boolean-object/commit/6cdb652add3c6e44c2f7fe07c5ca4c0d14ddc2c1) -- [Tests] run `nyc` on all tests [`9a33076`](https://github.com/inspect-js/is-boolean-object/commit/9a33076d14869bf5120a6ca3903bcb9a008cf2e5) -- [Tests] add .editorconfig [`bb401c0`](https://github.com/inspect-js/is-boolean-object/commit/bb401c084416b010d64e0c5a74465b37addab31f) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`5cb2405`](https://github.com/inspect-js/is-boolean-object/commit/5cb24052ca84d840e929f05cd1fe6c03b85ec032) -- [Robustness] use `call-bind` to avoid a dependency on `.call` [`76d87ae`](https://github.com/inspect-js/is-boolean-object/commit/76d87ae74235a9995d39bcf5783c04c744c34520) -- [actions] add "Allow Edits" workflow [`337206a`](https://github.com/inspect-js/is-boolean-object/commit/337206af74bd7c340bc938ab6dc0535c08490b3d) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`11f0481`](https://github.com/inspect-js/is-boolean-object/commit/11f0481efca28a241a35d384e2a302b1bcdc9a37) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`b9602c8`](https://github.com/inspect-js/is-boolean-object/commit/b9602c8ca11be138722187c1fb0a5b25a57a4edc) -- [Dev Deps] update `auto-changelog`, `tape`; add `aud` [`999e9e2`](https://github.com/inspect-js/is-boolean-object/commit/999e9e224d4eec8b20fc9c3431e9ba42caad79c9) -- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`bbb6728`](https://github.com/inspect-js/is-boolean-object/commit/bbb6728b9410f9d3e2d266523a477127e5e4c16f) - -## [v1.0.1](https://github.com/inspect-js/is-boolean-object/compare/v1.0.0...v1.0.1) - 2019-12-18 - -### Commits - -- [Tests] use shared travis-ci configs [`a1778b8`](https://github.com/inspect-js/is-boolean-object/commit/a1778b81ab4fe4479176de854e4e233cc441f183) -- Update `eslint`; use my personal shared `eslint` config. [`2c42c50`](https://github.com/inspect-js/is-boolean-object/commit/2c42c50a0654044b6c7e2a4ab18227e8c275464b) -- [Tests] remove `jscs` [`3807025`](https://github.com/inspect-js/is-boolean-object/commit/380702504fabc47fe22f61c4847379023d31a657) -- [Tests] up to `node` `v8.4`, `v7.10`, `v6.11`, `v5.12`, `v4.8`; improve matrix; newer npm breaks in older node; improve scripts. [`a02b986`](https://github.com/inspect-js/is-boolean-object/commit/a02b98682b285de09e2c5a895627771d6a7f552c) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `jscs`, `nsp`, `semver`, `tape` [`d9030a9`](https://github.com/inspect-js/is-boolean-object/commit/d9030a99b8e274c76ae5f23f31d9d085a7e25272) -- Update `eslint`, `nsp` [`a1b6388`](https://github.com/inspect-js/is-boolean-object/commit/a1b6388fabd0de51a02c567953826344ef05890c) -- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`17a0fd3`](https://github.com/inspect-js/is-boolean-object/commit/17a0fd391e32635ec3434baca0d062f8abeeb592) -- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`0b1818f`](https://github.com/inspect-js/is-boolean-object/commit/0b1818fdcaebc6133e515dfe3b5a8930b38999b5) -- [meta] remove unused Makefile and associated utilities [`33dc0ae`](https://github.com/inspect-js/is-boolean-object/commit/33dc0ae35a03e91f81b1bb3db5ba763dacadbfa2) -- Update `covert`, `jscs`, `eslint`, `semver` [`7e513c1`](https://github.com/inspect-js/is-boolean-object/commit/7e513c12998a651c14f62b3ecfb7215a5cc5ee8f) -- [Tests] up to `node` `v11.4`, `v10.14`, `v8.14`, `v6.15` [`992b849`](https://github.com/inspect-js/is-boolean-object/commit/992b84933760e0fe6ba2cee74ad7fff507f28128) -- [meta] add `auto-changelog` [`63d71b8`](https://github.com/inspect-js/is-boolean-object/commit/63d71b8beb9aeb77cab3d2db2cf643f1b8b1a55c) -- Update `tape`, `eslint`, `semver` [`76aea69`](https://github.com/inspect-js/is-boolean-object/commit/76aea699fb315ac460799182d707c388b4a4e017) -- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a6cbec0`](https://github.com/inspect-js/is-boolean-object/commit/a6cbec09940b6f2c7cf366526a94c0c4756508f5) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace`, `semver`, `tape`; add `safe-publish-latest` [`7cf6bb0`](https://github.com/inspect-js/is-boolean-object/commit/7cf6bb05ba7bac504df680dd9ca625fba6dccb5a) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`57d713c`](https://github.com/inspect-js/is-boolean-object/commit/57d713cca2ccbbbf1da1142ee5e8236d12551f76) -- [actions] add automatic rebasing / merge commit blocking [`f7a2bdb`](https://github.com/inspect-js/is-boolean-object/commit/f7a2bdb905e07d75c65593359f81bfeda9fe9826) -- [meta] create FUNDING.yml [`9765e73`](https://github.com/inspect-js/is-boolean-object/commit/9765e738cccdd5ff6c89b21324119a2bf4064fbd) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `replace`, `semver`, `tape` [`5c16b56`](https://github.com/inspect-js/is-boolean-object/commit/5c16b56a5a2d36c6a70c1bd396b3a6c931f655db) -- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`5717aad`](https://github.com/inspect-js/is-boolean-object/commit/5717aadd8b0e8c76ccb194d1845ad8cc120f29c6) -- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`80b924d`](https://github.com/inspect-js/is-boolean-object/commit/80b924dd270188e1e928f4141078bee14d810e9b) -- [Dev Deps] update `jscs` [`2e5479e`](https://github.com/inspect-js/is-boolean-object/commit/2e5479e56b6d33288582cfe8c254ca081e79500c) -- Test up to `io.js` `v2.2` [`93379a4`](https://github.com/inspect-js/is-boolean-object/commit/93379a4b48ba719113006ab08bbe6679c8a27293) -- [Tests] remove `nsp`; use `npm audit`; allow to fail for now [`36ae30a`](https://github.com/inspect-js/is-boolean-object/commit/36ae30acffe4a892ea0882a793b8a90f09d08fdf) -- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`ef76976`](https://github.com/inspect-js/is-boolean-object/commit/ef76976db22f2867fca2ee377fdbc9da81f0d142) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`a1182bd`](https://github.com/inspect-js/is-boolean-object/commit/a1182bd99e5d31e113107241f0d697e71b27bf7b) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`4f79b47`](https://github.com/inspect-js/is-boolean-object/commit/4f79b474f0643fd2c9dbc863949a61cf01255b6f) -- [Tests] up to `node` `v10.3` [`5e96464`](https://github.com/inspect-js/is-boolean-object/commit/5e96464fc08eacc45f5f58fe7800ddbc45e40cea) -- [Dev Deps] update `eslint`, `nsp`, `semver`, `tape` [`e1eb3fa`](https://github.com/inspect-js/is-boolean-object/commit/e1eb3fad8bad65140db3bd2381bb3bea6a9c6242) -- Only apps should have lockfiles. [`c7f301f`](https://github.com/inspect-js/is-boolean-object/commit/c7f301ff368f9e04f7f64a2ce9b6ae1aec803e69) -- [meta] add `funding` field [`fad0366`](https://github.com/inspect-js/is-boolean-object/commit/fad03662becea5db7cef29d816d173ad771be86a) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`80d39d9`](https://github.com/inspect-js/is-boolean-object/commit/80d39d90205d3bb564acb80b0625e90c267347fd) -- [Tests] use `eclint` instead of `editorconfig-tools` [`980e91b`](https://github.com/inspect-js/is-boolean-object/commit/980e91b186a728f77366ba16b7bebc813b9cc3b0) -- [Dev Deps] Update `tape`, `eslint` [`9960830`](https://github.com/inspect-js/is-boolean-object/commit/9960830876a3672686c569fde3d43bb7983955f1) -- Test up to `io.js` `v3.0` [`a3c3cd0`](https://github.com/inspect-js/is-boolean-object/commit/a3c3cd087d7fcefbf4f3525c05f4cee3b6e5b0ef) -- [Dev Deps] update `tape` [`217fbd6`](https://github.com/inspect-js/is-boolean-object/commit/217fbd6bb2989f9304ad95cd49697da7fe03b8d5) -- [Tests] only audit prod deps [`89284ee`](https://github.com/inspect-js/is-boolean-object/commit/89284ee17dce1d044df0ca9e006072f25742bbaf) -- [Performance] only use toStringTag code path when the value has that property [`2863bc5`](https://github.com/inspect-js/is-boolean-object/commit/2863bc5b72680f05ace8e66fddcf48966b942d55) -- [Dev Deps] update `replace` [`53e72a5`](https://github.com/inspect-js/is-boolean-object/commit/53e72a5ceca5b3a82e6407829f9227df9df6d329) -- [Enhancement] slight optimization for `null` [`a90a3c4`](https://github.com/inspect-js/is-boolean-object/commit/a90a3c4464d0300e23384d96fb4281b55b7fd723) -- [Dev Deps] update `tape` [`9377bd5`](https://github.com/inspect-js/is-boolean-object/commit/9377bd5110e99d8ec550f24ef3f6ead62a8f1f50) -- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`3085530`](https://github.com/inspect-js/is-boolean-object/commit/30855304841854f79e406372f524efe4bc7d8c04) -- Test on `io.js` `v2.4` [`8af335c`](https://github.com/inspect-js/is-boolean-object/commit/8af335ca82a0eeba4a0a593775e4caf744834ec4) -- Test on `io.js` `v2.3` [`1eb3424`](https://github.com/inspect-js/is-boolean-object/commit/1eb3424bef528551f5c99a754281a51d92e40ab1) - -## v1.0.0 - 2015-04-28 - -### Commits - -- Dotfiles [`6b9b998`](https://github.com/inspect-js/is-boolean-object/commit/6b9b998bb238a32d4829c9f9bf274e5ca15023ee) -- `make release` [`d5e50b3`](https://github.com/inspect-js/is-boolean-object/commit/d5e50b33a3cd8d8abe7de8ae36e2944c24ce76ba) -- package.json [`117676a`](https://github.com/inspect-js/is-boolean-object/commit/117676a48609e636d4257c1b35c695ff20939211) -- Read me [`ef327a7`](https://github.com/inspect-js/is-boolean-object/commit/ef327a74c7f73e64cfa3c20a9620ef7accf8b762) -- Initial commit [`2346886`](https://github.com/inspect-js/is-boolean-object/commit/2346886252b9637c1af6851a3fc2cbc98bc986aa) -- Tests [`67211f8`](https://github.com/inspect-js/is-boolean-object/commit/67211f8bff1a49e5df219935765b83573c097353) -- Implementation [`2d88bd6`](https://github.com/inspect-js/is-boolean-object/commit/2d88bd6e1ef0f07f5a639775eb89f3b78e12eb65) diff --git a/node_modules/is-boolean-object/README.md b/node_modules/is-boolean-object/README.md deleted file mode 100644 index aeadb7c81..000000000 --- a/node_modules/is-boolean-object/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# is-boolean-object [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -[![browser support][9]][10] - -Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag. - -## Example - -```js -var isBoolean = require('is-boolean-object'); -var assert = require('assert'); - -assert.notOk(isBoolean(undefined)); -assert.notOk(isBoolean(null)); -assert.notOk(isBoolean('foo')); -assert.notOk(isBoolean(function () {})); -assert.notOk(isBoolean([])); -assert.notOk(isBoolean({})); -assert.notOk(isBoolean(/a/g)); -assert.notOk(isBoolean(new RegExp('a', 'g'))); -assert.notOk(isBoolean(new Date())); -assert.notOk(isBoolean(42)); -assert.notOk(isBoolean(NaN)); -assert.notOk(isBoolean(Infinity)); - -assert.ok(isBoolean(new Boolean(42))); -assert.ok(isBoolean(false)); -assert.ok(isBoolean(Object(false))); -assert.ok(isBoolean(true)); -assert.ok(isBoolean(Object(true))); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-boolean-object -[2]: http://versionbadg.es/ljharb/is-boolean-object.svg -[3]: https://travis-ci.org/ljharb/is-boolean-object.svg -[4]: https://travis-ci.org/ljharb/is-boolean-object -[5]: https://david-dm.org/ljharb/is-boolean-object.svg -[6]: https://david-dm.org/ljharb/is-boolean-object -[7]: https://david-dm.org/ljharb/is-boolean-object/dev-status.svg -[8]: https://david-dm.org/ljharb/is-boolean-object#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-boolean-object.png -[10]: https://ci.testling.com/ljharb/is-boolean-object -[11]: https://nodei.co/npm/is-boolean-object.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-boolean-object.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-boolean-object.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-boolean-object diff --git a/node_modules/is-boolean-object/index.js b/node_modules/is-boolean-object/index.js deleted file mode 100644 index 69864eb56..000000000 --- a/node_modules/is-boolean-object/index.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var callBound = require('call-bind/callBound'); -var $boolToStr = callBound('Boolean.prototype.toString'); -var $toString = callBound('Object.prototype.toString'); - -var tryBooleanObject = function booleanBrandCheck(value) { - try { - $boolToStr(value); - return true; - } catch (e) { - return false; - } -}; -var boolClass = '[object Boolean]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isBoolean(value) { - if (typeof value === 'boolean') { - return true; - } - if (value === null || typeof value !== 'object') { - return false; - } - return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass; -}; diff --git a/node_modules/is-boolean-object/package.json b/node_modules/is-boolean-object/package.json deleted file mode 100644 index cbe33777c..000000000 --- a/node_modules/is-boolean-object/package.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "_from": "is-boolean-object@^1.1.0", - "_id": "is-boolean-object@1.1.0", - "_inBundle": false, - "_integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "_location": "/is-boolean-object", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-boolean-object@^1.1.0", - "name": "is-boolean-object", - "escapedName": "is-boolean-object", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "_shasum": "e2aaad3a3a8fca34c28f6eee135b156ed2587ff0", - "_spec": "is-boolean-object@^1.1.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "bugs": { - "url": "https://github.com/ljharb/is-boolean-object/issues" - }, - "bundleDependencies": false, - "dependencies": { - "call-bind": "^1.0.0" - }, - "deprecated": false, - "description": "Is this value a JS Boolean? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "devDependencies": { - "@ljharb/eslint-config": "^17.3.0", - "aud": "^1.1.3", - "auto-changelog": "^2.2.1", - "eclint": "^2.8.1", - "eslint": "^7.15.0", - "foreach": "^2.0.5", - "indexof": "^0.0.1", - "is": "^3.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^1.1.4", - "tape": "^5.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/is-boolean-object#readme", - "keywords": [ - "Boolean", - "ES6", - "toStringTag", - "@@toStringTag", - "Boolean object", - "true", - "false", - "is-boolean" - ], - "license": "MIT", - "main": "index.js", - "name": "is-boolean-object", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-boolean-object.git" - }, - "scripts": { - "eccheck": "eclint check $(git ls-files)", - "lint": "eslint --ext=js,mjs .", - "posttest": "aud --production", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prelint": "npm run eccheck", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only && npm run test:harmony", - "test:harmony": "node --harmony --es-staging test", - "tests-only": "nyc tape 'test/**/*.js'", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "testling": { - "files": "test.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.1.0" -} diff --git a/node_modules/is-boolean-object/test/index.js b/node_modules/is-boolean-object/test/index.js deleted file mode 100644 index 6b4b86a23..000000000 --- a/node_modules/is-boolean-object/test/index.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -var test = require('tape'); -var isBoolean = require('../'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('') === 'symbol'; - -test('not Booleans', function (t) { - t.test('primitives', function (st) { - st.notOk(isBoolean(), 'undefined is not Boolean'); - st.notOk(isBoolean(null), 'null is not Boolean'); - st.notOk(isBoolean(0), '0 is not Boolean'); - st.notOk(isBoolean(NaN), 'NaN is not Boolean'); - st.notOk(isBoolean(Infinity), 'Infinity is not Boolean'); - st.notOk(isBoolean('foo'), 'string is not Boolean'); - st.end(); - }); - - t.test('objects', function (st) { - st.notOk(isBoolean(Object(42)), 'number object is not Boolean'); - st.notOk(isBoolean([]), 'array is not Boolean'); - st.notOk(isBoolean({}), 'object is not Boolean'); - st.notOk(isBoolean(function () {}), 'function is not Boolean'); - st.notOk(isBoolean(/a/g), 'regex literal is not Boolean'); - st.notOk(isBoolean(new RegExp('a', 'g')), 'regex object is not Boolean'); - st.notOk(isBoolean(new Date()), 'new Date() is not Boolean'); - st.end(); - }); - - t.end(); -}); - -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { - var fakeBoolean = { - toString: function () { return 'true'; }, - valueOf: function () { return true; } - }; - fakeBoolean[Symbol.toStringTag] = 'Boolean'; - t.notOk(isBoolean(fakeBoolean), 'fake Boolean with @@toStringTag "Boolean" is not Boolean'); - t.end(); -}); - -test('Booleans', function (t) { - t.ok(isBoolean(true), 'true is Boolean'); - t.ok(isBoolean(false), 'false is Boolean'); - t.ok(isBoolean(Object(true)), 'Object(true) is Boolean'); - t.ok(isBoolean(Object(false)), 'Object(false) is Boolean'); - t.end(); -}); diff --git a/node_modules/is-extglob/package.json b/node_modules/is-extglob/package.json index 6690f5e01..7a908369d 100644 --- a/node_modules/is-extglob/package.json +++ b/node_modules/is-extglob/package.json @@ -1,48 +1,28 @@ { - "_from": "is-extglob@^2.1.1", - "_id": "is-extglob@2.1.1", - "_inBundle": false, - "_integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "_location": "/is-extglob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-extglob@^2.1.1", - "name": "is-extglob", - "escapedName": "is-extglob", - "rawSpec": "^2.1.1", - "saveSpec": null, - "fetchSpec": "^2.1.1" + "name": "is-extglob", + "description": "Returns true if a string has an extglob.", + "version": "2.1.1", + "homepage": "https://github.com/jonschlinkert/is-extglob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "repository": "jonschlinkert/is-extglob", + "bugs": { + "url": "https://github.com/jonschlinkert/is-extglob/issues" }, - "_requiredBy": [ - "/is-glob" + "license": "MIT", + "files": [ + "index.js" ], - "_resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "_shasum": "a88c02535791f02ed37c76a1b9ea9773c833f8c2", - "_spec": "is-extglob@^2.1.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/is-glob", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" + "main": "index.js", + "engines": { + "node": ">=0.10.0" }, - "bugs": { - "url": "https://github.com/jonschlinkert/is-extglob/issues" + "scripts": { + "test": "mocha" }, - "bundleDependencies": false, - "deprecated": false, - "description": "Returns true if a string has an extglob.", "devDependencies": { "gulp-format-md": "^0.1.10", "mocha": "^3.0.2" }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/jonschlinkert/is-extglob", "keywords": [ "bash", "braces", @@ -62,16 +42,6 @@ "string", "test" ], - "license": "MIT", - "main": "index.js", - "name": "is-extglob", - "repository": { - "type": "git", - "url": "git+https://github.com/jonschlinkert/is-extglob.git" - }, - "scripts": { - "test": "mocha" - }, "verb": { "toc": false, "layout": "default", @@ -95,6 +65,5 @@ "lint": { "reflinks": true } - }, - "version": "2.1.1" + } } diff --git a/node_modules/is-glob/README.md b/node_modules/is-glob/README.md index 59444ebe6..740724b27 100644 --- a/node_modules/is-glob/README.md +++ b/node_modules/is-glob/README.md @@ -1,4 +1,4 @@ -# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Linux Build Status](https://img.shields.io/travis/micromatch/is-glob.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/is-glob) [![Windows Build Status](https://img.shields.io/appveyor/ci/micromatch/is-glob.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/micromatch/is-glob) +# is-glob [![NPM version](https://img.shields.io/npm/v/is-glob.svg?style=flat)](https://www.npmjs.com/package/is-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![NPM total downloads](https://img.shields.io/npm/dt/is-glob.svg?style=flat)](https://npmjs.org/package/is-glob) [![Build Status](https://img.shields.io/github/workflow/status/micromatch/is-glob/dev)](https://github.com/micromatch/is-glob/actions) > Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. diff --git a/node_modules/is-glob/index.js b/node_modules/is-glob/index.js index 55826510c..620f563ec 100644 --- a/node_modules/is-glob/index.js +++ b/node_modules/is-glob/index.js @@ -7,8 +7,128 @@ var isExtglob = require('is-extglob'); var chars = { '{': '}', '(': ')', '[': ']'}; -var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/; -var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/; +var strictCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + var pipeIndex = -2; + var closeSquareIndex = -2; + var closeCurlyIndex = -2; + var closeParenIndex = -2; + var backSlashIndex = -2; + while (index < str.length) { + if (str[index] === '*') { + return true; + } + + if (str[index + 1] === '?' && /[\].+)]/.test(str[index])) { + return true; + } + + if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') { + if (closeSquareIndex < index) { + closeSquareIndex = str.indexOf(']', index); + } + if (closeSquareIndex > index) { + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { + return true; + } + } + } + + if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') { + closeCurlyIndex = str.indexOf('}', index); + if (closeCurlyIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { + return true; + } + } + } + + if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') { + closeParenIndex = str.indexOf(')', index); + if (closeParenIndex > index) { + backSlashIndex = str.indexOf('\\', index); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + + if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') { + if (pipeIndex < index) { + pipeIndex = str.indexOf('|', index); + } + if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') { + closeParenIndex = str.indexOf(')', pipeIndex); + if (closeParenIndex > pipeIndex) { + backSlashIndex = str.indexOf('\\', pipeIndex); + if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { + return true; + } + } + } + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; + +var relaxedCheck = function(str) { + if (str[0] === '!') { + return true; + } + var index = 0; + while (index < str.length) { + if (/[*?{}()[\]]/.test(str[index])) { + return true; + } + + if (str[index] === '\\') { + var open = str[index + 1]; + index += 2; + var close = chars[open]; + + if (close) { + var n = str.indexOf(close, index); + if (n !== -1) { + index = n + 1; + } + } + + if (str[index] === '!') { + return true; + } + } else { + index++; + } + } + return false; +}; module.exports = function isGlob(str, options) { if (typeof str !== 'string' || str === '') { @@ -19,30 +139,12 @@ module.exports = function isGlob(str, options) { return true; } - var regex = strictRegex; - var match; + var check = strictCheck; - // optionally relax regex + // optionally relax check if (options && options.strict === false) { - regex = relaxedRegex; + check = relaxedCheck; } - while ((match = regex.exec(str))) { - if (match[2]) return true; - var idx = match.index + match[0].length; - - // if an open bracket/brace/paren is escaped, - // set the index to the next closing character - var open = match[1]; - var close = open ? chars[open] : null; - if (open && close) { - var n = str.indexOf(close, idx); - if (n !== -1) { - idx = n + 1; - } - } - - str = str.slice(idx); - } - return false; + return check(str); }; diff --git a/node_modules/is-glob/package.json b/node_modules/is-glob/package.json index 489807b83..858af0378 100644 --- a/node_modules/is-glob/package.json +++ b/node_modules/is-glob/package.json @@ -1,66 +1,36 @@ { - "_from": "is-glob@^4.0.0", - "_id": "is-glob@4.0.1", - "_inBundle": false, - "_integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "_location": "/is-glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-glob@^4.0.0", - "name": "is-glob", - "escapedName": "is-glob", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/eslint", - "/glob-parent" + "name": "is-glob", + "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", + "version": "4.0.3", + "homepage": "https://github.com/micromatch/is-glob", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Brian Woodward (https://twitter.com/doowb)", + "Daniel Perez (https://tuvistavie.com)", + "Jon Schlinkert (http://twitter.com/jonschlinkert)" ], - "_resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "_shasum": "7567dbe9f2f5e2467bc77ab83c4a29482407a5dc", - "_spec": "is-glob@^4.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Jon Schlinkert", - "url": "https://github.com/jonschlinkert" - }, + "repository": "micromatch/is-glob", "bugs": { "url": "https://github.com/micromatch/is-glob/issues" }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Brian Woodward", - "url": "https://twitter.com/doowb" - }, - { - "name": "Daniel Perez", - "url": "https://tuvistavie.com" - }, - { - "name": "Jon Schlinkert", - "url": "http://twitter.com/jonschlinkert" - } + "license": "MIT", + "files": [ + "index.js" ], + "main": "index.js", + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha && node benchmark.js" + }, "dependencies": { "is-extglob": "^2.1.1" }, - "deprecated": false, - "description": "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience.", "devDependencies": { "gulp-format-md": "^0.1.10", "mocha": "^3.0.2" }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/micromatch/is-glob", "keywords": [ "bash", "braces", @@ -80,16 +50,6 @@ "string", "test" ], - "license": "MIT", - "main": "index.js", - "name": "is-glob", - "repository": { - "type": "git", - "url": "git+https://github.com/micromatch/is-glob.git" - }, - "scripts": { - "test": "mocha" - }, "verb": { "layout": "default", "plugins": [ @@ -117,6 +77,5 @@ "verb", "vinyl" ] - }, - "version": "4.0.1" + } } diff --git a/node_modules/is-number-object/.eslintrc b/node_modules/is-number-object/.eslintrc deleted file mode 100644 index a6dec9472..000000000 --- a/node_modules/is-number-object/.eslintrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - }, -} diff --git a/node_modules/is-number-object/.github/FUNDING.yml b/node_modules/is-number-object/.github/FUNDING.yml deleted file mode 100644 index 17f4dc55d..000000000 --- a/node_modules/is-number-object/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/is-number-object -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-number-object/.github/workflows/rebase.yml b/node_modules/is-number-object/.github/workflows/rebase.yml deleted file mode 100644 index 436cb79dc..000000000 --- a/node_modules/is-number-object/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/is-number-object/.travis.yml b/node_modules/is-number-object/.travis.yml deleted file mode 100644 index 2d1c1d25f..000000000 --- a/node_modules/is-number-object/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml - - ljharb/travis-ci:node/coverage.yml -matrix: - allow_failures: - - env: COVERAGE=true diff --git a/node_modules/is-number-object/CHANGELOG.md b/node_modules/is-number-object/CHANGELOG.md deleted file mode 100644 index 665d9db4c..000000000 --- a/node_modules/is-number-object/CHANGELOG.md +++ /dev/null @@ -1,84 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - -## [v1.0.4](https://github.com/inspect-js/is-number-object/compare/v1.0.3...v1.0.4) - 2019-12-19 - -### Commits - -- [Tests] use shared travis-ci configs [`792b5aa`](https://github.com/inspect-js/is-number-object/commit/792b5aa5e7313ddf5507f7283bb7d5d5c646b11b) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`dc66db7`](https://github.com/inspect-js/is-number-object/commit/dc66db7dd1eca0263f6602597eb40601519e912e) -- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`7660fed`](https://github.com/inspect-js/is-number-object/commit/7660fed03a7060eb5c91e74b9a17303d4fac1056) -- [Tests] remove `jscs` [`f1fee97`](https://github.com/inspect-js/is-number-object/commit/f1fee97423478bcc653c844fadda55138d9b9a54) -- [meta] add `auto-changelog` [`4b1c225`](https://github.com/inspect-js/is-number-object/commit/4b1c2253770eb18761a1e8b157772028d6f742c4) -- [meta] remove unused Makefile and associated utilities [`379b979`](https://github.com/inspect-js/is-number-object/commit/379b9793d9c61d7889e53bd9de9578dca9964ebc) -- Update `covert`, `jscs`, `eslint`, `semver` [`16d2af8`](https://github.com/inspect-js/is-number-object/commit/16d2af82a6c93aee614f7a4b2c468411c743e95f) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `is`, `replace`, `semver`, `tape` [`21c0f04`](https://github.com/inspect-js/is-number-object/commit/21c0f0431984b87443c6acb9f003368feb7b4368) -- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `nsp`, `eslint`, `semver`. Add `replace`. Use `^` instead of `~`. [`19d6ee3`](https://github.com/inspect-js/is-number-object/commit/19d6ee3a3d4a87764d57316804fd8b882ba5197c) -- Update `eslint` [`d32754b`](https://github.com/inspect-js/is-number-object/commit/d32754bcca0033e01eba531c4353d1239e992203) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `replace` [`1df8165`](https://github.com/inspect-js/is-number-object/commit/1df8165dd63d9f2f78ccb78e905d0a6b3e302884) -- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`675372b`](https://github.com/inspect-js/is-number-object/commit/675372b115fb20b5034f40bcbb5560c6c0512746) -- [readme] clean up readme; remove testling; fix repo URLs [`80e29c4`](https://github.com/inspect-js/is-number-object/commit/80e29c4d6d0811fc361e95ee83b81280bf3ae3f5) -- [Tests] up to `node` `v12.7`, `v10.16`, `v8.16` [`287a968`](https://github.com/inspect-js/is-number-object/commit/287a9687b1fc3d091ec231c06f19a19ff7b0e8f6) -- Test on latest `iojs` and `node` versions. [`11c98a2`](https://github.com/inspect-js/is-number-object/commit/11c98a23b232cb21c7daab797fd63875c2970681) -- [actions] add automatic rebasing / merge commit blocking [`022d026`](https://github.com/inspect-js/is-number-object/commit/022d026129df445f239ba2ecd8d47a2786242d75) -- [meta] create FUNDING.yml [`7f52710`](https://github.com/inspect-js/is-number-object/commit/7f527107168aad7108b7c262d295dcf44e03214d) -- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`bc8cd50`](https://github.com/inspect-js/is-number-object/commit/bc8cd508fe4440168f9b049be3ddf93c56c06c49) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`1f9200b`](https://github.com/inspect-js/is-number-object/commit/1f9200b7c56840dc23eeeca5d0ee4f64a0446e08) -- [Tests] up to `node` `v12.11` [`706d50a`](https://github.com/inspect-js/is-number-object/commit/706d50a779b90feb3f4d2ae88d8189d19b913073) -- [Dev Deps] update `jscs` [`e3591a4`](https://github.com/inspect-js/is-number-object/commit/e3591a445b1af25d46632eafea51efa07b4eb6dc) -- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`baf4ee7`](https://github.com/inspect-js/is-number-object/commit/baf4ee749fb65ec12e9cab102e77aa0e14312109) -- Update `nsp`, `eslint` [`61b18d5`](https://github.com/inspect-js/is-number-object/commit/61b18d5b44542fddf4950534d506b20d8c8b1f44) -- Update `eslint`, `semver` [`52e61bd`](https://github.com/inspect-js/is-number-object/commit/52e61bd4334c0a1afacd147fd0bc1e2c1be10df5) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `has-symbols`; add `safe-publish-latest` [`79db7f6`](https://github.com/inspect-js/is-number-object/commit/79db7f610d2bcf5f0d6e8ca834f7402504101072) -- Only apps should have lockfiles [`677b9b4`](https://github.com/inspect-js/is-number-object/commit/677b9b4fb6ad9d7b984cb0f89c8b5a6df143b29a) -- Test on `io.js` `v2.2` [`e8a38b2`](https://github.com/inspect-js/is-number-object/commit/e8a38b2fe73b841b0ed55d9f60573d460a4f2a62) -- [meta] add `funding` field [`85315e7`](https://github.com/inspect-js/is-number-object/commit/85315e75c119a2aef70a766f2ddc1079b64d006b) -- [Dev Deps] update `eslint`, `tape` [`f3581aa`](https://github.com/inspect-js/is-number-object/commit/f3581aaea310546f6ee4612990468d39f058d320) -- [Tests] use `eclint` instead of `editorconfig-tools` [`7b53680`](https://github.com/inspect-js/is-number-object/commit/7b5368071000eb1c715aeeee5ff47ffdbee9fe5c) -- [Dev Deps] update `semver`, `tape` [`d6b524a`](https://github.com/inspect-js/is-number-object/commit/d6b524ac2e8c0240c436cbe8828671e383d51fd5) -- [Dev Deps] Update `tape`, `eslint` [`be19203`](https://github.com/inspect-js/is-number-object/commit/be19203dee0aa70ff8f09823bf880a38b824e1ed) -- Test up to `io.js` `v2.1` [`feb7ba6`](https://github.com/inspect-js/is-number-object/commit/feb7ba63a0816f1d36419ce240f96e9b4e4c90ba) -- Test up to `io.js` `v3.0` [`7be1f0a`](https://github.com/inspect-js/is-number-object/commit/7be1f0a25dc59b6606be9ee1ace38cb7039a59d2) -- [Dev Deps] update `tape` [`d9a2318`](https://github.com/inspect-js/is-number-object/commit/d9a2318bc82477e9321e961def11e28d364e5562) -- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`a6cd411`](https://github.com/inspect-js/is-number-object/commit/a6cd411c6bd92691a48b52683afce584c2c6b21b) -- Test on `io.js` `v2.4` [`46c2e7f`](https://github.com/inspect-js/is-number-object/commit/46c2e7f2ce8ad7f8ab3c1da827d93fc2780eff06) -- Test on `io.js` `v2.3` [`9c344b0`](https://github.com/inspect-js/is-number-object/commit/9c344b0df83628908a1f776a3f2e5fc4fae1d4d2) -- Fix tests for faked @@toStringTag [`f8c446e`](https://github.com/inspect-js/is-number-object/commit/f8c446e9fc320c23807717356e259529f494b9f3) - -## [v1.0.3](https://github.com/inspect-js/is-number-object/compare/v1.0.2...v1.0.3) - 2015-01-30 - -### Commits - -- If @@toStringTag is not present, use the old-school Object#toString test. [`9b2a4df`](https://github.com/inspect-js/is-number-object/commit/9b2a4df6ccf903e89198d4244eeb7f47a7056327) - -## [v1.0.2](https://github.com/inspect-js/is-number-object/compare/v1.0.1...v1.0.2) - 2015-01-29 - -### Commits - -- Improve optimizability of the non-try/catch part. [`7e6be2f`](https://github.com/inspect-js/is-number-object/commit/7e6be2fd2346557fc81bd544ac8745021c50e266) -- Fix package.json [`4f2ebea`](https://github.com/inspect-js/is-number-object/commit/4f2ebeae09c45e1eefeb2c10a011ff2ef0aca921) - -## [v1.0.1](https://github.com/inspect-js/is-number-object/compare/v1.0.0...v1.0.1) - 2015-01-29 - -### Commits - -- Use Object() instead of new Number() [`1aaa746`](https://github.com/inspect-js/is-number-object/commit/1aaa746c26878a0f698aabea4d88215311f2a38d) -- Add early exits for typeof number, or typeof not "object". [`eae4337`](https://github.com/inspect-js/is-number-object/commit/eae43375d3f88e04bb10eabd954e5a6b66ad5305) - -## v1.0.0 - 2015-01-28 - -### Commits - -- Dotfiles. [`9c74e3e`](https://github.com/inspect-js/is-number-object/commit/9c74e3eb2b10398d4022de7c4015531e874f06c8) -- `make release` [`a99e5ae`](https://github.com/inspect-js/is-number-object/commit/a99e5aeb3995a7d543fc5833722bc02011fabad6) -- package.json [`4fed9ef`](https://github.com/inspect-js/is-number-object/commit/4fed9ef7c35ccfc45ca8acd3c92c9cb91c7daa6d) -- Read me [`c91d6ba`](https://github.com/inspect-js/is-number-object/commit/c91d6ba00de79eaaac5fec7c9d8866d61d0abb62) -- Initial commit [`629fb96`](https://github.com/inspect-js/is-number-object/commit/629fb969f076e0802c799b368c7b02556bb0750e) -- Tests. [`a39de62`](https://github.com/inspect-js/is-number-object/commit/a39de624785cc204ed7c0ea5518f1c878870ceb1) -- Implementation. [`aedd91e`](https://github.com/inspect-js/is-number-object/commit/aedd91e6fc23f00852ad1266b6c19f32b7f93a22) diff --git a/node_modules/is-number-object/README.md b/node_modules/is-number-object/README.md deleted file mode 100644 index 5617d7ec6..000000000 --- a/node_modules/is-number-object/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# is-number-object [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag. - -## Example - -```js -var isNumber = require('is-number-object'); -var assert = require('assert'); - -assert.notOk(isNumber(undefined)); -assert.notOk(isNumber(null)); -assert.notOk(isNumber(false)); -assert.notOk(isNumber(true)); -assert.notOk(isNumber('foo')); -assert.notOk(isNumber(function () {})); -assert.notOk(isNumber([])); -assert.notOk(isNumber({})); -assert.notOk(isNumber(/a/g)); -assert.notOk(isNumber(new RegExp('a', 'g'))); -assert.notOk(isNumber(new Date())); - -assert.ok(isNumber(42)); -assert.ok(isNumber(NaN)); -assert.ok(isNumber(Infinity)); -assert.ok(isNumber(new Number(42))); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-number-object -[2]: http://versionbadg.es/inspect-js/is-number-object.svg -[3]: https://travis-ci.org/inspect-js/is-number-object.svg -[4]: https://travis-ci.org/inspect-js/is-number-object -[5]: https://david-dm.org/inspect-js/is-number-object.svg -[6]: https://david-dm.org/inspect-js/is-number-object -[7]: https://david-dm.org/inspect-js/is-number-object/dev-status.svg -[8]: https://david-dm.org/inspect-js/is-number-object#info=devDependencies -[11]: https://nodei.co/npm/is-number-object.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-number-object.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-number-object.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-number-object diff --git a/node_modules/is-number-object/index.js b/node_modules/is-number-object/index.js deleted file mode 100644 index de303abe1..000000000 --- a/node_modules/is-number-object/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var numToStr = Number.prototype.toString; -var tryNumberObject = function tryNumberObject(value) { - try { - numToStr.call(value); - return true; - } catch (e) { - return false; - } -}; -var toStr = Object.prototype.toString; -var numClass = '[object Number]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isNumberObject(value) { - if (typeof value === 'number') { - return true; - } - if (typeof value !== 'object') { - return false; - } - return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass; -}; diff --git a/node_modules/is-number-object/package.json b/node_modules/is-number-object/package.json deleted file mode 100644 index 9acf5df7a..000000000 --- a/node_modules/is-number-object/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_from": "is-number-object@^1.0.4", - "_id": "is-number-object@1.0.4", - "_inBundle": false, - "_integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", - "_location": "/is-number-object", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-number-object@^1.0.4", - "name": "is-number-object", - "escapedName": "is-number-object", - "rawSpec": "^1.0.4", - "saveSpec": null, - "fetchSpec": "^1.0.4" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "_shasum": "36ac95e741cf18b283fc1ddf5e83da798e3ec197", - "_spec": "is-number-object@^1.0.4", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - }, - "bugs": { - "url": "https://github.com/inspect-js/is-number-object/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Is this value a JS Number object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.2", - "auto-changelog": "^1.16.2", - "covert": "^1.1.1", - "eclint": "^2.8.1", - "eslint": "^6.7.2", - "foreach": "^2.0.5", - "has-symbols": "^1.0.1", - "indexof": "^0.0.1", - "is": "^3.3.0", - "safe-publish-latest": "^1.1.4", - "tape": "^4.12.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/inspect-js/is-number-object#readme", - "keywords": [ - "Number", - "ES6", - "toStringTag", - "@@toStringTag", - "Number object" - ], - "license": "MIT", - "main": "index.js", - "name": "is-number-object", - "repository": { - "type": "git", - "url": "git://github.com/inspect-js/is-number-object.git" - }, - "scripts": { - "coverage": "covert test/index.js", - "eccheck": "eclint check *.js **/*.js > /dev/null", - "lint": "eslint .", - "posttest": "npx aud", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node --harmony --es-staging test", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.4" -} diff --git a/node_modules/is-number-object/test/index.js b/node_modules/is-number-object/test/index.js deleted file mode 100644 index b8c866fd5..000000000 --- a/node_modules/is-number-object/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var test = require('tape'); -var isNumber = require('../'); -var hasSymbols = require('has-symbols')(); - -test('not Numbers', function (t) { - t.notOk(isNumber(), 'undefined is not Number'); - t.notOk(isNumber(null), 'null is not Number'); - t.notOk(isNumber(false), 'false is not Number'); - t.notOk(isNumber(true), 'true is not Number'); - t.notOk(isNumber('foo'), 'string is not Number'); - t.notOk(isNumber([]), 'array is not Number'); - t.notOk(isNumber({}), 'object is not Number'); - t.notOk(isNumber(function () {}), 'function is not Number'); - t.notOk(isNumber(/a/g), 'regex literal is not Number'); - t.notOk(isNumber(new RegExp('a', 'g')), 'regex object is not Number'); - t.notOk(isNumber(new Date()), 'new Date() is not Number'); - t.end(); -}); - -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { - var fakeNumber = { - toString: function () { return '7'; }, - valueOf: function () { return 42; } - }; - fakeNumber[Symbol.toStringTag] = 'Number'; - t.notOk(isNumber(fakeNumber), 'fake Number with @@toStringTag "Number" is not Number'); - t.end(); -}); - -test('Numbers', function (t) { - t.ok(isNumber(42), 'number is Number'); - t.ok(isNumber(Object(42)), 'number object is Number'); - t.ok(isNumber(NaN), 'NaN is Number'); - t.ok(isNumber(Infinity), 'Infinity is Number'); - t.end(); -}); diff --git a/node_modules/is-path-inside/index.d.ts b/node_modules/is-path-inside/index.d.ts new file mode 100644 index 000000000..5cc3d804d --- /dev/null +++ b/node_modules/is-path-inside/index.d.ts @@ -0,0 +1,27 @@ +/** +Check if a path is inside another path. + +Note that relative paths are resolved against `process.cwd()` to make them absolute. + +_Important:_ This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guard against access to certain places on the file system. + +@example +``` +import isPathInside = require('is-path-inside'); + +isPathInside('a/b/c', 'a/b'); +//=> true + +isPathInside('a/b/c', 'x/y'); +//=> false + +isPathInside('a/b/c', 'a/b/c'); +//=> false + +isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus'); +//=> true +``` +*/ +declare function isPathInside(childPath: string, parentPath: string): boolean; + +export = isPathInside; diff --git a/node_modules/is-path-inside/index.js b/node_modules/is-path-inside/index.js new file mode 100644 index 000000000..28ed79c0f --- /dev/null +++ b/node_modules/is-path-inside/index.js @@ -0,0 +1,12 @@ +'use strict'; +const path = require('path'); + +module.exports = (childPath, parentPath) => { + const relation = path.relative(parentPath, childPath); + return Boolean( + relation && + relation !== '..' && + !relation.startsWith(`..${path.sep}`) && + relation !== path.resolve(childPath) + ); +}; diff --git a/node_modules/slice-ansi/node_modules/ansi-styles/license b/node_modules/is-path-inside/license similarity index 100% rename from node_modules/slice-ansi/node_modules/ansi-styles/license rename to node_modules/is-path-inside/license diff --git a/node_modules/is-path-inside/package.json b/node_modules/is-path-inside/package.json new file mode 100644 index 000000000..88c154ae7 --- /dev/null +++ b/node_modules/is-path-inside/package.json @@ -0,0 +1,36 @@ +{ + "name": "is-path-inside", + "version": "3.0.3", + "description": "Check if a path is inside another path", + "license": "MIT", + "repository": "sindresorhus/is-path-inside", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "path", + "inside", + "folder", + "directory", + "dir", + "file", + "resolve" + ], + "devDependencies": { + "ava": "^2.1.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/is-path-inside/readme.md b/node_modules/is-path-inside/readme.md new file mode 100644 index 000000000..e8c4f928e --- /dev/null +++ b/node_modules/is-path-inside/readme.md @@ -0,0 +1,63 @@ +# is-path-inside + +> Check if a path is inside another path + + +## Install + +``` +$ npm install is-path-inside +``` + + +## Usage + +```js +const isPathInside = require('is-path-inside'); + +isPathInside('a/b/c', 'a/b'); +//=> true + +isPathInside('a/b/c', 'x/y'); +//=> false + +isPathInside('a/b/c', 'a/b/c'); +//=> false + +isPathInside('/Users/sindresorhus/dev/unicorn', '/Users/sindresorhus'); +//=> true +``` + + +## API + +### isPathInside(childPath, parentPath) + +Note that relative paths are resolved against `process.cwd()` to make them absolute. + +**Important:** This package is meant for use with path manipulation. It does not check if the paths exist nor does it resolve symlinks. You should not use this as a security mechanism to guard against access to certain places on the file system. + +#### childPath + +Type: `string` + +The path that should be inside `parentPath`. + +#### parentPath + +Type: `string` + +The path that should contain `childPath`. + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/is-string/.eslintrc b/node_modules/is-string/.eslintrc deleted file mode 100644 index 5bf1191f8..000000000 --- a/node_modules/is-string/.eslintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "root": true, - - "extends": "@ljharb", - - "rules": { - "func-name-matching": 0, - "max-statements": [2, 15] - }, - - "overrides": [ - { - "files": ["test.js"], - "rules": { - "no-magic-numbers": 0, - }, - }, - ], -} diff --git a/node_modules/is-string/.github/FUNDING.yml b/node_modules/is-string/.github/FUNDING.yml deleted file mode 100644 index 519746be3..000000000 --- a/node_modules/is-string/.github/FUNDING.yml +++ /dev/null @@ -1,12 +0,0 @@ -# These are supported funding model platforms - -github: [ljharb] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: npm/is-string -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/is-string/.github/workflows/rebase.yml b/node_modules/is-string/.github/workflows/rebase.yml deleted file mode 100644 index 436cb79dc..000000000 --- a/node_modules/is-string/.github/workflows/rebase.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Automatic Rebase - -on: [pull_request] - -jobs: - _: - name: "Automatic Rebase" - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - uses: ljharb/rebase@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/is-string/.travis.yml b/node_modules/is-string/.travis.yml deleted file mode 100644 index 2d1c1d25f..000000000 --- a/node_modules/is-string/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: ~> 1.0 -language: node_js -os: - - linux -import: - - ljharb/travis-ci:node/all.yml - - ljharb/travis-ci:node/pretest.yml - - ljharb/travis-ci:node/posttest.yml - - ljharb/travis-ci:node/coverage.yml -matrix: - allow_failures: - - env: COVERAGE=true diff --git a/node_modules/is-string/CHANGELOG.md b/node_modules/is-string/CHANGELOG.md deleted file mode 100644 index 217c2ad6e..000000000 --- a/node_modules/is-string/CHANGELOG.md +++ /dev/null @@ -1,84 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - -## [v1.0.5](https://github.com/inspect-js/is-string/compare/v1.0.4...v1.0.5) - 2019-12-19 - -### Commits - -- [Tests] use shared travis-ci configs [`4121d6b`](https://github.com/inspect-js/is-string/commit/4121d6b168ae1d54a81791ee6877f9813cab6253) -- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v5.12`, `v4.9`; use `nvm install-latest-npm` [`e7a3e89`](https://github.com/inspect-js/is-string/commit/e7a3e89ccb9638d73f45dbcb2a42e509bd3153c4) -- Update `eslint`, `tape`, `semver`; use my personal shared `eslint` config [`6c380a7`](https://github.com/inspect-js/is-string/commit/6c380a70011714370e754fa0df95f56cdcaa3e60) -- [Tests] remove `jscs` [`3d49592`](https://github.com/inspect-js/is-string/commit/3d49592b9880fcb1a23b67286445281131a553e3) -- Update `is`, `tape`, `covert`, `jscs`, `editorconfig-tools`, `eslint`, `nsp`, `semver`. [`cc6983d`](https://github.com/inspect-js/is-string/commit/cc6983d06bc98f4ae9b7c9439d5d73c7318d8acd) -- [meta] add `auto-changelog` [`b857897`](https://github.com/inspect-js/is-string/commit/b85789723ce3a7064536598e0fcdd495257c6134) -- [meta] remove unused Makefile and associated utilities [`3f0f51c`](https://github.com/inspect-js/is-string/commit/3f0f51cbae1f97dbe1466eee88d105b3df0d2f0a) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `is`, `covert`, `tape`, `semver` [`9d4a95e`](https://github.com/inspect-js/is-string/commit/9d4a95e4473fe8195501878525b5af5948aa45c9) -- Update `eslint` [`e861b4b`](https://github.com/inspect-js/is-string/commit/e861b4bc71f5390670aebdff91119a1f8aeeb88a) -- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`172e2dd`](https://github.com/inspect-js/is-string/commit/172e2dd1a0b9eb042bcb9a80ff5e774a90ff0695) -- Test on `node` and `io.js` latest. [`fd426cd`](https://github.com/inspect-js/is-string/commit/fd426cd18b22b0d0e1731598125393dcfe0c5704) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest` [`23bdf83`](https://github.com/inspect-js/is-string/commit/23bdf83cf42138eba09f45bd0b040b069f9839d4) -- [actions] add automatic rebasing / merge commit blocking [`96153c0`](https://github.com/inspect-js/is-string/commit/96153c0d687a7fda2261f4c02add5d0b41e8aed7) -- [meta] create FUNDING.yml [`66ae246`](https://github.com/inspect-js/is-string/commit/66ae246d6cdaa4ccbc21f7c144b672139b8ccef6) -- [Dev Deps] update `is`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `semver` [`817361a`](https://github.com/inspect-js/is-string/commit/817361a9673cd1ec9854b52578a980159f7d8701) -- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `semver`, `tape` [`fc35d3f`](https://github.com/inspect-js/is-string/commit/fc35d3feb40921bb22e1639903cb7f2fab77814b) -- [Dev Deps] update `jscs` [`886767e`](https://github.com/inspect-js/is-string/commit/886767e04e5ad59ac0bc926a87233cc8546c8b4f) -- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`3410922`](https://github.com/inspect-js/is-string/commit/341092203c11a3b92eee55a7ecb7b8265e8fcecd) -- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`4d6c73b`](https://github.com/inspect-js/is-string/commit/4d6c73b507bcd39050ef71e554069f72fc5b222a) -- Update `nsp`, `eslint` [`b11de49`](https://github.com/inspect-js/is-string/commit/b11de4910beee1ffe1e67fbe25ec6707ca796b27) -- Update `eslint`, `semver` [`0777977`](https://github.com/inspect-js/is-string/commit/0777977757a85a1db75831d03a14b4b1fde05d7e) -- Only apps should have lockfiles [`78b49ff`](https://github.com/inspect-js/is-string/commit/78b49ffd04d4cd8c57d9e7b485421fbf3641b41b) -- [meta] add `funding` field [`81328a6`](https://github.com/inspect-js/is-string/commit/81328a6ef3eee989164127e4c0c82f1da73d3567) -- [Dev Deps] update `eslint`, `tape` [`fc9a225`](https://github.com/inspect-js/is-string/commit/fc9a225b27935f7c9c2704281d7fddd3614d3cb8) -- [Tests] use `eclint` instead of `editorconfig-tools` [`59c2c61`](https://github.com/inspect-js/is-string/commit/59c2c610dbd8e8ca1e4aa3fa9c9f93205cab9b07) -- [Dev Deps] Update `tape`, `eslint` [`a429816`](https://github.com/inspect-js/is-string/commit/a429816688e23c81948b4ae72324c26c27849b7c) -- Test on `io.js` `v2.2` [`08b476e`](https://github.com/inspect-js/is-string/commit/08b476ed0734a70e3091c04ddd2f173a2df21eb2) -- Test up to `io.js` `v3.0` [`22637ef`](https://github.com/inspect-js/is-string/commit/22637ef9e0030533df85cf1992fc099a88b1924c) -- [meta] add `safe-publish-latest` [`20ccb48`](https://github.com/inspect-js/is-string/commit/20ccb48fd85f0245eb893507d00003090da020d0) -- [Dev Deps] update `tape` [`06b58a0`](https://github.com/inspect-js/is-string/commit/06b58a048c2a820e5611ad2bd9ddfbe893295a57) -- Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. [`ea7cf84`](https://github.com/inspect-js/is-string/commit/ea7cf849b952c924d1687a302098251a7b827c80) -- Test on `io.js` `v2.4` [`66ec3ea`](https://github.com/inspect-js/is-string/commit/66ec3ea390b364583a792799b53857fd186ccc88) -- Test on `io.js` `v2.3` [`ca6e796`](https://github.com/inspect-js/is-string/commit/ca6e796f16ec433b88962162fde8012f28e18f1e) -- Fix tests for faked @@toStringTag [`3cce832`](https://github.com/inspect-js/is-string/commit/3cce8329133dfd233987359df151018b3b136be1) - -## [v1.0.4](https://github.com/inspect-js/is-string/compare/v1.0.3...v1.0.4) - 2015-01-30 - -### Commits - -- If @@toStringTag is not present, use the old-school Object#toString test. [`30675ec`](https://github.com/inspect-js/is-string/commit/30675ecb5c5cc43873918661a414a1d0f8b77325) - -## [v1.0.3](https://github.com/inspect-js/is-string/compare/v1.0.2...v1.0.3) - 2015-01-29 - -### Commits - -- Refactor to aid optimization of non-try/catch code. [`9b2772a`](https://github.com/inspect-js/is-string/commit/9b2772abe09ba8cbaa631322cc226ee906d2db22) - -## [v1.0.2](https://github.com/inspect-js/is-string/compare/v1.0.1...v1.0.2) - 2015-01-29 - -### Commits - -- Fix broken package.json [`dc921d3`](https://github.com/inspect-js/is-string/commit/dc921d332b64e4041162f04e4712b0dc687863a5) - -## [v1.0.1](https://github.com/inspect-js/is-string/compare/v1.0.0...v1.0.1) - 2015-01-29 - -### Commits - -- Fix eslint config. [`c4e05bd`](https://github.com/inspect-js/is-string/commit/c4e05bd171da6002d432e451fd48912db8b048e0) -- Add early exits for typeof "string", or typeof not "object". [`82f41d3`](https://github.com/inspect-js/is-string/commit/82f41d36a599bc6a06152792c84c7683e412c513) - -## v1.0.0 - 2015-01-28 - -### Commits - -- Dotfiles. [`45bc9dd`](https://github.com/inspect-js/is-string/commit/45bc9dd60201722344986a6c7536be9ea9ccefbf) -- `make release` [`23707f5`](https://github.com/inspect-js/is-string/commit/23707f5ecfdf00afb0e57c06ac07f7f49cdeb606) -- package.json [`575ad81`](https://github.com/inspect-js/is-string/commit/575ad811c61b156cfbcc60ff61947183c6ebe6a2) -- Read me [`3f67c9a`](https://github.com/inspect-js/is-string/commit/3f67c9a0725f811845d38646a19322895cd03981) -- Initial commit [`2c26a7a`](https://github.com/inspect-js/is-string/commit/2c26a7a2e41dec77be2c59d5847f29a6ab7c0b29) -- Tests. [`38c987b`](https://github.com/inspect-js/is-string/commit/38c987b8513b0ac03b0897e0fce7de8135d4ee0f) -- Implementation. [`0471d59`](https://github.com/inspect-js/is-string/commit/0471d59078d7f3f77619913ec21c57c0af27114c) diff --git a/node_modules/is-string/README.md b/node_modules/is-string/README.md deleted file mode 100644 index 13895e5f4..000000000 --- a/node_modules/is-string/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# is-string [![Version Badge][2]][1] - -[![Build Status][3]][4] -[![dependency status][5]][6] -[![dev dependency status][7]][8] -[![License][license-image]][license-url] -[![Downloads][downloads-image]][downloads-url] - -[![npm badge][11]][1] - -[![browser support][9]][10] - -Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag. - -## Example - -```js -var isString = require('is-string'); -var assert = require('assert'); - -assert.notOk(isString(undefined)); -assert.notOk(isString(null)); -assert.notOk(isString(false)); -assert.notOk(isString(true)); -assert.notOk(isString(function () {})); -assert.notOk(isString([])); -assert.notOk(isString({})); -assert.notOk(isString(/a/g)); -assert.notOk(isString(new RegExp('a', 'g'))); -assert.notOk(isString(new Date())); -assert.notOk(isString(42)); -assert.notOk(isString(NaN)); -assert.notOk(isString(Infinity)); -assert.notOk(isString(new Number(42))); - -assert.ok(isString('foo')); -assert.ok(isString(Object('foo'))); -``` - -## Tests -Simply clone the repo, `npm install`, and run `npm test` - -[1]: https://npmjs.org/package/is-string -[2]: http://versionbadg.es/ljharb/is-string.svg -[3]: https://travis-ci.org/ljharb/is-string.svg -[4]: https://travis-ci.org/ljharb/is-string -[5]: https://david-dm.org/ljharb/is-string.svg -[6]: https://david-dm.org/ljharb/is-string -[7]: https://david-dm.org/ljharb/is-string/dev-status.svg -[8]: https://david-dm.org/ljharb/is-string#info=devDependencies -[9]: https://ci.testling.com/ljharb/is-string.png -[10]: https://ci.testling.com/ljharb/is-string -[11]: https://nodei.co/npm/is-string.png?downloads=true&stars=true -[license-image]: http://img.shields.io/npm/l/is-string.svg -[license-url]: LICENSE -[downloads-image]: http://img.shields.io/npm/dm/is-string.svg -[downloads-url]: http://npm-stat.com/charts.html?package=is-string diff --git a/node_modules/is-string/index.js b/node_modules/is-string/index.js deleted file mode 100644 index 95b7050cc..000000000 --- a/node_modules/is-string/index.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -var strValue = String.prototype.valueOf; -var tryStringObject = function tryStringObject(value) { - try { - strValue.call(value); - return true; - } catch (e) { - return false; - } -}; -var toStr = Object.prototype.toString; -var strClass = '[object String]'; -var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; - -module.exports = function isString(value) { - if (typeof value === 'string') { - return true; - } - if (typeof value !== 'object') { - return false; - } - return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass; -}; diff --git a/node_modules/is-string/package.json b/node_modules/is-string/package.json deleted file mode 100644 index 7e1be2b8c..000000000 --- a/node_modules/is-string/package.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "_from": "is-string@^1.0.5", - "_id": "is-string@1.0.5", - "_inBundle": false, - "_integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "_location": "/is-string", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "is-string@^1.0.5", - "name": "is-string", - "escapedName": "is-string", - "rawSpec": "^1.0.5", - "saveSpec": null, - "fetchSpec": "^1.0.5" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "_shasum": "40493ed198ef3ff477b8c7f92f644ec82a5cd3a6", - "_spec": "is-string@^1.0.5", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "Jordan Harband", - "email": "ljharb@gmail.com" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false - }, - "bugs": { - "url": "https://github.com/ljharb/is-string/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Is this value a JS String object or primitive? This module works cross-realm/iframe, and despite ES6 @@toStringTag.", - "devDependencies": { - "@ljharb/eslint-config": "^15.0.2", - "auto-changelog": "^1.16.2", - "covert": "^1.1.1", - "eclint": "^2.8.1", - "eslint": "^6.7.2", - "foreach": "^2.0.5", - "indexof": "^0.0.1", - "is": "^3.3.0", - "safe-publish-latest": "^1.1.4", - "tape": "^4.12.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "homepage": "https://github.com/ljharb/is-string#readme", - "keywords": [ - "String", - "string", - "ES6", - "toStringTag", - "@@toStringTag", - "String object" - ], - "license": "MIT", - "main": "index.js", - "name": "is-string", - "repository": { - "type": "git", - "url": "git://github.com/ljharb/is-string.git" - }, - "scripts": { - "coverage": "covert test/index.js", - "eccheck": "eclint check *.js **/*.js > /dev/null", - "lint": "eslint .", - "posttest": "npx aud", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"", - "prepublish": "safe-publish-latest", - "pretest": "npm run lint", - "test": "npm run tests-only", - "tests-only": "node --harmony --es-staging test", - "version": "auto-changelog && git add CHANGELOG.md" - }, - "testling": { - "files": "test/index.js", - "browsers": [ - "iexplore/6.0..latest", - "firefox/3.0..6.0", - "firefox/15.0..latest", - "firefox/nightly", - "chrome/4.0..10.0", - "chrome/20.0..latest", - "chrome/canary", - "opera/10.0..latest", - "opera/next", - "safari/4.0..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2" - ] - }, - "version": "1.0.5" -} diff --git a/node_modules/is-string/test/index.js b/node_modules/is-string/test/index.js deleted file mode 100644 index 03c08747f..000000000 --- a/node_modules/is-string/test/index.js +++ /dev/null @@ -1,39 +0,0 @@ -'use strict'; - -var test = require('tape'); -var isString = require('..'); -var hasSymbols = typeof Symbol === 'function' && typeof Symbol('') === 'symbol'; - -test('not Strings', function (t) { - t.notOk(isString(), 'undefined is not String'); - t.notOk(isString(null), 'null is not String'); - t.notOk(isString(false), 'false is not String'); - t.notOk(isString(true), 'true is not String'); - t.notOk(isString([]), 'array is not String'); - t.notOk(isString({}), 'object is not String'); - t.notOk(isString(function () {}), 'function is not String'); - t.notOk(isString(/a/g), 'regex literal is not String'); - t.notOk(isString(new RegExp('a', 'g')), 'regex object is not String'); - t.notOk(isString(new Date()), 'new Date() is not String'); - t.notOk(isString(42), 'number is not String'); - t.notOk(isString(Object(42)), 'number object is not String'); - t.notOk(isString(NaN), 'NaN is not String'); - t.notOk(isString(Infinity), 'Infinity is not String'); - t.end(); -}); - -test('@@toStringTag', { skip: !hasSymbols || !Symbol.toStringTag }, function (t) { - var fakeString = { - toString: function () { return '7'; }, - valueOf: function () { return '42'; } - }; - fakeString[Symbol.toStringTag] = 'String'; - t.notOk(isString(fakeString), 'fake String with @@toStringTag "String" is not String'); - t.end(); -}); - -test('Strings', function (t) { - t.ok(isString('foo'), 'string primitive is String'); - t.ok(isString(Object('foo')), 'string object is String'); - t.end(); -}); diff --git a/node_modules/lodash.clonedeep/README.md b/node_modules/lodash.clonedeep/README.md deleted file mode 100644 index fee48e470..000000000 --- a/node_modules/lodash.clonedeep/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.clonedeep v4.5.0 - -The [lodash](https://lodash.com/) method `_.cloneDeep` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.clonedeep -``` - -In Node.js: -```js -var cloneDeep = require('lodash.clonedeep'); -``` - -See the [documentation](https://lodash.com/docs#cloneDeep) or [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash.clonedeep) for more details. diff --git a/node_modules/lodash.clonedeep/package.json b/node_modules/lodash.clonedeep/package.json deleted file mode 100644 index abedfb24d..000000000 --- a/node_modules/lodash.clonedeep/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "lodash.clonedeep@^4.5.0", - "_id": "lodash.clonedeep@4.5.0", - "_inBundle": false, - "_integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "_location": "/lodash.clonedeep", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lodash.clonedeep@^4.5.0", - "name": "lodash.clonedeep", - "escapedName": "lodash.clonedeep", - "rawSpec": "^4.5.0", - "saveSpec": null, - "fetchSpec": "^4.5.0" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "_shasum": "e23f3f9c4f8fbdde872529c1071857a086e5ccef", - "_spec": "lodash.clonedeep@^4.5.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "deprecated": false, - "description": "The lodash method `_.cloneDeep` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "clonedeep" - ], - "license": "MIT", - "name": "lodash.clonedeep", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.5.0" -} diff --git a/node_modules/lodash.flatten/LICENSE b/node_modules/lodash.flatten/LICENSE deleted file mode 100644 index e0c69d560..000000000 --- a/node_modules/lodash.flatten/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.flatten/README.md b/node_modules/lodash.flatten/README.md deleted file mode 100644 index 526fa7386..000000000 --- a/node_modules/lodash.flatten/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.flatten v4.4.0 - -The [lodash](https://lodash.com/) method `_.flatten` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.flatten -``` - -In Node.js: -```js -var flatten = require('lodash.flatten'); -``` - -See the [documentation](https://lodash.com/docs#flatten) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.flatten) for more details. diff --git a/node_modules/lodash.flatten/index.js b/node_modules/lodash.flatten/index.js deleted file mode 100644 index 09ae7a66e..000000000 --- a/node_modules/lodash.flatten/index.js +++ /dev/null @@ -1,349 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; - -/** - * The base implementation of `_.flatten` with support for restricting flattening. - * - * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/** - * Checks if `value` is a flattenable `arguments` object or array. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ -function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); -} - -/** - * Flattens `array` a single level deep. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] - */ -function flatten(array) { - var length = array ? array.length : 0; - return length ? baseFlatten(array, 1) : []; -} - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = flatten; diff --git a/node_modules/lodash.flatten/package.json b/node_modules/lodash.flatten/package.json deleted file mode 100644 index 3e8571de5..000000000 --- a/node_modules/lodash.flatten/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "lodash.flatten@^4.4.0", - "_id": "lodash.flatten@4.4.0", - "_inBundle": false, - "_integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "_location": "/lodash.flatten", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lodash.flatten@^4.4.0", - "name": "lodash.flatten", - "escapedName": "lodash.flatten", - "rawSpec": "^4.4.0", - "saveSpec": null, - "fetchSpec": "^4.4.0" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "_shasum": "f31c22225a9632d2bbf8e4addbef240aa765a61f", - "_spec": "lodash.flatten@^4.4.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "deprecated": false, - "description": "The lodash method `_.flatten` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "flatten" - ], - "license": "MIT", - "name": "lodash.flatten", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.4.0" -} diff --git a/node_modules/lodash.clonedeep/LICENSE b/node_modules/lodash.merge/LICENSE similarity index 96% rename from node_modules/lodash.clonedeep/LICENSE rename to node_modules/lodash.merge/LICENSE index e0c69d560..77c42f140 100644 --- a/node_modules/lodash.clonedeep/LICENSE +++ b/node_modules/lodash.merge/LICENSE @@ -1,4 +1,4 @@ -Copyright jQuery Foundation and other contributors +Copyright OpenJS Foundation and other contributors Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors diff --git a/node_modules/lodash.merge/README.md b/node_modules/lodash.merge/README.md new file mode 100644 index 000000000..91b75386c --- /dev/null +++ b/node_modules/lodash.merge/README.md @@ -0,0 +1,18 @@ +# lodash.merge v4.6.2 + +The [Lodash](https://lodash.com/) method `_.merge` exported as a [Node.js](https://nodejs.org/) module. + +## Installation + +Using npm: +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash.merge +``` + +In Node.js: +```js +var merge = require('lodash.merge'); +``` + +See the [documentation](https://lodash.com/docs#merge) or [package source](https://github.com/lodash/lodash/blob/4.6.2-npm-packages/lodash.merge) for more details. diff --git a/node_modules/lodash.clonedeep/index.js b/node_modules/lodash.merge/index.js similarity index 55% rename from node_modules/lodash.clonedeep/index.js rename to node_modules/lodash.merge/index.js index 1b0e50298..8e75d955e 100644 --- a/node_modules/lodash.clonedeep/index.js +++ b/node_modules/lodash.merge/index.js @@ -1,7 +1,7 @@ /** - * lodash (Custom Build) + * Lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors + * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors @@ -13,12 +13,17 @@ var LARGE_ARRAY_SIZE = 200; /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/** Used to detect hot functions by number of calls within a span of milliseconds. */ +var HOT_COUNT = 800, + HOT_SPAN = 16; + /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', @@ -26,12 +31,13 @@ var argsTag = '[object Arguments]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', + nullTag = '[object Null]', objectTag = '[object Object]', - promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', - symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', @@ -52,30 +58,27 @@ var arrayBufferTag = '[object ArrayBuffer]', */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; -/** Used to identify `toStringTag` values supported by `_.clone`. */ -var cloneableTags = {}; -cloneableTags[argsTag] = cloneableTags[arrayTag] = -cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = -cloneableTags[boolTag] = cloneableTags[dateTag] = -cloneableTags[float32Tag] = cloneableTags[float64Tag] = -cloneableTags[int8Tag] = cloneableTags[int16Tag] = -cloneableTags[int32Tag] = cloneableTags[mapTag] = -cloneableTags[numberTag] = cloneableTags[objectTag] = -cloneableTags[regexpTag] = cloneableTags[setTag] = -cloneableTags[stringTag] = cloneableTags[symbolTag] = -cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = -cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; -cloneableTags[errorTag] = cloneableTags[funcTag] = -cloneableTags[weakMapTag] = false; +/** Used to identify `toStringTag` values of typed arrays. */ +var typedArrayTags = {}; +typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = +typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = +typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = +typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = +typedArrayTags[uint32Tag] = true; +typedArrayTags[argsTag] = typedArrayTags[arrayTag] = +typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = +typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = +typedArrayTags[errorTag] = typedArrayTags[funcTag] = +typedArrayTags[mapTag] = typedArrayTags[numberTag] = +typedArrayTags[objectTag] = typedArrayTags[regexpTag] = +typedArrayTags[setTag] = typedArrayTags[stringTag] = +typedArrayTags[weakMapTag] = false; /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; @@ -95,97 +98,45 @@ var freeModule = freeExports && typeof module == 'object' && module && !module.n /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; -/** - * Adds the key-value `pair` to `map`. - * - * @private - * @param {Object} map The map to modify. - * @param {Array} pair The key-value pair to add. - * @returns {Object} Returns `map`. - */ -function addMapEntry(map, pair) { - // Don't return `map.set` because it's not chainable in IE 11. - map.set(pair[0], pair[1]); - return map; -} +/** Detect free variable `process` from Node.js. */ +var freeProcess = moduleExports && freeGlobal.process; -/** - * Adds `value` to `set`. - * - * @private - * @param {Object} set The set to modify. - * @param {*} value The value to add. - * @returns {Object} Returns `set`. - */ -function addSetEntry(set, value) { - // Don't return `set.add` because it's not chainable in IE 11. - set.add(value); - return set; -} +/** Used to access faster Node.js helpers. */ +var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array ? array.length : 0; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; + if (types) { + return types; } - } - return array; -} -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} +}()); - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} +/* Node.js helper references. */ +var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. * * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. */ -function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array ? array.length : 0; - - if (initAccum && length) { - accumulator = array[++index]; - } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); +function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); } - return accumulator; + return func.apply(thisArg, args); } /** @@ -208,51 +159,28 @@ function baseTimes(n, iteratee) { } /** - * Gets the value at `key` of `object`. + * The base implementation of `_.unary` without support for storing metadata. * * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -/** - * Checks if `value` is a host object in IE < 9. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. - */ -function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; +function baseUnary(func) { + return function(value) { + return func(value); + }; } /** - * Converts `map` to its key-value pairs. + * Gets the value at `key` of `object`. * * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ -function mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; +function getValue(object, key) { + return object == null ? undefined : object[key]; } /** @@ -269,23 +197,6 @@ function overArg(func, transform) { }; } -/** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ -function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; -} - /** Used for built-in method references. */ var arrayProto = Array.prototype, funcProto = Function.prototype, @@ -294,24 +205,27 @@ var arrayProto = Array.prototype, /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; +/** Used to detect methods masquerading as native. */ +var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; +}()); + /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ -var objectToString = objectProto.toString; +var nativeObjectToString = objectProto.toString; + +/** Used to infer the `Object` constructor. */ +var objectCtorString = funcToString.call(Object); /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + @@ -323,34 +237,53 @@ var reIsNative = RegExp('^' + var Buffer = moduleExports ? root.Buffer : undefined, Symbol = root.Symbol, Uint8Array = root.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice; + splice = arrayProto.splice, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + +var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} +}()); /* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeKeys = overArg(Object.keys, Object); +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeMax = Math.max, + nativeNow = Date.now; /* Built-in method references that are verified to be native. */ -var DataView = getNative(root, 'DataView'), - Map = getNative(root, 'Map'), - Promise = getNative(root, 'Promise'), - Set = getNative(root, 'Set'), - WeakMap = getNative(root, 'WeakMap'), +var Map = getNative(root, 'Map'), nativeCreate = getNative(Object, 'create'); -/** Used to detect maps, sets, and weakmaps. */ -var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; +/** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ +var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; +}()); /** * Creates a hash object. @@ -361,7 +294,7 @@ var symbolProto = Symbol ? Symbol.prototype : undefined, */ function Hash(entries) { var index = -1, - length = entries ? entries.length : 0; + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { @@ -379,6 +312,7 @@ function Hash(entries) { */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; } /** @@ -392,7 +326,9 @@ function hashClear() { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { - return this.has(key) && delete this.__data__[key]; + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } /** @@ -424,7 +360,7 @@ function hashGet(key) { */ function hashHas(key) { var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } /** @@ -439,6 +375,7 @@ function hashHas(key) { */ function hashSet(key, value) { var data = this.__data__; + this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } @@ -459,7 +396,7 @@ Hash.prototype.set = hashSet; */ function ListCache(entries) { var index = -1, - length = entries ? entries.length : 0; + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { @@ -477,6 +414,7 @@ function ListCache(entries) { */ function listCacheClear() { this.__data__ = []; + this.size = 0; } /** @@ -501,6 +439,7 @@ function listCacheDelete(key) { } else { splice.call(data, index, 1); } + --this.size; return true; } @@ -548,6 +487,7 @@ function listCacheSet(key, value) { index = assocIndexOf(data, key); if (index < 0) { + ++this.size; data.push([key, value]); } else { data[index][1] = value; @@ -571,7 +511,7 @@ ListCache.prototype.set = listCacheSet; */ function MapCache(entries) { var index = -1, - length = entries ? entries.length : 0; + length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { @@ -588,6 +528,7 @@ function MapCache(entries) { * @memberOf MapCache */ function mapCacheClear() { + this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), @@ -605,7 +546,9 @@ function mapCacheClear() { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; } /** @@ -645,7 +588,11 @@ function mapCacheHas(key) { * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); + var data = getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; return this; } @@ -664,7 +611,8 @@ MapCache.prototype.set = mapCacheSet; * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { - this.__data__ = new ListCache(entries); + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } /** @@ -676,6 +624,7 @@ function Stack(entries) { */ function stackClear() { this.__data__ = new ListCache; + this.size = 0; } /** @@ -688,7 +637,11 @@ function stackClear() { * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { - return this.__data__['delete'](key); + var data = this.__data__, + result = data['delete'](key); + + this.size = data.size; + return result; } /** @@ -728,16 +681,18 @@ function stackHas(key) { * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { - var cache = this.__data__; - if (cache instanceof ListCache) { - var pairs = cache.__data__; + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); + this.size = ++data.size; return this; } - cache = this.__data__ = new MapCache(pairs); + data = this.__data__ = new MapCache(pairs); } - cache.set(key, value); + data.set(key, value); + this.size = data.size; return this; } @@ -757,24 +712,48 @@ Stack.prototype.set = stackSet; * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - // Safari 9 makes `arguments.length` enumerable in strict mode. - var result = (isArray(value) || isArguments(value)) - ? baseTimes(value.length, String) - : []; - - var length = result.length, - skipIndexes = !!length; + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && (key == 'length' || isIndex(key, length)))) { + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { result.push(key); } } return result; } +/** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ +function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } +} + /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -789,7 +768,7 @@ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { - object[key] = value; + baseAssignValue(object, key, value); } } @@ -812,130 +791,65 @@ function assocIndexOf(array, key) { } /** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ -function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); -} - -/** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. - * - * @private - * @param {*} value The value to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @param {boolean} [isFull] Specify a clone including symbols. - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. - */ -function baseClone(value, isDeep, isFull, customizer, key, object, stack) { - var result; - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } +function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; - - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); - } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - if (isHostObject(value)) { - return object ? value : {}; - } - result = initCloneObject(isFunc ? {} : value); - if (!isDeep) { - return copySymbols(value, baseAssign(result, value)); - } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; - } - result = initCloneByTag(value, tag, baseClone, isDeep); - } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (!isArr) { - var props = isFull ? getAllKeys(value) : keys(value); + object[key] = value; } - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; - } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); - }); - return result; } /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. */ -function baseCreate(proto) { - return isObject(proto) ? objectCreate(proto) : {}; -} +var baseFor = createBaseFor(); /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. + * The base implementation of `getTag` without fallbacks for buggy environments. * * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ -function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } /** - * The base implementation of `getTag`. + * The base implementation of `_.isArguments`. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ -function baseGetTag(value) { - return objectToString.call(value); +function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } /** @@ -950,24 +864,38 @@ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ +function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; +} + +/** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ -function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); +function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { + var isProto = isPrototype(object), + result = []; + + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } @@ -975,98 +903,174 @@ function baseKeys(object) { } /** - * Creates a clone of `buffer`. + * The base implementation of `_.merge` without support for multiple sources. * * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. - */ -function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; } - var result = new buffer.constructor(buffer.length); - buffer.copy(result); - return result; -} + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; -/** - * Creates a clone of `arrayBuffer`. - * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. - */ -function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); - return result; + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); } /** - * Creates a clone of `dataView`. + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. * * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. - */ -function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ +function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); + + if (stacked) { + assignMergeValue(object, key, stacked); + return; + } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; + + var isCommon = newValue === undefined; + + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); + + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); } /** - * Creates a clone of `map`. + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private - * @param {Object} map The map to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned map. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ -function cloneMap(map, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); - return arrayReduce(array, addMapEntry, new map.constructor); +function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } /** - * Creates a clone of `regexp`. + * The base implementation of `setToString` without support for hot loop shorting. * * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ -function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; -} +var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); +}; /** - * Creates a clone of `set`. + * Creates a clone of `buffer`. * * @private - * @param {Object} set The set to clone. - * @param {Function} cloneFunc The function to clone values. + * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned set. + * @returns {Buffer} Returns the cloned buffer. */ -function cloneSet(set, isDeep, cloneFunc) { - var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); - return arrayReduce(array, addSetEntry, new set.constructor); +function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; } /** - * Creates a clone of the `symbol` object. + * Creates a clone of `arrayBuffer`. * * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ -function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; +function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + return result; } /** @@ -1112,6 +1116,7 @@ function copyArray(source, array) { * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { + var isNew = !object; object || (object = {}); var index = -1, @@ -1124,32 +1129,73 @@ function copyObject(source, props, object, customizer) { ? customizer(object[key], source[key], key, object, source) : undefined; - assignValue(object, key, newValue === undefined ? source[key] : newValue); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } } return object; } /** - * Copies own symbol properties of `source` to `object`. + * Creates a function like `_.assign`. * * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ -function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); +function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } /** - * Creates an array of own enumerable property names and symbols of `object`. + * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ -function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); +function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; } /** @@ -1181,63 +1227,28 @@ function getNative(object, key) { } /** - * Creates an array of the own enumerable symbol properties of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. - */ -var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; - -/** - * Gets the `toStringTag` of `value`. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @returns {string} Returns the raw `toStringTag`. */ -var getTag = baseGetTag; - -// Fallback for data views, maps, sets, and weak maps in IE 11, -// for data views in Edge < 14, and promises in Node.js. -if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; -} +function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; -/** - * Initializes an array clone. - * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. - */ -function initCloneArray(array) { - var length = array.length, - result = array.constructor(length); + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } } return result; } @@ -1255,55 +1266,6 @@ function initCloneObject(object) { : {}; } -/** - * Initializes an object clone based on its `toStringTag`. - * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {Function} cloneFunc The function to clone values. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. - */ -function initCloneByTag(object, tag, cloneFunc, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return cloneMap(object, isDeep, cloneFunc); - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); - - case setTag: - return cloneSet(object, isDeep, cloneFunc); - - case symbolTag: - return cloneSymbol(object); - } -} - /** * Checks if `value` is a valid array-like index. * @@ -1313,10 +1275,37 @@ function initCloneByTag(object, tag, cloneFunc, isDeep) { * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { + var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); +} + +/** + * Checks if the given arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. + */ +function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; } /** @@ -1358,11 +1347,130 @@ function isPrototype(value) { return value === proto; } +/** + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ +function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; +} + +/** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ +function objectToString(value) { + return nativeObjectToString.call(value); +} + +/** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ +function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); + + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; +} + +/** + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ +function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; + } + + if (key == '__proto__') { + return; + } + + return object[key]; +} + +/** + * Sets the `toString` method of `func` to return `string`. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ +var setToString = shortOut(baseSetToString); + +/** + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. + * + * @private + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. + */ +function shortOut(func) { + var count = 0, + lastCalled = 0; + + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; +} + /** * Converts `func` to its source code. * * @private - * @param {Function} func The function to process. + * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { @@ -1377,28 +1485,6 @@ function toSource(func) { return ''; } -/** - * This method is like `_.clone` except that it recursively clones `value`. - * - * @static - * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone - * @example - * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; - * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false - */ -function cloneDeep(value) { - return baseClone(value, true, true); -} - /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) @@ -1453,11 +1539,10 @@ function eq(value, other) { * _.isArguments([1, 2, 3]); * // => false */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} +var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); +}; /** * Checks if `value` is classified as an `Array` object. @@ -1579,10 +1664,13 @@ var isBuffer = nativeIsBuffer || stubFalse; * // => false */ function isFunction(value) { + if (!isObject(value)) { + return false; + } // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** @@ -1643,7 +1731,7 @@ function isLength(value) { */ function isObject(value) { var type = typeof value; - return !!value && (type == 'object' || type == 'function'); + return value != null && (type == 'object' || type == 'function'); } /** @@ -1671,19 +1759,105 @@ function isObject(value) { * // => false */ function isObjectLike(value) { - return !!value && typeof value == 'object'; + return value != null && typeof value == 'object'; } /** - * Creates an array of the own enumerable property names of `object`. + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * @static + * @memberOf _ + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ +function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; +} + +/** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ +var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + +/** + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. * * @static - * @since 0.1.0 * @memberOf _ + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ +function toPlainObject(value) { + return copyObject(value, keysIn(value)); +} + +/** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. @@ -1696,36 +1870,91 @@ function isObjectLike(value) { * * Foo.prototype.c = 3; * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ -function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); +function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } /** - * This method returns a new empty array. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 4.13.0 + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; + * + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + */ +var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); +}); + +/** + * Creates a function that returns `value`. + * + * @static + * @memberOf _ + * @since 2.4.0 * @category Util - * @returns {Array} Returns the new empty array. + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. * @example * - * var arrays = _.times(2, _.stubArray); + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * console.log(arrays); - * // => [[], []] + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] * - * console.log(arrays[0] === arrays[1]); - * // => false + * console.log(objects[0] === objects[1]); + * // => true + */ +function constant(value) { + return function() { + return value; + }; +} + +/** + * This method returns the first argument it receives. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example + * + * var object = { 'a': 1 }; + * + * console.log(_.identity(object) === object); + * // => true */ -function stubArray() { - return []; +function identity(value) { + return value; } /** @@ -1745,4 +1974,4 @@ function stubFalse() { return false; } -module.exports = cloneDeep; +module.exports = merge; diff --git a/node_modules/lodash.merge/package.json b/node_modules/lodash.merge/package.json new file mode 100644 index 000000000..3130fc8fb --- /dev/null +++ b/node_modules/lodash.merge/package.json @@ -0,0 +1,16 @@ +{ + "name": "lodash.merge", + "version": "4.6.2", + "description": "The Lodash method `_.merge` exported as a module.", + "homepage": "https://lodash.com/", + "icon": "https://lodash.com/icon.svg", + "license": "MIT", + "keywords": "lodash-modularized, merge", + "author": "John-David Dalton ", + "contributors": [ + "John-David Dalton ", + "Mathias Bynens " + ], + "repository": "lodash/lodash", + "scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" } +} diff --git a/node_modules/lodash.truncate/LICENSE b/node_modules/lodash.truncate/LICENSE deleted file mode 100644 index e0c69d560..000000000 --- a/node_modules/lodash.truncate/LICENSE +++ /dev/null @@ -1,47 +0,0 @@ -Copyright jQuery Foundation and other contributors - -Based on Underscore.js, copyright Jeremy Ashkenas, -DocumentCloud and Investigative Reporters & Editors - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/lodash/lodash - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules and vendor directories are externally -maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/node_modules/lodash.truncate/README.md b/node_modules/lodash.truncate/README.md deleted file mode 100644 index a2936e9af..000000000 --- a/node_modules/lodash.truncate/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# lodash.truncate v4.4.2 - -The [lodash](https://lodash.com/) method `_.truncate` exported as a [Node.js](https://nodejs.org/) module. - -## Installation - -Using npm: -```bash -$ {sudo -H} npm i -g npm -$ npm i --save lodash.truncate -``` - -In Node.js: -```js -var truncate = require('lodash.truncate'); -``` - -See the [documentation](https://lodash.com/docs#truncate) or [package source](https://github.com/lodash/lodash/blob/4.4.2-npm-packages/lodash.truncate) for more details. diff --git a/node_modules/lodash.truncate/index.js b/node_modules/lodash.truncate/index.js deleted file mode 100644 index 4f5449ecc..000000000 --- a/node_modules/lodash.truncate/index.js +++ /dev/null @@ -1,632 +0,0 @@ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as default options for `_.truncate`. */ -var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** `Object#toString` result references. */ -var regexpTag = '[object RegExp]', - symbolTag = '[object Symbol]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to match `RegExp` flags from their coerced string values. */ -var reFlags = /\w*$/; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Used to compose unicode character classes. */ -var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23', - rsComboSymbolsRange = '\\u20d0-\\u20f0', - rsVarRange = '\\ufe0e\\ufe0f'; - -/** Used to compose unicode capture groups. */ -var rsAstral = '[' + rsAstralRange + ']', - rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsZWJ = '\\u200d'; - -/** Used to compose unicode regexes. */ -var reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; - -/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ -var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); - -/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ -var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']'); - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -/** Detect free variable `exports`. */ -var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - -/** Detect free variable `module`. */ -var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; - -/** Detect the popular CommonJS extension `module.exports`. */ -var moduleExports = freeModule && freeModule.exports === freeExports; - -/** Detect free variable `process` from Node.js. */ -var freeProcess = moduleExports && freeGlobal.process; - -/** Used to access faster Node.js helpers. */ -var nodeUtil = (function() { - try { - return freeProcess && freeProcess.binding('util'); - } catch (e) {} -}()); - -/* Node.js helper references. */ -var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp; - -/** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -var asciiSize = baseProperty('length'); - -/** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function asciiToArray(string) { - return string.split(''); -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ -function baseUnary(func) { - return function(value) { - return func(value); - }; -} - -/** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ -function hasUnicode(string) { - return reHasUnicode.test(string); -} - -/** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ -function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); -} - -/** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); -} - -/** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ -function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - result++; - } - return result; -} - -/** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ -function unicodeToArray(string) { - return string.match(reUnicode) || []; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.isRegExp` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - */ -function baseIsRegExp(value) { - return isObject(value) && objectToString.call(value) == regexpTag; -} - -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Casts `array` to a slice if it's needed. - * - * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. - */ -function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `RegExp` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. - * @example - * - * _.isRegExp(/abc/); - * // => true - * - * _.isRegExp('/abc/'); - * // => false - */ -var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -/** - * Truncates `string` if it's longer than the given maximum string length. - * The last characters of the truncated string are replaced with the omission - * string which defaults to "...". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to truncate. - * @param {Object} [options={}] The options object. - * @param {number} [options.length=30] The maximum string length. - * @param {string} [options.omission='...'] The string to indicate text is omitted. - * @param {RegExp|string} [options.separator] The separator pattern to truncate to. - * @returns {string} Returns the truncated string. - * @example - * - * _.truncate('hi-diddly-ho there, neighborino'); - * // => 'hi-diddly-ho there, neighbo...' - * - * _.truncate('hi-diddly-ho there, neighborino', { - * 'length': 24, - * 'separator': ' ' - * }); - * // => 'hi-diddly-ho there,...' - * - * _.truncate('hi-diddly-ho there, neighborino', { - * 'length': 24, - * 'separator': /,? +/ - * }); - * // => 'hi-diddly-ho there...' - * - * _.truncate('hi-diddly-ho there, neighborino', { - * 'omission': ' [...]' - * }); - * // => 'hi-diddly-ho there, neig [...]' - */ -function truncate(string, options) { - var length = DEFAULT_TRUNC_LENGTH, - omission = DEFAULT_TRUNC_OMISSION; - - if (isObject(options)) { - var separator = 'separator' in options ? options.separator : separator; - length = 'length' in options ? toInteger(options.length) : length; - omission = 'omission' in options ? baseToString(options.omission) : omission; - } - string = toString(string); - - var strLength = string.length; - if (hasUnicode(string)) { - var strSymbols = stringToArray(string); - strLength = strSymbols.length; - } - if (length >= strLength) { - return string; - } - var end = length - stringSize(omission); - if (end < 1) { - return omission; - } - var result = strSymbols - ? castSlice(strSymbols, 0, end).join('') - : string.slice(0, end); - - if (separator === undefined) { - return result + omission; - } - if (strSymbols) { - end += (result.length - end); - } - if (isRegExp(separator)) { - if (string.slice(end).search(separator)) { - var match, - substring = result; - - if (!separator.global) { - separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); - } - separator.lastIndex = 0; - while ((match = separator.exec(substring))) { - var newEnd = match.index; - } - result = result.slice(0, newEnd === undefined ? end : newEnd); - } - } else if (string.indexOf(baseToString(separator), end) != end) { - var index = result.lastIndexOf(separator); - if (index > -1) { - result = result.slice(0, index); - } - } - return result + omission; -} - -module.exports = truncate; diff --git a/node_modules/lodash.truncate/package.json b/node_modules/lodash.truncate/package.json deleted file mode 100644 index c8f3f274d..000000000 --- a/node_modules/lodash.truncate/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "lodash.truncate@^4.4.2", - "_id": "lodash.truncate@4.4.2", - "_inBundle": false, - "_integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "_location": "/lodash.truncate", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "lodash.truncate@^4.4.2", - "name": "lodash.truncate", - "escapedName": "lodash.truncate", - "rawSpec": "^4.4.2", - "saveSpec": null, - "fetchSpec": "^4.4.2" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "_shasum": "5a350da0b1113b837ecfffd5812cbe58d6eae193", - "_spec": "lodash.truncate@^4.4.2", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - "bugs": { - "url": "https://github.com/lodash/lodash/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "John-David Dalton", - "email": "john.david.dalton@gmail.com", - "url": "http://allyoucanleet.com/" - }, - { - "name": "Blaine Bublitz", - "email": "blaine.bublitz@gmail.com", - "url": "https://github.com/phated" - }, - { - "name": "Mathias Bynens", - "email": "mathias@qiwi.be", - "url": "https://mathiasbynens.be/" - } - ], - "deprecated": false, - "description": "The lodash method `_.truncate` exported as a module.", - "homepage": "https://lodash.com/", - "icon": "https://lodash.com/icon.svg", - "keywords": [ - "lodash-modularized", - "truncate" - ], - "license": "MIT", - "name": "lodash.truncate", - "repository": { - "type": "git", - "url": "git+https://github.com/lodash/lodash.git" - }, - "scripts": { - "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" - }, - "version": "4.4.2" -} diff --git a/node_modules/minimatch/README.md b/node_modules/minimatch/README.md index ad72b8133..33ede1d6e 100644 --- a/node_modules/minimatch/README.md +++ b/node_modules/minimatch/README.md @@ -2,7 +2,7 @@ A minimal matching utility. -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) +[![Build Status](https://travis-ci.org/isaacs/minimatch.svg?branch=master)](http://travis-ci.org/isaacs/minimatch) This is the matching library used internally by npm. @@ -171,6 +171,27 @@ Suppress the behavior of treating a leading `!` character as negation. Returns from negate expressions the same as if they were not negated. (Ie, true on a hit, false on a miss.) +### partial + +Compare a partial path to a pattern. As long as the parts of the path that +are present are not contradicted by the pattern, it will be treated as a +match. This is useful in applications where you're walking through a +folder structure, and don't yet have the full path, but want to ensure that +you do not walk down paths that can never be a match. + +For example, + +```js +minimatch('/a/b', '/a/*/c/d', { partial: true }) // true, might be /a/b/c/d +minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d +minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a +``` + +### allowWindowsEscape + +Windows path separator `\` is by default converted to `/`, which +prohibits the usage of `\` as a escape character. This flag skips that +behavior and allows using the escape character. ## Comparisons to other fnmatch/glob implementations diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js index 5b5f8cf44..fda45ade7 100644 --- a/node_modules/minimatch/minimatch.js +++ b/node_modules/minimatch/minimatch.js @@ -1,10 +1,10 @@ module.exports = minimatch minimatch.Minimatch = Minimatch -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} +var path = (function () { try { return require('path') } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} var expand = require('brace-expansion') @@ -56,43 +56,64 @@ function filter (pattern, options) { } function ext (a, b) { - a = a || {} b = b || {} var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) Object.keys(a).forEach(function (k) { t[k] = a[k] }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) return t } minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } var orig = minimatch var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) + return orig(p, pattern, ext(def, options)) } m.Minimatch = function Minimatch (pattern, options) { return new orig.Minimatch(pattern, ext(def, options)) } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } return m } Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch return minimatch.defaults(def).Minimatch } function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} @@ -101,9 +122,6 @@ function minimatch (p, pattern, options) { return false } - // "" only matches "" - if (pattern.trim() === '') return p === '' - return new Minimatch(pattern, options).match(p) } @@ -112,15 +130,14 @@ function Minimatch (pattern, options) { return new Minimatch(pattern, options) } - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } + assertValidPattern(pattern) if (!options) options = {} + pattern = pattern.trim() // windows support: need to use /, not \ - if (path.sep !== '/') { + if (!options.allowWindowsEscape && path.sep !== '/') { pattern = pattern.split(path.sep).join('/') } @@ -131,6 +148,7 @@ function Minimatch (pattern, options) { this.negate = false this.comment = false this.empty = false + this.partial = !!options.partial // make the set of regexps etc. this.make() @@ -140,9 +158,6 @@ Minimatch.prototype.debug = function () {} Minimatch.prototype.make = make function make () { - // don't do it more than once. - if (this._made) return - var pattern = this.pattern var options = this.options @@ -162,7 +177,7 @@ function make () { // step 2: expand braces var set = this.globSet = this.braceExpand() - if (options.debug) this.debug = console.error + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } this.debug(this.pattern, set) @@ -242,12 +257,11 @@ function braceExpand (pattern, options) { pattern = typeof pattern === 'undefined' ? this.pattern : pattern - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } + assertValidPattern(pattern) - if (options.nobrace || - !pattern.match(/\{.*\}/)) { + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { // shortcut. no need to expand. return [pattern] } @@ -255,6 +269,17 @@ function braceExpand (pattern, options) { return expand(pattern) } +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + // parse a component of the expanded set. // At this point, no pattern may contain "/" in it // so we're going to return a 2d array, where each entry is the full @@ -269,14 +294,17 @@ function braceExpand (pattern, options) { Minimatch.prototype.parse = parse var SUBPARSE = {} function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } + assertValidPattern(pattern) var options = this.options // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } if (pattern === '') return '' var re = '' @@ -332,10 +360,12 @@ function parse (pattern, isSub) { } switch (c) { - case '/': + /* istanbul ignore next */ + case '/': { // completely not allowed, even escaped. // Should already be path-split by now. return false + } case '\\': clearStateChar() @@ -454,25 +484,23 @@ function parse (pattern, isSub) { // handle the case where we left a class open. // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue } // finish up the class. @@ -556,9 +584,7 @@ function parse (pattern, isSub) { // something that could conceivably capture a dot var addPatternStart = false switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true + case '[': case '.': case '(': addPatternStart = true } // Hack to work around lack of negative lookbehind in JS @@ -620,7 +646,7 @@ function parse (pattern, isSub) { var flags = options.nocase ? 'i' : '' try { var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { + } catch (er) /* istanbul ignore next - should be impossible */ { // If it was an invalid regular expression, then it can't match // anything. This trick looks for a character after the end of // the string, which is of course impossible, except in multi-line @@ -678,7 +704,7 @@ function makeRe () { try { this.regexp = new RegExp(re, flags) - } catch (ex) { + } catch (ex) /* istanbul ignore next - should be impossible */ { this.regexp = false } return this.regexp @@ -696,8 +722,8 @@ minimatch.match = function (list, pattern, options) { return list } -Minimatch.prototype.match = match -function match (f, partial) { +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial this.debug('match', f, this.pattern) // short-circuit in the case of busted things. // comments, etc. @@ -779,6 +805,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // should be impossible. // some invalid regexp stuff in the set. + /* istanbul ignore if */ if (p === false) return false if (p === GLOBSTAR) { @@ -852,6 +879,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // no match was found. // However, in partial mode, we can't say this is necessarily over. // If there's more *pattern* left, then + /* istanbul ignore if */ if (partial) { // ran out of file this.debug('\n>>> no match, partial?', file, fr, pattern, pr) @@ -865,11 +893,7 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // patterns with magic have been turned into regexps. var hit if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } + hit = f === p this.debug('string match', p, f, hit) } else { hit = f.match(p) @@ -900,16 +924,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) { // this is ok if we're doing the match as part of // a glob fs traversal. return partial - } else if (pi === pl) { + } else /* istanbul ignore else */ if (pi === pl) { // ran out of pattern, still have file left. // this is only acceptable if we're on the very last // empty segment of a file with a trailing slash. // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd + return (fi === fl - 1) && (file[fi] === '') } // should be unreachable. + /* istanbul ignore next */ throw new Error('wtf?') } diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json index cf4c388ef..566efdfe4 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -1,66 +1,33 @@ { - "_from": "minimatch@^3.0.4", - "_id": "minimatch@3.0.4", - "_inBundle": false, - "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "_location": "/minimatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimatch@^3.0.4", - "name": "minimatch", - "escapedName": "minimatch", - "rawSpec": "^3.0.4", - "saveSpec": null, - "fetchSpec": "^3.0.4" + "author": "Isaac Z. Schlueter (http://blog.izs.me)", + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "3.1.2", + "publishConfig": { + "tag": "v3-legacy" }, - "_requiredBy": [ - "/@eslint/eslintrc", - "/eslint", - "/glob", - "/test-exclude" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", - "_spec": "minimatch@^3.0.4", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "test": "tap", + "preversion": "npm test", + "postversion": "npm publish", + "postpublish": "git push origin --all; git push origin --tags" }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" + "engines": { + "node": "*" }, - "bundleDependencies": false, "dependencies": { "brace-expansion": "^1.1.7" }, - "deprecated": false, - "description": "a glob matcher in javascript", "devDependencies": { - "tap": "^10.3.2" - }, - "engines": { - "node": "*" + "tap": "^15.1.6" }, + "license": "ISC", "files": [ "minimatch.js" - ], - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "name": "minimatch", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --cov" - }, - "version": "3.0.4" + ] } diff --git a/node_modules/optionator/README.md b/node_modules/optionator/README.md index b1c53918f..fd8af5083 100644 --- a/node_modules/optionator/README.md +++ b/node_modules/optionator/README.md @@ -23,7 +23,7 @@ Other helpful features include reformatting the help text based on the size of t ## About Optionator uses [type-check](https://github.com/gkz/type-check) and [levn](https://github.com/gkz/levn) behind the scenes to cast and verify input according the specified types. -MIT license. Version 0.9.1 +MIT license. Version 0.9.3 npm install optionator diff --git a/node_modules/optionator/lib/help.js b/node_modules/optionator/lib/help.js index 59e6f9694..d75b28b4a 100644 --- a/node_modules/optionator/lib/help.js +++ b/node_modules/optionator/lib/help.js @@ -3,7 +3,7 @@ var ref$, id, find, sort, min, max, map, unlines, nameToRaw, dasherize, naturalJoin, wordWrap, wordwrap, getPreText, setHelpStyleDefaults, generateHelpForOption, generateHelp; ref$ = require('prelude-ls'), id = ref$.id, find = ref$.find, sort = ref$.sort, min = ref$.min, max = ref$.max, map = ref$.map, unlines = ref$.unlines; ref$ = require('./util'), nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; - wordWrap = require('word-wrap'); + wordWrap = require('@aashutoshrathi/word-wrap'); wordwrap = function(a, b){ var ref$, indent, width; ref$ = b === undefined diff --git a/node_modules/optionator/lib/index.js b/node_modules/optionator/lib/index.js index 20d914b2a..bb3ab0b0e 100644 --- a/node_modules/optionator/lib/index.js +++ b/node_modules/optionator/lib/index.js @@ -1,7 +1,7 @@ // Generated by LiveScript 1.6.0 (function(){ var VERSION, ref$, id, map, compact, any, groupBy, partition, chars, isItNaN, keys, Obj, camelize, deepIs, closestString, nameToRaw, dasherize, naturalJoin, generateHelp, generateHelpForOption, parsedTypeCheck, parseType, parseLevn, camelizeKeys, parseString, main, toString$ = {}.toString, slice$ = [].slice, arrayFrom$ = Array.from || function(x){return slice$.call(x);}; - VERSION = '0.9.1'; + VERSION = '0.9.3'; ref$ = require('prelude-ls'), id = ref$.id, map = ref$.map, compact = ref$.compact, any = ref$.any, groupBy = ref$.groupBy, partition = ref$.partition, chars = ref$.chars, isItNaN = ref$.isItNaN, keys = ref$.keys, Obj = ref$.Obj, camelize = ref$.camelize; deepIs = require('deep-is'); ref$ = require('./util'), closestString = ref$.closestString, nameToRaw = ref$.nameToRaw, dasherize = ref$.dasherize, naturalJoin = ref$.naturalJoin; diff --git a/node_modules/optionator/package.json b/node_modules/optionator/package.json index 3d3357b63..1965a0520 100644 --- a/node_modules/optionator/package.json +++ b/node_modules/optionator/package.json @@ -1,57 +1,8 @@ { - "_from": "optionator@^0.9.1", - "_id": "optionator@0.9.1", - "_inBundle": false, - "_integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "_location": "/optionator", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "optionator@^0.9.1", - "name": "optionator", - "escapedName": "optionator", - "rawSpec": "^0.9.1", - "saveSpec": null, - "fetchSpec": "^0.9.1" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "_shasum": "4f236a6373dae0566a6d43e1326674f50c291499", - "_spec": "optionator@^0.9.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "George Zahariev", - "email": "z@georgezahariev.com" - }, - "bugs": { - "url": "https://github.com/gkz/optionator/issues" - }, - "bundleDependencies": false, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - }, - "deprecated": false, + "name": "optionator", + "version": "0.9.3", + "author": "George Zahariev ", "description": "option parsing and help generation", - "devDependencies": { - "livescript": "^1.6.0", - "mocha": "^7.1.1" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "lib", - "README.md", - "LICENSE" - ], "homepage": "https://github.com/gkz/optionator", "keywords": [ "options", @@ -59,9 +10,17 @@ "option parsing", "cli" ], - "license": "MIT", + "files": [ + "lib", + "README.md", + "LICENSE" + ], "main": "./lib/", - "name": "optionator", + "bugs": "https://github.com/gkz/optionator/issues", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + }, "repository": { "type": "git", "url": "git://github.com/gkz/optionator.git" @@ -69,5 +28,16 @@ "scripts": { "test": "make test" }, - "version": "0.9.1" + "dependencies": { + "prelude-ls": "^1.2.1", + "deep-is": "^0.1.3", + "@aashutoshrathi/word-wrap": "^1.2.3", + "type-check": "^0.4.0", + "levn": "^0.4.1", + "fast-levenshtein": "^2.0.6" + }, + "devDependencies": { + "livescript": "^1.6.0", + "mocha": "^7.1.1" + } } diff --git a/node_modules/progress/CHANGELOG.md b/node_modules/progress/CHANGELOG.md deleted file mode 100644 index d9be0aa18..000000000 --- a/node_modules/progress/CHANGELOG.md +++ /dev/null @@ -1,115 +0,0 @@ - -2.0.0 / 2017-04-04 -================== - - * Fix: check before using stream.clearLine to prevent crash in Docker - * Fix: fixed output multiline on windows cmd - * Fix: Bug with array length when window is too small - * Fix: Don't clear whole line every time; instead, clear everything after end of line - * Fix: Use `this.stream` instead of `console.log` when terminating a progress bar to ensure that, if a writable stream is provided, it uses that rather than process.stdout - * Fix: Bug causing potentially stale tokens on render - * Feature: configurable cursor - * Feature: feature to interrupt the bar and display a message - * Feature: Add rate reporting to progress bar - * Improvement: Add head option to specify head character - * Improvement: Rename tickTokens to tokens - * Improvement: Change default throttle time to 16ms - * Improvement: Rename renderDelay to renderThrottle - * Improvement: Add delay between render updates - * Docs: Add example and documentation for custom token usage - * Docs: Add head option to readme - * Docs: Updated README example for public use - * Docs: Add renderThrottle option to code documentation - -1.1.7 / 2014-06-30 -================== - - * fixed a bug that occurs when a progress bar attempts to draw itself - on a console with very few columns - -1.1.6 / 2014-06-16 -================== - - * now prevents progress bar from exceeding TTY width by limiting its width to - the with of the TTY - -1.1.5 / 2014-03-25 -================== - - * updated documentation and various other repo maintenance - * updated makefile to run examples with `make` - * removed dependency on readline module - -1.1.4 / 2014-03-14 -================== - - * now supports streams, for example output progress bar to stderr, while piping - stdout - * increases performance and flicker by remembering the last drawn progress bar - -1.1.3 / 2013-12-31 -================== - - * fixes a bug where bar would bug when initializing - * allows to pass updated tokens when ticking or updating the bar - * fixes a bug where the bar would throw if skipping to far - -1.1.2 / 2013-10-17 -================== - - * lets you pass an `fmt` and a `total` instead of an options object - -1.1.0 / 2013-09-18 -================== - - * eta and elapsed tokens default to 0.0 instead of ?.? - * better JSDocs - * added back and forth example - * added method to update the progress bar to a specific percentage - * added an option to hide the bar on completion - -1.0.1 / 2013-08-07 -================== - - * on os x readline now works, reverting the terminal hack - -1.0.0 / 2013-06-18 -================== - - * remove .version - * merge pull request #15 from davglass/readline-osx - * on OSX revert back to terminal hack to avoid a readline bug - -0.1.0 / 2012-09-19 -================== - - * fixed logic bug that caused bar to jump one extra space at the end [davglass] - * working with readline impl, even on Windows [davglass] - * using readline instead of the \r hack [davglass] - -0.0.5 / 2012-08-07 -================== - - * add ability to tick by zero chunks - tick(0) - * fix ETA. Closes #4 [lwille] - -0.0.4 / 2011-11-14 -================== - - * allow more recent versions of node - -0.0.3 / 2011-04-20 -================== - - * changed; erase the line when complete - -0.0.2 / 2011-04-20 -================== - - * added custom tokens support - * fixed; clear line before writing - -0.0.1 / 2010-01-03 -================== - - * initial release diff --git a/node_modules/progress/LICENSE b/node_modules/progress/LICENSE deleted file mode 100644 index 4608b3947..000000000 --- a/node_modules/progress/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2017 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/progress/Makefile b/node_modules/progress/Makefile deleted file mode 100644 index f933be10a..000000000 --- a/node_modules/progress/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -EXAMPLES = $(foreach EXAMPLE, $(wildcard examples/*.js), $(EXAMPLE)) - -.PHONY: test -test: $(EXAMPLES) - -.PHONY: $(EXAMPLES) -$(EXAMPLES): ; node $@ && echo diff --git a/node_modules/progress/Readme.md b/node_modules/progress/Readme.md deleted file mode 100644 index 6d4271abc..000000000 --- a/node_modules/progress/Readme.md +++ /dev/null @@ -1,146 +0,0 @@ -Flexible ascii progress bar. - -## Installation - -```bash -$ npm install progress -``` - -## Usage - -First we create a `ProgressBar`, giving it a format string -as well as the `total`, telling the progress bar when it will -be considered complete. After that all we need to do is `tick()` appropriately. - -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - console.log('\ncomplete\n'); - clearInterval(timer); - } -}, 100); -``` - -### Options - -These are keys in the options object you can pass to the progress bar along with -`total` as seen in the example above. - -- `curr` current completed index -- `total` total number of ticks to complete -- `width` the displayed width of the progress bar defaulting to total -- `stream` the output stream defaulting to stderr -- `head` head character defaulting to complete character -- `complete` completion character defaulting to "=" -- `incomplete` incomplete character defaulting to "-" -- `renderThrottle` minimum time between updates in milliseconds defaulting to 16 -- `clear` option to clear the bar on completion defaulting to false -- `callback` optional function to call when the progress bar completes - -### Tokens - -These are tokens you can use in the format of your progress bar. - -- `:bar` the progress bar itself -- `:current` current tick number -- `:total` total ticks -- `:elapsed` time elapsed in seconds -- `:percent` completion percentage -- `:eta` estimated completion time in seconds -- `:rate` rate of ticks per second - -### Custom Tokens - -You can define custom tokens by adding a `{'name': value}` object parameter to your method (`tick()`, `update()`, etc.) calls. - -```javascript -var bar = new ProgressBar(':current: :token1 :token2', { total: 3 }) -bar.tick({ - 'token1': "Hello", - 'token2': "World!\n" -}) -bar.tick(2, { - 'token1': "Goodbye", - 'token2': "World!" -}) -``` -The above example would result in the output below. - -``` -1: Hello World! -3: Goodbye World! -``` - -## Examples - -### Download - -In our download example each tick has a variable influence, so we pass the chunk -length which adjusts the progress bar appropriately relative to the total -length. - -```javascript -var ProgressBar = require('progress'); -var https = require('https'); - -var req = https.request({ - host: 'download.github.com', - port: 443, - path: '/visionmedia-node-jscoverage-0d4608a.zip' -}); - -req.on('response', function(res){ - var len = parseInt(res.headers['content-length'], 10); - - console.log(); - var bar = new ProgressBar(' downloading [:bar] :rate/bps :percent :etas', { - complete: '=', - incomplete: ' ', - width: 20, - total: len - }); - - res.on('data', function (chunk) { - bar.tick(chunk.length); - }); - - res.on('end', function () { - console.log('\n'); - }); -}); - -req.end(); -``` - -The above example result in a progress bar like the one below. - -``` -downloading [===== ] 39/bps 29% 3.7s -``` - -### Interrupt - -To display a message during progress bar execution, use `interrupt()` -```javascript -var ProgressBar = require('progress'); - -var bar = new ProgressBar(':bar :current/:total', { total: 10 }); -var timer = setInterval(function () { - bar.tick(); - if (bar.complete) { - clearInterval(timer); - } else if (bar.curr === 5) { - bar.interrupt('this message appears above the progress bar\ncurrent progress is ' + bar.curr + '/' + bar.total); - } -}, 1000); -``` - -You can see more examples in the `examples` folder. - -## License - -MIT diff --git a/node_modules/progress/index.js b/node_modules/progress/index.js deleted file mode 100644 index 4449dd30d..000000000 --- a/node_modules/progress/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/node-progress'); diff --git a/node_modules/progress/lib/node-progress.js b/node_modules/progress/lib/node-progress.js deleted file mode 100644 index 8eb0740a7..000000000 --- a/node_modules/progress/lib/node-progress.js +++ /dev/null @@ -1,236 +0,0 @@ -/*! - * node-progress - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Expose `ProgressBar`. - */ - -exports = module.exports = ProgressBar; - -/** - * Initialize a `ProgressBar` with the given `fmt` string and `options` or - * `total`. - * - * Options: - * - * - `curr` current completed index - * - `total` total number of ticks to complete - * - `width` the displayed width of the progress bar defaulting to total - * - `stream` the output stream defaulting to stderr - * - `head` head character defaulting to complete character - * - `complete` completion character defaulting to "=" - * - `incomplete` incomplete character defaulting to "-" - * - `renderThrottle` minimum time between updates in milliseconds defaulting to 16 - * - `callback` optional function to call when the progress bar completes - * - `clear` will clear the progress bar upon termination - * - * Tokens: - * - * - `:bar` the progress bar itself - * - `:current` current tick number - * - `:total` total ticks - * - `:elapsed` time elapsed in seconds - * - `:percent` completion percentage - * - `:eta` eta in seconds - * - `:rate` rate of ticks per second - * - * @param {string} fmt - * @param {object|number} options or total - * @api public - */ - -function ProgressBar(fmt, options) { - this.stream = options.stream || process.stderr; - - if (typeof(options) == 'number') { - var total = options; - options = {}; - options.total = total; - } else { - options = options || {}; - if ('string' != typeof fmt) throw new Error('format required'); - if ('number' != typeof options.total) throw new Error('total required'); - } - - this.fmt = fmt; - this.curr = options.curr || 0; - this.total = options.total; - this.width = options.width || this.total; - this.clear = options.clear - this.chars = { - complete : options.complete || '=', - incomplete : options.incomplete || '-', - head : options.head || (options.complete || '=') - }; - this.renderThrottle = options.renderThrottle !== 0 ? (options.renderThrottle || 16) : 0; - this.lastRender = -Infinity; - this.callback = options.callback || function () {}; - this.tokens = {}; - this.lastDraw = ''; -} - -/** - * "tick" the progress bar with optional `len` and optional `tokens`. - * - * @param {number|object} len or tokens - * @param {object} tokens - * @api public - */ - -ProgressBar.prototype.tick = function(len, tokens){ - if (len !== 0) - len = len || 1; - - // swap tokens - if ('object' == typeof len) tokens = len, len = 1; - if (tokens) this.tokens = tokens; - - // start time for eta - if (0 == this.curr) this.start = new Date; - - this.curr += len - - // try to render - this.render(); - - // progress complete - if (this.curr >= this.total) { - this.render(undefined, true); - this.complete = true; - this.terminate(); - this.callback(this); - return; - } -}; - -/** - * Method to render the progress bar with optional `tokens` to place in the - * progress bar's `fmt` field. - * - * @param {object} tokens - * @api public - */ - -ProgressBar.prototype.render = function (tokens, force) { - force = force !== undefined ? force : false; - if (tokens) this.tokens = tokens; - - if (!this.stream.isTTY) return; - - var now = Date.now(); - var delta = now - this.lastRender; - if (!force && (delta < this.renderThrottle)) { - return; - } else { - this.lastRender = now; - } - - var ratio = this.curr / this.total; - ratio = Math.min(Math.max(ratio, 0), 1); - - var percent = Math.floor(ratio * 100); - var incomplete, complete, completeLength; - var elapsed = new Date - this.start; - var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1); - var rate = this.curr / (elapsed / 1000); - - /* populate the bar template with percentages and timestamps */ - var str = this.fmt - .replace(':current', this.curr) - .replace(':total', this.total) - .replace(':elapsed', isNaN(elapsed) ? '0.0' : (elapsed / 1000).toFixed(1)) - .replace(':eta', (isNaN(eta) || !isFinite(eta)) ? '0.0' : (eta / 1000) - .toFixed(1)) - .replace(':percent', percent.toFixed(0) + '%') - .replace(':rate', Math.round(rate)); - - /* compute the available space (non-zero) for the bar */ - var availableSpace = Math.max(0, this.stream.columns - str.replace(':bar', '').length); - if(availableSpace && process.platform === 'win32'){ - availableSpace = availableSpace - 1; - } - - var width = Math.min(this.width, availableSpace); - - /* TODO: the following assumes the user has one ':bar' token */ - completeLength = Math.round(width * ratio); - complete = Array(Math.max(0, completeLength + 1)).join(this.chars.complete); - incomplete = Array(Math.max(0, width - completeLength + 1)).join(this.chars.incomplete); - - /* add head to the complete string */ - if(completeLength > 0) - complete = complete.slice(0, -1) + this.chars.head; - - /* fill in the actual progress bar */ - str = str.replace(':bar', complete + incomplete); - - /* replace the extra tokens */ - if (this.tokens) for (var key in this.tokens) str = str.replace(':' + key, this.tokens[key]); - - if (this.lastDraw !== str) { - this.stream.cursorTo(0); - this.stream.write(str); - this.stream.clearLine(1); - this.lastDraw = str; - } -}; - -/** - * "update" the progress bar to represent an exact percentage. - * The ratio (between 0 and 1) specified will be multiplied by `total` and - * floored, representing the closest available "tick." For example, if a - * progress bar has a length of 3 and `update(0.5)` is called, the progress - * will be set to 1. - * - * A ratio of 0.5 will attempt to set the progress to halfway. - * - * @param {number} ratio The ratio (between 0 and 1 inclusive) to set the - * overall completion to. - * @api public - */ - -ProgressBar.prototype.update = function (ratio, tokens) { - var goal = Math.floor(ratio * this.total); - var delta = goal - this.curr; - - this.tick(delta, tokens); -}; - -/** - * "interrupt" the progress bar and write a message above it. - * @param {string} message The message to write. - * @api public - */ - -ProgressBar.prototype.interrupt = function (message) { - // clear the current line - this.stream.clearLine(); - // move the cursor to the start of the line - this.stream.cursorTo(0); - // write the message text - this.stream.write(message); - // terminate the line after writing the message - this.stream.write('\n'); - // re-display the progress bar with its lastDraw - this.stream.write(this.lastDraw); -}; - -/** - * Terminates a progress bar. - * - * @api public - */ - -ProgressBar.prototype.terminate = function () { - if (this.clear) { - if (this.stream.clearLine) { - this.stream.clearLine(); - this.stream.cursorTo(0); - } - } else { - this.stream.write('\n'); - } -}; diff --git a/node_modules/progress/package.json b/node_modules/progress/package.json deleted file mode 100644 index 13ab9ffd5..000000000 --- a/node_modules/progress/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "progress@^2.0.0", - "_id": "progress@2.0.3", - "_inBundle": false, - "_integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "_location": "/progress", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "progress@^2.0.0", - "name": "progress", - "escapedName": "progress", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "_shasum": "7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8", - "_spec": "progress@^2.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/visionmedia/node-progress/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Christoffer Hallas", - "email": "christoffer.hallas@gmail.com" - }, - { - "name": "Jordan Scales", - "email": "scalesjordan@gmail.com" - }, - { - "name": "Andrew Rhyne", - "email": "rhyneandrew@gmail.com" - }, - { - "name": "Marco Brack", - "email": "PapstDonB@Googlemail.com" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Flexible ascii progress bar", - "engines": { - "node": ">=0.4.0" - }, - "homepage": "https://github.com/visionmedia/node-progress#readme", - "keywords": [ - "cli", - "progress" - ], - "license": "MIT", - "main": "./index.js", - "name": "progress", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-progress.git" - }, - "version": "2.0.3" -} diff --git a/node_modules/queue-microtask/LICENSE b/node_modules/queue-microtask/LICENSE new file mode 100755 index 000000000..c7e685275 --- /dev/null +++ b/node_modules/queue-microtask/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/queue-microtask/README.md b/node_modules/queue-microtask/README.md new file mode 100644 index 000000000..0be05a64f --- /dev/null +++ b/node_modules/queue-microtask/README.md @@ -0,0 +1,90 @@ +# queue-microtask [![ci][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[ci-image]: https://img.shields.io/github/workflow/status/feross/queue-microtask/ci/master +[ci-url]: https://github.com/feross/queue-microtask/actions +[npm-image]: https://img.shields.io/npm/v/queue-microtask.svg +[npm-url]: https://npmjs.org/package/queue-microtask +[downloads-image]: https://img.shields.io/npm/dm/queue-microtask.svg +[downloads-url]: https://npmjs.org/package/queue-microtask +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +### fast, tiny [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask) shim for modern engines + +- Use [`queueMicrotask`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/queueMicrotask) in all modern JS engines. +- No dependencies. Less than 10 lines. No shims or complicated fallbacks. +- Optimal performance in all modern environments + - Uses `queueMicrotask` in modern environments + - Fallback to `Promise.resolve().then(fn)` in Node.js 10 and earlier, and old browsers (same performance as `queueMicrotask`) + +## install + +``` +npm install queue-microtask +``` + +## usage + +```js +const queueMicrotask = require('queue-microtask') + +queueMicrotask(() => { /* this will run soon */ }) +``` + +## What is `queueMicrotask` and why would one use it? + +The `queueMicrotask` function is a WHATWG standard. It queues a microtask to be executed prior to control returning to the event loop. + +A microtask is a short function which will run after the current task has completed its work and when there is no other code waiting to be run before control of the execution context is returned to the event loop. + +The code `queueMicrotask(fn)` is equivalent to the code `Promise.resolve().then(fn)`. It is also very similar to [`process.nextTick(fn)`](https://nodejs.org/api/process.html#process_process_nexttick_callback_args) in Node. + +Using microtasks lets code run without interfering with any other, potentially higher priority, code that is pending, but before the JS engine regains control over the execution context. + +See the [spec](https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#microtask-queuing) or [Node documentation](https://nodejs.org/api/globals.html#globals_queuemicrotask_callback) for more information. + +## Who is this package for? + +This package allows you to use `queueMicrotask` safely in all modern JS engines. Use it if you prioritize small JS bundle size over support for old browsers. + +If you just need to support Node 12 and later, use `queueMicrotask` directly. If you need to support all versions of Node, use this package. + +## Why not use `process.nextTick`? + +In Node, `queueMicrotask` and `process.nextTick` are [essentially equivalent](https://nodejs.org/api/globals.html#globals_queuemicrotask_callback), though there are [subtle differences](https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks) that don't matter in most situations. + +You can think of `queueMicrotask` as a standardized version of `process.nextTick` that works in the browser. No need to rely on your browser bundler to shim `process` for the browser environment. + +## Why not use `setTimeout(fn, 0)`? + +This approach is the most compatible, but it has problems. Modern browsers throttle timers severely, so `setTimeout(…, 0)` usually takes at least 4ms to run. Furthermore, the throttling gets even worse if the page is backgrounded. If you have many `setTimeout` calls, then this can severely limit the performance of your program. + +## Why not use a microtask library like [`immediate`](https://www.npmjs.com/package/immediate) or [`asap`](https://www.npmjs.com/package/asap)? + +These packages are great! However, if you prioritize small JS bundle size over optimal performance in old browsers then you may want to consider this package. + +This package (`queue-microtask`) is four times smaller than `immediate`, twice as small as `asap`, and twice as small as using `process.nextTick` and letting the browser bundler shim it automatically. + +Note: This package throws an exception in JS environments which lack `Promise` support -- which are usually very old browsers and Node.js versions. + +Since the `queueMicrotask` API is supported in Node.js, Chrome, Firefox, Safari, Opera, and Edge, **the vast majority of users will get optimal performance**. Any JS environment with `Promise`, which is almost all of them, also get optimal performance. If you need support for JS environments which lack `Promise` support, use one of the alternative packages. + +## What is a shim? + +> In computer programming, a shim is a library that transparently intercepts API calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere. – [Wikipedia](https://en.wikipedia.org/wiki/Shim_(computing)) + +This package could also be described as a "ponyfill". + +> A ponyfill is almost the same as a polyfill, but not quite. Instead of patching functionality for older browsers, a ponyfill provides that functionality as a standalone module you can use. – [PonyFoo](https://ponyfoo.com/articles/polyfills-or-ponyfills) + +## API + +### `queueMicrotask(fn)` + +The `queueMicrotask()` method queues a microtask. + +The `fn` argument is a function to be executed after all pending tasks have completed but before yielding control to the browser's event loop. + +## license + +MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org). diff --git a/node_modules/queue-microtask/index.d.ts b/node_modules/queue-microtask/index.d.ts new file mode 100644 index 000000000..b6a864632 --- /dev/null +++ b/node_modules/queue-microtask/index.d.ts @@ -0,0 +1,2 @@ +declare const queueMicrotask: (cb: () => void) => void +export = queueMicrotask diff --git a/node_modules/queue-microtask/index.js b/node_modules/queue-microtask/index.js new file mode 100644 index 000000000..55605343a --- /dev/null +++ b/node_modules/queue-microtask/index.js @@ -0,0 +1,9 @@ +/*! queue-microtask. MIT License. Feross Aboukhadijeh */ +let promise + +module.exports = typeof queueMicrotask === 'function' + ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global) + // reuse resolved promise, and allocate it lazily + : cb => (promise || (promise = Promise.resolve())) + .then(cb) + .catch(err => setTimeout(() => { throw err }, 0)) diff --git a/node_modules/queue-microtask/package.json b/node_modules/queue-microtask/package.json new file mode 100644 index 000000000..d29a401f5 --- /dev/null +++ b/node_modules/queue-microtask/package.json @@ -0,0 +1,55 @@ +{ + "name": "queue-microtask", + "description": "fast, tiny `queueMicrotask` shim for modern engines", + "version": "1.2.3", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/queue-microtask/issues" + }, + "devDependencies": { + "standard": "*", + "tape": "^5.2.2" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "homepage": "https://github.com/feross/queue-microtask", + "keywords": [ + "asap", + "immediate", + "micro task", + "microtask", + "nextTick", + "process.nextTick", + "queue micro task", + "queue microtask", + "queue-microtask", + "queueMicrotask", + "setImmediate", + "task" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/queue-microtask.git" + }, + "scripts": { + "test": "standard && tape test/*.js" + } +} diff --git a/node_modules/regexpp/index.d.ts b/node_modules/regexpp/index.d.ts deleted file mode 100644 index 7943c6395..000000000 --- a/node_modules/regexpp/index.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -// Generated by dts-bundle v0.7.3 - -declare module 'regexpp' { - import * as AST from "regexpp/ast"; - import { RegExpParser } from "regexpp/parser"; - import { RegExpValidator } from "regexpp/validator"; - import { RegExpVisitor } from "regexpp/visitor"; - export { AST, RegExpParser, RegExpValidator }; - export function parseRegExpLiteral(source: string | RegExp, options?: RegExpParser.Options): AST.RegExpLiteral; - export function validateRegExpLiteral(source: string, options?: RegExpValidator.Options): void; - export function visitRegExpAST(node: AST.Node, handlers: RegExpVisitor.Handlers): void; -} - -declare module 'regexpp/ast' { - export type Node = BranchNode | LeafNode; - export type BranchNode = RegExpLiteral | Pattern | Alternative | Group | CapturingGroup | Quantifier | CharacterClass | LookaroundAssertion | CharacterClassRange; - export type LeafNode = BoundaryAssertion | CharacterSet | Character | Backreference | Flags; - export type Element = Assertion | Quantifier | QuantifiableElement; - export type QuantifiableElement = Group | CapturingGroup | CharacterClass | CharacterSet | Character | Backreference | LookaheadAssertion; - export type CharacterClassElement = EscapeCharacterSet | UnicodePropertyCharacterSet | Character | CharacterClassRange; - export interface NodeBase { - type: Node["type"]; - parent: Node["parent"]; - start: number; - end: number; - raw: string; - } - export interface RegExpLiteral extends NodeBase { - type: "RegExpLiteral"; - parent: null; - pattern: Pattern; - flags: Flags; - } - export interface Pattern extends NodeBase { - type: "Pattern"; - parent: RegExpLiteral | null; - alternatives: Alternative[]; - } - export interface Alternative extends NodeBase { - type: "Alternative"; - parent: Pattern | Group | CapturingGroup | LookaroundAssertion; - elements: Element[]; - } - export interface Group extends NodeBase { - type: "Group"; - parent: Alternative | Quantifier; - alternatives: Alternative[]; - } - export interface CapturingGroup extends NodeBase { - type: "CapturingGroup"; - parent: Alternative | Quantifier; - name: string | null; - alternatives: Alternative[]; - references: Backreference[]; - } - export type LookaroundAssertion = LookaheadAssertion | LookbehindAssertion; - export interface LookaheadAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative | Quantifier; - kind: "lookahead"; - negate: boolean; - alternatives: Alternative[]; - } - export interface LookbehindAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative; - kind: "lookbehind"; - negate: boolean; - alternatives: Alternative[]; - } - export interface Quantifier extends NodeBase { - type: "Quantifier"; - parent: Alternative; - min: number; - max: number; - greedy: boolean; - element: QuantifiableElement; - } - export interface CharacterClass extends NodeBase { - type: "CharacterClass"; - parent: Alternative | Quantifier; - negate: boolean; - elements: CharacterClassElement[]; - } - export interface CharacterClassRange extends NodeBase { - type: "CharacterClassRange"; - parent: CharacterClass; - min: Character; - max: Character; - } - export type Assertion = BoundaryAssertion | LookaroundAssertion; - export type BoundaryAssertion = EdgeAssertion | WordBoundaryAssertion; - export interface EdgeAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative | Quantifier; - kind: "start" | "end"; - } - export interface WordBoundaryAssertion extends NodeBase { - type: "Assertion"; - parent: Alternative | Quantifier; - kind: "word"; - negate: boolean; - } - export type CharacterSet = AnyCharacterSet | EscapeCharacterSet | UnicodePropertyCharacterSet; - export interface AnyCharacterSet extends NodeBase { - type: "CharacterSet"; - parent: Alternative | Quantifier; - kind: "any"; - } - export interface EscapeCharacterSet extends NodeBase { - type: "CharacterSet"; - parent: Alternative | Quantifier | CharacterClass; - kind: "digit" | "space" | "word"; - negate: boolean; - } - export interface UnicodePropertyCharacterSet extends NodeBase { - type: "CharacterSet"; - parent: Alternative | Quantifier | CharacterClass; - kind: "property"; - key: string; - value: string | null; - negate: boolean; - } - export interface Character extends NodeBase { - type: "Character"; - parent: Alternative | Quantifier | CharacterClass | CharacterClassRange; - value: number; - } - export interface Backreference extends NodeBase { - type: "Backreference"; - parent: Alternative | Quantifier; - ref: number | string; - resolved: CapturingGroup; - } - export interface Flags extends NodeBase { - type: "Flags"; - parent: RegExpLiteral | null; - dotAll: boolean; - global: boolean; - ignoreCase: boolean; - multiline: boolean; - sticky: boolean; - unicode: boolean; - } -} - -declare module 'regexpp/parser' { - import { Flags, RegExpLiteral, Pattern } from "regexpp/ast"; - import { EcmaVersion } from "regexpp/ecma-versions"; - export namespace RegExpParser { - interface Options { - strict?: boolean; - ecmaVersion?: EcmaVersion; - } - } - export class RegExpParser { - constructor(options?: RegExpParser.Options); - parseLiteral(source: string, start?: number, end?: number): RegExpLiteral; - parseFlags(source: string, start?: number, end?: number): Flags; - parsePattern(source: string, start?: number, end?: number, uFlag?: boolean): Pattern; - } -} - -declare module 'regexpp/validator' { - import { EcmaVersion } from "regexpp/ecma-versions"; - export namespace RegExpValidator { - interface Options { - strict?: boolean; - ecmaVersion?: EcmaVersion; - onLiteralEnter?(start: number): void; - onLiteralLeave?(start: number, end: number): void; - onFlags?(start: number, end: number, global: boolean, ignoreCase: boolean, multiline: boolean, unicode: boolean, sticky: boolean, dotAll: boolean): void; - onPatternEnter?(start: number): void; - onPatternLeave?(start: number, end: number): void; - onDisjunctionEnter?(start: number): void; - onDisjunctionLeave?(start: number, end: number): void; - onAlternativeEnter?(start: number, index: number): void; - onAlternativeLeave?(start: number, end: number, index: number): void; - onGroupEnter?(start: number): void; - onGroupLeave?(start: number, end: number): void; - onCapturingGroupEnter?(start: number, name: string | null): void; - onCapturingGroupLeave?(start: number, end: number, name: string | null): void; - onQuantifier?(start: number, end: number, min: number, max: number, greedy: boolean): void; - onLookaroundAssertionEnter?(start: number, kind: "lookahead" | "lookbehind", negate: boolean): void; - onLookaroundAssertionLeave?(start: number, end: number, kind: "lookahead" | "lookbehind", negate: boolean): void; - onEdgeAssertion?(start: number, end: number, kind: "start" | "end"): void; - onWordBoundaryAssertion?(start: number, end: number, kind: "word", negate: boolean): void; - onAnyCharacterSet?(start: number, end: number, kind: "any"): void; - onEscapeCharacterSet?(start: number, end: number, kind: "digit" | "space" | "word", negate: boolean): void; - onUnicodePropertyCharacterSet?(start: number, end: number, kind: "property", key: string, value: string | null, negate: boolean): void; - onCharacter?(start: number, end: number, value: number): void; - onBackreference?(start: number, end: number, ref: number | string): void; - onCharacterClassEnter?(start: number, negate: boolean): void; - onCharacterClassLeave?(start: number, end: number, negate: boolean): void; - onCharacterClassRange?(start: number, end: number, min: number, max: number): void; - } - } - export class RegExpValidator { - constructor(options?: RegExpValidator.Options); - validateLiteral(source: string, start?: number, end?: number): void; - validateFlags(source: string, start?: number, end?: number): void; - validatePattern(source: string, start?: number, end?: number, uFlag?: boolean): void; - } -} - -declare module 'regexpp/visitor' { - import { Alternative, Assertion, Backreference, CapturingGroup, Character, CharacterClass, CharacterClassRange, CharacterSet, Flags, Group, Node, Pattern, Quantifier, RegExpLiteral } from "regexpp/ast"; - export class RegExpVisitor { - constructor(handlers: RegExpVisitor.Handlers); - visit(node: Node): void; - } - export namespace RegExpVisitor { - interface Handlers { - onAlternativeEnter?(node: Alternative): void; - onAlternativeLeave?(node: Alternative): void; - onAssertionEnter?(node: Assertion): void; - onAssertionLeave?(node: Assertion): void; - onBackreferenceEnter?(node: Backreference): void; - onBackreferenceLeave?(node: Backreference): void; - onCapturingGroupEnter?(node: CapturingGroup): void; - onCapturingGroupLeave?(node: CapturingGroup): void; - onCharacterEnter?(node: Character): void; - onCharacterLeave?(node: Character): void; - onCharacterClassEnter?(node: CharacterClass): void; - onCharacterClassLeave?(node: CharacterClass): void; - onCharacterClassRangeEnter?(node: CharacterClassRange): void; - onCharacterClassRangeLeave?(node: CharacterClassRange): void; - onCharacterSetEnter?(node: CharacterSet): void; - onCharacterSetLeave?(node: CharacterSet): void; - onFlagsEnter?(node: Flags): void; - onFlagsLeave?(node: Flags): void; - onGroupEnter?(node: Group): void; - onGroupLeave?(node: Group): void; - onPatternEnter?(node: Pattern): void; - onPatternLeave?(node: Pattern): void; - onQuantifierEnter?(node: Quantifier): void; - onQuantifierLeave?(node: Quantifier): void; - onRegExpLiteralEnter?(node: RegExpLiteral): void; - onRegExpLiteralLeave?(node: RegExpLiteral): void; - } - } -} - -declare module 'regexpp/ecma-versions' { - export type EcmaVersion = 5 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020; -} - diff --git a/node_modules/regexpp/index.js.map b/node_modules/regexpp/index.js.map deleted file mode 100644 index 68fc68e63..000000000 --- a/node_modules/regexpp/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js.map","sources":[".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\ids.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\properties.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\index.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\reader.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\regexp-syntax-error.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\validator.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\parser.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\visitor.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\index.ts"}],"names":[],"mappings":";;;;;;;;;;;AAIA,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAE3D,SAAgB,SAAS,CAAC,EAAU;IAChC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;CAC5B;AAED,SAAgB,YAAY,CAAC,EAAU;IACnC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,KAAK,IAAI;QAAE,OAAO,IAAI,CAAA;IAC5B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,OAAO,cAAc,CAAC,EAAE,CAAC,IAAI,iBAAiB,CAAC,EAAE,CAAC,CAAA;CACrD;AAED,SAAS,cAAc,CAAC,EAAU;IAC9B,OAAO,SAAS,CACZ,EAAE,EACF,kBAAkB,KAAK,kBAAkB,GAAG,sBAAsB,EAAE,CAAC,CACxE,CAAA;CACJ;AAED,SAAS,iB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,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;SAC5C;QACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC3B,IAAI,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE;YACrC,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAA;SAC5C;KACJ;CACJ;;SCzLe,kBAAkB,CAC9B,MAAuB,EACvB,OAA8B;IAE9B,OAAO,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;CAChE;AAOD,SAAgB,qBAAqB,CACjC,MAAc,EACd,OAAiC;IAEjC,OAAO,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAAA;CAC9D;AAED,SAAgB,cAAc,CAC1B,IAAc,EACd,QAAgC;IAEhC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;CAC1C;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/regexpp/index.mjs.map b/node_modules/regexpp/index.mjs.map deleted file mode 100644 index ee329beb5..000000000 --- a/node_modules/regexpp/index.mjs.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.mjs.map","sources":[".temp/unicode/src/unicode/ids.ts",".temp/unicode/src/unicode/properties.ts",".temp/unicode/src/unicode/index.ts",".temp/src/reader.ts",".temp/src/regexp-syntax-error.ts",".temp/src/validator.ts",".temp/src/parser.ts",".temp/src/visitor.ts",".temp/src/index.ts"],"sourcesContent":[{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\ids.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\properties.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\unicode\\src\\unicode\\index.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\reader.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\regexp-syntax-error.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\validator.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\parser.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\visitor.ts"},{"errno":-4058,"code":"ENOENT","syscall":"open","path":"C:\\Users\\t-nagashima.AD\\dev\\regexpp\\.temp\\src\\index.ts"}],"names":[],"mappings":";;;;;;;AAIA,IAAI,kBAAkB,GAAyB,SAAS,CAAA;AACxD,IAAI,qBAAqB,GAAyB,SAAS,CAAA;AAE3D,SAAgB,SAAS,CAAC,EAAU;IAChC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI,CAAA;IAC1B,OAAO,cAAc,CAAC,EAAE,CAAC,CAAA;CAC5B;AAED,SAAgB,YAAY,CAAC,EAAU;IACnC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,KAAK,CAAA;IAC3B,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,IAAI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C,CAAA;CAC1C;;;;"} \ No newline at end of file diff --git a/node_modules/regexpp/package.json b/node_modules/regexpp/package.json deleted file mode 100644 index a9021363d..000000000 --- a/node_modules/regexpp/package.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "_from": "regexpp@^3.1.0", - "_id": "regexpp@3.1.0", - "_inBundle": false, - "_integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "_location": "/regexpp", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "regexpp@^3.1.0", - "name": "regexpp", - "escapedName": "regexpp", - "rawSpec": "^3.1.0", - "saveSpec": null, - "fetchSpec": "^3.1.0" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "_shasum": "206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2", - "_spec": "regexpp@^3.1.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Toru Nagashima", - "url": "https://github.com/mysticatea" - }, - "bugs": { - "url": "https://github.com/mysticatea/regexpp/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Regular expression parser for ECMAScript.", - "devDependencies": { - "@mysticatea/eslint-plugin": "^11.0.0", - "@types/eslint": "^4.16.2", - "@types/jsdom": "^12.2.4", - "@types/mocha": "^5.2.2", - "@types/node": "^12.6.8", - "codecov": "^3.5.0", - "dts-bundle": "^0.7.3", - "eslint": "^6.1.0", - "jsdom": "^15.1.1", - "mocha": "^6.2.0", - "npm-run-all": "^4.1.5", - "nyc": "^14.1.1", - "rimraf": "^2.6.2", - "rollup": "^1.17.0", - "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-sourcemaps": "^0.4.2", - "ts-node": "^8.3.0", - "typescript": "^3.5.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.*" - ], - "funding": "https://github.com/sponsors/mysticatea", - "homepage": "https://github.com/mysticatea/regexpp#readme", - "keywords": [ - "regexp", - "regular", - "expression", - "parser", - "validator", - "ast", - "abstract", - "syntax", - "tree", - "ecmascript", - "es2015", - "es2016", - "es2017", - "es2018", - "es2019", - "es2020", - "annexB" - ], - "license": "MIT", - "main": "index", - "name": "regexpp", - "repository": { - "type": "git", - "url": "git+https://github.com/mysticatea/regexpp.git" - }, - "scripts": { - "build": "run-s build:*", - "build:dts": "dts-bundle --name regexpp --main .temp/index.d.ts --out ../index.d.ts", - "build:rollup": "rollup -c", - "build:tsc": "tsc --module es2015", - "clean": "rimraf .temp index.*", - "codecov": "nyc report -r lcovonly && codecov -t ${CODECOV_TOKEN} --disable=gcov", - "lint": "eslint scripts src test --ext .ts", - "postversion": "git push && git push --tags", - "prebuild": "npm run -s clean", - "pretest": "run-s build lint", - "preversion": "npm test", - "prewatch": "npm run -s clean", - "test": "nyc _mocha \"test/*.ts\" --reporter dot --timeout 10000", - "update:test": "ts-node scripts/update-fixtures.ts", - "update:unicode": "run-s update:unicode:*", - "update:unicode:ids": "ts-node scripts/update-unicode-ids.ts", - "update:unicode:props": "ts-node scripts/update-unicode-properties.ts", - "version": "npm run -s build", - "watch": "_mocha \"test/*.ts\" --require ts-node/register --reporter dot --timeout 10000 --watch-extensions ts --watch --growl" - }, - "version": "3.1.0" -} diff --git a/node_modules/require-from-string/index.js b/node_modules/require-from-string/index.js deleted file mode 100644 index cb5595fde..000000000 --- a/node_modules/require-from-string/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -var Module = require('module'); -var path = require('path'); - -module.exports = function requireFromString(code, filename, opts) { - if (typeof filename === 'object') { - opts = filename; - filename = undefined; - } - - opts = opts || {}; - filename = filename || ''; - - opts.appendPaths = opts.appendPaths || []; - opts.prependPaths = opts.prependPaths || []; - - if (typeof code !== 'string') { - throw new Error('code must be a string, not ' + typeof code); - } - - var paths = Module._nodeModulePaths(path.dirname(filename)); - - var parent = module.parent; - var m = new Module(filename, parent); - m.filename = filename; - m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths); - m._compile(code, filename); - - var exports = m.exports; - parent && parent.children && parent.children.splice(parent.children.indexOf(m), 1); - - return exports; -}; diff --git a/node_modules/require-from-string/package.json b/node_modules/require-from-string/package.json deleted file mode 100644 index a3ecea524..000000000 --- a/node_modules/require-from-string/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "require-from-string@^2.0.2", - "_id": "require-from-string@2.0.2", - "_inBundle": false, - "_integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "_location": "/require-from-string", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "require-from-string@^2.0.2", - "name": "require-from-string", - "escapedName": "require-from-string", - "rawSpec": "^2.0.2", - "saveSpec": null, - "fetchSpec": "^2.0.2" - }, - "_requiredBy": [ - "/table/ajv" - ], - "_resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "_shasum": "89a7fdd938261267318eafe14f9c32e598c36909", - "_spec": "require-from-string@^2.0.2", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table/node_modules/ajv", - "author": { - "name": "Vsevolod Strukchinsky", - "email": "floatdrop@gmail.com", - "url": "github.com/floatdrop" - }, - "bugs": { - "url": "https://github.com/floatdrop/require-from-string/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Require module from string", - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/floatdrop/require-from-string#readme", - "keywords": [], - "license": "MIT", - "name": "require-from-string", - "repository": { - "type": "git", - "url": "git+https://github.com/floatdrop/require-from-string.git" - }, - "scripts": { - "test": "mocha" - }, - "version": "2.0.2" -} diff --git a/node_modules/require-from-string/readme.md b/node_modules/require-from-string/readme.md deleted file mode 100644 index 88b3236f8..000000000 --- a/node_modules/require-from-string/readme.md +++ /dev/null @@ -1,56 +0,0 @@ -# require-from-string [![Build Status](https://travis-ci.org/floatdrop/require-from-string.svg?branch=master)](https://travis-ci.org/floatdrop/require-from-string) - -Load module from string in Node. - -## Install - -``` -$ npm install --save require-from-string -``` - - -## Usage - -```js -var requireFromString = require('require-from-string'); - -requireFromString('module.exports = 1'); -//=> 1 -``` - - -## API - -### requireFromString(code, [filename], [options]) - -#### code - -*Required* -Type: `string` - -Module code. - -#### filename -Type: `string` -Default: `''` - -Optional filename. - - -#### options -Type: `object` - -##### appendPaths -Type: `Array` - -List of `paths`, that will be appended to module `paths`. Useful, when you want -to be able require modules from these paths. - -##### prependPaths -Type: `Array` - -Same as `appendPaths`, but paths will be prepended. - -## License - -MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/node_modules/reusify/.coveralls.yml b/node_modules/reusify/.coveralls.yml new file mode 100644 index 000000000..359f68349 --- /dev/null +++ b/node_modules/reusify/.coveralls.yml @@ -0,0 +1 @@ +repo_token: yIxhFqtaaz5iGVYfie9mODehFYogm8S8L diff --git a/node_modules/reusify/.travis.yml b/node_modules/reusify/.travis.yml new file mode 100644 index 000000000..197047681 --- /dev/null +++ b/node_modules/reusify/.travis.yml @@ -0,0 +1,28 @@ +language: node_js +sudo: false + +node_js: + - 9 + - 8 + - 7 + - 6 + - 5 + - 4 + - 4.0 + - iojs-v3 + - iojs-v2 + - iojs-v1 + - 0.12 + - 0.10 + +cache: + directories: + - node_modules + +after_script: +- npm run coverage + +notifications: + email: + on_success: never + on_failure: always diff --git a/node_modules/is-number-object/LICENSE b/node_modules/reusify/LICENSE similarity index 96% rename from node_modules/is-number-object/LICENSE rename to node_modules/reusify/LICENSE index b43df444e..fbf3a01d8 100644 --- a/node_modules/is-number-object/LICENSE +++ b/node_modules/reusify/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Jordan Harband +Copyright (c) 2015 Matteo Collina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/reusify/README.md b/node_modules/reusify/README.md new file mode 100644 index 000000000..badcb7ccf --- /dev/null +++ b/node_modules/reusify/README.md @@ -0,0 +1,145 @@ +# reusify + +[![npm version][npm-badge]][npm-url] +[![Build Status][travis-badge]][travis-url] +[![Coverage Status][coveralls-badge]][coveralls-url] + +Reuse your objects and functions for maximum speed. This technique will +make any function run ~10% faster. You call your functions a +lot, and it adds up quickly in hot code paths. + +``` +$ node benchmarks/createNoCodeFunction.js +Total time 53133 +Total iterations 100000000 +Iteration/s 1882069.5236482036 + +$ node benchmarks/reuseNoCodeFunction.js +Total time 50617 +Total iterations 100000000 +Iteration/s 1975620.838848608 +``` + +The above benchmark uses fibonacci to simulate a real high-cpu load. +The actual numbers might differ for your use case, but the difference +should not. + +The benchmark was taken using Node v6.10.0. + +This library was extracted from +[fastparallel](http://npm.im/fastparallel). + +## Example + +```js +var reusify = require('reusify') +var fib = require('reusify/benchmarks/fib') +var instance = reusify(MyObject) + +// get an object from the cache, +// or creates a new one when cache is empty +var obj = instance.get() + +// set the state +obj.num = 100 +obj.func() + +// reset the state. +// if the state contains any external object +// do not use delete operator (it is slow) +// prefer set them to null +obj.num = 0 + +// store an object in the cache +instance.release(obj) + +function MyObject () { + // you need to define this property + // so V8 can compile MyObject into an + // hidden class + this.next = null + this.num = 0 + + var that = this + + // this function is never reallocated, + // so it can be optimized by V8 + this.func = function () { + if (null) { + // do nothing + } else { + // calculates fibonacci + fib(that.num) + } + } +} +``` + +The above example was intended for synchronous code, let's see async: +```js +var reusify = require('reusify') +var instance = reusify(MyObject) + +for (var i = 0; i < 100; i++) { + getData(i, console.log) +} + +function getData (value, cb) { + var obj = instance.get() + + obj.value = value + obj.cb = cb + obj.run() +} + +function MyObject () { + this.next = null + this.value = null + + var that = this + + this.run = function () { + asyncOperation(that.value, that.handle) + } + + this.handle = function (err, result) { + that.cb(err, result) + that.value = null + that.cb = null + instance.release(that) + } +} +``` + +Also note how in the above examples, the code, that consumes an istance of `MyObject`, +reset the state to initial condition, just before storing it in the cache. +That's needed so that every subsequent request for an instance from the cache, +could get a clean instance. + +## Why + +It is faster because V8 doesn't have to collect all the functions you +create. On a short-lived benchmark, it is as fast as creating the +nested function, but on a longer time frame it creates less +pressure on the garbage collector. + +## Other examples +If you want to see some complex example, checkout [middie](https://github.com/fastify/middie) and [steed](https://github.com/mcollina/steed). + +## Acknowledgements + +Thanks to [Trevor Norris](https://github.com/trevnorris) for +getting me down the rabbit hole of performance, and thanks to [Mathias +Buss](http://github.com/mafintosh) for suggesting me to share this +trick. + +## License + +MIT + +[npm-badge]: https://badge.fury.io/js/reusify.svg +[npm-url]: https://badge.fury.io/js/reusify +[travis-badge]: https://api.travis-ci.org/mcollina/reusify.svg +[travis-url]: https://travis-ci.org/mcollina/reusify +[coveralls-badge]: https://coveralls.io/repos/mcollina/reusify/badge.svg?branch=master&service=github +[coveralls-url]: https://coveralls.io/github/mcollina/reusify?branch=master diff --git a/node_modules/reusify/benchmarks/createNoCodeFunction.js b/node_modules/reusify/benchmarks/createNoCodeFunction.js new file mode 100644 index 000000000..ce1aac7b7 --- /dev/null +++ b/node_modules/reusify/benchmarks/createNoCodeFunction.js @@ -0,0 +1,30 @@ +'use strict' + +var fib = require('./fib') +var max = 100000000 +var start = Date.now() + +// create a funcion with the typical error +// pattern, that delegates the heavy load +// to something else +function createNoCodeFunction () { + /* eslint no-constant-condition: "off" */ + var num = 100 + + ;(function () { + if (null) { + // do nothing + } else { + fib(num) + } + })() +} + +for (var i = 0; i < max; i++) { + createNoCodeFunction() +} + +var time = Date.now() - start +console.log('Total time', time) +console.log('Total iterations', max) +console.log('Iteration/s', max / time * 1000) diff --git a/node_modules/reusify/benchmarks/fib.js b/node_modules/reusify/benchmarks/fib.js new file mode 100644 index 000000000..e22cc48de --- /dev/null +++ b/node_modules/reusify/benchmarks/fib.js @@ -0,0 +1,13 @@ +'use strict' + +function fib (num) { + var fib = [] + + fib[0] = 0 + fib[1] = 1 + for (var i = 2; i <= num; i++) { + fib[i] = fib[i - 2] + fib[i - 1] + } +} + +module.exports = fib diff --git a/node_modules/reusify/benchmarks/reuseNoCodeFunction.js b/node_modules/reusify/benchmarks/reuseNoCodeFunction.js new file mode 100644 index 000000000..3358d6e50 --- /dev/null +++ b/node_modules/reusify/benchmarks/reuseNoCodeFunction.js @@ -0,0 +1,38 @@ +'use strict' + +var reusify = require('../') +var fib = require('./fib') +var instance = reusify(MyObject) +var max = 100000000 +var start = Date.now() + +function reuseNoCodeFunction () { + var obj = instance.get() + obj.num = 100 + obj.func() + obj.num = 0 + instance.release(obj) +} + +function MyObject () { + this.next = null + var that = this + this.num = 0 + this.func = function () { + /* eslint no-constant-condition: "off" */ + if (null) { + // do nothing + } else { + fib(that.num) + } + } +} + +for (var i = 0; i < max; i++) { + reuseNoCodeFunction() +} + +var time = Date.now() - start +console.log('Total time', time) +console.log('Total iterations', max) +console.log('Iteration/s', max / time * 1000) diff --git a/node_modules/reusify/package.json b/node_modules/reusify/package.json new file mode 100644 index 000000000..ee66aeecb --- /dev/null +++ b/node_modules/reusify/package.json @@ -0,0 +1,45 @@ +{ + "name": "reusify", + "version": "1.0.4", + "description": "Reuse objects and functions with style", + "main": "reusify.js", + "scripts": { + "lint": "standard", + "test": "tape test.js | faucet", + "istanbul": "istanbul cover tape test.js", + "coverage": "npm run istanbul; cat coverage/lcov.info | coveralls" + }, + "pre-commit": [ + "lint", + "test" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/mcollina/reusify.git" + }, + "keywords": [ + "reuse", + "object", + "performance", + "function", + "fast" + ], + "author": "Matteo Collina ", + "license": "MIT", + "bugs": { + "url": "https://github.com/mcollina/reusify/issues" + }, + "homepage": "https://github.com/mcollina/reusify#readme", + "engines": { + "node": ">=0.10.0", + "iojs": ">=1.0.0" + }, + "devDependencies": { + "coveralls": "^2.13.3", + "faucet": "0.0.1", + "istanbul": "^0.4.5", + "pre-commit": "^1.2.2", + "standard": "^10.0.3", + "tape": "^4.8.0" + } +} diff --git a/node_modules/reusify/reusify.js b/node_modules/reusify/reusify.js new file mode 100644 index 000000000..e6f36f3a8 --- /dev/null +++ b/node_modules/reusify/reusify.js @@ -0,0 +1,33 @@ +'use strict' + +function reusify (Constructor) { + var head = new Constructor() + var tail = head + + function get () { + var current = head + + if (current.next) { + head = current.next + } else { + head = new Constructor() + tail = head + } + + current.next = null + + return current + } + + function release (obj) { + tail.next = obj + tail = obj + } + + return { + get: get, + release: release + } +} + +module.exports = reusify diff --git a/node_modules/reusify/test.js b/node_modules/reusify/test.js new file mode 100644 index 000000000..929cfd719 --- /dev/null +++ b/node_modules/reusify/test.js @@ -0,0 +1,66 @@ +'use strict' + +var test = require('tape') +var reusify = require('./') + +test('reuse objects', function (t) { + t.plan(6) + + function MyObject () { + t.pass('constructor called') + this.next = null + } + + var instance = reusify(MyObject) + var obj = instance.get() + + t.notEqual(obj, instance.get(), 'two instance created') + t.notOk(obj.next, 'next must be null') + + instance.release(obj) + + // the internals keeps a hot copy ready for reuse + // putting this one back in the queue + instance.release(instance.get()) + + // comparing the old one with the one we got + // never do this in real code, after release you + // should never reuse that instance + t.equal(obj, instance.get(), 'instance must be reused') +}) + +test('reuse more than 2 objects', function (t) { + function MyObject () { + t.pass('constructor called') + this.next = null + } + + var instance = reusify(MyObject) + var obj = instance.get() + var obj2 = instance.get() + var obj3 = instance.get() + + t.notOk(obj.next, 'next must be null') + t.notOk(obj2.next, 'next must be null') + t.notOk(obj3.next, 'next must be null') + + t.notEqual(obj, obj2) + t.notEqual(obj, obj3) + t.notEqual(obj3, obj2) + + instance.release(obj) + instance.release(obj2) + instance.release(obj3) + + // skip one + instance.get() + + var obj4 = instance.get() + var obj5 = instance.get() + var obj6 = instance.get() + + t.equal(obj4, obj) + t.equal(obj5, obj2) + t.equal(obj6, obj3) + t.end() +}) diff --git a/node_modules/run-parallel/LICENSE b/node_modules/run-parallel/LICENSE new file mode 100644 index 000000000..c7e685275 --- /dev/null +++ b/node_modules/run-parallel/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/run-parallel/README.md b/node_modules/run-parallel/README.md new file mode 100644 index 000000000..edc3da452 --- /dev/null +++ b/node_modules/run-parallel/README.md @@ -0,0 +1,85 @@ +# run-parallel [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/run-parallel/master.svg +[travis-url]: https://travis-ci.org/feross/run-parallel +[npm-image]: https://img.shields.io/npm/v/run-parallel.svg +[npm-url]: https://npmjs.org/package/run-parallel +[downloads-image]: https://img.shields.io/npm/dm/run-parallel.svg +[downloads-url]: https://npmjs.org/package/run-parallel +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +### Run an array of functions in parallel + +![parallel](https://raw.githubusercontent.com/feross/run-parallel/master/img.png) [![Sauce Test Status](https://saucelabs.com/browser-matrix/run-parallel.svg)](https://saucelabs.com/u/run-parallel) + +### install + +``` +npm install run-parallel +``` + +### usage + +#### parallel(tasks, [callback]) + +Run the `tasks` array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its callback, the main +`callback` is immediately called with the value of the error. Once the `tasks` have +completed, the results are passed to the final `callback` as an array. + +It is also possible to use an object instead of an array. Each property will be run as a +function and the results will be passed to the final `callback` as an object instead of +an array. This can be a more readable way of handling the results. + +##### arguments + +- `tasks` - An array or object containing functions to run. Each function is passed a +`callback(err, result)` which it must call on completion with an error `err` (which can +be `null`) and an optional `result` value. +- `callback(err, results)` - An optional callback to run once all the functions have +completed. This function gets a results array (or object) containing all the result +arguments passed to the task callbacks. + +##### example + +```js +var parallel = require('run-parallel') + +parallel([ + function (callback) { + setTimeout(function () { + callback(null, 'one') + }, 200) + }, + function (callback) { + setTimeout(function () { + callback(null, 'two') + }, 100) + } +], +// optional callback +function (err, results) { + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}) +``` + +This module is basically equavalent to +[`async.parallel`](https://github.com/caolan/async#paralleltasks-callback), but it's +handy to just have the one function you need instead of the kitchen sink. Modularity! +Especially handy if you're serving to the browser and need to reduce your javascript +bundle size. + +Works great in the browser with [browserify](http://browserify.org/)! + +### see also + +- [run-auto](https://github.com/feross/run-auto) +- [run-parallel-limit](https://github.com/feross/run-parallel-limit) +- [run-series](https://github.com/feross/run-series) +- [run-waterfall](https://github.com/feross/run-waterfall) + +### license + +MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/node_modules/run-parallel/index.js b/node_modules/run-parallel/index.js new file mode 100644 index 000000000..6307141d6 --- /dev/null +++ b/node_modules/run-parallel/index.js @@ -0,0 +1,51 @@ +/*! run-parallel. MIT License. Feross Aboukhadijeh */ +module.exports = runParallel + +const queueMicrotask = require('queue-microtask') + +function runParallel (tasks, cb) { + let results, pending, keys + let isSync = true + + if (Array.isArray(tasks)) { + results = [] + pending = tasks.length + } else { + keys = Object.keys(tasks) + results = {} + pending = keys.length + } + + function done (err) { + function end () { + if (cb) cb(err, results) + cb = null + } + if (isSync) queueMicrotask(end) + else end() + } + + function each (i, err, result) { + results[i] = result + if (--pending === 0 || err) { + done(err) + } + } + + if (!pending) { + // empty + done(null) + } else if (keys) { + // object + keys.forEach(function (key) { + tasks[key](function (err, result) { each(key, err, result) }) + }) + } else { + // array + tasks.forEach(function (task, i) { + task(function (err, result) { each(i, err, result) }) + }) + } + + isSync = false +} diff --git a/node_modules/run-parallel/package.json b/node_modules/run-parallel/package.json new file mode 100644 index 000000000..1f1475788 --- /dev/null +++ b/node_modules/run-parallel/package.json @@ -0,0 +1,58 @@ +{ + "name": "run-parallel", + "description": "Run an array of functions in parallel", + "version": "1.2.0", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "https://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/run-parallel/issues" + }, + "dependencies": { + "queue-microtask": "^1.2.2" + }, + "devDependencies": { + "airtap": "^3.0.0", + "standard": "*", + "tape": "^5.0.1" + }, + "homepage": "https://github.com/feross/run-parallel", + "keywords": [ + "parallel", + "async", + "function", + "callback", + "asynchronous", + "run", + "array", + "run parallel" + ], + "license": "MIT", + "main": "index.js", + "repository": { + "type": "git", + "url": "git://github.com/feross/run-parallel.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "airtap -- test/*.js", + "test-browser-local": "airtap --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] +} diff --git a/node_modules/slice-ansi/index.js b/node_modules/slice-ansi/index.js deleted file mode 100755 index 72d37d9a5..000000000 --- a/node_modules/slice-ansi/index.js +++ /dev/null @@ -1,103 +0,0 @@ -'use strict'; -const isFullwidthCodePoint = require('is-fullwidth-code-point'); -const astralRegex = require('astral-regex'); -const ansiStyles = require('ansi-styles'); - -const ESCAPES = [ - '\u001B', - '\u009B' -]; - -const wrapAnsi = code => `${ESCAPES[0]}[${code}m`; - -const checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => { - let output = []; - ansiCodes = [...ansiCodes]; - - for (let ansiCode of ansiCodes) { - const ansiCodeOrigin = ansiCode; - if (ansiCode.includes(';')) { - ansiCode = ansiCode.split(';')[0][0] + '0'; - } - - const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10)); - if (item) { - const indexEscape = ansiCodes.indexOf(item.toString()); - if (indexEscape === -1) { - output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin)); - } else { - ansiCodes.splice(indexEscape, 1); - } - } else if (isEscapes) { - output.push(wrapAnsi(0)); - break; - } else { - output.push(wrapAnsi(ansiCodeOrigin)); - } - } - - if (isEscapes) { - output = output.filter((element, index) => output.indexOf(element) === index); - - if (endAnsiCode !== undefined) { - const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10))); - output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []); - } - } - - return output.join(''); -}; - -module.exports = (string, begin, end) => { - const characters = [...string]; - const ansiCodes = []; - - let stringEnd = typeof end === 'number' ? end : characters.length; - let isInsideEscape = false; - let ansiCode; - let visible = 0; - let output = ''; - - for (const [index, character] of characters.entries()) { - let leftEscape = false; - - if (ESCAPES.includes(character)) { - const code = /\d[^m]*/.exec(string.slice(index, index + 18)); - ansiCode = code && code.length > 0 ? code[0] : undefined; - - if (visible < stringEnd) { - isInsideEscape = true; - - if (ansiCode !== undefined) { - ansiCodes.push(ansiCode); - } - } - } else if (isInsideEscape && character === 'm') { - isInsideEscape = false; - leftEscape = true; - } - - if (!isInsideEscape && !leftEscape) { - visible++; - } - - if (!astralRegex({exact: true}).test(character) && isFullwidthCodePoint(character.codePointAt())) { - visible++; - - if (typeof end !== 'number') { - stringEnd++; - } - } - - if (visible > begin && visible <= stringEnd) { - output += character; - } else if (visible === begin && !isInsideEscape && ansiCode !== undefined) { - output = checkAnsi(ansiCodes); - } else if (visible >= stringEnd) { - output += checkAnsi(ansiCodes, true, ansiCode); - break; - } - } - - return output; -}; diff --git a/node_modules/slice-ansi/node_modules/ansi-styles/index.d.ts b/node_modules/slice-ansi/node_modules/ansi-styles/index.d.ts deleted file mode 100644 index 44a907e58..000000000 --- a/node_modules/slice-ansi/node_modules/ansi-styles/index.d.ts +++ /dev/null @@ -1,345 +0,0 @@ -declare type CSSColor = - | 'aliceblue' - | 'antiquewhite' - | 'aqua' - | 'aquamarine' - | 'azure' - | 'beige' - | 'bisque' - | 'black' - | 'blanchedalmond' - | 'blue' - | 'blueviolet' - | 'brown' - | 'burlywood' - | 'cadetblue' - | 'chartreuse' - | 'chocolate' - | 'coral' - | 'cornflowerblue' - | 'cornsilk' - | 'crimson' - | 'cyan' - | 'darkblue' - | 'darkcyan' - | 'darkgoldenrod' - | 'darkgray' - | 'darkgreen' - | 'darkgrey' - | 'darkkhaki' - | 'darkmagenta' - | 'darkolivegreen' - | 'darkorange' - | 'darkorchid' - | 'darkred' - | 'darksalmon' - | 'darkseagreen' - | 'darkslateblue' - | 'darkslategray' - | 'darkslategrey' - | 'darkturquoise' - | 'darkviolet' - | 'deeppink' - | 'deepskyblue' - | 'dimgray' - | 'dimgrey' - | 'dodgerblue' - | 'firebrick' - | 'floralwhite' - | 'forestgreen' - | 'fuchsia' - | 'gainsboro' - | 'ghostwhite' - | 'gold' - | 'goldenrod' - | 'gray' - | 'green' - | 'greenyellow' - | 'grey' - | 'honeydew' - | 'hotpink' - | 'indianred' - | 'indigo' - | 'ivory' - | 'khaki' - | 'lavender' - | 'lavenderblush' - | 'lawngreen' - | 'lemonchiffon' - | 'lightblue' - | 'lightcoral' - | 'lightcyan' - | 'lightgoldenrodyellow' - | 'lightgray' - | 'lightgreen' - | 'lightgrey' - | 'lightpink' - | 'lightsalmon' - | 'lightseagreen' - | 'lightskyblue' - | 'lightslategray' - | 'lightslategrey' - | 'lightsteelblue' - | 'lightyellow' - | 'lime' - | 'limegreen' - | 'linen' - | 'magenta' - | 'maroon' - | 'mediumaquamarine' - | 'mediumblue' - | 'mediumorchid' - | 'mediumpurple' - | 'mediumseagreen' - | 'mediumslateblue' - | 'mediumspringgreen' - | 'mediumturquoise' - | 'mediumvioletred' - | 'midnightblue' - | 'mintcream' - | 'mistyrose' - | 'moccasin' - | 'navajowhite' - | 'navy' - | 'oldlace' - | 'olive' - | 'olivedrab' - | 'orange' - | 'orangered' - | 'orchid' - | 'palegoldenrod' - | 'palegreen' - | 'paleturquoise' - | 'palevioletred' - | 'papayawhip' - | 'peachpuff' - | 'peru' - | 'pink' - | 'plum' - | 'powderblue' - | 'purple' - | 'rebeccapurple' - | 'red' - | 'rosybrown' - | 'royalblue' - | 'saddlebrown' - | 'salmon' - | 'sandybrown' - | 'seagreen' - | 'seashell' - | 'sienna' - | 'silver' - | 'skyblue' - | 'slateblue' - | 'slategray' - | 'slategrey' - | 'snow' - | 'springgreen' - | 'steelblue' - | 'tan' - | 'teal' - | 'thistle' - | 'tomato' - | 'turquoise' - | 'violet' - | 'wheat' - | 'white' - | 'whitesmoke' - | 'yellow' - | 'yellowgreen'; - -declare namespace ansiStyles { - interface ColorConvert { - /** - The RGB color space. - - @param red - (`0`-`255`) - @param green - (`0`-`255`) - @param blue - (`0`-`255`) - */ - rgb(red: number, green: number, blue: number): string; - - /** - The RGB HEX color space. - - @param hex - A hexadecimal string containing RGB data. - */ - hex(hex: string): string; - - /** - @param keyword - A CSS color name. - */ - keyword(keyword: CSSColor): string; - - /** - The HSL color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param lightness - (`0`-`100`) - */ - hsl(hue: number, saturation: number, lightness: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param saturation - (`0`-`100`) - @param value - (`0`-`100`) - */ - hsv(hue: number, saturation: number, value: number): string; - - /** - The HSV color space. - - @param hue - (`0`-`360`) - @param whiteness - (`0`-`100`) - @param blackness - (`0`-`100`) - */ - hwb(hue: number, whiteness: number, blackness: number): string; - - /** - Use a [4-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4-bit) to set text color. - */ - ansi(ansi: number): string; - - /** - Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color. - */ - ansi256(ansi: number): string; - } - - interface CSPair { - /** - The ANSI terminal control sequence for starting this style. - */ - readonly open: string; - - /** - The ANSI terminal control sequence for ending this style. - */ - readonly close: string; - } - - interface ColorBase { - readonly ansi: ColorConvert; - readonly ansi256: ColorConvert; - readonly ansi16m: ColorConvert; - - /** - The ANSI terminal control sequence for ending this color. - */ - readonly close: string; - } - - interface Modifier { - /** - Resets the current color chain. - */ - readonly reset: CSPair; - - /** - Make text bold. - */ - readonly bold: CSPair; - - /** - Emitting only a small amount of light. - */ - readonly dim: CSPair; - - /** - Make text italic. (Not widely supported) - */ - readonly italic: CSPair; - - /** - Make text underline. (Not widely supported) - */ - readonly underline: CSPair; - - /** - Inverse background and foreground colors. - */ - readonly inverse: CSPair; - - /** - Prints the text, but makes it invisible. - */ - readonly hidden: CSPair; - - /** - Puts a horizontal line through the center of the text. (Not widely supported) - */ - readonly strikethrough: CSPair; - } - - interface ForegroundColor { - readonly black: CSPair; - readonly red: CSPair; - readonly green: CSPair; - readonly yellow: CSPair; - readonly blue: CSPair; - readonly cyan: CSPair; - readonly magenta: CSPair; - readonly white: CSPair; - - /** - Alias for `blackBright`. - */ - readonly gray: CSPair; - - /** - Alias for `blackBright`. - */ - readonly grey: CSPair; - - readonly blackBright: CSPair; - readonly redBright: CSPair; - readonly greenBright: CSPair; - readonly yellowBright: CSPair; - readonly blueBright: CSPair; - readonly cyanBright: CSPair; - readonly magentaBright: CSPair; - readonly whiteBright: CSPair; - } - - interface BackgroundColor { - readonly bgBlack: CSPair; - readonly bgRed: CSPair; - readonly bgGreen: CSPair; - readonly bgYellow: CSPair; - readonly bgBlue: CSPair; - readonly bgCyan: CSPair; - readonly bgMagenta: CSPair; - readonly bgWhite: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGray: CSPair; - - /** - Alias for `bgBlackBright`. - */ - readonly bgGrey: CSPair; - - readonly bgBlackBright: CSPair; - readonly bgRedBright: CSPair; - readonly bgGreenBright: CSPair; - readonly bgYellowBright: CSPair; - readonly bgBlueBright: CSPair; - readonly bgCyanBright: CSPair; - readonly bgMagentaBright: CSPair; - readonly bgWhiteBright: CSPair; - } -} - -declare const ansiStyles: { - readonly modifier: ansiStyles.Modifier; - readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; - readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; - readonly codes: ReadonlyMap; -} & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier; - -export = ansiStyles; diff --git a/node_modules/slice-ansi/node_modules/ansi-styles/index.js b/node_modules/slice-ansi/node_modules/ansi-styles/index.js deleted file mode 100644 index 5d82581a1..000000000 --- a/node_modules/slice-ansi/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,163 +0,0 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); -}; - -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; - -function assembleStyles() { - const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); - - return styles; -} - -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); diff --git a/node_modules/slice-ansi/node_modules/ansi-styles/package.json b/node_modules/slice-ansi/node_modules/ansi-styles/package.json deleted file mode 100644 index 1cacfa021..000000000 --- a/node_modules/slice-ansi/node_modules/ansi-styles/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "ansi-styles@^4.0.0", - "_id": "ansi-styles@4.3.0", - "_inBundle": false, - "_integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "_location": "/slice-ansi/ansi-styles", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ansi-styles@^4.0.0", - "name": "ansi-styles", - "escapedName": "ansi-styles", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/slice-ansi" - ], - "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "_shasum": "edd803628ae71c04c85ae7a0906edad34b648937", - "_spec": "ansi-styles@^4.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/slice-ansi", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/ansi-styles/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-convert": "^2.0.1" - }, - "deprecated": false, - "description": "ANSI escape codes for styling strings in the terminal", - "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", - "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/chalk/ansi-styles?sponsor=1", - "homepage": "https://github.com/chalk/ansi-styles#readme", - "keywords": [ - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "ansi-styles", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/ansi-styles.git" - }, - "scripts": { - "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor", - "test": "xo && ava && tsd" - }, - "version": "4.3.0" -} diff --git a/node_modules/slice-ansi/node_modules/ansi-styles/readme.md b/node_modules/slice-ansi/node_modules/ansi-styles/readme.md deleted file mode 100644 index 24883de80..000000000 --- a/node_modules/slice-ansi/node_modules/ansi-styles/readme.md +++ /dev/null @@ -1,152 +0,0 @@ -# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) - -> [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal - -You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. - - - -## Install - -``` -$ npm install ansi-styles -``` - -## Usage - -```js -const style = require('ansi-styles'); - -console.log(`${style.green.open}Hello world!${style.green.close}`); - - -// Color conversion between 16/256/truecolor -// NOTE: If conversion goes to 16 colors or 256 colors, the original color -// may be degraded to fit that color palette. This means terminals -// that do not support 16 million colors will best-match the -// original color. -console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close); -console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close); -console.log(style.color.ansi16m.hex('#abcdef') + 'Hello world!' + style.color.close); -``` - -## API - -Each style has an `open` and `close` property. - -## Styles - -### Modifiers - -- `reset` -- `bold` -- `dim` -- `italic` *(Not widely supported)* -- `underline` -- `inverse` -- `hidden` -- `strikethrough` *(Not widely supported)* - -### Colors - -- `black` -- `red` -- `green` -- `yellow` -- `blue` -- `magenta` -- `cyan` -- `white` -- `blackBright` (alias: `gray`, `grey`) -- `redBright` -- `greenBright` -- `yellowBright` -- `blueBright` -- `magentaBright` -- `cyanBright` -- `whiteBright` - -### Background colors - -- `bgBlack` -- `bgRed` -- `bgGreen` -- `bgYellow` -- `bgBlue` -- `bgMagenta` -- `bgCyan` -- `bgWhite` -- `bgBlackBright` (alias: `bgGray`, `bgGrey`) -- `bgRedBright` -- `bgGreenBright` -- `bgYellowBright` -- `bgBlueBright` -- `bgMagentaBright` -- `bgCyanBright` -- `bgWhiteBright` - -## Advanced usage - -By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. - -- `style.modifier` -- `style.color` -- `style.bgColor` - -###### Example - -```js -console.log(style.color.green.open); -``` - -Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values. - -###### Example - -```js -console.log(style.codes.get(36)); -//=> 39 -``` - -## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728) - -`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors. - -The following color spaces from `color-convert` are supported: - -- `rgb` -- `hex` -- `keyword` -- `hsl` -- `hsv` -- `hwb` -- `ansi` -- `ansi256` - -To use these, call the associated conversion function with the intended output, for example: - -```js -style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code -style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code - -style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code -style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code - -style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code -style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code -``` - -## Related - -- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - -## For enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of `ansi-styles` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-ansi-styles?utm_source=npm-ansi-styles&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) diff --git a/node_modules/slice-ansi/node_modules/color-convert/CHANGELOG.md b/node_modules/slice-ansi/node_modules/color-convert/CHANGELOG.md deleted file mode 100644 index 0a7bce4fd..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/CHANGELOG.md +++ /dev/null @@ -1,54 +0,0 @@ -# 1.0.0 - 2016-01-07 - -- Removed: unused speed test -- Added: Automatic routing between previously unsupported conversions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Removed: `convert()` class -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: all functions to lookup dictionary -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Changed: `ansi` to `ansi256` -([#27](https://github.com/Qix-/color-convert/pull/27)) -- Fixed: argument grouping for functions requiring only one argument -([#27](https://github.com/Qix-/color-convert/pull/27)) - -# 0.6.0 - 2015-07-23 - -- Added: methods to handle -[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors: - - rgb2ansi16 - - rgb2ansi - - hsl2ansi16 - - hsl2ansi - - hsv2ansi16 - - hsv2ansi - - hwb2ansi16 - - hwb2ansi - - cmyk2ansi16 - - cmyk2ansi - - keyword2ansi16 - - keyword2ansi - - ansi162rgb - - ansi162hsl - - ansi162hsv - - ansi162hwb - - ansi162cmyk - - ansi162keyword - - ansi2rgb - - ansi2hsl - - ansi2hsv - - ansi2hwb - - ansi2cmyk - - ansi2keyword -([#18](https://github.com/harthur/color-convert/pull/18)) - -# 0.5.3 - 2015-06-02 - -- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]` -([#15](https://github.com/harthur/color-convert/issues/15)) - ---- - -Check out commit logs for older releases diff --git a/node_modules/slice-ansi/node_modules/color-convert/LICENSE b/node_modules/slice-ansi/node_modules/color-convert/LICENSE deleted file mode 100644 index 5b4c386f9..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011-2016 Heather Arthur - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/slice-ansi/node_modules/color-convert/README.md b/node_modules/slice-ansi/node_modules/color-convert/README.md deleted file mode 100644 index d4b08fc36..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# color-convert - -[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert) - -Color-convert is a color conversion library for JavaScript and node. -It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest): - -```js -var convert = require('color-convert'); - -convert.rgb.hsl(140, 200, 100); // [96, 48, 59] -convert.keyword.rgb('blue'); // [0, 0, 255] - -var rgbChannels = convert.rgb.channels; // 3 -var cmykChannels = convert.cmyk.channels; // 4 -var ansiChannels = convert.ansi16.channels; // 1 -``` - -# Install - -```console -$ npm install color-convert -``` - -# API - -Simply get the property of the _from_ and _to_ conversion that you're looking for. - -All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function. - -All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha). - -```js -var convert = require('color-convert'); - -// Hex to LAB -convert.hex.lab('DEADBF'); // [ 76, 21, -2 ] -convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ] - -// RGB to CMYK -convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ] -convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ] -``` - -### Arrays -All functions that accept multiple arguments also support passing an array. - -Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.) - -```js -var convert = require('color-convert'); - -convert.rgb.hex(123, 45, 67); // '7B2D43' -convert.rgb.hex([123, 45, 67]); // '7B2D43' -``` - -## Routing - -Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex). - -Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js). - -# Contribute - -If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request. - -# License -Copyright © 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE). diff --git a/node_modules/slice-ansi/node_modules/color-convert/conversions.js b/node_modules/slice-ansi/node_modules/color-convert/conversions.js deleted file mode 100644 index 2657f265c..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/conversions.js +++ /dev/null @@ -1,839 +0,0 @@ -/* MIT license */ -/* eslint-disable no-mixed-operators */ -const cssKeywords = require('color-name'); - -// NOTE: conversions should only return primitive values (i.e. arrays, or -// values that give correct `typeof` results). -// do not use box values types (i.e. Number(), String(), etc.) - -const reverseKeywords = {}; -for (const key of Object.keys(cssKeywords)) { - reverseKeywords[cssKeywords[key]] = key; -} - -const convert = { - rgb: {channels: 3, labels: 'rgb'}, - hsl: {channels: 3, labels: 'hsl'}, - hsv: {channels: 3, labels: 'hsv'}, - hwb: {channels: 3, labels: 'hwb'}, - cmyk: {channels: 4, labels: 'cmyk'}, - xyz: {channels: 3, labels: 'xyz'}, - lab: {channels: 3, labels: 'lab'}, - lch: {channels: 3, labels: 'lch'}, - hex: {channels: 1, labels: ['hex']}, - keyword: {channels: 1, labels: ['keyword']}, - ansi16: {channels: 1, labels: ['ansi16']}, - ansi256: {channels: 1, labels: ['ansi256']}, - hcg: {channels: 3, labels: ['h', 'c', 'g']}, - apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, - gray: {channels: 1, labels: ['gray']} -}; - -module.exports = convert; - -// Hide .channels and .labels properties -for (const model of Object.keys(convert)) { - if (!('channels' in convert[model])) { - throw new Error('missing channels property: ' + model); - } - - if (!('labels' in convert[model])) { - throw new Error('missing channel labels property: ' + model); - } - - if (convert[model].labels.length !== convert[model].channels) { - throw new Error('channel and label counts mismatch: ' + model); - } - - const {channels, labels} = convert[model]; - delete convert[model].channels; - delete convert[model].labels; - Object.defineProperty(convert[model], 'channels', {value: channels}); - Object.defineProperty(convert[model], 'labels', {value: labels}); -} - -convert.rgb.hsl = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const min = Math.min(r, g, b); - const max = Math.max(r, g, b); - const delta = max - min; - let h; - let s; - - if (max === min) { - h = 0; - } else if (r === max) { - h = (g - b) / delta; - } else if (g === max) { - h = 2 + (b - r) / delta; - } else if (b === max) { - h = 4 + (r - g) / delta; - } - - h = Math.min(h * 60, 360); - - if (h < 0) { - h += 360; - } - - const l = (min + max) / 2; - - if (max === min) { - s = 0; - } else if (l <= 0.5) { - s = delta / (max + min); - } else { - s = delta / (2 - max - min); - } - - return [h, s * 100, l * 100]; -}; - -convert.rgb.hsv = function (rgb) { - let rdif; - let gdif; - let bdif; - let h; - let s; - - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const v = Math.max(r, g, b); - const diff = v - Math.min(r, g, b); - const diffc = function (c) { - return (v - c) / 6 / diff + 1 / 2; - }; - - if (diff === 0) { - h = 0; - s = 0; - } else { - s = diff / v; - rdif = diffc(r); - gdif = diffc(g); - bdif = diffc(b); - - if (r === v) { - h = bdif - gdif; - } else if (g === v) { - h = (1 / 3) + rdif - bdif; - } else if (b === v) { - h = (2 / 3) + gdif - rdif; - } - - if (h < 0) { - h += 1; - } else if (h > 1) { - h -= 1; - } - } - - return [ - h * 360, - s * 100, - v * 100 - ]; -}; - -convert.rgb.hwb = function (rgb) { - const r = rgb[0]; - const g = rgb[1]; - let b = rgb[2]; - const h = convert.rgb.hsl(rgb)[0]; - const w = 1 / 255 * Math.min(r, Math.min(g, b)); - - b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); - - return [h, w * 100, b * 100]; -}; - -convert.rgb.cmyk = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - - const k = Math.min(1 - r, 1 - g, 1 - b); - const c = (1 - r - k) / (1 - k) || 0; - const m = (1 - g - k) / (1 - k) || 0; - const y = (1 - b - k) / (1 - k) || 0; - - return [c * 100, m * 100, y * 100, k * 100]; -}; - -function comparativeDistance(x, y) { - /* - See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance - */ - return ( - ((x[0] - y[0]) ** 2) + - ((x[1] - y[1]) ** 2) + - ((x[2] - y[2]) ** 2) - ); -} - -convert.rgb.keyword = function (rgb) { - const reversed = reverseKeywords[rgb]; - if (reversed) { - return reversed; - } - - let currentClosestDistance = Infinity; - let currentClosestKeyword; - - for (const keyword of Object.keys(cssKeywords)) { - const value = cssKeywords[keyword]; - - // Compute comparative distance - const distance = comparativeDistance(rgb, value); - - // Check if its less, if so set as closest - if (distance < currentClosestDistance) { - currentClosestDistance = distance; - currentClosestKeyword = keyword; - } - } - - return currentClosestKeyword; -}; - -convert.keyword.rgb = function (keyword) { - return cssKeywords[keyword]; -}; - -convert.rgb.xyz = function (rgb) { - let r = rgb[0] / 255; - let g = rgb[1] / 255; - let b = rgb[2] / 255; - - // Assume sRGB - r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); - g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); - b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); - - const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); - const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); - const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); - - return [x * 100, y * 100, z * 100]; -}; - -convert.rgb.lab = function (rgb) { - const xyz = convert.rgb.xyz(rgb); - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.hsl.rgb = function (hsl) { - const h = hsl[0] / 360; - const s = hsl[1] / 100; - const l = hsl[2] / 100; - let t2; - let t3; - let val; - - if (s === 0) { - val = l * 255; - return [val, val, val]; - } - - if (l < 0.5) { - t2 = l * (1 + s); - } else { - t2 = l + s - l * s; - } - - const t1 = 2 * l - t2; - - const rgb = [0, 0, 0]; - for (let i = 0; i < 3; i++) { - t3 = h + 1 / 3 * -(i - 1); - if (t3 < 0) { - t3++; - } - - if (t3 > 1) { - t3--; - } - - if (6 * t3 < 1) { - val = t1 + (t2 - t1) * 6 * t3; - } else if (2 * t3 < 1) { - val = t2; - } else if (3 * t3 < 2) { - val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; - } else { - val = t1; - } - - rgb[i] = val * 255; - } - - return rgb; -}; - -convert.hsl.hsv = function (hsl) { - const h = hsl[0]; - let s = hsl[1] / 100; - let l = hsl[2] / 100; - let smin = s; - const lmin = Math.max(l, 0.01); - - l *= 2; - s *= (l <= 1) ? l : 2 - l; - smin *= lmin <= 1 ? lmin : 2 - lmin; - const v = (l + s) / 2; - const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); - - return [h, sv * 100, v * 100]; -}; - -convert.hsv.rgb = function (hsv) { - const h = hsv[0] / 60; - const s = hsv[1] / 100; - let v = hsv[2] / 100; - const hi = Math.floor(h) % 6; - - const f = h - Math.floor(h); - const p = 255 * v * (1 - s); - const q = 255 * v * (1 - (s * f)); - const t = 255 * v * (1 - (s * (1 - f))); - v *= 255; - - switch (hi) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } -}; - -convert.hsv.hsl = function (hsv) { - const h = hsv[0]; - const s = hsv[1] / 100; - const v = hsv[2] / 100; - const vmin = Math.max(v, 0.01); - let sl; - let l; - - l = (2 - s) * v; - const lmin = (2 - s) * vmin; - sl = s * vmin; - sl /= (lmin <= 1) ? lmin : 2 - lmin; - sl = sl || 0; - l /= 2; - - return [h, sl * 100, l * 100]; -}; - -// http://dev.w3.org/csswg/css-color/#hwb-to-rgb -convert.hwb.rgb = function (hwb) { - const h = hwb[0] / 360; - let wh = hwb[1] / 100; - let bl = hwb[2] / 100; - const ratio = wh + bl; - let f; - - // Wh + bl cant be > 1 - if (ratio > 1) { - wh /= ratio; - bl /= ratio; - } - - const i = Math.floor(6 * h); - const v = 1 - bl; - f = 6 * h - i; - - if ((i & 0x01) !== 0) { - f = 1 - f; - } - - const n = wh + f * (v - wh); // Linear interpolation - - let r; - let g; - let b; - /* eslint-disable max-statements-per-line,no-multi-spaces */ - switch (i) { - default: - case 6: - case 0: r = v; g = n; b = wh; break; - case 1: r = n; g = v; b = wh; break; - case 2: r = wh; g = v; b = n; break; - case 3: r = wh; g = n; b = v; break; - case 4: r = n; g = wh; b = v; break; - case 5: r = v; g = wh; b = n; break; - } - /* eslint-enable max-statements-per-line,no-multi-spaces */ - - return [r * 255, g * 255, b * 255]; -}; - -convert.cmyk.rgb = function (cmyk) { - const c = cmyk[0] / 100; - const m = cmyk[1] / 100; - const y = cmyk[2] / 100; - const k = cmyk[3] / 100; - - const r = 1 - Math.min(1, c * (1 - k) + k); - const g = 1 - Math.min(1, m * (1 - k) + k); - const b = 1 - Math.min(1, y * (1 - k) + k); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.rgb = function (xyz) { - const x = xyz[0] / 100; - const y = xyz[1] / 100; - const z = xyz[2] / 100; - let r; - let g; - let b; - - r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); - g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); - b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); - - // Assume sRGB - r = r > 0.0031308 - ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) - : r * 12.92; - - g = g > 0.0031308 - ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) - : g * 12.92; - - b = b > 0.0031308 - ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) - : b * 12.92; - - r = Math.min(Math.max(0, r), 1); - g = Math.min(Math.max(0, g), 1); - b = Math.min(Math.max(0, b), 1); - - return [r * 255, g * 255, b * 255]; -}; - -convert.xyz.lab = function (xyz) { - let x = xyz[0]; - let y = xyz[1]; - let z = xyz[2]; - - x /= 95.047; - y /= 100; - z /= 108.883; - - x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); - y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); - z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); - - const l = (116 * y) - 16; - const a = 500 * (x - y); - const b = 200 * (y - z); - - return [l, a, b]; -}; - -convert.lab.xyz = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let x; - let y; - let z; - - y = (l + 16) / 116; - x = a / 500 + y; - z = y - b / 200; - - const y2 = y ** 3; - const x2 = x ** 3; - const z2 = z ** 3; - y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; - x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; - z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; - - x *= 95.047; - y *= 100; - z *= 108.883; - - return [x, y, z]; -}; - -convert.lab.lch = function (lab) { - const l = lab[0]; - const a = lab[1]; - const b = lab[2]; - let h; - - const hr = Math.atan2(b, a); - h = hr * 360 / 2 / Math.PI; - - if (h < 0) { - h += 360; - } - - const c = Math.sqrt(a * a + b * b); - - return [l, c, h]; -}; - -convert.lch.lab = function (lch) { - const l = lch[0]; - const c = lch[1]; - const h = lch[2]; - - const hr = h / 360 * 2 * Math.PI; - const a = c * Math.cos(hr); - const b = c * Math.sin(hr); - - return [l, a, b]; -}; - -convert.rgb.ansi16 = function (args, saturation = null) { - const [r, g, b] = args; - let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization - - value = Math.round(value / 50); - - if (value === 0) { - return 30; - } - - let ansi = 30 - + ((Math.round(b / 255) << 2) - | (Math.round(g / 255) << 1) - | Math.round(r / 255)); - - if (value === 2) { - ansi += 60; - } - - return ansi; -}; - -convert.hsv.ansi16 = function (args) { - // Optimization here; we already know the value and don't need to get - // it converted for us. - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); -}; - -convert.rgb.ansi256 = function (args) { - const r = args[0]; - const g = args[1]; - const b = args[2]; - - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (r === g && g === b) { - if (r < 8) { - return 16; - } - - if (r > 248) { - return 231; - } - - return Math.round(((r - 8) / 247) * 24) + 232; - } - - const ansi = 16 - + (36 * Math.round(r / 255 * 5)) - + (6 * Math.round(g / 255 * 5)) - + Math.round(b / 255 * 5); - - return ansi; -}; - -convert.ansi16.rgb = function (args) { - let color = args % 10; - - // Handle greyscale - if (color === 0 || color === 7) { - if (args > 50) { - color += 3.5; - } - - color = color / 10.5 * 255; - - return [color, color, color]; - } - - const mult = (~~(args > 50) + 1) * 0.5; - const r = ((color & 1) * mult) * 255; - const g = (((color >> 1) & 1) * mult) * 255; - const b = (((color >> 2) & 1) * mult) * 255; - - return [r, g, b]; -}; - -convert.ansi256.rgb = function (args) { - // Handle greyscale - if (args >= 232) { - const c = (args - 232) * 10 + 8; - return [c, c, c]; - } - - args -= 16; - - let rem; - const r = Math.floor(args / 36) / 5 * 255; - const g = Math.floor((rem = args % 36) / 6) / 5 * 255; - const b = (rem % 6) / 5 * 255; - - return [r, g, b]; -}; - -convert.rgb.hex = function (args) { - const integer = ((Math.round(args[0]) & 0xFF) << 16) - + ((Math.round(args[1]) & 0xFF) << 8) - + (Math.round(args[2]) & 0xFF); - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.hex.rgb = function (args) { - const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) { - return [0, 0, 0]; - } - - let colorString = match[0]; - - if (match[0].length === 3) { - colorString = colorString.split('').map(char => { - return char + char; - }).join(''); - } - - const integer = parseInt(colorString, 16); - const r = (integer >> 16) & 0xFF; - const g = (integer >> 8) & 0xFF; - const b = integer & 0xFF; - - return [r, g, b]; -}; - -convert.rgb.hcg = function (rgb) { - const r = rgb[0] / 255; - const g = rgb[1] / 255; - const b = rgb[2] / 255; - const max = Math.max(Math.max(r, g), b); - const min = Math.min(Math.min(r, g), b); - const chroma = (max - min); - let grayscale; - let hue; - - if (chroma < 1) { - grayscale = min / (1 - chroma); - } else { - grayscale = 0; - } - - if (chroma <= 0) { - hue = 0; - } else - if (max === r) { - hue = ((g - b) / chroma) % 6; - } else - if (max === g) { - hue = 2 + (b - r) / chroma; - } else { - hue = 4 + (r - g) / chroma; - } - - hue /= 6; - hue %= 1; - - return [hue * 360, chroma * 100, grayscale * 100]; -}; - -convert.hsl.hcg = function (hsl) { - const s = hsl[1] / 100; - const l = hsl[2] / 100; - - const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); - - let f = 0; - if (c < 1.0) { - f = (l - 0.5 * c) / (1.0 - c); - } - - return [hsl[0], c * 100, f * 100]; -}; - -convert.hsv.hcg = function (hsv) { - const s = hsv[1] / 100; - const v = hsv[2] / 100; - - const c = s * v; - let f = 0; - - if (c < 1.0) { - f = (v - c) / (1 - c); - } - - return [hsv[0], c * 100, f * 100]; -}; - -convert.hcg.rgb = function (hcg) { - const h = hcg[0] / 360; - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - if (c === 0.0) { - return [g * 255, g * 255, g * 255]; - } - - const pure = [0, 0, 0]; - const hi = (h % 1) * 6; - const v = hi % 1; - const w = 1 - v; - let mg = 0; - - /* eslint-disable max-statements-per-line */ - switch (Math.floor(hi)) { - case 0: - pure[0] = 1; pure[1] = v; pure[2] = 0; break; - case 1: - pure[0] = w; pure[1] = 1; pure[2] = 0; break; - case 2: - pure[0] = 0; pure[1] = 1; pure[2] = v; break; - case 3: - pure[0] = 0; pure[1] = w; pure[2] = 1; break; - case 4: - pure[0] = v; pure[1] = 0; pure[2] = 1; break; - default: - pure[0] = 1; pure[1] = 0; pure[2] = w; - } - /* eslint-enable max-statements-per-line */ - - mg = (1.0 - c) * g; - - return [ - (c * pure[0] + mg) * 255, - (c * pure[1] + mg) * 255, - (c * pure[2] + mg) * 255 - ]; -}; - -convert.hcg.hsv = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const v = c + g * (1.0 - c); - let f = 0; - - if (v > 0.0) { - f = c / v; - } - - return [hcg[0], f * 100, v * 100]; -}; - -convert.hcg.hsl = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - - const l = g * (1.0 - c) + 0.5 * c; - let s = 0; - - if (l > 0.0 && l < 0.5) { - s = c / (2 * l); - } else - if (l >= 0.5 && l < 1.0) { - s = c / (2 * (1 - l)); - } - - return [hcg[0], s * 100, l * 100]; -}; - -convert.hcg.hwb = function (hcg) { - const c = hcg[1] / 100; - const g = hcg[2] / 100; - const v = c + g * (1.0 - c); - return [hcg[0], (v - c) * 100, (1 - v) * 100]; -}; - -convert.hwb.hcg = function (hwb) { - const w = hwb[1] / 100; - const b = hwb[2] / 100; - const v = 1 - b; - const c = v - w; - let g = 0; - - if (c < 1) { - g = (v - c) / (1 - c); - } - - return [hwb[0], c * 100, g * 100]; -}; - -convert.apple.rgb = function (apple) { - return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; -}; - -convert.rgb.apple = function (rgb) { - return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; -}; - -convert.gray.rgb = function (args) { - return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; -}; - -convert.gray.hsl = function (args) { - return [0, 0, args[0]]; -}; - -convert.gray.hsv = convert.gray.hsl; - -convert.gray.hwb = function (gray) { - return [0, 100, gray[0]]; -}; - -convert.gray.cmyk = function (gray) { - return [0, 0, 0, gray[0]]; -}; - -convert.gray.lab = function (gray) { - return [gray[0], 0, 0]; -}; - -convert.gray.hex = function (gray) { - const val = Math.round(gray[0] / 100 * 255) & 0xFF; - const integer = (val << 16) + (val << 8) + val; - - const string = integer.toString(16).toUpperCase(); - return '000000'.substring(string.length) + string; -}; - -convert.rgb.gray = function (rgb) { - const val = (rgb[0] + rgb[1] + rgb[2]) / 3; - return [val / 255 * 100]; -}; diff --git a/node_modules/slice-ansi/node_modules/color-convert/index.js b/node_modules/slice-ansi/node_modules/color-convert/index.js deleted file mode 100644 index b648e5737..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/index.js +++ /dev/null @@ -1,81 +0,0 @@ -const conversions = require('./conversions'); -const route = require('./route'); - -const convert = {}; - -const models = Object.keys(conversions); - -function wrapRaw(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - return fn(args); - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -function wrapRounded(fn) { - const wrappedFn = function (...args) { - const arg0 = args[0]; - - if (arg0 === undefined || arg0 === null) { - return arg0; - } - - if (arg0.length > 1) { - args = arg0; - } - - const result = fn(args); - - // We're assuming the result is an array here. - // see notice in conversions.js; don't use box types - // in conversion functions. - if (typeof result === 'object') { - for (let len = result.length, i = 0; i < len; i++) { - result[i] = Math.round(result[i]); - } - } - - return result; - }; - - // Preserve .conversion property if there is one - if ('conversion' in fn) { - wrappedFn.conversion = fn.conversion; - } - - return wrappedFn; -} - -models.forEach(fromModel => { - convert[fromModel] = {}; - - Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); - Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); - - const routes = route(fromModel); - const routeModels = Object.keys(routes); - - routeModels.forEach(toModel => { - const fn = routes[toModel]; - - convert[fromModel][toModel] = wrapRounded(fn); - convert[fromModel][toModel].raw = wrapRaw(fn); - }); -}); - -module.exports = convert; diff --git a/node_modules/slice-ansi/node_modules/color-convert/package.json b/node_modules/slice-ansi/node_modules/color-convert/package.json deleted file mode 100644 index 55b62a9da..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "color-convert@^2.0.1", - "_id": "color-convert@2.0.1", - "_inBundle": false, - "_integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "_location": "/slice-ansi/color-convert", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "color-convert@^2.0.1", - "name": "color-convert", - "escapedName": "color-convert", - "rawSpec": "^2.0.1", - "saveSpec": null, - "fetchSpec": "^2.0.1" - }, - "_requiredBy": [ - "/slice-ansi/ansi-styles" - ], - "_resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "_shasum": "72d3a68d598c9bdb3af2ad1e84f21d896abd4de3", - "_spec": "color-convert@^2.0.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/slice-ansi/node_modules/ansi-styles", - "author": { - "name": "Heather Arthur", - "email": "fayearthur@gmail.com" - }, - "bugs": { - "url": "https://github.com/Qix-/color-convert/issues" - }, - "bundleDependencies": false, - "dependencies": { - "color-name": "~1.1.4" - }, - "deprecated": false, - "description": "Plain color conversion functions", - "devDependencies": { - "chalk": "^2.4.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=7.0.0" - }, - "files": [ - "index.js", - "conversions.js", - "route.js" - ], - "homepage": "https://github.com/Qix-/color-convert#readme", - "keywords": [ - "color", - "colour", - "convert", - "converter", - "conversion", - "rgb", - "hsl", - "hsv", - "hwb", - "cmyk", - "ansi", - "ansi16" - ], - "license": "MIT", - "name": "color-convert", - "repository": { - "type": "git", - "url": "git+https://github.com/Qix-/color-convert.git" - }, - "scripts": { - "pretest": "xo", - "test": "node test/basic.js" - }, - "version": "2.0.1", - "xo": { - "rules": { - "default-case": 0, - "no-inline-comments": 0, - "operator-linebreak": 0 - } - } -} diff --git a/node_modules/slice-ansi/node_modules/color-convert/route.js b/node_modules/slice-ansi/node_modules/color-convert/route.js deleted file mode 100644 index 1a08521b5..000000000 --- a/node_modules/slice-ansi/node_modules/color-convert/route.js +++ /dev/null @@ -1,97 +0,0 @@ -const conversions = require('./conversions'); - -/* - This function routes a model to all other models. - - all functions that are routed have a property `.conversion` attached - to the returned synthetic function. This property is an array - of strings, each with the steps in between the 'from' and 'to' - color models (inclusive). - - conversions that are not possible simply are not included. -*/ - -function buildGraph() { - const graph = {}; - // https://jsperf.com/object-keys-vs-for-in-with-closure/3 - const models = Object.keys(conversions); - - for (let len = models.length, i = 0; i < len; i++) { - graph[models[i]] = { - // http://jsperf.com/1-vs-infinity - // micro-opt, but this is simple. - distance: -1, - parent: null - }; - } - - return graph; -} - -// https://en.wikipedia.org/wiki/Breadth-first_search -function deriveBFS(fromModel) { - const graph = buildGraph(); - const queue = [fromModel]; // Unshift -> queue -> pop - - graph[fromModel].distance = 0; - - while (queue.length) { - const current = queue.pop(); - const adjacents = Object.keys(conversions[current]); - - for (let len = adjacents.length, i = 0; i < len; i++) { - const adjacent = adjacents[i]; - const node = graph[adjacent]; - - if (node.distance === -1) { - node.distance = graph[current].distance + 1; - node.parent = current; - queue.unshift(adjacent); - } - } - } - - return graph; -} - -function link(from, to) { - return function (args) { - return to(from(args)); - }; -} - -function wrapConversion(toModel, graph) { - const path = [graph[toModel].parent, toModel]; - let fn = conversions[graph[toModel].parent][toModel]; - - let cur = graph[toModel].parent; - while (graph[cur].parent) { - path.unshift(graph[cur].parent); - fn = link(conversions[graph[cur].parent][cur], fn); - cur = graph[cur].parent; - } - - fn.conversion = path; - return fn; -} - -module.exports = function (fromModel) { - const graph = deriveBFS(fromModel); - const conversion = {}; - - const models = Object.keys(graph); - for (let len = models.length, i = 0; i < len; i++) { - const toModel = models[i]; - const node = graph[toModel]; - - if (node.parent === null) { - // No possible conversion, or this node is the source model. - continue; - } - - conversion[toModel] = wrapConversion(toModel, graph); - } - - return conversion; -}; - diff --git a/node_modules/slice-ansi/node_modules/color-name/README.md b/node_modules/slice-ansi/node_modules/color-name/README.md deleted file mode 100644 index 932b97917..000000000 --- a/node_modules/slice-ansi/node_modules/color-name/README.md +++ /dev/null @@ -1,11 +0,0 @@ -A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors. - -[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/) - - -```js -var colors = require('color-name'); -colors.red //[255,0,0] -``` - - diff --git a/node_modules/slice-ansi/node_modules/color-name/index.js b/node_modules/slice-ansi/node_modules/color-name/index.js deleted file mode 100644 index b7c198a6f..000000000 --- a/node_modules/slice-ansi/node_modules/color-name/index.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict' - -module.exports = { - "aliceblue": [240, 248, 255], - "antiquewhite": [250, 235, 215], - "aqua": [0, 255, 255], - "aquamarine": [127, 255, 212], - "azure": [240, 255, 255], - "beige": [245, 245, 220], - "bisque": [255, 228, 196], - "black": [0, 0, 0], - "blanchedalmond": [255, 235, 205], - "blue": [0, 0, 255], - "blueviolet": [138, 43, 226], - "brown": [165, 42, 42], - "burlywood": [222, 184, 135], - "cadetblue": [95, 158, 160], - "chartreuse": [127, 255, 0], - "chocolate": [210, 105, 30], - "coral": [255, 127, 80], - "cornflowerblue": [100, 149, 237], - "cornsilk": [255, 248, 220], - "crimson": [220, 20, 60], - "cyan": [0, 255, 255], - "darkblue": [0, 0, 139], - "darkcyan": [0, 139, 139], - "darkgoldenrod": [184, 134, 11], - "darkgray": [169, 169, 169], - "darkgreen": [0, 100, 0], - "darkgrey": [169, 169, 169], - "darkkhaki": [189, 183, 107], - "darkmagenta": [139, 0, 139], - "darkolivegreen": [85, 107, 47], - "darkorange": [255, 140, 0], - "darkorchid": [153, 50, 204], - "darkred": [139, 0, 0], - "darksalmon": [233, 150, 122], - "darkseagreen": [143, 188, 143], - "darkslateblue": [72, 61, 139], - "darkslategray": [47, 79, 79], - "darkslategrey": [47, 79, 79], - "darkturquoise": [0, 206, 209], - "darkviolet": [148, 0, 211], - "deeppink": [255, 20, 147], - "deepskyblue": [0, 191, 255], - "dimgray": [105, 105, 105], - "dimgrey": [105, 105, 105], - "dodgerblue": [30, 144, 255], - "firebrick": [178, 34, 34], - "floralwhite": [255, 250, 240], - "forestgreen": [34, 139, 34], - "fuchsia": [255, 0, 255], - "gainsboro": [220, 220, 220], - "ghostwhite": [248, 248, 255], - "gold": [255, 215, 0], - "goldenrod": [218, 165, 32], - "gray": [128, 128, 128], - "green": [0, 128, 0], - "greenyellow": [173, 255, 47], - "grey": [128, 128, 128], - "honeydew": [240, 255, 240], - "hotpink": [255, 105, 180], - "indianred": [205, 92, 92], - "indigo": [75, 0, 130], - "ivory": [255, 255, 240], - "khaki": [240, 230, 140], - "lavender": [230, 230, 250], - "lavenderblush": [255, 240, 245], - "lawngreen": [124, 252, 0], - "lemonchiffon": [255, 250, 205], - "lightblue": [173, 216, 230], - "lightcoral": [240, 128, 128], - "lightcyan": [224, 255, 255], - "lightgoldenrodyellow": [250, 250, 210], - "lightgray": [211, 211, 211], - "lightgreen": [144, 238, 144], - "lightgrey": [211, 211, 211], - "lightpink": [255, 182, 193], - "lightsalmon": [255, 160, 122], - "lightseagreen": [32, 178, 170], - "lightskyblue": [135, 206, 250], - "lightslategray": [119, 136, 153], - "lightslategrey": [119, 136, 153], - "lightsteelblue": [176, 196, 222], - "lightyellow": [255, 255, 224], - "lime": [0, 255, 0], - "limegreen": [50, 205, 50], - "linen": [250, 240, 230], - "magenta": [255, 0, 255], - "maroon": [128, 0, 0], - "mediumaquamarine": [102, 205, 170], - "mediumblue": [0, 0, 205], - "mediumorchid": [186, 85, 211], - "mediumpurple": [147, 112, 219], - "mediumseagreen": [60, 179, 113], - "mediumslateblue": [123, 104, 238], - "mediumspringgreen": [0, 250, 154], - "mediumturquoise": [72, 209, 204], - "mediumvioletred": [199, 21, 133], - "midnightblue": [25, 25, 112], - "mintcream": [245, 255, 250], - "mistyrose": [255, 228, 225], - "moccasin": [255, 228, 181], - "navajowhite": [255, 222, 173], - "navy": [0, 0, 128], - "oldlace": [253, 245, 230], - "olive": [128, 128, 0], - "olivedrab": [107, 142, 35], - "orange": [255, 165, 0], - "orangered": [255, 69, 0], - "orchid": [218, 112, 214], - "palegoldenrod": [238, 232, 170], - "palegreen": [152, 251, 152], - "paleturquoise": [175, 238, 238], - "palevioletred": [219, 112, 147], - "papayawhip": [255, 239, 213], - "peachpuff": [255, 218, 185], - "peru": [205, 133, 63], - "pink": [255, 192, 203], - "plum": [221, 160, 221], - "powderblue": [176, 224, 230], - "purple": [128, 0, 128], - "rebeccapurple": [102, 51, 153], - "red": [255, 0, 0], - "rosybrown": [188, 143, 143], - "royalblue": [65, 105, 225], - "saddlebrown": [139, 69, 19], - "salmon": [250, 128, 114], - "sandybrown": [244, 164, 96], - "seagreen": [46, 139, 87], - "seashell": [255, 245, 238], - "sienna": [160, 82, 45], - "silver": [192, 192, 192], - "skyblue": [135, 206, 235], - "slateblue": [106, 90, 205], - "slategray": [112, 128, 144], - "slategrey": [112, 128, 144], - "snow": [255, 250, 250], - "springgreen": [0, 255, 127], - "steelblue": [70, 130, 180], - "tan": [210, 180, 140], - "teal": [0, 128, 128], - "thistle": [216, 191, 216], - "tomato": [255, 99, 71], - "turquoise": [64, 224, 208], - "violet": [238, 130, 238], - "wheat": [245, 222, 179], - "white": [255, 255, 255], - "whitesmoke": [245, 245, 245], - "yellow": [255, 255, 0], - "yellowgreen": [154, 205, 50] -}; diff --git a/node_modules/slice-ansi/node_modules/color-name/package.json b/node_modules/slice-ansi/node_modules/color-name/package.json deleted file mode 100644 index afd25bdf7..000000000 --- a/node_modules/slice-ansi/node_modules/color-name/package.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "_from": "color-name@~1.1.4", - "_id": "color-name@1.1.4", - "_inBundle": false, - "_integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "_location": "/slice-ansi/color-name", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "color-name@~1.1.4", - "name": "color-name", - "escapedName": "color-name", - "rawSpec": "~1.1.4", - "saveSpec": null, - "fetchSpec": "~1.1.4" - }, - "_requiredBy": [ - "/slice-ansi/color-convert" - ], - "_resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "_shasum": "c2a09a87acbde69543de6f63fa3995c826c536a2", - "_spec": "color-name@~1.1.4", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/slice-ansi/node_modules/color-convert", - "author": { - "name": "DY", - "email": "dfcreative@gmail.com" - }, - "bugs": { - "url": "https://github.com/colorjs/color-name/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A list of color names and its values", - "files": [ - "index.js" - ], - "homepage": "https://github.com/colorjs/color-name", - "keywords": [ - "color-name", - "color", - "color-keyword", - "keyword" - ], - "license": "MIT", - "main": "index.js", - "name": "color-name", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/colorjs/color-name.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.1.4" -} diff --git a/node_modules/slice-ansi/package.json b/node_modules/slice-ansi/package.json deleted file mode 100644 index 048362915..000000000 --- a/node_modules/slice-ansi/package.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "_from": "slice-ansi@^4.0.0", - "_id": "slice-ansi@4.0.0", - "_inBundle": false, - "_integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "_location": "/slice-ansi", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "slice-ansi@^4.0.0", - "name": "slice-ansi", - "escapedName": "slice-ansi", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "_shasum": "500e8dd0fd55b05815086255b3195adf2a45fe6b", - "_spec": "slice-ansi@^4.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "bugs": { - "url": "https://github.com/chalk/slice-ansi/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "deprecated": false, - "description": "Slice a string with ANSI escape codes", - "devDependencies": { - "ava": "^2.1.0", - "chalk": "^3.0.0", - "random-item": "^3.0.0", - "strip-ansi": "^6.0.0", - "xo": "^0.26.1" - }, - "engines": { - "node": ">=10" - }, - "files": [ - "index.js" - ], - "funding": "https://github.com/chalk/slice-ansi?sponsor=1", - "homepage": "https://github.com/chalk/slice-ansi#readme", - "keywords": [ - "slice", - "string", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "cli", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "slice-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/slice-ansi.git" - }, - "scripts": { - "test": "xo && ava" - }, - "version": "4.0.0" -} diff --git a/node_modules/slice-ansi/readme.md b/node_modules/slice-ansi/readme.md deleted file mode 100644 index 88d36772c..000000000 --- a/node_modules/slice-ansi/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# slice-ansi [![Build Status](https://travis-ci.org/chalk/slice-ansi.svg?branch=master)](https://travis-ci.org/chalk/slice-ansi) [![XO: Linted](https://img.shields.io/badge/xo-linted-blue.svg)](https://github.com/xojs/xo) - -> Slice a string with [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) - -## Install - -``` -$ npm install slice-ansi -``` - -## Usage - -```js -const chalk = require('chalk'); -const sliceAnsi = require('slice-ansi'); - -const string = 'The quick brown ' + chalk.red('fox jumped over ') + - 'the lazy ' + chalk.green('dog and then ran away with the unicorn.'); - -console.log(sliceAnsi(string, 20, 30)); -``` - -## API - -### sliceAnsi(string, beginSlice, endSlice?) - -#### string - -Type: `string` - -String with ANSI escape codes. Like one styled by [`chalk`](https://github.com/chalk/chalk). - -#### beginSlice - -Type: `number` - -Zero-based index at which to begin the slice. - -#### endSlice - -Type: `number` - -Zero-based index at which to end the slice. - -## Related - -- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes -- [cli-truncate](https://github.com/sindresorhus/cli-truncate) - Truncate a string to a specific width in the terminal -- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right - -## Maintainers - -- [Sindre Sorhus](https://github.com/sindresorhus) -- [Josh Junon](https://github.com/qix-) - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/strip-ansi/package.json b/node_modules/strip-ansi/package.json index 6f22b83ff..1a41108d4 100644 --- a/node_modules/strip-ansi/package.json +++ b/node_modules/strip-ansi/package.json @@ -1,91 +1,54 @@ { - "_from": "strip-ansi@^6.0.0", - "_id": "strip-ansi@6.0.0", - "_inBundle": false, - "_integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "_location": "/strip-ansi", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "strip-ansi@^6.0.0", - "name": "strip-ansi", - "escapedName": "strip-ansi", - "rawSpec": "^6.0.0", - "saveSpec": null, - "fetchSpec": "^6.0.0" - }, - "_requiredBy": [ - "/@jest/core", - "/cliui", - "/eslint", - "/string-length", - "/string-width", - "/wrap-ansi" - ], - "_resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "_shasum": "0b1571dd7669ccd4f3e06e14ef1eed26225ae532", - "_spec": "strip-ansi@^6.0.0", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/chalk/strip-ansi/issues" - }, - "bundleDependencies": false, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "deprecated": false, - "description": "Strip ANSI escape codes from a string", - "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/chalk/strip-ansi#readme", - "keywords": [ - "strip", - "trim", - "remove", - "ansi", - "styles", - "color", - "colour", - "colors", - "terminal", - "console", - "string", - "tty", - "escape", - "formatting", - "rgb", - "256", - "shell", - "xterm", - "log", - "logging", - "command-line", - "text" - ], - "license": "MIT", - "name": "strip-ansi", - "repository": { - "type": "git", - "url": "git+https://github.com/chalk/strip-ansi.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "6.0.0" + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } } diff --git a/node_modules/table/LICENSE b/node_modules/table/LICENSE deleted file mode 100644 index 6c41d45cd..000000000 --- a/node_modules/table/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2018, Gajus Kuizinas (http://gajus.com/) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/table/README.md b/node_modules/table/README.md deleted file mode 100644 index 22a79962a..000000000 --- a/node_modules/table/README.md +++ /dev/null @@ -1,734 +0,0 @@ - -# Table - -[![Travis build status](http://img.shields.io/travis/gajus/table/master.svg?style=flat-square)](https://travis-ci.org/gajus/table) -[![Coveralls](https://img.shields.io/coveralls/gajus/table.svg?style=flat-square)](https://coveralls.io/github/gajus/table) -[![NPM version](http://img.shields.io/npm/v/table.svg?style=flat-square)](https://www.npmjs.org/package/table) -[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical) -[![Twitter Follow](https://img.shields.io/twitter/follow/kuizinas.svg?style=social&label=Follow)](https://twitter.com/kuizinas) - -* [Table](#table) - * [Features](#table-features) - * [Install](#table-install) - * [Usage](#table-usage) - * [Cell Content Alignment](#table-usage-cell-content-alignment) - * [Column Width](#table-usage-column-width) - * [Custom Border](#table-usage-custom-border) - * [Draw Horizontal Line](#table-usage-draw-horizontal-line) - * [Single Line Mode](#table-usage-single-line-mode) - * [Padding Cell Content](#table-usage-padding-cell-content) - * [Predefined Border Templates](#table-usage-predefined-border-templates) - * [Streaming](#table-usage-streaming) - * [Text Truncation](#table-usage-text-truncation) - * [Text Wrapping](#table-usage-text-wrapping) - - -Produces a string that represents array data in a text table. - -![Demo of table displaying a list of missions to the Moon.](./.README/demo.png) - - -## Features - -* Works with strings containing [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) characters. -* Works with strings containing [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). -* Configurable border characters. -* Configurable content alignment per column. -* Configurable content padding per column. -* Configurable column width. -* Text wrapping. - - -## Install - -```bash -npm install table - -``` - -[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/gajus) -[![Become a Patron](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/gajus) - - -## Usage - -Table data is described using an array (rows) of array (cells). - -```js -import { - table -} from 'table'; - -// Using commonjs? -// const {table} = require('table'); - -let data, - output; - -data = [ - ['0A', '0B', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'] -]; - -/** - * @typedef {string} table~cell - */ - -/** - * @typedef {table~cell[]} table~row - */ - -/** - * @typedef {Object} table~columns - * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). - * @property {number} width Column width (default: auto). - * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). - * @property {number} paddingLeft Cell content padding width left (default: 1). - * @property {number} paddingRight Cell content padding width right (default: 1). - */ - -/** - * @typedef {Object} table~border - * @property {string} topBody - * @property {string} topJoin - * @property {string} topLeft - * @property {string} topRight - * @property {string} bottomBody - * @property {string} bottomJoin - * @property {string} bottomLeft - * @property {string} bottomRight - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - * @property {string} joinBody - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinJoin - */ - -/** - * Used to dynamically tell table whether to draw a line separating rows or not. - * The default behavior is to always return true. - * - * @typedef {function} drawHorizontalLine - * @param {number} index - * @param {number} size - * @return {boolean} - */ - -/** - * @typedef {Object} table~config - * @property {table~border} border - * @property {table~columns[]} columns Column specific configuration. - * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. - * @property {table~drawHorizontalLine} drawHorizontalLine - */ - -/** - * Generates a text table. - * - * @param {table~row[]} rows - * @param {table~config} config - * @return {String} - */ -output = table(data); - -console.log(output); -``` - -``` -╔════╤════╤════╗ -║ 0A │ 0B │ 0C ║ -╟────┼────┼────╢ -║ 1A │ 1B │ 1C ║ -╟────┼────┼────╢ -║ 2A │ 2B │ 2C ║ -╚════╧════╧════╝ - -``` - - - -### Cell Content Alignment - -`{string} config.columns[{number}].alignment` property controls content horizontal alignment within a cell. - -Valid values are: "left", "right" and "center". - -```js -let config, - data, - output; - -data = [ - ['0A', '0B', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'] -]; - -config = { - columns: { - 0: { - alignment: 'left', - width: 10 - }, - 1: { - alignment: 'center', - width: 10 - }, - 2: { - alignment: 'right', - width: 10 - } - } -}; - -output = table(data, config); - -console.log(output); -``` - -``` -╔════════════╤════════════╤════════════╗ -║ 0A │ 0B │ 0C ║ -╟────────────┼────────────┼────────────╢ -║ 1A │ 1B │ 1C ║ -╟────────────┼────────────┼────────────╢ -║ 2A │ 2B │ 2C ║ -╚════════════╧════════════╧════════════╝ -``` - - -### Column Width - -`{number} config.columns[{number}].width` property restricts column width to a fixed width. - -```js -let data, - output, - options; - -data = [ - ['0A', '0B', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'] -]; - -options = { - columns: { - 1: { - width: 10 - } - } -}; - -output = table(data, options); - -console.log(output); -``` - -``` -╔════╤════════════╤════╗ -║ 0A │ 0B │ 0C ║ -╟────┼────────────┼────╢ -║ 1A │ 1B │ 1C ║ -╟────┼────────────┼────╢ -║ 2A │ 2B │ 2C ║ -╚════╧════════════╧════╝ -``` - - -### Custom Border - -`{object} config.border` property describes characters used to draw the table border. - -```js -let config, - data, - output; - -data = [ - ['0A', '0B', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'] -]; - -config = { - border: { - topBody: `─`, - topJoin: `┬`, - topLeft: `┌`, - topRight: `┐`, - - bottomBody: `─`, - bottomJoin: `┴`, - bottomLeft: `└`, - bottomRight: `┘`, - - bodyLeft: `│`, - bodyRight: `│`, - bodyJoin: `│`, - - joinBody: `─`, - joinLeft: `├`, - joinRight: `┤`, - joinJoin: `┼` - } -}; - -output = table(data, config); - -console.log(output); -``` - -``` -┌────┬────┬────┐ -│ 0A │ 0B │ 0C │ -├────┼────┼────┤ -│ 1A │ 1B │ 1C │ -├────┼────┼────┤ -│ 2A │ 2B │ 2C │ -└────┴────┴────┘ -``` - - -### Draw Horizontal Line - -`{function} config.drawHorizontalLine` property is a function that is called for every non-content row in the table. The result of the function `{boolean}` determines whether a row is drawn. - -```js -let data, - output, - options; - -data = [ - ['0A', '0B', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'], - ['3A', '3B', '3C'], - ['4A', '4B', '4C'] -]; - -options = { - /** - * @typedef {function} drawHorizontalLine - * @param {number} index - * @param {number} size - * @return {boolean} - */ - drawHorizontalLine: (index, size) => { - return index === 0 || index === 1 || index === size - 1 || index === size; - } -}; - -output = table(data, options); - -console.log(output); - -``` - -``` -╔════╤════╤════╗ -║ 0A │ 0B │ 0C ║ -╟────┼────┼────╢ -║ 1A │ 1B │ 1C ║ -║ 2A │ 2B │ 2C ║ -║ 3A │ 3B │ 3C ║ -╟────┼────┼────╢ -║ 4A │ 4B │ 4C ║ -╚════╧════╧════╝ - -``` - - -### Single Line Mode - -Horizontal lines inside the table are not drawn. - -```js -import { - table, - getBorderCharacters -} from 'table'; - -const data = [ - ['-rw-r--r--', '1', 'pandorym', 'staff', '1529', 'May 23 11:25', 'LICENSE'], - ['-rw-r--r--', '1', 'pandorym', 'staff', '16327', 'May 23 11:58', 'README.md'], - ['drwxr-xr-x', '76', 'pandorym', 'staff', '2432', 'May 23 12:02', 'dist'], - ['drwxr-xr-x', '634', 'pandorym', 'staff', '20288', 'May 23 11:54', 'node_modules'], - ['-rw-r--r--', '1,', 'pandorym', 'staff', '525688', 'May 23 11:52', 'package-lock.json'], - ['-rw-r--r--@', '1', 'pandorym', 'staff', '2440', 'May 23 11:25', 'package.json'], - ['drwxr-xr-x', '27', 'pandorym', 'staff', '864', 'May 23 11:25', 'src'], - ['drwxr-xr-x', '20', 'pandorym', 'staff', '640', 'May 23 11:25', 'test'], -]; - -const config = { - singleLine: true -}; - -const output = table(data, config); -console.log(output); -``` - -``` -╔═════════════╤═════╤══════════╤═══════╤════════╤══════════════╤═══════════════════╗ -║ -rw-r--r-- │ 1 │ pandorym │ staff │ 1529 │ May 23 11:25 │ LICENSE ║ -║ -rw-r--r-- │ 1 │ pandorym │ staff │ 16327 │ May 23 11:58 │ README.md ║ -║ drwxr-xr-x │ 76 │ pandorym │ staff │ 2432 │ May 23 12:02 │ dist ║ -║ drwxr-xr-x │ 634 │ pandorym │ staff │ 20288 │ May 23 11:54 │ node_modules ║ -║ -rw-r--r-- │ 1, │ pandorym │ staff │ 525688 │ May 23 11:52 │ package-lock.json ║ -║ -rw-r--r--@ │ 1 │ pandorym │ staff │ 2440 │ May 23 11:25 │ package.json ║ -║ drwxr-xr-x │ 27 │ pandorym │ staff │ 864 │ May 23 11:25 │ src ║ -║ drwxr-xr-x │ 20 │ pandorym │ staff │ 640 │ May 23 11:25 │ test ║ -╚═════════════╧═════╧══════════╧═══════╧════════╧══════════════╧═══════════════════╝ -``` - - -### Padding Cell Content - -`{number} config.columns[{number}].paddingLeft` and `{number} config.columns[{number}].paddingRight` properties control content padding within a cell. Property value represents a number of whitespaces used to pad the content. - -```js -let config, - data, - output; - -data = [ - ['0A', 'AABBCC', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'] -]; - -config = { - columns: { - 0: { - paddingLeft: 3 - }, - 1: { - width: 2, - paddingRight: 3 - } - } -}; - -output = table(data, config); - -console.log(output); -``` - -``` -╔══════╤══════╤════╗ -║ 0A │ AA │ 0C ║ -║ │ BB │ ║ -║ │ CC │ ║ -╟──────┼──────┼────╢ -║ 1A │ 1B │ 1C ║ -╟──────┼──────┼────╢ -║ 2A │ 2B │ 2C ║ -╚══════╧══════╧════╝ -``` - - -### Predefined Border Templates - -You can load one of the predefined border templates using `getBorderCharacters` function. - -```js -import { - table, - getBorderCharacters -} from 'table'; - -let config, - data; - -data = [ - ['0A', '0B', '0C'], - ['1A', '1B', '1C'], - ['2A', '2B', '2C'] -]; - -config = { - border: getBorderCharacters(`name of the template`) -}; - -table(data, config); -``` - -``` -# honeywell - -╔════╤════╤════╗ -║ 0A │ 0B │ 0C ║ -╟────┼────┼────╢ -║ 1A │ 1B │ 1C ║ -╟────┼────┼────╢ -║ 2A │ 2B │ 2C ║ -╚════╧════╧════╝ - -# norc - -┌────┬────┬────┐ -│ 0A │ 0B │ 0C │ -├────┼────┼────┤ -│ 1A │ 1B │ 1C │ -├────┼────┼────┤ -│ 2A │ 2B │ 2C │ -└────┴────┴────┘ - -# ramac (ASCII; for use in terminals that do not support Unicode characters) - -+----+----+----+ -| 0A | 0B | 0C | -|----|----|----| -| 1A | 1B | 1C | -|----|----|----| -| 2A | 2B | 2C | -+----+----+----+ - -# void (no borders; see "bordless table" section of the documentation) - - 0A 0B 0C - - 1A 1B 1C - - 2A 2B 2C - -``` - -Raise [an issue](https://github.com/gajus/table/issues) if you'd like to contribute a new border template. - - -#### Borderless Table - -Simply using "void" border character template creates a table with a lot of unnecessary spacing. - -To create a more plesant to the eye table, reset the padding and remove the joining rows, e.g. - -```js -let output; - -output = table(data, { - border: getBorderCharacters(`void`), - columnDefault: { - paddingLeft: 0, - paddingRight: 1 - }, - drawHorizontalLine: () => { - return false - } -}); - -console.log(output); -``` - -``` -0A 0B 0C -1A 1B 1C -2A 2B 2C -``` - - -### Streaming - -`table` package exports `createStream` function used to draw a table and append rows. - -`createStream` requires `{number} columnDefault.width` and `{number} columnCount` configuration properties. - -```js -import { - createStream -} from 'table'; - -let config, - stream; - -config = { - columnDefault: { - width: 50 - }, - columnCount: 1 -}; - -stream = createStream(config); - -setInterval(() => { - stream.write([new Date()]); -}, 500); -``` - -![Streaming current date.](./.README/streaming.gif) - -`table` package uses ANSI escape codes to overwrite the output of the last line when a new row is printed. - -The underlying implementation is explained in this [Stack Overflow answer](http://stackoverflow.com/a/32938658/368691). - -Streaming supports all of the configuration properties and functionality of a static table (such as auto text wrapping, alignment and padding), e.g. - -```js -import { - createStream -} from 'table'; - -import _ from 'lodash'; - -let config, - stream, - i; - -config = { - columnDefault: { - width: 50 - }, - columnCount: 3, - columns: { - 0: { - width: 10, - alignment: 'right' - }, - 1: { - alignment: 'center', - }, - 2: { - width: 10 - } - } -}; - -stream = createStream(config); - -i = 0; - -setInterval(() => { - let random; - - random = _.sample('abcdefghijklmnopqrstuvwxyz', _.random(1, 30)).join(''); - - stream.write([i++, new Date(), random]); -}, 500); -``` - -![Streaming random data.](./.README/streaming-random.gif) - - -### Text Truncation - -To handle a content that overflows the container width, `table` package implements [text wrapping](#table-usage-text-wrapping). However, sometimes you may want to truncate content that is too long to be displayed in the table. - -`{number} config.columns[{number}].truncate` property (default: `Infinity`) truncates the text at the specified length. - -```js -let config, - data, - output; - -data = [ - ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] -]; - -config = { - columns: { - 0: { - width: 20, - truncate: 100 - } - } -}; - -output = table(data, config); - -console.log(output); -``` - -``` -╔══════════════════════╗ -║ Lorem ipsum dolor si ║ -║ t amet, consectetur ║ -║ adipiscing elit. Pha ║ -║ sellus pulvinar nibh ║ -║ sed mauris conva... ║ -╚══════════════════════╝ -``` - - -### Text Wrapping - -`table` package implements auto text wrapping, i.e. text that has width greater than the container width will be separated into multiple lines, e.g. - -```js -let config, - data, - output; - -data = [ - ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] -]; - -config = { - columns: { - 0: { - width: 20 - } - } -}; - -output = table(data, config); - -console.log(output); -``` - -``` -╔══════════════════════╗ -║ Lorem ipsum dolor si ║ -║ t amet, consectetur ║ -║ adipiscing elit. Pha ║ -║ sellus pulvinar nibh ║ -║ sed mauris convallis ║ -║ dapibus. Nunc venena ║ -║ tis tempus nulla sit ║ -║ amet viverra. ║ -╚══════════════════════╝ -``` - -When `wrapWord` is `true` the text is broken at the nearest space or one of the special characters ("-", "_", "\", "/", ".", ",", ";"), e.g. - -```js -let config, - data, - output; - -data = [ - ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar nibh sed mauris convallis dapibus. Nunc venenatis tempus nulla sit amet viverra.'] -]; - -config = { - columns: { - 0: { - width: 20, - wrapWord: true - } - } -}; - -output = table(data, config); - -console.log(output); -``` - -``` -╔══════════════════════╗ -║ Lorem ipsum dolor ║ -║ sit amet, ║ -║ consectetur ║ -║ adipiscing elit. ║ -║ Phasellus pulvinar ║ -║ nibh sed mauris ║ -║ convallis dapibus. ║ -║ Nunc venenatis ║ -║ tempus nulla sit ║ -║ amet viverra. ║ -╚══════════════════════╝ - -``` - diff --git a/node_modules/table/dist/alignString.js b/node_modules/table/dist/alignString.js deleted file mode 100644 index 09412798e..000000000 --- a/node_modules/table/dist/alignString.js +++ /dev/null @@ -1,107 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _isNumberObject = _interopRequireDefault(require("is-number-object")); - -var _isString = _interopRequireDefault(require("is-string")); - -var _stringWidth = _interopRequireDefault(require("string-width")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const alignments = ['left', 'right', 'center']; -/** - * @param {string} subject - * @param {number} width - * @returns {string} - */ - -const alignLeft = (subject, width) => { - return subject + ' '.repeat(width); -}; -/** - * @param {string} subject - * @param {number} width - * @returns {string} - */ - - -const alignRight = (subject, width) => { - return ' '.repeat(width) + subject; -}; -/** - * @param {string} subject - * @param {number} width - * @returns {string} - */ - - -const alignCenter = (subject, width) => { - let halfWidth; - halfWidth = width / 2; - - if (width % 2 === 0) { - return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth); - } else { - halfWidth = Math.floor(halfWidth); - return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth + 1); - } -}; -/** - * Pads a string to the left and/or right to position the subject - * text in a desired alignment within a container. - * - * @param {string} subject - * @param {number} containerWidth - * @param {string} alignment One of the valid options (left, right, center). - * @returns {string} - */ - - -const alignString = (subject, containerWidth, alignment) => { - if (!(0, _isString.default)(subject)) { - throw new TypeError('Subject parameter value must be a string.'); - } - - if (!(0, _isNumberObject.default)(containerWidth)) { - throw new TypeError('Container width parameter value must be a number.'); - } - - const subjectWidth = (0, _stringWidth.default)(subject); - - if (subjectWidth > containerWidth) { - // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); - throw new Error('Subject parameter value width cannot be greater than the container width.'); - } - - if (!(0, _isString.default)(alignment)) { - throw new TypeError('Alignment parameter value must be a string.'); - } - - if (!alignments.includes(alignment)) { - throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); - } - - if (subjectWidth === 0) { - return ' '.repeat(containerWidth); - } - - const availableWidth = containerWidth - subjectWidth; - - if (alignment === 'left') { - return alignLeft(subject, availableWidth); - } - - if (alignment === 'right') { - return alignRight(subject, availableWidth); - } - - return alignCenter(subject, availableWidth); -}; - -var _default = alignString; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/alignString.js.flow b/node_modules/table/dist/alignString.js.flow deleted file mode 100644 index a3739bc27..000000000 --- a/node_modules/table/dist/alignString.js.flow +++ /dev/null @@ -1,97 +0,0 @@ -import isNumber from 'is-number-object'; -import isString from 'is-string'; -import stringWidth from 'string-width'; - -const alignments = [ - 'left', - 'right', - 'center', -]; - -/** - * @param {string} subject - * @param {number} width - * @returns {string} - */ -const alignLeft = (subject, width) => { - return subject + ' '.repeat(width); -}; - -/** - * @param {string} subject - * @param {number} width - * @returns {string} - */ -const alignRight = (subject, width) => { - return ' '.repeat(width) + subject; -}; - -/** - * @param {string} subject - * @param {number} width - * @returns {string} - */ -const alignCenter = (subject, width) => { - let halfWidth; - - halfWidth = width / 2; - - if (width % 2 === 0) { - return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth); - } else { - halfWidth = Math.floor(halfWidth); - - return ' '.repeat(halfWidth) + subject + ' '.repeat(halfWidth + 1); - } -}; - -/** - * Pads a string to the left and/or right to position the subject - * text in a desired alignment within a container. - * - * @param {string} subject - * @param {number} containerWidth - * @param {string} alignment One of the valid options (left, right, center). - * @returns {string} - */ -export default (subject, containerWidth, alignment) => { - if (!isString(subject)) { - throw new TypeError('Subject parameter value must be a string.'); - } - - if (!isNumber(containerWidth)) { - throw new TypeError('Container width parameter value must be a number.'); - } - - const subjectWidth = stringWidth(subject); - - if (subjectWidth > containerWidth) { - // console.log('subjectWidth', subjectWidth, 'containerWidth', containerWidth, 'subject', subject); - - throw new Error('Subject parameter value width cannot be greater than the container width.'); - } - - if (!isString(alignment)) { - throw new TypeError('Alignment parameter value must be a string.'); - } - - if (!alignments.includes(alignment)) { - throw new Error('Alignment parameter value must be a known alignment parameter value (left, right, center).'); - } - - if (subjectWidth === 0) { - return ' '.repeat(containerWidth); - } - - const availableWidth = containerWidth - subjectWidth; - - if (alignment === 'left') { - return alignLeft(subject, availableWidth); - } - - if (alignment === 'right') { - return alignRight(subject, availableWidth); - } - - return alignCenter(subject, availableWidth); -}; diff --git a/node_modules/table/dist/alignTableData.js b/node_modules/table/dist/alignTableData.js deleted file mode 100644 index fc60afe85..000000000 --- a/node_modules/table/dist/alignTableData.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _stringWidth = _interopRequireDefault(require("string-width")); - -var _alignString = _interopRequireDefault(require("./alignString")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {table~row[]} rows - * @param {object} config - * @returns {table~row[]} - */ -const alignTableData = (rows, config) => { - return rows.map(cells => { - return cells.map((value, index1) => { - const column = config.columns[index1]; - - if ((0, _stringWidth.default)(value) === column.width) { - return value; - } else { - return (0, _alignString.default)(value, column.width, column.alignment); - } - }); - }); -}; - -var _default = alignTableData; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/alignTableData.js.flow b/node_modules/table/dist/alignTableData.js.flow deleted file mode 100644 index c82c31e26..000000000 --- a/node_modules/table/dist/alignTableData.js.flow +++ /dev/null @@ -1,21 +0,0 @@ -import stringWidth from 'string-width'; -import alignString from './alignString'; - -/** - * @param {table~row[]} rows - * @param {object} config - * @returns {table~row[]} - */ -export default (rows, config) => { - return rows.map((cells) => { - return cells.map((value, index1) => { - const column = config.columns[index1]; - - if (stringWidth(value) === column.width) { - return value; - } else { - return alignString(value, column.width, column.alignment); - } - }); - }); -}; diff --git a/node_modules/table/dist/calculateCellHeight.js b/node_modules/table/dist/calculateCellHeight.js deleted file mode 100644 index 8f7ed9fc8..000000000 --- a/node_modules/table/dist/calculateCellHeight.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _isString = _interopRequireDefault(require("is-string")); - -var _wrapCell = _interopRequireDefault(require("./wrapCell")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {string} value - * @param {number} columnWidth - * @param {boolean} useWrapWord - * @returns {number} - */ -const calculateCellHeight = (value, columnWidth, useWrapWord = false) => { - if (!(0, _isString.default)(value)) { - throw new TypeError('Value must be a string.'); - } - - if (!Number.isInteger(columnWidth)) { - throw new TypeError('Column width must be an integer.'); - } - - if (columnWidth < 1) { - throw new Error('Column width must be greater than 0.'); - } - - return (0, _wrapCell.default)(value, columnWidth, useWrapWord).length; -}; - -var _default = calculateCellHeight; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellHeight.js.flow b/node_modules/table/dist/calculateCellHeight.js.flow deleted file mode 100644 index 172604390..000000000 --- a/node_modules/table/dist/calculateCellHeight.js.flow +++ /dev/null @@ -1,24 +0,0 @@ -import isString from 'is-string'; -import wrapCell from './wrapCell'; - -/** - * @param {string} value - * @param {number} columnWidth - * @param {boolean} useWrapWord - * @returns {number} - */ -export default (value, columnWidth, useWrapWord = false) => { - if (!isString(value)) { - throw new TypeError('Value must be a string.'); - } - - if (!Number.isInteger(columnWidth)) { - throw new TypeError('Column width must be an integer.'); - } - - if (columnWidth < 1) { - throw new Error('Column width must be greater than 0.'); - } - - return wrapCell(value, columnWidth, useWrapWord).length; -}; diff --git a/node_modules/table/dist/calculateCellWidthIndex.js b/node_modules/table/dist/calculateCellWidthIndex.js deleted file mode 100644 index c46fb861d..000000000 --- a/node_modules/table/dist/calculateCellWidthIndex.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _stringWidth = _interopRequireDefault(require("string-width")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calculates width of each cell contents. - * - * @param {string[]} cells - * @returns {number[]} - */ -const calculateCellWidthIndex = cells => { - return cells.map(value => { - return Math.max(...value.split('\n').map(line => { - return (0, _stringWidth.default)(line); - })); - }); -}; - -var _default = calculateCellWidthIndex; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/calculateCellWidthIndex.js.flow b/node_modules/table/dist/calculateCellWidthIndex.js.flow deleted file mode 100644 index e2539539a..000000000 --- a/node_modules/table/dist/calculateCellWidthIndex.js.flow +++ /dev/null @@ -1,17 +0,0 @@ -import stringWidth from 'string-width'; - -/** - * Calculates width of each cell contents. - * - * @param {string[]} cells - * @returns {number[]} - */ -export default (cells) => { - return cells.map((value) => { - return Math.max( - ...value.split('\n').map((line) => { - return stringWidth(line); - }), - ); - }); -}; diff --git a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js deleted file mode 100644 index 057d0a506..000000000 --- a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js +++ /dev/null @@ -1,36 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _calculateCellWidthIndex = _interopRequireDefault(require("./calculateCellWidthIndex")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Produces an array of values that describe the largest value length (width) in every column. - * - * @param {Array[]} rows - * @returns {number[]} - */ -const calculateMaximumColumnWidthIndex = rows => { - if (!rows[0]) { - throw new Error('Dataset must have at least one row.'); - } - - const columns = new Array(rows[0].length).fill(0); - rows.forEach(row => { - const columnWidthIndex = (0, _calculateCellWidthIndex.default)(row); - columnWidthIndex.forEach((valueWidth, index0) => { - if (columns[index0] < valueWidth) { - columns[index0] = valueWidth; - } - }); - }); - return columns; -}; - -var _default = calculateMaximumColumnWidthIndex; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.flow b/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.flow deleted file mode 100644 index 5c8c10981..000000000 --- a/node_modules/table/dist/calculateMaximumColumnWidthIndex.js.flow +++ /dev/null @@ -1,27 +0,0 @@ -import calculateCellWidthIndex from './calculateCellWidthIndex'; - -/** - * Produces an array of values that describe the largest value length (width) in every column. - * - * @param {Array[]} rows - * @returns {number[]} - */ -export default (rows) => { - if (!rows[0]) { - throw new Error('Dataset must have at least one row.'); - } - - const columns = new Array(rows[0].length).fill(0); - - rows.forEach((row) => { - const columnWidthIndex = calculateCellWidthIndex(row); - - columnWidthIndex.forEach((valueWidth, index0) => { - if (columns[index0] < valueWidth) { - columns[index0] = valueWidth; - } - }); - }); - - return columns; -}; diff --git a/node_modules/table/dist/calculateRowHeightIndex.js b/node_modules/table/dist/calculateRowHeightIndex.js deleted file mode 100644 index b8175d656..000000000 --- a/node_modules/table/dist/calculateRowHeightIndex.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _isBooleanObject = _interopRequireDefault(require("is-boolean-object")); - -var _isNumberObject = _interopRequireDefault(require("is-number-object")); - -var _calculateCellHeight = _interopRequireDefault(require("./calculateCellHeight")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Calculates the vertical row span index. - * - * @param {Array[]} rows - * @param {object} config - * @returns {number[]} - */ -const calculateRowHeightIndex = (rows, config) => { - const tableWidth = rows[0].length; - const rowSpanIndex = []; - rows.forEach(cells => { - const cellHeightIndex = new Array(tableWidth).fill(1); - cells.forEach((value, index1) => { - if (!(0, _isNumberObject.default)(config.columns[index1].width)) { - throw new TypeError('column[index].width must be a number.'); - } - - if (!(0, _isBooleanObject.default)(config.columns[index1].wrapWord)) { - throw new TypeError('column[index].wrapWord must be a boolean.'); - } - - cellHeightIndex[index1] = (0, _calculateCellHeight.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); - }); - rowSpanIndex.push(Math.max(...cellHeightIndex)); - }); - return rowSpanIndex; -}; - -var _default = calculateRowHeightIndex; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/calculateRowHeightIndex.js.flow b/node_modules/table/dist/calculateRowHeightIndex.js.flow deleted file mode 100644 index 04c61b3ea..000000000 --- a/node_modules/table/dist/calculateRowHeightIndex.js.flow +++ /dev/null @@ -1,36 +0,0 @@ -import isBoolean from 'is-boolean-object'; -import isNumber from 'is-number-object'; -import calculateCellHeight from './calculateCellHeight'; - -/** - * Calculates the vertical row span index. - * - * @param {Array[]} rows - * @param {object} config - * @returns {number[]} - */ -export default (rows, config) => { - const tableWidth = rows[0].length; - - const rowSpanIndex = []; - - rows.forEach((cells) => { - const cellHeightIndex = new Array(tableWidth).fill(1); - - cells.forEach((value, index1) => { - if (!isNumber(config.columns[index1].width)) { - throw new TypeError('column[index].width must be a number.'); - } - - if (!isBoolean(config.columns[index1].wrapWord)) { - throw new TypeError('column[index].wrapWord must be a boolean.'); - } - - cellHeightIndex[index1] = calculateCellHeight(value, config.columns[index1].width, config.columns[index1].wrapWord); - }); - - rowSpanIndex.push(Math.max(...cellHeightIndex)); - }); - - return rowSpanIndex; -}; diff --git a/node_modules/table/dist/createStream.js b/node_modules/table/dist/createStream.js deleted file mode 100644 index 731f12035..000000000 --- a/node_modules/table/dist/createStream.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _alignTableData = _interopRequireDefault(require("./alignTableData")); - -var _calculateRowHeightIndex = _interopRequireDefault(require("./calculateRowHeightIndex")); - -var _drawBorder = require("./drawBorder"); - -var _drawRow = _interopRequireDefault(require("./drawRow")); - -var _makeStreamConfig = _interopRequireDefault(require("./makeStreamConfig")); - -var _mapDataUsingRowHeightIndex = _interopRequireDefault(require("./mapDataUsingRowHeightIndex")); - -var _padTableData = _interopRequireDefault(require("./padTableData")); - -var _stringifyTableData = _interopRequireDefault(require("./stringifyTableData")); - -var _truncateTableData = _interopRequireDefault(require("./truncateTableData")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {Array} data - * @param {object} config - * @returns {Array} - */ -const prepareData = (data, config) => { - let rows; - rows = (0, _stringifyTableData.default)(data); - rows = (0, _truncateTableData.default)(data, config); - const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); - rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); - rows = (0, _alignTableData.default)(rows, config); - rows = (0, _padTableData.default)(rows, config); - return rows; -}; -/** - * @param {string[]} row - * @param {number[]} columnWidthIndex - * @param {object} config - * @returns {undefined} - */ - - -const create = (row, columnWidthIndex, config) => { - const rows = prepareData([row], config); - const body = rows.map(literalRow => { - return (0, _drawRow.default)(literalRow, config.border); - }).join(''); - let output; - output = ''; - output += (0, _drawBorder.drawBorderTop)(columnWidthIndex, config.border); - output += body; - output += (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); - output = output.trimEnd(); - process.stdout.write(output); -}; -/** - * @param {string[]} row - * @param {number[]} columnWidthIndex - * @param {object} config - * @returns {undefined} - */ - - -const append = (row, columnWidthIndex, config) => { - const rows = prepareData([row], config); - const body = rows.map(literalRow => { - return (0, _drawRow.default)(literalRow, config.border); - }).join(''); - let output = ''; - const bottom = (0, _drawBorder.drawBorderBottom)(columnWidthIndex, config.border); - - if (bottom !== '\n') { - output = '\r\u001B[K'; - } - - output += (0, _drawBorder.drawBorderJoin)(columnWidthIndex, config.border); - output += body; - output += bottom; - output = output.trimEnd(); - process.stdout.write(output); -}; -/** - * @param {object} userConfig - * @returns {object} - */ - - -const createStream = (userConfig = {}) => { - const config = (0, _makeStreamConfig.default)(userConfig); - const columnWidthIndex = Object.values(config.columns).map(column => { - return column.width + column.paddingLeft + column.paddingRight; - }); - let empty; - empty = true; - return { - /** - * @param {string[]} row - * @returns {undefined} - */ - write: row => { - if (row.length !== config.columnCount) { - throw new Error('Row cell count does not match the config.columnCount.'); - } - - if (empty) { - empty = false; - return create(row, columnWidthIndex, config); - } else { - return append(row, columnWidthIndex, config); - } - } - }; -}; - -var _default = createStream; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/createStream.js.flow b/node_modules/table/dist/createStream.js.flow deleted file mode 100644 index 747ba6a75..000000000 --- a/node_modules/table/dist/createStream.js.flow +++ /dev/null @@ -1,125 +0,0 @@ -import alignTableData from './alignTableData'; -import calculateRowHeightIndex from './calculateRowHeightIndex'; -import { - drawBorderBottom, - drawBorderJoin, - drawBorderTop, -} from './drawBorder'; -import drawRow from './drawRow'; -import makeStreamConfig from './makeStreamConfig'; -import mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex'; -import padTableData from './padTableData'; -import stringifyTableData from './stringifyTableData'; -import truncateTableData from './truncateTableData'; - -/** - * @param {Array} data - * @param {object} config - * @returns {Array} - */ -const prepareData = (data, config) => { - let rows; - - rows = stringifyTableData(data); - - rows = truncateTableData(data, config); - - const rowHeightIndex = calculateRowHeightIndex(rows, config); - - rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config); - rows = alignTableData(rows, config); - rows = padTableData(rows, config); - - return rows; -}; - -/** - * @param {string[]} row - * @param {number[]} columnWidthIndex - * @param {object} config - * @returns {undefined} - */ -const create = (row, columnWidthIndex, config) => { - const rows = prepareData([row], config); - - const body = rows.map((literalRow) => { - return drawRow(literalRow, config.border); - }).join(''); - - let output; - - output = ''; - - output += drawBorderTop(columnWidthIndex, config.border); - output += body; - output += drawBorderBottom(columnWidthIndex, config.border); - - output = output.trimEnd(); - - process.stdout.write(output); -}; - -/** - * @param {string[]} row - * @param {number[]} columnWidthIndex - * @param {object} config - * @returns {undefined} - */ -const append = (row, columnWidthIndex, config) => { - const rows = prepareData([row], config); - - const body = rows.map((literalRow) => { - return drawRow(literalRow, config.border); - }).join(''); - - let output = ''; - const bottom = drawBorderBottom(columnWidthIndex, config.border); - - if (bottom !== '\n') { - output = '\r\u001B[K'; - } - - output += drawBorderJoin(columnWidthIndex, config.border); - output += body; - output += bottom; - - output = output.trimEnd(); - - process.stdout.write(output); -}; - -/** - * @param {object} userConfig - * @returns {object} - */ -export default (userConfig = {}) => { - const config = makeStreamConfig(userConfig); - - const columnWidthIndex = Object.values(config.columns).map((column) => { - return column.width + column.paddingLeft + column.paddingRight; - }); - - let empty; - - empty = true; - - return { - /** - * @param {string[]} row - * @returns {undefined} - */ - write: (row) => { - if (row.length !== config.columnCount) { - throw new Error('Row cell count does not match the config.columnCount.'); - } - - if (empty) { - empty = false; - - return create(row, columnWidthIndex, config); - } else { - return append(row, columnWidthIndex, config); - } - }, - }; -}; diff --git a/node_modules/table/dist/drawBorder.js b/node_modules/table/dist/drawBorder.js deleted file mode 100644 index 965e8539d..000000000 --- a/node_modules/table/dist/drawBorder.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.drawBorderTop = exports.drawBorderJoin = exports.drawBorderBottom = exports.drawBorder = void 0; - -/** - * @typedef drawBorder~parts - * @property {string} left - * @property {string} right - * @property {string} body - * @property {string} join - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorder~parts} parts - * @returns {string} - */ -const drawBorder = (columnSizeIndex, parts) => { - const columns = columnSizeIndex.map(size => { - return parts.body.repeat(size); - }).join(parts.join); - return parts.left + columns + parts.right + '\n'; -}; -/** - * @typedef drawBorderTop~parts - * @property {string} topLeft - * @property {string} topRight - * @property {string} topBody - * @property {string} topJoin - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorderTop~parts} parts - * @returns {string} - */ - - -exports.drawBorder = drawBorder; - -const drawBorderTop = (columnSizeIndex, parts) => { - const border = drawBorder(columnSizeIndex, { - body: parts.topBody, - join: parts.topJoin, - left: parts.topLeft, - right: parts.topRight - }); - - if (border === '\n') { - return ''; - } - - return border; -}; -/** - * @typedef drawBorderJoin~parts - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinBody - * @property {string} joinJoin - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorderJoin~parts} parts - * @returns {string} - */ - - -exports.drawBorderTop = drawBorderTop; - -const drawBorderJoin = (columnSizeIndex, parts) => { - return drawBorder(columnSizeIndex, { - body: parts.joinBody, - join: parts.joinJoin, - left: parts.joinLeft, - right: parts.joinRight - }); -}; -/** - * @typedef drawBorderBottom~parts - * @property {string} topLeft - * @property {string} topRight - * @property {string} topBody - * @property {string} topJoin - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorderBottom~parts} parts - * @returns {string} - */ - - -exports.drawBorderJoin = drawBorderJoin; - -const drawBorderBottom = (columnSizeIndex, parts) => { - return drawBorder(columnSizeIndex, { - body: parts.bottomBody, - join: parts.bottomJoin, - left: parts.bottomLeft, - right: parts.bottomRight - }); -}; - -exports.drawBorderBottom = drawBorderBottom; \ No newline at end of file diff --git a/node_modules/table/dist/drawBorder.js.flow b/node_modules/table/dist/drawBorder.js.flow deleted file mode 100644 index 85de2475e..000000000 --- a/node_modules/table/dist/drawBorder.js.flow +++ /dev/null @@ -1,101 +0,0 @@ -/** - * @typedef drawBorder~parts - * @property {string} left - * @property {string} right - * @property {string} body - * @property {string} join - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorder~parts} parts - * @returns {string} - */ -const drawBorder = (columnSizeIndex, parts) => { - const columns = columnSizeIndex - .map((size) => { - return parts.body.repeat(size); - }) - .join(parts.join); - - return parts.left + columns + parts.right + '\n'; -}; - -/** - * @typedef drawBorderTop~parts - * @property {string} topLeft - * @property {string} topRight - * @property {string} topBody - * @property {string} topJoin - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorderTop~parts} parts - * @returns {string} - */ -const drawBorderTop = (columnSizeIndex, parts) => { - const border = drawBorder(columnSizeIndex, { - body: parts.topBody, - join: parts.topJoin, - left: parts.topLeft, - right: parts.topRight, - }); - - if (border === '\n') { - return ''; - } - - return border; -}; - -/** - * @typedef drawBorderJoin~parts - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinBody - * @property {string} joinJoin - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorderJoin~parts} parts - * @returns {string} - */ -const drawBorderJoin = (columnSizeIndex, parts) => { - return drawBorder(columnSizeIndex, { - body: parts.joinBody, - join: parts.joinJoin, - left: parts.joinLeft, - right: parts.joinRight, - }); -}; - -/** - * @typedef drawBorderBottom~parts - * @property {string} topLeft - * @property {string} topRight - * @property {string} topBody - * @property {string} topJoin - */ - -/** - * @param {number[]} columnSizeIndex - * @param {drawBorderBottom~parts} parts - * @returns {string} - */ -const drawBorderBottom = (columnSizeIndex, parts) => { - return drawBorder(columnSizeIndex, { - body: parts.bottomBody, - join: parts.bottomJoin, - left: parts.bottomLeft, - right: parts.bottomRight, - }); -}; - -export { - drawBorder, - drawBorderBottom, - drawBorderJoin, - drawBorderTop, -}; diff --git a/node_modules/table/dist/drawRow.js b/node_modules/table/dist/drawRow.js deleted file mode 100644 index 432f5bce1..000000000 --- a/node_modules/table/dist/drawRow.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/** - * @typedef {object} drawRow~border - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - */ - -/** - * @param {number[]} columns - * @param {drawRow~border} border - * @returns {string} - */ -const drawRow = (columns, border) => { - return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n'; -}; - -var _default = drawRow; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/drawRow.js.flow b/node_modules/table/dist/drawRow.js.flow deleted file mode 100644 index 978eab2de..000000000 --- a/node_modules/table/dist/drawRow.js.flow +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @typedef {object} drawRow~border - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - */ - -/** - * @param {number[]} columns - * @param {drawRow~border} border - * @returns {string} - */ -export default (columns, border) => { - return border.bodyLeft + columns.join(border.bodyJoin) + border.bodyRight + '\n'; -}; diff --git a/node_modules/table/dist/drawTable.js b/node_modules/table/dist/drawTable.js deleted file mode 100644 index 4c49d0fff..000000000 --- a/node_modules/table/dist/drawTable.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _drawBorder = require("./drawBorder"); - -var _drawRow = _interopRequireDefault(require("./drawRow")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {Array} rows - * @param {object} border - * @param {Array} columnSizeIndex - * @param {Array} rowSpanIndex - * @param {Function} drawHorizontalLine - * @param {boolean} singleLine - * @returns {string} - */ -const drawTable = (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => { - let output; - let realRowIndex; - let rowHeight; - const rowCount = rows.length; - realRowIndex = 0; - output = ''; - - if (drawHorizontalLine(realRowIndex, rowCount)) { - output += (0, _drawBorder.drawBorderTop)(columnSizeIndex, border); - } - - rows.forEach((row, index0) => { - output += (0, _drawRow.default)(row, border); - - if (!rowHeight) { - rowHeight = rowSpanIndex[realRowIndex]; - realRowIndex++; - } - - rowHeight--; - - if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { - output += (0, _drawBorder.drawBorderJoin)(columnSizeIndex, border); - } - }); - - if (drawHorizontalLine(realRowIndex, rowCount)) { - output += (0, _drawBorder.drawBorderBottom)(columnSizeIndex, border); - } - - return output; -}; - -var _default = drawTable; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/drawTable.js.flow b/node_modules/table/dist/drawTable.js.flow deleted file mode 100644 index 84707caa8..000000000 --- a/node_modules/table/dist/drawTable.js.flow +++ /dev/null @@ -1,53 +0,0 @@ -import { - drawBorderTop, - drawBorderJoin, - drawBorderBottom, -} from './drawBorder'; -import drawRow from './drawRow'; - -/** - * @param {Array} rows - * @param {object} border - * @param {Array} columnSizeIndex - * @param {Array} rowSpanIndex - * @param {Function} drawHorizontalLine - * @param {boolean} singleLine - * @returns {string} - */ -export default (rows, border, columnSizeIndex, rowSpanIndex, drawHorizontalLine, singleLine) => { - let output; - let realRowIndex; - let rowHeight; - - const rowCount = rows.length; - - realRowIndex = 0; - - output = ''; - - if (drawHorizontalLine(realRowIndex, rowCount)) { - output += drawBorderTop(columnSizeIndex, border); - } - - rows.forEach((row, index0) => { - output += drawRow(row, border); - - if (!rowHeight) { - rowHeight = rowSpanIndex[realRowIndex]; - - realRowIndex++; - } - - rowHeight--; - - if (!singleLine && rowHeight === 0 && index0 !== rowCount - 1 && drawHorizontalLine(realRowIndex, rowCount)) { - output += drawBorderJoin(columnSizeIndex, border); - } - }); - - if (drawHorizontalLine(realRowIndex, rowCount)) { - output += drawBorderBottom(columnSizeIndex, border); - } - - return output; -}; diff --git a/node_modules/table/dist/getBorderCharacters.js b/node_modules/table/dist/getBorderCharacters.js deleted file mode 100644 index e7fe968a4..000000000 --- a/node_modules/table/dist/getBorderCharacters.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/* eslint-disable sort-keys-fix/sort-keys-fix */ - -/** - * @typedef border - * @property {string} topBody - * @property {string} topJoin - * @property {string} topLeft - * @property {string} topRight - * @property {string} bottomBody - * @property {string} bottomJoin - * @property {string} bottomLeft - * @property {string} bottomRight - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - * @property {string} joinBody - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinJoin - */ - -/** - * @param {string} name - * @returns {border} - */ -const getBorderCharacters = name => { - if (name === 'honeywell') { - return { - topBody: '═', - topJoin: '╤', - topLeft: '╔', - topRight: '╗', - bottomBody: '═', - bottomJoin: '╧', - bottomLeft: '╚', - bottomRight: '╝', - bodyLeft: '║', - bodyRight: '║', - bodyJoin: '│', - joinBody: '─', - joinLeft: '╟', - joinRight: '╢', - joinJoin: '┼' - }; - } - - if (name === 'norc') { - return { - topBody: '─', - topJoin: '┬', - topLeft: '┌', - topRight: '┐', - bottomBody: '─', - bottomJoin: '┴', - bottomLeft: '└', - bottomRight: '┘', - bodyLeft: '│', - bodyRight: '│', - bodyJoin: '│', - joinBody: '─', - joinLeft: '├', - joinRight: '┤', - joinJoin: '┼' - }; - } - - if (name === 'ramac') { - return { - topBody: '-', - topJoin: '+', - topLeft: '+', - topRight: '+', - bottomBody: '-', - bottomJoin: '+', - bottomLeft: '+', - bottomRight: '+', - bodyLeft: '|', - bodyRight: '|', - bodyJoin: '|', - joinBody: '-', - joinLeft: '|', - joinRight: '|', - joinJoin: '|' - }; - } - - if (name === 'void') { - return { - topBody: '', - topJoin: '', - topLeft: '', - topRight: '', - bottomBody: '', - bottomJoin: '', - bottomLeft: '', - bottomRight: '', - bodyLeft: '', - bodyRight: '', - bodyJoin: '', - joinBody: '', - joinLeft: '', - joinRight: '', - joinJoin: '' - }; - } - - throw new Error('Unknown border template "' + name + '".'); -}; - -var _default = getBorderCharacters; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/getBorderCharacters.js.flow b/node_modules/table/dist/getBorderCharacters.js.flow deleted file mode 100644 index bc8b0f263..000000000 --- a/node_modules/table/dist/getBorderCharacters.js.flow +++ /dev/null @@ -1,120 +0,0 @@ -/* eslint-disable sort-keys-fix/sort-keys-fix */ - -/** - * @typedef border - * @property {string} topBody - * @property {string} topJoin - * @property {string} topLeft - * @property {string} topRight - * @property {string} bottomBody - * @property {string} bottomJoin - * @property {string} bottomLeft - * @property {string} bottomRight - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - * @property {string} joinBody - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinJoin - */ - -/** - * @param {string} name - * @returns {border} - */ -export default (name) => { - if (name === 'honeywell') { - return { - topBody: '═', - topJoin: '╤', - topLeft: '╔', - topRight: '╗', - - bottomBody: '═', - bottomJoin: '╧', - bottomLeft: '╚', - bottomRight: '╝', - - bodyLeft: '║', - bodyRight: '║', - bodyJoin: '│', - - joinBody: '─', - joinLeft: '╟', - joinRight: '╢', - joinJoin: '┼', - }; - } - - if (name === 'norc') { - return { - topBody: '─', - topJoin: '┬', - topLeft: '┌', - topRight: '┐', - - bottomBody: '─', - bottomJoin: '┴', - bottomLeft: '└', - bottomRight: '┘', - - bodyLeft: '│', - bodyRight: '│', - bodyJoin: '│', - - joinBody: '─', - joinLeft: '├', - joinRight: '┤', - joinJoin: '┼', - }; - } - - if (name === 'ramac') { - return { - topBody: '-', - topJoin: '+', - topLeft: '+', - topRight: '+', - - bottomBody: '-', - bottomJoin: '+', - bottomLeft: '+', - bottomRight: '+', - - bodyLeft: '|', - bodyRight: '|', - bodyJoin: '|', - - joinBody: '-', - joinLeft: '|', - joinRight: '|', - joinJoin: '|', - }; - } - - if (name === 'void') { - return { - topBody: '', - topJoin: '', - topLeft: '', - topRight: '', - - bottomBody: '', - bottomJoin: '', - bottomLeft: '', - bottomRight: '', - - bodyLeft: '', - bodyRight: '', - bodyJoin: '', - - joinBody: '', - joinLeft: '', - joinRight: '', - joinJoin: '', - }; - } - - throw new Error('Unknown border template "' + name + '".'); -}; diff --git a/node_modules/table/dist/index.js b/node_modules/table/dist/index.js deleted file mode 100644 index 069dcccb3..000000000 --- a/node_modules/table/dist/index.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "createStream", { - enumerable: true, - get: function () { - return _createStream.default; - } -}); -Object.defineProperty(exports, "getBorderCharacters", { - enumerable: true, - get: function () { - return _getBorderCharacters.default; - } -}); -Object.defineProperty(exports, "table", { - enumerable: true, - get: function () { - return _table.default; - } -}); - -var _createStream = _interopRequireDefault(require("./createStream")); - -var _getBorderCharacters = _interopRequireDefault(require("./getBorderCharacters")); - -var _table = _interopRequireDefault(require("./table")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file diff --git a/node_modules/table/dist/index.js.flow b/node_modules/table/dist/index.js.flow deleted file mode 100644 index 4a47c5025..000000000 --- a/node_modules/table/dist/index.js.flow +++ /dev/null @@ -1,9 +0,0 @@ -import createStream from './createStream'; -import getBorderCharacters from './getBorderCharacters'; -import table from './table'; - -export { - table, - createStream, - getBorderCharacters, -}; diff --git a/node_modules/table/dist/makeConfig.js b/node_modules/table/dist/makeConfig.js deleted file mode 100644 index a80d9a06a..000000000 --- a/node_modules/table/dist/makeConfig.js +++ /dev/null @@ -1,91 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _lodash = _interopRequireDefault(require("lodash.clonedeep")); - -var _calculateMaximumColumnWidthIndex = _interopRequireDefault(require("./calculateMaximumColumnWidthIndex")); - -var _getBorderCharacters = _interopRequireDefault(require("./getBorderCharacters")); - -var _validateConfig = _interopRequireDefault(require("./validateConfig")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Merges user provided border characters with the default border ("honeywell") characters. - * - * @param {object} border - * @returns {object} - */ -const makeBorder = (border = {}) => { - return Object.assign({}, (0, _getBorderCharacters.default)('honeywell'), border); -}; -/** - * Creates a configuration for every column using default - * values for the missing configuration properties. - * - * @param {Array[]} rows - * @param {object} columns - * @param {object} columnDefault - * @returns {object} - */ - - -const makeColumns = (rows, columns = {}, columnDefault = {}) => { - const maximumColumnWidthIndex = (0, _calculateMaximumColumnWidthIndex.default)(rows); - - for (let index = 0; index < rows[0].length; index++) { - if (typeof columns[index] === 'undefined') { - columns[index] = {}; - } - - columns[index] = Object.assign({ - alignment: 'left', - paddingLeft: 1, - paddingRight: 1, - truncate: Number.POSITIVE_INFINITY, - width: maximumColumnWidthIndex[index], - wrapWord: false - }, columnDefault, columns[index]); - } - - return columns; -}; -/** - * Makes a new configuration object out of the userConfig object - * using default values for the missing configuration properties. - * - * @param {Array[]} rows - * @param {object} userConfig - * @returns {object} - */ - - -const makeConfig = (rows, userConfig = {}) => { - (0, _validateConfig.default)('config.json', userConfig); - const config = (0, _lodash.default)(userConfig); - config.border = makeBorder(config.border); - config.columns = makeColumns(rows, config.columns, config.columnDefault); - - if (!config.drawHorizontalLine) { - /** - * @returns {boolean} - */ - config.drawHorizontalLine = () => { - return true; - }; - } - - if (config.singleLine === undefined) { - config.singleLine = false; - } - - return config; -}; - -var _default = makeConfig; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/makeConfig.js.flow b/node_modules/table/dist/makeConfig.js.flow deleted file mode 100644 index 3fcbc79c5..000000000 --- a/node_modules/table/dist/makeConfig.js.flow +++ /dev/null @@ -1,76 +0,0 @@ -import cloneDeep from 'lodash.clonedeep'; -import calculateMaximumColumnWidthIndex from './calculateMaximumColumnWidthIndex'; -import getBorderCharacters from './getBorderCharacters'; -import validateConfig from './validateConfig'; - -/** - * Merges user provided border characters with the default border ("honeywell") characters. - * - * @param {object} border - * @returns {object} - */ -const makeBorder = (border = {}) => { - return Object.assign({}, getBorderCharacters('honeywell'), border); -}; - -/** - * Creates a configuration for every column using default - * values for the missing configuration properties. - * - * @param {Array[]} rows - * @param {object} columns - * @param {object} columnDefault - * @returns {object} - */ -const makeColumns = (rows, columns = {}, columnDefault = {}) => { - const maximumColumnWidthIndex = calculateMaximumColumnWidthIndex(rows); - - for (let index = 0; index < rows[0].length; index++) { - if (typeof columns[index] === 'undefined') { - columns[index] = {}; - } - - columns[index] = Object.assign({ - alignment: 'left', - paddingLeft: 1, - paddingRight: 1, - truncate: Number.POSITIVE_INFINITY, - width: maximumColumnWidthIndex[index], - wrapWord: false, - }, columnDefault, columns[index]); - } - - return columns; -}; - -/** - * Makes a new configuration object out of the userConfig object - * using default values for the missing configuration properties. - * - * @param {Array[]} rows - * @param {object} userConfig - * @returns {object} - */ -export default (rows, userConfig = {}) => { - validateConfig('config.json', userConfig); - - const config = cloneDeep(userConfig); - - config.border = makeBorder(config.border); - config.columns = makeColumns(rows, config.columns, config.columnDefault); - - if (!config.drawHorizontalLine) { - /** - * @returns {boolean} - */ - config.drawHorizontalLine = () => { - return true; - }; - } - - if (config.singleLine === undefined) { - config.singleLine = false; - } - - return config; -}; diff --git a/node_modules/table/dist/makeStreamConfig.js b/node_modules/table/dist/makeStreamConfig.js deleted file mode 100644 index 6ca9733dd..000000000 --- a/node_modules/table/dist/makeStreamConfig.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _lodash = _interopRequireDefault(require("lodash.clonedeep")); - -var _getBorderCharacters = _interopRequireDefault(require("./getBorderCharacters")); - -var _validateConfig = _interopRequireDefault(require("./validateConfig")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Merges user provided border characters with the default border ("honeywell") characters. - * - * @param {object} border - * @returns {object} - */ -const makeBorder = (border = {}) => { - return Object.assign({}, (0, _getBorderCharacters.default)('honeywell'), border); -}; -/** - * Creates a configuration for every column using default - * values for the missing configuration properties. - * - * @param {number} columnCount - * @param {object} columns - * @param {object} columnDefault - * @returns {object} - */ - - -const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { - for (let index = 0; index < columnCount; index++) { - if (typeof columns[index] === 'undefined') { - columns[index] = {}; - } - - columns[index] = Object.assign({ - alignment: 'left', - paddingLeft: 1, - paddingRight: 1, - truncate: Number.POSITIVE_INFINITY, - wrapWord: false - }, columnDefault, columns[index]); - } - - return columns; -}; -/** - * @typedef {object} columnConfig - * @property {string} alignment - * @property {number} width - * @property {number} truncate - * @property {number} paddingLeft - * @property {number} paddingRight - */ - -/** - * @typedef {object} streamConfig - * @property {columnConfig} columnDefault - * @property {object} border - * @property {columnConfig[]} - * @property {number} columnCount Number of columns in the table (required). - */ - -/** - * Makes a new configuration object out of the userConfig object - * using default values for the missing configuration properties. - * - * @param {streamConfig} userConfig - * @returns {object} - */ - - -const makeStreamConfig = (userConfig = {}) => { - (0, _validateConfig.default)('streamConfig.json', userConfig); - const config = (0, _lodash.default)(userConfig); - - if (!config.columnDefault || !config.columnDefault.width) { - throw new Error('Must provide config.columnDefault.width when creating a stream.'); - } - - if (!config.columnCount) { - throw new Error('Must provide config.columnCount.'); - } - - config.border = makeBorder(config.border); - config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); - return config; -}; - -var _default = makeStreamConfig; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/makeStreamConfig.js.flow b/node_modules/table/dist/makeStreamConfig.js.flow deleted file mode 100644 index 8536bf5b3..000000000 --- a/node_modules/table/dist/makeStreamConfig.js.flow +++ /dev/null @@ -1,83 +0,0 @@ -import cloneDeep from 'lodash.clonedeep'; -import getBorderCharacters from './getBorderCharacters'; -import validateConfig from './validateConfig'; - -/** - * Merges user provided border characters with the default border ("honeywell") characters. - * - * @param {object} border - * @returns {object} - */ -const makeBorder = (border = {}) => { - return Object.assign({}, getBorderCharacters('honeywell'), border); -}; - -/** - * Creates a configuration for every column using default - * values for the missing configuration properties. - * - * @param {number} columnCount - * @param {object} columns - * @param {object} columnDefault - * @returns {object} - */ -const makeColumns = (columnCount, columns = {}, columnDefault = {}) => { - for (let index = 0; index < columnCount; index++) { - if (typeof columns[index] === 'undefined') { - columns[index] = {}; - } - - columns[index] = Object.assign({ - alignment: 'left', - paddingLeft: 1, - paddingRight: 1, - truncate: Number.POSITIVE_INFINITY, - wrapWord: false, - }, columnDefault, columns[index]); - } - - return columns; -}; - -/** - * @typedef {object} columnConfig - * @property {string} alignment - * @property {number} width - * @property {number} truncate - * @property {number} paddingLeft - * @property {number} paddingRight - */ - -/** - * @typedef {object} streamConfig - * @property {columnConfig} columnDefault - * @property {object} border - * @property {columnConfig[]} - * @property {number} columnCount Number of columns in the table (required). - */ - -/** - * Makes a new configuration object out of the userConfig object - * using default values for the missing configuration properties. - * - * @param {streamConfig} userConfig - * @returns {object} - */ -export default (userConfig = {}) => { - validateConfig('streamConfig.json', userConfig); - - const config = cloneDeep(userConfig); - - if (!config.columnDefault || !config.columnDefault.width) { - throw new Error('Must provide config.columnDefault.width when creating a stream.'); - } - - if (!config.columnCount) { - throw new Error('Must provide config.columnCount.'); - } - - config.border = makeBorder(config.border); - config.columns = makeColumns(config.columnCount, config.columns, config.columnDefault); - - return config; -}; diff --git a/node_modules/table/dist/mapDataUsingRowHeightIndex.js b/node_modules/table/dist/mapDataUsingRowHeightIndex.js deleted file mode 100644 index 170857075..000000000 --- a/node_modules/table/dist/mapDataUsingRowHeightIndex.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _lodash = _interopRequireDefault(require("lodash.flatten")); - -var _wrapCell = _interopRequireDefault(require("./wrapCell")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {Array} unmappedRows - * @param {number[]} rowHeightIndex - * @param {object} config - * @returns {Array} - */ -const mapDataUsingRowHeightIndex = (unmappedRows, rowHeightIndex, config) => { - const tableWidth = unmappedRows[0].length; - const mappedRows = unmappedRows.map((cells, index0) => { - const rowHeight = Array.from(new Array(rowHeightIndex[index0]), () => { - return new Array(tableWidth).fill(''); - }); // rowHeight - // [{row index within rowSaw; index2}] - // [{cell index within a virtual row; index1}] - - cells.forEach((value, index1) => { - const cellLines = (0, _wrapCell.default)(value, config.columns[index1].width, config.columns[index1].wrapWord); - cellLines.forEach((cellLine, index2) => { - rowHeight[index2][index1] = cellLine; - }); - }); - return rowHeight; - }); - return (0, _lodash.default)(mappedRows); -}; - -var _default = mapDataUsingRowHeightIndex; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow b/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow deleted file mode 100644 index 5d59b059a..000000000 --- a/node_modules/table/dist/mapDataUsingRowHeightIndex.js.flow +++ /dev/null @@ -1,34 +0,0 @@ -import flatten from 'lodash.flatten'; -import wrapCell from './wrapCell'; - -/** - * @param {Array} unmappedRows - * @param {number[]} rowHeightIndex - * @param {object} config - * @returns {Array} - */ -export default (unmappedRows, rowHeightIndex, config) => { - const tableWidth = unmappedRows[0].length; - - const mappedRows = unmappedRows.map((cells, index0) => { - const rowHeight = Array.from(new Array(rowHeightIndex[index0]), () => { - return new Array(tableWidth).fill(''); - }); - - // rowHeight - // [{row index within rowSaw; index2}] - // [{cell index within a virtual row; index1}] - - cells.forEach((value, index1) => { - const cellLines = wrapCell(value, config.columns[index1].width, config.columns[index1].wrapWord); - - cellLines.forEach((cellLine, index2) => { - rowHeight[index2][index1] = cellLine; - }); - }); - - return rowHeight; - }); - - return flatten(mappedRows); -}; diff --git a/node_modules/table/dist/padTableData.js b/node_modules/table/dist/padTableData.js deleted file mode 100644 index 4b7fd4dfe..000000000 --- a/node_modules/table/dist/padTableData.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/** - * @param {table~row[]} rows - * @param {object} config - * @returns {table~row[]} - */ -const padTableData = (rows, config) => { - return rows.map(cells => { - return cells.map((value, index1) => { - const column = config.columns[index1]; - return ' '.repeat(column.paddingLeft) + value + ' '.repeat(column.paddingRight); - }); - }); -}; - -var _default = padTableData; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/padTableData.js.flow b/node_modules/table/dist/padTableData.js.flow deleted file mode 100644 index a4e6b142c..000000000 --- a/node_modules/table/dist/padTableData.js.flow +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @param {table~row[]} rows - * @param {object} config - * @returns {table~row[]} - */ -export default (rows, config) => { - return rows.map((cells) => { - return cells.map((value, index1) => { - const column = config.columns[index1]; - - return ' '.repeat(column.paddingLeft) + value + ' '.repeat(column.paddingRight); - }); - }); -}; diff --git a/node_modules/table/dist/schemas/config.json b/node_modules/table/dist/schemas/config.json deleted file mode 100644 index 10fc74ab9..000000000 --- a/node_modules/table/dist/schemas/config.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$id": "config.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "border": { - "$ref": "shared.json#/definitions/borders" - }, - "columns": { - "$ref": "shared.json#/definitions/columns" - }, - "columnDefault": { - "$ref": "shared.json#/definitions/column" - }, - "drawHorizontalLine": { - "typeof": "function" - }, - "singleLine": { - "typeof": "boolean" - } - }, - "additionalProperties": false -} diff --git a/node_modules/table/dist/schemas/shared.json b/node_modules/table/dist/schemas/shared.json deleted file mode 100644 index 7d03f9269..000000000 --- a/node_modules/table/dist/schemas/shared.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$id": "shared.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "columns": { - "type": "object", - "patternProperties": { - "^[0-9]+$": { - "$ref": "#/definitions/column" - } - }, - "additionalProperties": false - }, - "column": { - "type": "object", - "properties": { - "alignment": { - "type": "string", - "enum": [ - "left", - "right", - "center" - ] - }, - "width": { - "type": "number" - }, - "wrapWord": { - "type": "boolean" - }, - "truncate": { - "type": "number" - }, - "paddingLeft": { - "type": "number" - }, - "paddingRight": { - "type": "number" - } - }, - "additionalProperties": false - }, - "borders": { - "type": "object", - "properties": { - "topBody": { - "$ref": "#/definitions/border" - }, - "topJoin": { - "$ref": "#/definitions/border" - }, - "topLeft": { - "$ref": "#/definitions/border" - }, - "topRight": { - "$ref": "#/definitions/border" - }, - "bottomBody": { - "$ref": "#/definitions/border" - }, - "bottomJoin": { - "$ref": "#/definitions/border" - }, - "bottomLeft": { - "$ref": "#/definitions/border" - }, - "bottomRight": { - "$ref": "#/definitions/border" - }, - "bodyLeft": { - "$ref": "#/definitions/border" - }, - "bodyRight": { - "$ref": "#/definitions/border" - }, - "bodyJoin": { - "$ref": "#/definitions/border" - }, - "joinBody": { - "$ref": "#/definitions/border" - }, - "joinLeft": { - "$ref": "#/definitions/border" - }, - "joinRight": { - "$ref": "#/definitions/border" - }, - "joinJoin": { - "$ref": "#/definitions/border" - } - }, - "additionalProperties": false - }, - "border": { - "type": "string" - } - } -} diff --git a/node_modules/table/dist/schemas/streamConfig.json b/node_modules/table/dist/schemas/streamConfig.json deleted file mode 100644 index 24dfa5628..000000000 --- a/node_modules/table/dist/schemas/streamConfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$id": "streamConfig.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "border": { - "$ref": "shared.json#/definitions/borders" - }, - "columns": { - "$ref": "shared.json#/definitions/columns" - }, - "columnDefault": { - "$ref": "shared.json#/definitions/column" - }, - "columnCount": { - "type": "number" - } - }, - "additionalProperties": false -} diff --git a/node_modules/table/dist/stringifyTableData.js b/node_modules/table/dist/stringifyTableData.js deleted file mode 100644 index 99640e165..000000000 --- a/node_modules/table/dist/stringifyTableData.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/** - * Casts all cell values to a string. - * - * @param {table~row[]} rows - * @returns {table~row[]} - */ -const stringifyTableData = rows => { - return rows.map(cells => { - return cells.map(String); - }); -}; - -var _default = stringifyTableData; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/stringifyTableData.js.flow b/node_modules/table/dist/stringifyTableData.js.flow deleted file mode 100644 index a4dffac13..000000000 --- a/node_modules/table/dist/stringifyTableData.js.flow +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Casts all cell values to a string. - * - * @param {table~row[]} rows - * @returns {table~row[]} - */ -export default (rows) => { - return rows.map((cells) => { - return cells.map(String); - }); -}; diff --git a/node_modules/table/dist/table.js b/node_modules/table/dist/table.js deleted file mode 100644 index 8c053d81f..000000000 --- a/node_modules/table/dist/table.js +++ /dev/null @@ -1,109 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _alignTableData = _interopRequireDefault(require("./alignTableData")); - -var _calculateCellWidthIndex = _interopRequireDefault(require("./calculateCellWidthIndex")); - -var _calculateRowHeightIndex = _interopRequireDefault(require("./calculateRowHeightIndex")); - -var _drawTable = _interopRequireDefault(require("./drawTable")); - -var _makeConfig = _interopRequireDefault(require("./makeConfig")); - -var _mapDataUsingRowHeightIndex = _interopRequireDefault(require("./mapDataUsingRowHeightIndex")); - -var _padTableData = _interopRequireDefault(require("./padTableData")); - -var _stringifyTableData = _interopRequireDefault(require("./stringifyTableData")); - -var _truncateTableData = _interopRequireDefault(require("./truncateTableData")); - -var _validateTableData = _interopRequireDefault(require("./validateTableData")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @typedef {string} table~cell - */ - -/** - * @typedef {table~cell[]} table~row - */ - -/** - * @typedef {object} table~columns - * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). - * @property {number} width Column width (default: auto). - * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). - * @property {boolean} wrapWord When true the text is broken at the nearest space or one of the special characters - * @property {number} paddingLeft Cell content padding width left (default: 1). - * @property {number} paddingRight Cell content padding width right (default: 1). - */ - -/** - * @typedef {object} table~border - * @property {string} topBody - * @property {string} topJoin - * @property {string} topLeft - * @property {string} topRight - * @property {string} bottomBody - * @property {string} bottomJoin - * @property {string} bottomLeft - * @property {string} bottomRight - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - * @property {string} joinBody - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinJoin - */ - -/** - * Used to tell whether to draw a horizontal line. - * This callback is called for each non-content line of the table. - * The default behavior is to always return true. - * - * @typedef {Function} drawHorizontalLine - * @param {number} index - * @param {number} size - * @returns {boolean} - */ - -/** - * @typedef {object} table~config - * @property {table~border} border - * @property {table~columns[]} columns Column specific configuration. - * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. - * @property {table~drawHorizontalLine} drawHorizontalLine - * @property {table~singleLine} singleLine Horizontal lines inside the table are not drawn. - */ - -/** - * Generates a text table. - * - * @param {table~row[]} data - * @param {table~config} userConfig - * @returns {string} - */ -const table = (data, userConfig = {}) => { - let rows; - (0, _validateTableData.default)(data); - rows = (0, _stringifyTableData.default)(data); - const config = (0, _makeConfig.default)(rows, userConfig); - rows = (0, _truncateTableData.default)(data, config); - const rowHeightIndex = (0, _calculateRowHeightIndex.default)(rows, config); - rows = (0, _mapDataUsingRowHeightIndex.default)(rows, rowHeightIndex, config); - rows = (0, _alignTableData.default)(rows, config); - rows = (0, _padTableData.default)(rows, config); - const cellWidthIndex = (0, _calculateCellWidthIndex.default)(rows[0]); - return (0, _drawTable.default)(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine); -}; - -var _default = table; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/table.js.flow b/node_modules/table/dist/table.js.flow deleted file mode 100644 index 6790e8cc5..000000000 --- a/node_modules/table/dist/table.js.flow +++ /dev/null @@ -1,96 +0,0 @@ -import alignTableData from './alignTableData'; -import calculateCellWidthIndex from './calculateCellWidthIndex'; -import calculateRowHeightIndex from './calculateRowHeightIndex'; -import drawTable from './drawTable'; -import makeConfig from './makeConfig'; -import mapDataUsingRowHeightIndex from './mapDataUsingRowHeightIndex'; -import padTableData from './padTableData'; -import stringifyTableData from './stringifyTableData'; -import truncateTableData from './truncateTableData'; -import validateTableData from './validateTableData'; - -/** - * @typedef {string} table~cell - */ - -/** - * @typedef {table~cell[]} table~row - */ - -/** - * @typedef {object} table~columns - * @property {string} alignment Cell content alignment (enum: left, center, right) (default: left). - * @property {number} width Column width (default: auto). - * @property {number} truncate Number of characters are which the content will be truncated (default: Infinity). - * @property {boolean} wrapWord When true the text is broken at the nearest space or one of the special characters - * @property {number} paddingLeft Cell content padding width left (default: 1). - * @property {number} paddingRight Cell content padding width right (default: 1). - */ - -/** - * @typedef {object} table~border - * @property {string} topBody - * @property {string} topJoin - * @property {string} topLeft - * @property {string} topRight - * @property {string} bottomBody - * @property {string} bottomJoin - * @property {string} bottomLeft - * @property {string} bottomRight - * @property {string} bodyLeft - * @property {string} bodyRight - * @property {string} bodyJoin - * @property {string} joinBody - * @property {string} joinLeft - * @property {string} joinRight - * @property {string} joinJoin - */ - -/** - * Used to tell whether to draw a horizontal line. - * This callback is called for each non-content line of the table. - * The default behavior is to always return true. - * - * @typedef {Function} drawHorizontalLine - * @param {number} index - * @param {number} size - * @returns {boolean} - */ - -/** - * @typedef {object} table~config - * @property {table~border} border - * @property {table~columns[]} columns Column specific configuration. - * @property {table~columns} columnDefault Default values for all columns. Column specific settings overwrite the default values. - * @property {table~drawHorizontalLine} drawHorizontalLine - * @property {table~singleLine} singleLine Horizontal lines inside the table are not drawn. - */ - -/** - * Generates a text table. - * - * @param {table~row[]} data - * @param {table~config} userConfig - * @returns {string} - */ -export default (data, userConfig = {}) => { - let rows; - - validateTableData(data); - - rows = stringifyTableData(data); - - const config = makeConfig(rows, userConfig); - - rows = truncateTableData(data, config); - - const rowHeightIndex = calculateRowHeightIndex(rows, config); - - rows = mapDataUsingRowHeightIndex(rows, rowHeightIndex, config); - rows = alignTableData(rows, config); - rows = padTableData(rows, config); - - const cellWidthIndex = calculateCellWidthIndex(rows[0]); - - return drawTable(rows, config.border, cellWidthIndex, rowHeightIndex, config.drawHorizontalLine, config.singleLine); -}; diff --git a/node_modules/table/dist/truncateTableData.js b/node_modules/table/dist/truncateTableData.js deleted file mode 100644 index 72f8bfd8d..000000000 --- a/node_modules/table/dist/truncateTableData.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _lodash = _interopRequireDefault(require("lodash.truncate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @todo Make it work with ASCII content. - * @param {table~row[]} rows - * @param {object} config - * @returns {table~row[]} - */ -const truncateTableData = (rows, config) => { - return rows.map(cells => { - return cells.map((content, index) => { - return (0, _lodash.default)(content, { - length: config.columns[index].truncate - }); - }); - }); -}; - -var _default = truncateTableData; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/truncateTableData.js.flow b/node_modules/table/dist/truncateTableData.js.flow deleted file mode 100644 index e78b7ec78..000000000 --- a/node_modules/table/dist/truncateTableData.js.flow +++ /dev/null @@ -1,17 +0,0 @@ -import truncate from 'lodash.truncate'; - -/** - * @todo Make it work with ASCII content. - * @param {table~row[]} rows - * @param {object} config - * @returns {table~row[]} - */ -export default (rows, config) => { - return rows.map((cells) => { - return cells.map((content, index) => { - return truncate(content, { - length: config.columns[index].truncate, - }); - }); - }); -}; diff --git a/node_modules/table/dist/validateConfig.js b/node_modules/table/dist/validateConfig.js deleted file mode 100644 index b01a94b54..000000000 --- a/node_modules/table/dist/validateConfig.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _validators = _interopRequireDefault(require("../dist/validators")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {string} schemaId - * @param {formatData~config} config - * @returns {undefined} - */ -const validateConfig = (schemaId, config = {}) => { - const validate = _validators.default[schemaId]; - - if (!validate(config)) { - const errors = validate.errors.map(error => { - return { - dataPath: error.dataPath, - message: error.message, - params: error.params, - schemaPath: error.schemaPath - }; - }); - /* eslint-disable no-console */ - - console.log('config', config); - console.log('errors', errors); - /* eslint-enable no-console */ - - throw new Error('Invalid config.'); - } -}; - -var _default = validateConfig; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/validateConfig.js.flow b/node_modules/table/dist/validateConfig.js.flow deleted file mode 100644 index 2873880b7..000000000 --- a/node_modules/table/dist/validateConfig.js.flow +++ /dev/null @@ -1,27 +0,0 @@ -import validators from '../dist/validators'; - -/** - * @param {string} schemaId - * @param {formatData~config} config - * @returns {undefined} - */ -export default (schemaId, config = {}) => { - const validate = validators[schemaId]; - if (!validate(config)) { - const errors = validate.errors.map((error) => { - return { - dataPath: error.dataPath, - message: error.message, - params: error.params, - schemaPath: error.schemaPath, - }; - }); - - /* eslint-disable no-console */ - console.log('config', config); - console.log('errors', errors); - /* eslint-enable no-console */ - - throw new Error('Invalid config.'); - } -}; diff --git a/node_modules/table/dist/validateTableData.js b/node_modules/table/dist/validateTableData.js deleted file mode 100644 index d80c2e266..000000000 --- a/node_modules/table/dist/validateTableData.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -/** - * @typedef {string} cell - */ - -/** - * @typedef {cell[]} validateData~column - */ - -/** - * @param {column[]} rows - * @returns {undefined} - */ -const validateTableData = rows => { - if (!Array.isArray(rows)) { - throw new TypeError('Table data must be an array.'); - } - - if (rows.length === 0) { - throw new Error('Table must define at least one row.'); - } - - if (rows[0].length === 0) { - throw new Error('Table must define at least one column.'); - } - - const columnNumber = rows[0].length; - - for (const cells of rows) { - if (!Array.isArray(cells)) { - throw new TypeError('Table row data must be an array.'); - } - - if (cells.length !== columnNumber) { - throw new Error('Table must have a consistent number of cells.'); - } - - for (const cell of cells) { - // eslint-disable-next-line no-control-regex - if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { - throw new Error('Table data must not contain control characters.'); - } - } - } -}; - -var _default = validateTableData; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/validateTableData.js.flow b/node_modules/table/dist/validateTableData.js.flow deleted file mode 100644 index dcc7fc1d1..000000000 --- a/node_modules/table/dist/validateTableData.js.flow +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @typedef {string} cell - */ - -/** - * @typedef {cell[]} validateData~column - */ - -/** - * @param {column[]} rows - * @returns {undefined} - */ -export default (rows) => { - if (!Array.isArray(rows)) { - throw new TypeError('Table data must be an array.'); - } - - if (rows.length === 0) { - throw new Error('Table must define at least one row.'); - } - - if (rows[0].length === 0) { - throw new Error('Table must define at least one column.'); - } - - const columnNumber = rows[0].length; - - for (const cells of rows) { - if (!Array.isArray(cells)) { - throw new TypeError('Table row data must be an array.'); - } - - if (cells.length !== columnNumber) { - throw new Error('Table must have a consistent number of cells.'); - } - - for (const cell of cells) { - // eslint-disable-next-line no-control-regex - if (/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test(cell)) { - throw new Error('Table data must not contain control characters.'); - } - } - } -}; diff --git a/node_modules/table/dist/validators.js b/node_modules/table/dist/validators.js deleted file mode 100644 index 51783aa08..000000000 --- a/node_modules/table/dist/validators.js +++ /dev/null @@ -1,1493 +0,0 @@ -"use strict"; -exports["config.json"] = validate43; -const schema13 = { - "$id": "config.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "border": { - "$ref": "shared.json#/definitions/borders" - }, - "columns": { - "$ref": "shared.json#/definitions/columns" - }, - "columnDefault": { - "$ref": "shared.json#/definitions/column" - }, - "drawHorizontalLine": { - "typeof": "function" - }, - "singleLine": { - "typeof": "boolean" - } - }, - "additionalProperties": false -}; -const schema15 = { - "type": "object", - "properties": { - "topBody": { - "$ref": "#/definitions/border" - }, - "topJoin": { - "$ref": "#/definitions/border" - }, - "topLeft": { - "$ref": "#/definitions/border" - }, - "topRight": { - "$ref": "#/definitions/border" - }, - "bottomBody": { - "$ref": "#/definitions/border" - }, - "bottomJoin": { - "$ref": "#/definitions/border" - }, - "bottomLeft": { - "$ref": "#/definitions/border" - }, - "bottomRight": { - "$ref": "#/definitions/border" - }, - "bodyLeft": { - "$ref": "#/definitions/border" - }, - "bodyRight": { - "$ref": "#/definitions/border" - }, - "bodyJoin": { - "$ref": "#/definitions/border" - }, - "joinBody": { - "$ref": "#/definitions/border" - }, - "joinLeft": { - "$ref": "#/definitions/border" - }, - "joinRight": { - "$ref": "#/definitions/border" - }, - "joinJoin": { - "$ref": "#/definitions/border" - } - }, - "additionalProperties": false -}; -const func8 = Object.prototype.hasOwnProperty; -const schema16 = { - "type": "string" -}; - -function validate46(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (typeof data !== "string") { - const err0 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "string" - }, - message: "must be string" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - validate46.errors = vErrors; - return errors === 0; -} - -function validate45(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!(func8.call(schema15.properties, key0))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.topBody !== undefined) { - if (!(validate46(data.topBody, { - instancePath: instancePath + "/topBody", - parentData: data, - parentDataProperty: "topBody", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.topJoin !== undefined) { - if (!(validate46(data.topJoin, { - instancePath: instancePath + "/topJoin", - parentData: data, - parentDataProperty: "topJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.topLeft !== undefined) { - if (!(validate46(data.topLeft, { - instancePath: instancePath + "/topLeft", - parentData: data, - parentDataProperty: "topLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.topRight !== undefined) { - if (!(validate46(data.topRight, { - instancePath: instancePath + "/topRight", - parentData: data, - parentDataProperty: "topRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomBody !== undefined) { - if (!(validate46(data.bottomBody, { - instancePath: instancePath + "/bottomBody", - parentData: data, - parentDataProperty: "bottomBody", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomJoin !== undefined) { - if (!(validate46(data.bottomJoin, { - instancePath: instancePath + "/bottomJoin", - parentData: data, - parentDataProperty: "bottomJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomLeft !== undefined) { - if (!(validate46(data.bottomLeft, { - instancePath: instancePath + "/bottomLeft", - parentData: data, - parentDataProperty: "bottomLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomRight !== undefined) { - if (!(validate46(data.bottomRight, { - instancePath: instancePath + "/bottomRight", - parentData: data, - parentDataProperty: "bottomRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bodyLeft !== undefined) { - if (!(validate46(data.bodyLeft, { - instancePath: instancePath + "/bodyLeft", - parentData: data, - parentDataProperty: "bodyLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bodyRight !== undefined) { - if (!(validate46(data.bodyRight, { - instancePath: instancePath + "/bodyRight", - parentData: data, - parentDataProperty: "bodyRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bodyJoin !== undefined) { - if (!(validate46(data.bodyJoin, { - instancePath: instancePath + "/bodyJoin", - parentData: data, - parentDataProperty: "bodyJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinBody !== undefined) { - if (!(validate46(data.joinBody, { - instancePath: instancePath + "/joinBody", - parentData: data, - parentDataProperty: "joinBody", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinLeft !== undefined) { - if (!(validate46(data.joinLeft, { - instancePath: instancePath + "/joinLeft", - parentData: data, - parentDataProperty: "joinLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinRight !== undefined) { - if (!(validate46(data.joinRight, { - instancePath: instancePath + "/joinRight", - parentData: data, - parentDataProperty: "joinRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinJoin !== undefined) { - if (!(validate46(data.joinJoin, { - instancePath: instancePath + "/joinJoin", - parentData: data, - parentDataProperty: "joinJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - } else { - const err1 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - validate45.errors = vErrors; - return errors === 0; -} -const schema17 = { - "type": "object", - "patternProperties": { - "^[0-9]+$": { - "$ref": "#/definitions/column" - } - }, - "additionalProperties": false -}; -const pattern0 = new RegExp("^[0-9]+$", "u"); -const schema18 = { - "type": "object", - "properties": { - "alignment": { - "type": "string", - "enum": ["left", "right", "center"] - }, - "width": { - "type": "number" - }, - "wrapWord": { - "type": "boolean" - }, - "truncate": { - "type": "number" - }, - "paddingLeft": { - "type": "number" - }, - "paddingRight": { - "type": "number" - } - }, - "additionalProperties": false -}; -const func0 = require("ajv/dist/runtime/equal").default; - -function validate64(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!((((((key0 === "alignment") || (key0 === "width")) || (key0 === "wrapWord")) || (key0 === "truncate")) || (key0 === "paddingLeft")) || (key0 === "paddingRight"))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.alignment !== undefined) { - let data0 = data.alignment; - if (typeof data0 !== "string") { - const err1 = { - instancePath: instancePath + "/alignment", - schemaPath: "#/properties/alignment/type", - keyword: "type", - params: { - type: "string" - }, - message: "must be string" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - if (!(((data0 === "left") || (data0 === "right")) || (data0 === "center"))) { - const err2 = { - instancePath: instancePath + "/alignment", - schemaPath: "#/properties/alignment/enum", - keyword: "enum", - params: { - allowedValues: schema18.properties.alignment.enum - }, - message: "must be equal to one of the allowed values" - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - if (data.width !== undefined) { - let data1 = data.width; - if (!((typeof data1 == "number") && (isFinite(data1)))) { - const err3 = { - instancePath: instancePath + "/width", - schemaPath: "#/properties/width/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - } - if (data.wrapWord !== undefined) { - if (typeof data.wrapWord !== "boolean") { - const err4 = { - instancePath: instancePath + "/wrapWord", - schemaPath: "#/properties/wrapWord/type", - keyword: "type", - params: { - type: "boolean" - }, - message: "must be boolean" - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - } - if (data.truncate !== undefined) { - let data3 = data.truncate; - if (!((typeof data3 == "number") && (isFinite(data3)))) { - const err5 = { - instancePath: instancePath + "/truncate", - schemaPath: "#/properties/truncate/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - } - if (data.paddingLeft !== undefined) { - let data4 = data.paddingLeft; - if (!((typeof data4 == "number") && (isFinite(data4)))) { - const err6 = { - instancePath: instancePath + "/paddingLeft", - schemaPath: "#/properties/paddingLeft/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - if (data.paddingRight !== undefined) { - let data5 = data.paddingRight; - if (!((typeof data5 == "number") && (isFinite(data5)))) { - const err7 = { - instancePath: instancePath + "/paddingRight", - schemaPath: "#/properties/paddingRight/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } - } else { - const err8 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - validate64.errors = vErrors; - return errors === 0; -} - -function validate63(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!(pattern0.test(key0))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - for (const key1 in data) { - if (pattern0.test(key1)) { - if (!(validate64(data[key1], { - instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), - parentData: data, - parentDataProperty: key1, - rootData - }))) { - vErrors = vErrors === null ? validate64.errors : vErrors.concat(validate64.errors); - errors = vErrors.length; - } - } - } - } else { - const err1 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - validate63.errors = vErrors; - return errors === 0; -} - -function validate67(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!((((((key0 === "alignment") || (key0 === "width")) || (key0 === "wrapWord")) || (key0 === "truncate")) || (key0 === "paddingLeft")) || (key0 === "paddingRight"))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.alignment !== undefined) { - let data0 = data.alignment; - if (typeof data0 !== "string") { - const err1 = { - instancePath: instancePath + "/alignment", - schemaPath: "#/properties/alignment/type", - keyword: "type", - params: { - type: "string" - }, - message: "must be string" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - if (!(((data0 === "left") || (data0 === "right")) || (data0 === "center"))) { - const err2 = { - instancePath: instancePath + "/alignment", - schemaPath: "#/properties/alignment/enum", - keyword: "enum", - params: { - allowedValues: schema18.properties.alignment.enum - }, - message: "must be equal to one of the allowed values" - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - if (data.width !== undefined) { - let data1 = data.width; - if (!((typeof data1 == "number") && (isFinite(data1)))) { - const err3 = { - instancePath: instancePath + "/width", - schemaPath: "#/properties/width/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - } - if (data.wrapWord !== undefined) { - if (typeof data.wrapWord !== "boolean") { - const err4 = { - instancePath: instancePath + "/wrapWord", - schemaPath: "#/properties/wrapWord/type", - keyword: "type", - params: { - type: "boolean" - }, - message: "must be boolean" - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - } - if (data.truncate !== undefined) { - let data3 = data.truncate; - if (!((typeof data3 == "number") && (isFinite(data3)))) { - const err5 = { - instancePath: instancePath + "/truncate", - schemaPath: "#/properties/truncate/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - } - if (data.paddingLeft !== undefined) { - let data4 = data.paddingLeft; - if (!((typeof data4 == "number") && (isFinite(data4)))) { - const err6 = { - instancePath: instancePath + "/paddingLeft", - schemaPath: "#/properties/paddingLeft/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - if (data.paddingRight !== undefined) { - let data5 = data.paddingRight; - if (!((typeof data5 == "number") && (isFinite(data5)))) { - const err7 = { - instancePath: instancePath + "/paddingRight", - schemaPath: "#/properties/paddingRight/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } - } else { - const err8 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - validate67.errors = vErrors; - return errors === 0; -} - -function validate43(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - /*# sourceURL="config.json" */ ; - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!(((((key0 === "border") || (key0 === "columns")) || (key0 === "columnDefault")) || (key0 === "drawHorizontalLine")) || (key0 === "singleLine"))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.border !== undefined) { - if (!(validate45(data.border, { - instancePath: instancePath + "/border", - parentData: data, - parentDataProperty: "border", - rootData - }))) { - vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors); - errors = vErrors.length; - } - } - if (data.columns !== undefined) { - if (!(validate63(data.columns, { - instancePath: instancePath + "/columns", - parentData: data, - parentDataProperty: "columns", - rootData - }))) { - vErrors = vErrors === null ? validate63.errors : vErrors.concat(validate63.errors); - errors = vErrors.length; - } - } - if (data.columnDefault !== undefined) { - if (!(validate67(data.columnDefault, { - instancePath: instancePath + "/columnDefault", - parentData: data, - parentDataProperty: "columnDefault", - rootData - }))) { - vErrors = vErrors === null ? validate67.errors : vErrors.concat(validate67.errors); - errors = vErrors.length; - } - } - if (data.drawHorizontalLine !== undefined) { - if (typeof data.drawHorizontalLine != "function") { - const err1 = { - instancePath: instancePath + "/drawHorizontalLine", - schemaPath: "#/properties/drawHorizontalLine/typeof", - keyword: "typeof", - params: {}, - message: "should pass \"typeof\" keyword validation" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } - if (data.singleLine !== undefined) { - if (typeof data.singleLine != "boolean") { - const err2 = { - instancePath: instancePath + "/singleLine", - schemaPath: "#/properties/singleLine/typeof", - keyword: "typeof", - params: {}, - message: "should pass \"typeof\" keyword validation" - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - } else { - const err3 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - validate43.errors = vErrors; - return errors === 0; -} -exports["streamConfig.json"] = validate69; -const schema20 = { - "$id": "streamConfig.json", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "properties": { - "border": { - "$ref": "shared.json#/definitions/borders" - }, - "columns": { - "$ref": "shared.json#/definitions/columns" - }, - "columnDefault": { - "$ref": "shared.json#/definitions/column" - }, - "columnCount": { - "type": "number" - } - }, - "additionalProperties": false -}; - -function validate70(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!(func8.call(schema15.properties, key0))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.topBody !== undefined) { - if (!(validate46(data.topBody, { - instancePath: instancePath + "/topBody", - parentData: data, - parentDataProperty: "topBody", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.topJoin !== undefined) { - if (!(validate46(data.topJoin, { - instancePath: instancePath + "/topJoin", - parentData: data, - parentDataProperty: "topJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.topLeft !== undefined) { - if (!(validate46(data.topLeft, { - instancePath: instancePath + "/topLeft", - parentData: data, - parentDataProperty: "topLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.topRight !== undefined) { - if (!(validate46(data.topRight, { - instancePath: instancePath + "/topRight", - parentData: data, - parentDataProperty: "topRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomBody !== undefined) { - if (!(validate46(data.bottomBody, { - instancePath: instancePath + "/bottomBody", - parentData: data, - parentDataProperty: "bottomBody", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomJoin !== undefined) { - if (!(validate46(data.bottomJoin, { - instancePath: instancePath + "/bottomJoin", - parentData: data, - parentDataProperty: "bottomJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomLeft !== undefined) { - if (!(validate46(data.bottomLeft, { - instancePath: instancePath + "/bottomLeft", - parentData: data, - parentDataProperty: "bottomLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bottomRight !== undefined) { - if (!(validate46(data.bottomRight, { - instancePath: instancePath + "/bottomRight", - parentData: data, - parentDataProperty: "bottomRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bodyLeft !== undefined) { - if (!(validate46(data.bodyLeft, { - instancePath: instancePath + "/bodyLeft", - parentData: data, - parentDataProperty: "bodyLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bodyRight !== undefined) { - if (!(validate46(data.bodyRight, { - instancePath: instancePath + "/bodyRight", - parentData: data, - parentDataProperty: "bodyRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.bodyJoin !== undefined) { - if (!(validate46(data.bodyJoin, { - instancePath: instancePath + "/bodyJoin", - parentData: data, - parentDataProperty: "bodyJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinBody !== undefined) { - if (!(validate46(data.joinBody, { - instancePath: instancePath + "/joinBody", - parentData: data, - parentDataProperty: "joinBody", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinLeft !== undefined) { - if (!(validate46(data.joinLeft, { - instancePath: instancePath + "/joinLeft", - parentData: data, - parentDataProperty: "joinLeft", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinRight !== undefined) { - if (!(validate46(data.joinRight, { - instancePath: instancePath + "/joinRight", - parentData: data, - parentDataProperty: "joinRight", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - if (data.joinJoin !== undefined) { - if (!(validate46(data.joinJoin, { - instancePath: instancePath + "/joinJoin", - parentData: data, - parentDataProperty: "joinJoin", - rootData - }))) { - vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors); - errors = vErrors.length; - } - } - } else { - const err1 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - validate70.errors = vErrors; - return errors === 0; -} - -function validate87(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!(pattern0.test(key0))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - for (const key1 in data) { - if (pattern0.test(key1)) { - if (!(validate64(data[key1], { - instancePath: instancePath + "/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"), - parentData: data, - parentDataProperty: key1, - rootData - }))) { - vErrors = vErrors === null ? validate64.errors : vErrors.concat(validate64.errors); - errors = vErrors.length; - } - } - } - } else { - const err1 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - validate87.errors = vErrors; - return errors === 0; -} - -function validate90(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!((((((key0 === "alignment") || (key0 === "width")) || (key0 === "wrapWord")) || (key0 === "truncate")) || (key0 === "paddingLeft")) || (key0 === "paddingRight"))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.alignment !== undefined) { - let data0 = data.alignment; - if (typeof data0 !== "string") { - const err1 = { - instancePath: instancePath + "/alignment", - schemaPath: "#/properties/alignment/type", - keyword: "type", - params: { - type: "string" - }, - message: "must be string" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - if (!(((data0 === "left") || (data0 === "right")) || (data0 === "center"))) { - const err2 = { - instancePath: instancePath + "/alignment", - schemaPath: "#/properties/alignment/enum", - keyword: "enum", - params: { - allowedValues: schema18.properties.alignment.enum - }, - message: "must be equal to one of the allowed values" - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - } - if (data.width !== undefined) { - let data1 = data.width; - if (!((typeof data1 == "number") && (isFinite(data1)))) { - const err3 = { - instancePath: instancePath + "/width", - schemaPath: "#/properties/width/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err3]; - } else { - vErrors.push(err3); - } - errors++; - } - } - if (data.wrapWord !== undefined) { - if (typeof data.wrapWord !== "boolean") { - const err4 = { - instancePath: instancePath + "/wrapWord", - schemaPath: "#/properties/wrapWord/type", - keyword: "type", - params: { - type: "boolean" - }, - message: "must be boolean" - }; - if (vErrors === null) { - vErrors = [err4]; - } else { - vErrors.push(err4); - } - errors++; - } - } - if (data.truncate !== undefined) { - let data3 = data.truncate; - if (!((typeof data3 == "number") && (isFinite(data3)))) { - const err5 = { - instancePath: instancePath + "/truncate", - schemaPath: "#/properties/truncate/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err5]; - } else { - vErrors.push(err5); - } - errors++; - } - } - if (data.paddingLeft !== undefined) { - let data4 = data.paddingLeft; - if (!((typeof data4 == "number") && (isFinite(data4)))) { - const err6 = { - instancePath: instancePath + "/paddingLeft", - schemaPath: "#/properties/paddingLeft/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err6]; - } else { - vErrors.push(err6); - } - errors++; - } - } - if (data.paddingRight !== undefined) { - let data5 = data.paddingRight; - if (!((typeof data5 == "number") && (isFinite(data5)))) { - const err7 = { - instancePath: instancePath + "/paddingRight", - schemaPath: "#/properties/paddingRight/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err7]; - } else { - vErrors.push(err7); - } - errors++; - } - } - } else { - const err8 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err8]; - } else { - vErrors.push(err8); - } - errors++; - } - validate90.errors = vErrors; - return errors === 0; -} - -function validate69(data, { - instancePath = "", - parentData, - parentDataProperty, - rootData = data -} = {}) { - /*# sourceURL="streamConfig.json" */ ; - let vErrors = null; - let errors = 0; - if (data && typeof data == "object" && !Array.isArray(data)) { - for (const key0 in data) { - if (!((((key0 === "border") || (key0 === "columns")) || (key0 === "columnDefault")) || (key0 === "columnCount"))) { - const err0 = { - instancePath, - schemaPath: "#/additionalProperties", - keyword: "additionalProperties", - params: { - additionalProperty: key0 - }, - message: "must NOT have additional properties" - }; - if (vErrors === null) { - vErrors = [err0]; - } else { - vErrors.push(err0); - } - errors++; - } - } - if (data.border !== undefined) { - if (!(validate70(data.border, { - instancePath: instancePath + "/border", - parentData: data, - parentDataProperty: "border", - rootData - }))) { - vErrors = vErrors === null ? validate70.errors : vErrors.concat(validate70.errors); - errors = vErrors.length; - } - } - if (data.columns !== undefined) { - if (!(validate87(data.columns, { - instancePath: instancePath + "/columns", - parentData: data, - parentDataProperty: "columns", - rootData - }))) { - vErrors = vErrors === null ? validate87.errors : vErrors.concat(validate87.errors); - errors = vErrors.length; - } - } - if (data.columnDefault !== undefined) { - if (!(validate90(data.columnDefault, { - instancePath: instancePath + "/columnDefault", - parentData: data, - parentDataProperty: "columnDefault", - rootData - }))) { - vErrors = vErrors === null ? validate90.errors : vErrors.concat(validate90.errors); - errors = vErrors.length; - } - } - if (data.columnCount !== undefined) { - let data3 = data.columnCount; - if (!((typeof data3 == "number") && (isFinite(data3)))) { - const err1 = { - instancePath: instancePath + "/columnCount", - schemaPath: "#/properties/columnCount/type", - keyword: "type", - params: { - type: "number" - }, - message: "must be number" - }; - if (vErrors === null) { - vErrors = [err1]; - } else { - vErrors.push(err1); - } - errors++; - } - } - } else { - const err2 = { - instancePath, - schemaPath: "#/type", - keyword: "type", - params: { - type: "object" - }, - message: "must be object" - }; - if (vErrors === null) { - vErrors = [err2]; - } else { - vErrors.push(err2); - } - errors++; - } - validate69.errors = vErrors; - return errors === 0; -} \ No newline at end of file diff --git a/node_modules/table/dist/wrapCell.js b/node_modules/table/dist/wrapCell.js deleted file mode 100644 index 040787dde..000000000 --- a/node_modules/table/dist/wrapCell.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _wrapString = _interopRequireDefault(require("./wrapString")); - -var _wrapWord = _interopRequireDefault(require("./wrapWord")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Wrap a single cell value into a list of lines - * - * Always wraps on newlines, for the remainder uses either word or string wrapping - * depending on user configuration. - * - * @param {string} cellValue - * @param {number} columnWidth - * @param {boolean} useWrapWord - * @returns {Array} - */ -const wrapCell = (cellValue, columnWidth, useWrapWord) => { - // First split on literal newlines - const cellLines = cellValue.split('\n'); // Then iterate over the list and word-wrap every remaining line if necessary. - - for (let lineNr = 0; lineNr < cellLines.length;) { - let lineChunks; - - if (useWrapWord) { - lineChunks = (0, _wrapWord.default)(cellLines[lineNr], columnWidth); - } else { - lineChunks = (0, _wrapString.default)(cellLines[lineNr], columnWidth); - } // Replace our original array element with whatever the wrapping returned - - - cellLines.splice(lineNr, 1, ...lineChunks); - lineNr += lineChunks.length; - } - - return cellLines; -}; - -var _default = wrapCell; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/wrapCell.js.flow b/node_modules/table/dist/wrapCell.js.flow deleted file mode 100644 index 0c66260e2..000000000 --- a/node_modules/table/dist/wrapCell.js.flow +++ /dev/null @@ -1,35 +0,0 @@ -import wrapString from './wrapString'; -import wrapWord from './wrapWord'; - -/** - * Wrap a single cell value into a list of lines - * - * Always wraps on newlines, for the remainder uses either word or string wrapping - * depending on user configuration. - * - * @param {string} cellValue - * @param {number} columnWidth - * @param {boolean} useWrapWord - * @returns {Array} - */ -export default (cellValue, columnWidth, useWrapWord) => { - // First split on literal newlines - const cellLines = cellValue.split('\n'); - - // Then iterate over the list and word-wrap every remaining line if necessary. - for (let lineNr = 0; lineNr < cellLines.length;) { - let lineChunks; - - if (useWrapWord) { - lineChunks = wrapWord(cellLines[lineNr], columnWidth); - } else { - lineChunks = wrapString(cellLines[lineNr], columnWidth); - } - - // Replace our original array element with whatever the wrapping returned - cellLines.splice(lineNr, 1, ...lineChunks); - lineNr += lineChunks.length; - } - - return cellLines; -}; diff --git a/node_modules/table/dist/wrapString.js b/node_modules/table/dist/wrapString.js deleted file mode 100644 index f97f798c4..000000000 --- a/node_modules/table/dist/wrapString.js +++ /dev/null @@ -1,39 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _sliceAnsi = _interopRequireDefault(require("slice-ansi")); - -var _stringWidth = _interopRequireDefault(require("string-width")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Creates an array of strings split into groups the length of size. - * This function works with strings that contain ASCII characters. - * - * wrapText is different from would-be "chunk" implementation - * in that whitespace characters that occur on a chunk size limit are trimmed. - * - * @param {string} subject - * @param {number} size - * @returns {Array} - */ -const wrapString = (subject, size) => { - let subjectSlice; - subjectSlice = subject; - const chunks = []; - - do { - chunks.push((0, _sliceAnsi.default)(subjectSlice, 0, size)); - subjectSlice = (0, _sliceAnsi.default)(subjectSlice, size).trim(); - } while ((0, _stringWidth.default)(subjectSlice)); - - return chunks; -}; - -var _default = wrapString; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/wrapString.js.flow b/node_modules/table/dist/wrapString.js.flow deleted file mode 100644 index bbb40721e..000000000 --- a/node_modules/table/dist/wrapString.js.flow +++ /dev/null @@ -1,29 +0,0 @@ -import slice from 'slice-ansi'; -import stringWidth from 'string-width'; - -/** - * Creates an array of strings split into groups the length of size. - * This function works with strings that contain ASCII characters. - * - * wrapText is different from would-be "chunk" implementation - * in that whitespace characters that occur on a chunk size limit are trimmed. - * - * @param {string} subject - * @param {number} size - * @returns {Array} - */ -export default (subject, size) => { - let subjectSlice; - - subjectSlice = subject; - - const chunks = []; - - do { - chunks.push(slice(subjectSlice, 0, size)); - - subjectSlice = slice(subjectSlice, size).trim(); - } while (stringWidth(subjectSlice)); - - return chunks; -}; diff --git a/node_modules/table/dist/wrapWord.js b/node_modules/table/dist/wrapWord.js deleted file mode 100644 index 52a8095ab..000000000 --- a/node_modules/table/dist/wrapWord.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _sliceAnsi = _interopRequireDefault(require("slice-ansi")); - -var _stringWidth = _interopRequireDefault(require("string-width")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * @param {string} input - * @param {number} size - * @returns {Array} - */ -const wrapWord = (input, size) => { - let subject; - subject = input; - const chunks = []; // https://regex101.com/r/gY5kZ1/1 - - const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))'); - - do { - let chunk; - chunk = subject.match(re); - - if (chunk) { - chunk = chunk[0]; - subject = (0, _sliceAnsi.default)(subject, (0, _stringWidth.default)(chunk)); - chunk = chunk.trim(); - } else { - chunk = (0, _sliceAnsi.default)(subject, 0, size); - subject = (0, _sliceAnsi.default)(subject, size); - } - - chunks.push(chunk); - } while ((0, _stringWidth.default)(subject)); - - return chunks; -}; - -var _default = wrapWord; -exports.default = _default; \ No newline at end of file diff --git a/node_modules/table/dist/wrapWord.js.flow b/node_modules/table/dist/wrapWord.js.flow deleted file mode 100644 index 02a8d45ea..000000000 --- a/node_modules/table/dist/wrapWord.js.flow +++ /dev/null @@ -1,39 +0,0 @@ -import slice from 'slice-ansi'; -import stringWidth from 'string-width'; - -/** - * @param {string} input - * @param {number} size - * @returns {Array} - */ -export default (input, size) => { - let subject; - - subject = input; - - const chunks = []; - - // https://regex101.com/r/gY5kZ1/1 - const re = new RegExp('(^.{1,' + size + '}(\\s+|$))|(^.{1,' + (size - 1) + '}(\\\\|/|_|\\.|,|;|-))'); - - do { - let chunk; - - chunk = subject.match(re); - - if (chunk) { - chunk = chunk[0]; - - subject = slice(subject, stringWidth(chunk)); - - chunk = chunk.trim(); - } else { - chunk = slice(subject, 0, size); - subject = slice(subject, size); - } - - chunks.push(chunk); - } while (stringWidth(subject)); - - return chunks; -}; diff --git a/node_modules/table/node_modules/ajv/.runkit_example.js b/node_modules/table/node_modules/ajv/.runkit_example.js deleted file mode 100644 index 0d578d5d5..000000000 --- a/node_modules/table/node_modules/ajv/.runkit_example.js +++ /dev/null @@ -1,23 +0,0 @@ -const Ajv = require("ajv") -const ajv = new Ajv({allErrors: true}) - -const schema = { - type: "object", - properties: { - foo: {type: "string"}, - bar: {type: "number", maximum: 3}, - }, - required: ["foo", "bar"], - additionalProperties: false, -} - -const validate = ajv.compile(schema) - -test({foo: "abc", bar: 2}) -test({foo: 2, bar: 4}) - -function test(data) { - const valid = validate(data) - if (valid) console.log("Valid!") - else console.log("Invalid: " + ajv.errorsText(validate.errors)) -} diff --git a/node_modules/table/node_modules/ajv/LICENSE b/node_modules/table/node_modules/ajv/LICENSE deleted file mode 100644 index 139162ad2..000000000 --- a/node_modules/table/node_modules/ajv/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015-2021 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/node_modules/table/node_modules/ajv/README.md b/node_modules/table/node_modules/ajv/README.md deleted file mode 100644 index f9273a3fd..000000000 --- a/node_modules/table/node_modules/ajv/README.md +++ /dev/null @@ -1,181 +0,0 @@ -Ajv logo - -  - -# Ajv JSON schema validator - -The fastest JSON validator for Node.js and browser. - -Supports JSON Schema draft-06/07/2019-09/2020-12 (draft-04 is supported in [version 6](https://github.com/ajv-validator/ajv/tree/v6)) and JSON Type Definition [RFC8927](https://datatracker.ietf.org/doc/rfc8927/). - -[![build](https://github.com/ajv-validator/ajv/workflows/build/badge.svg)](https://github.com/ajv-validator/ajv/actions?query=workflow%3Abuild) -[![npm](https://img.shields.io/npm/v/ajv.svg)](https://www.npmjs.com/package/ajv) -[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) -[![Coverage Status](https://coveralls.io/repos/github/ajv-validator/ajv/badge.svg?branch=master)](https://coveralls.io/github/ajv-validator/ajv?branch=master) -[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) -[![GitHub Sponsors](https://img.shields.io/badge/$-sponsors-brightgreen)](https://github.com/sponsors/epoberezkin) - -## Platinum sponsors - -[](https://www.mozilla.org)[](https://opencollective.com/ajv) - -## Contributing - -More than 100 people contributed to Ajv, and we would love to have you join the development. We welcome implementing new features that will benefit many users and ideas to improve our documentation. - -Please review [Contributing guidelines](./CONTRIBUTING.md) and [Code components](https://ajv.js.org/components.html). - -## Documentation - -All documentation is available on the [Ajv website](https://ajv.js.org). - -Some useful site links: -- [Getting started](https://ajv.js.org/guide/getting-started.html) -- [JSON Schema vs JSON Type Definition](https://ajv.js.org/guide/schema-language.html) -- [API reference](https://ajv.js.org/api.html) -- [Strict mode](https://ajv.js.org/strict-mode.html) -- [Standalone validation code](https://ajv.js.org/standalone.html) -- [Security considerations](https://ajv.js.org/security.html) -- [Command line interface](https://ajv.js.org/packages/ajv-cli.html) -- [Frequently Asked Questions](https://ajv.js.org/faq.html) - -## Please [sponsor Ajv development](https://github.com/sponsors/epoberezkin) - -Since I asked to support Ajv development 40 people and 6 organizations contributed via GitHub and OpenCollective - this support helped receiving the MOSS grant! - -Your continuing support is very important - the funds will be used to develop and maintain Ajv once the next major version is released. - -Please sponsor Ajv via: - -- [GitHub sponsors page](https://github.com/sponsors/epoberezkin) (GitHub will match it) -- [Ajv Open Collective️](https://opencollective.com/ajv) - -Thank you. - -#### Open Collective sponsors - - - - - - - - - - - - - - -## Performance - -Ajv generates code to turn JSON Schemas into super-fast validation functions that are efficient for v8 optimization. - -Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: - -- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place -- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster -- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) -- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) - -Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): - -[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|djv|@cfworker/json-schema|jsonschema&chd=t:100,69.2,51.5,13.1,5.1,1.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) - -## Features - -- Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6): - - all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html)) - - [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions: - - NEW: keyword [discriminator](https://ajv.js.org/json-schema.md#discriminator). - - keyword [nullable](https://ajv.js.org/json-schema.md#nullable). - - full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available) - - support of recursive references between schemas - - correct string lengths for strings with unicode pairs - - JSON Schema [formats](https://ajv.js.org/guide/formats.html) (with [ajv-formats](https://github.com/ajv-validator/ajv-formats) plugin). - - [validates schemas against meta-schema](https://ajv.js.org/api.html#api-validateschema) -- NEW: supports [JSON Type Definition](https://datatracker.ietf.org/doc/rfc8927/): - - all keywords (see [JSON Type Definition schema forms](https://ajv.js.org/json-type-definition.html)) - - meta-schema for JTD schemas - - "union" keyword and user-defined keywords (can be used inside "metadata" member of the schema) -- supports [browsers](https://ajv.js.org/guide/environments.html#browsers) and Node.js 10.x - current -- [asynchronous loading](https://ajv.js.org/guide/managing-schemas.html#asynchronous-schema-loading) of referenced schemas during compilation -- "All errors" validation mode with [option allErrors](https://ajv.js.org/options.html#allerrors) -- [error messages with parameters](https://ajv.js.org/api.html#validation-errors) describing error reasons to allow error message generation -- i18n error messages support with [ajv-i18n](https://github.com/ajv-validator/ajv-i18n) package -- [removing-additional-properties](https://ajv.js.org/guide/modifying-data.html#removing-additional-properties) -- [assigning defaults](https://ajv.js.org/guide/modifying-data.html#assigning-defaults) to missing properties and items -- [coercing data](https://ajv.js.org/guide/modifying-data.html#coercing-data-types) to the types specified in `type` keywords -- [user-defined keywords](https://ajv.js.org/guide/user-keywords.html) -- additional extension keywords with [ajv-keywords](https://github.com/ajv-validator/ajv-keywords) package -- [\$data reference](https://ajv.js.org/guide/combining-schemas.html#data-reference) to use values from the validated data as values for the schema keywords -- [asynchronous validation](https://ajv.js.org/guide/async-validation.html) of user-defined formats and keywords - -## Install - -To install version 8: - -``` -npm install ajv -``` - -## Getting started - -Try it in the Node.js REPL: https://runkit.com/npm/ajv - -In JavaScript: - -```javascript -// or ESM/TypeScript import -import Ajv from "ajv" -// Node.js require: -const Ajv = require("ajv") - -const ajv = new Ajv() // options can be passed, e.g. {allErrors: true} - -const schema = { - type: "object", - properties: { - foo: {type: "integer"}, - bar: {type: "string"} - }, - required: ["foo"], - additionalProperties: false, -} - -const validate = ajv.compile(schema) -const valid = validate(data) -if (!valid) console.log(validate.errors) -``` - -Learn how to use Ajv and see more examples in the [Guide: getting started](https://ajv.js.org/guide/getting-started.html) - -## Changes history - -See [https://github.com/ajv-validator/ajv/releases](https://github.com/ajv-validator/ajv/releases) - -**Please note**: [Changes in version 8.0.0](https://github.com/ajv-validator/ajv/releases/tag/v8.0.0) - -[Version 7.0.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0) - -[Version 6.0.0](https://github.com/ajv-validator/ajv/releases/tag/v6.0.0). - -## Code of conduct - -Please review and follow the [Code of conduct](./CODE_OF_CONDUCT.md). - -Please report any unacceptable behaviour to ajv.validator@gmail.com - it will be reviewed by the project team. - -## Security contact - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerabilities via GitHub issues. - -## Open-source software support - -Ajv is a part of [Tidelift subscription](https://tidelift.com/subscription/pkg/npm-ajv?utm_source=npm-ajv&utm_medium=referral&utm_campaign=readme) - it provides a centralised support to open-source software users, in addition to the support provided by software maintainers. - -## License - -[MIT](./LICENSE) diff --git a/node_modules/table/node_modules/ajv/dist/2019.d.ts b/node_modules/table/node_modules/ajv/dist/2019.d.ts deleted file mode 100644 index 5a391dd6e..000000000 --- a/node_modules/table/node_modules/ajv/dist/2019.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { AnySchemaObject } from "./types"; -import AjvCore, { Options } from "./core"; -declare class Ajv2019 extends AjvCore { - constructor(opts?: Options); - _addVocabularies(): void; - _addDefaultMetaSchema(): void; - defaultMeta(): string | AnySchemaObject | undefined; -} -export default Ajv2019; -export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types"; -export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core"; -export { SchemaCxt, SchemaObjCxt } from "./compile"; -export { KeywordCxt } from "./compile/validate"; -export { DefinedError } from "./vocabularies/errors"; -export { JSONType } from "./compile/rules"; -export { JSONSchemaType } from "./types/json-schema"; -export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen"; diff --git a/node_modules/table/node_modules/ajv/dist/2019.js b/node_modules/table/node_modules/ajv/dist/2019.js deleted file mode 100644 index 89d78532f..000000000 --- a/node_modules/table/node_modules/ajv/dist/2019.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -const core_1 = require("./core"); -const draft7_1 = require("./vocabularies/draft7"); -const dynamic_1 = require("./vocabularies/dynamic"); -const next_1 = require("./vocabularies/next"); -const unevaluated_1 = require("./vocabularies/unevaluated"); -const discriminator_1 = require("./vocabularies/discriminator"); -const json_schema_2019_09_1 = require("./refs/json-schema-2019-09"); -const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema"; -class Ajv2019 extends core_1.default { - constructor(opts = {}) { - super({ - ...opts, - dynamicRef: true, - next: true, - unevaluated: true, - }); - } - _addVocabularies() { - super._addVocabularies(); - this.addVocabulary(dynamic_1.default); - draft7_1.default.forEach((v) => this.addVocabulary(v)); - this.addVocabulary(next_1.default); - this.addVocabulary(unevaluated_1.default); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - const { $data, meta } = this.opts; - if (!meta) - return; - json_schema_2019_09_1.default.call(this, $data); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } -} -module.exports = exports = Ajv2019; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Ajv2019; -var validate_1 = require("./compile/validate"); -Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); -var codegen_1 = require("./compile/codegen"); -Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } }); -Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } }); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); -Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); -Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); -Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); -//# sourceMappingURL=2019.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/2019.js.map b/node_modules/table/node_modules/ajv/dist/2019.js.map deleted file mode 100644 index 8e4e87cae..000000000 --- a/node_modules/table/node_modules/ajv/dist/2019.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"2019.js","sourceRoot":"","sources":["../lib/2019.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AAEvC,kDAAsD;AACtD,oDAAsD;AACtD,8CAAgD;AAChD,4DAA8D;AAC9D,gEAAwD;AACxD,oEAA0D;AAE1D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,MAAM,OAAQ,SAAQ,cAAO;IAC3B,YAAY,OAAgB,EAAE;QAC5B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,IAAI;SAClB,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;QACrC,gBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EA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/table/node_modules/ajv/dist/2020.d.ts deleted file mode 100644 index 21bae8f60..000000000 --- a/node_modules/table/node_modules/ajv/dist/2020.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { AnySchemaObject } from "./types"; -import AjvCore, { Options } from "./core"; -declare class Ajv2020 extends AjvCore { - constructor(opts?: Options); - _addVocabularies(): void; - _addDefaultMetaSchema(): void; - defaultMeta(): string | AnySchemaObject | undefined; -} -export default Ajv2020; -export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, } from "./types"; -export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core"; -export { SchemaCxt, SchemaObjCxt } from "./compile"; -export { KeywordCxt } from "./compile/validate"; -export { DefinedError } from "./vocabularies/errors"; -export { JSONType } from "./compile/rules"; -export { JSONSchemaType } from "./types/json-schema"; -export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen"; diff --git a/node_modules/table/node_modules/ajv/dist/2020.js b/node_modules/table/node_modules/ajv/dist/2020.js deleted file mode 100644 index bdd1dd69d..000000000 --- a/node_modules/table/node_modules/ajv/dist/2020.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -const core_1 = require("./core"); -const draft2020_1 = require("./vocabularies/draft2020"); -const discriminator_1 = require("./vocabularies/discriminator"); -const json_schema_2020_12_1 = require("./refs/json-schema-2020-12"); -const META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema"; -class Ajv2020 extends core_1.default { - constructor(opts = {}) { - super({ - ...opts, - dynamicRef: true, - next: true, - unevaluated: true, - }); - } - _addVocabularies() { - super._addVocabularies(); - draft2020_1.default.forEach((v) => this.addVocabulary(v)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - const { $data, meta } = this.opts; - if (!meta) - return; - json_schema_2020_12_1.default.call(this, $data); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } -} -module.exports = exports = Ajv2020; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Ajv2020; -var validate_1 = require("./compile/validate"); -Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); -var codegen_1 = require("./compile/codegen"); -Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } }); -Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } }); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); -Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); -Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); -Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); -//# sourceMappingURL=2020.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/2020.js.map b/node_modules/table/node_modules/ajv/dist/2020.js.map deleted file mode 100644 index 922393521..000000000 --- a/node_modules/table/node_modules/ajv/dist/2020.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"2020.js","sourceRoot":"","sources":["../lib/2020.ts"],"names":[],"mappings":";;;AACA,iCAAuC;AAEvC,wDAA4D;AAC5D,gEAAwD;AACxD,oEAA0D;AAE1D,MAAM,cAAc,GAAG,8CAA8C,CAAA;AAErE,MAAM,OAAQ,SAAQ,cAAO;IAC3B,YAAY,OAAgB,EAAE;QAC5B,KAAK,CA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GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/ajv.d.ts b/node_modules/table/node_modules/ajv/dist/ajv.d.ts deleted file mode 100644 index ce43bbf2e..000000000 --- a/node_modules/table/node_modules/ajv/dist/ajv.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { AnySchemaObject } from "./types"; -import AjvCore from "./core"; -declare class Ajv extends AjvCore { - _addVocabularies(): void; - _addDefaultMetaSchema(): void; - defaultMeta(): string | AnySchemaObject | undefined; -} -export default Ajv; -export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, SchemaValidateFunction, ErrorObject, ErrorNoParams, } from "./types"; -export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core"; -export { SchemaCxt, SchemaObjCxt } from "./compile"; -export { KeywordCxt } from "./compile/validate"; -export { DefinedError } from "./vocabularies/errors"; -export { JSONType } from "./compile/rules"; -export { JSONSchemaType } from "./types/json-schema"; -export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen"; diff --git a/node_modules/table/node_modules/ajv/dist/ajv.js b/node_modules/table/node_modules/ajv/dist/ajv.js deleted file mode 100644 index 219bcf0da..000000000 --- a/node_modules/table/node_modules/ajv/dist/ajv.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -const core_1 = require("./core"); -const draft7_1 = require("./vocabularies/draft7"); -const discriminator_1 = require("./vocabularies/discriminator"); -const draft7MetaSchema = require("./refs/json-schema-draft-07.json"); -const META_SUPPORT_DATA = ["/properties"]; -const META_SCHEMA_ID = "http://json-schema.org/draft-07/schema"; -class Ajv extends core_1.default { - _addVocabularies() { - super._addVocabularies(); - draft7_1.default.forEach((v) => this.addVocabulary(v)); - if (this.opts.discriminator) - this.addKeyword(discriminator_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - if (!this.opts.meta) - return; - const metaSchema = this.opts.$data - ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) - : draft7MetaSchema; - this.addMetaSchema(metaSchema, META_SCHEMA_ID, false); - this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID; - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } -} -module.exports = exports = Ajv; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Ajv; -var validate_1 = require("./compile/validate"); -Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); -var codegen_1 = require("./compile/codegen"); -Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } }); -Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } }); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); -Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); -Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); -Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); -//# sourceMappingURL=ajv.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/ajv.js.map b/node_modules/table/node_modules/ajv/dist/ajv.js.map deleted file mode 100644 index 18006d4b7..000000000 --- a/node_modules/table/node_modules/ajv/dist/ajv.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ajv.js","sourceRoot":"","sources":["../lib/ajv.ts"],"names":[],"mappings":";;;AACA,iCAA4B;AAC5B,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e,GAAG,CAAA;AA0BlB,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAIlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/code.d.ts b/node_modules/table/node_modules/ajv/dist/compile/codegen/code.d.ts deleted file mode 100644 index 78fca4d2f..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/code.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export declare abstract class _CodeOrName { - abstract readonly str: string; - abstract readonly names: UsedNames; - abstract toString(): string; - abstract emptyStr(): boolean; -} -export declare const IDENTIFIER: RegExp; -export declare class Name extends _CodeOrName { - readonly str: string; - constructor(s: string); - toString(): string; - emptyStr(): boolean; - get names(): UsedNames; -} -export declare class _Code extends _CodeOrName { - readonly _items: readonly CodeItem[]; - private _str?; - private _names?; - constructor(code: string | readonly CodeItem[]); - toString(): string; - emptyStr(): boolean; - get str(): string; - get names(): UsedNames; -} -export declare type CodeItem = Name | string | number | boolean | null; -export declare type UsedNames = Record; -export declare type Code = _Code | Name; -export declare type SafeExpr = Code | number | boolean | null; -export declare const nil: _Code; -declare type CodeArg = SafeExpr | string | undefined; -export declare function _(strs: TemplateStringsArray, ...args: CodeArg[]): _Code; -export declare function str(strs: TemplateStringsArray, ...args: (CodeArg | string[])[]): _Code; -export declare function addCodeArg(code: CodeItem[], arg: CodeArg | string[]): void; -export declare function strConcat(c1: Code, c2: Code): Code; -export declare function stringify(x: unknown): Code; -export declare function safeStringify(x: unknown): string; -export declare function getProperty(key: Code | string | number): Code; -export declare function regexpCode(rx: RegExp): Code; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/code.js b/node_modules/table/node_modules/ajv/dist/compile/codegen/code.js deleted file mode 100644 index cf3cdb57b..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/code.js +++ /dev/null @@ -1,147 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.regexpCode = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0; -class _CodeOrName { -} -exports._CodeOrName = _CodeOrName; -exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i; -class Name extends _CodeOrName { - constructor(s) { - super(); - if (!exports.IDENTIFIER.test(s)) - throw new Error("CodeGen: name must be a valid identifier"); - this.str = s; - } - toString() { - return this.str; - } - emptyStr() { - return false; - } - get names() { - return { [this.str]: 1 }; - } -} -exports.Name = Name; -class _Code extends _CodeOrName { - constructor(code) { - super(); - this._items = typeof code === "string" ? [code] : code; - } - toString() { - return this.str; - } - emptyStr() { - if (this._items.length > 1) - return false; - const item = this._items[0]; - return item === "" || item === '""'; - } - get str() { - var _a; - return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, ""))); - } - get names() { - var _a; - return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => { - if (c instanceof Name) - names[c.str] = (names[c.str] || 0) + 1; - return names; - }, {}))); - } -} -exports._Code = _Code; -exports.nil = new _Code(""); -function _(strs, ...args) { - const code = [strs[0]]; - let i = 0; - while (i < args.length) { - addCodeArg(code, args[i]); - code.push(strs[++i]); - } - return new _Code(code); -} -exports._ = _; -const plus = new _Code("+"); -function str(strs, ...args) { - const expr = [safeStringify(strs[0])]; - let i = 0; - while (i < args.length) { - expr.push(plus); - addCodeArg(expr, args[i]); - expr.push(plus, safeStringify(strs[++i])); - } - optimize(expr); - return new _Code(expr); -} -exports.str = str; -function addCodeArg(code, arg) { - if (arg instanceof _Code) - code.push(...arg._items); - else if (arg instanceof Name) - code.push(arg); - else - code.push(interpolate(arg)); -} -exports.addCodeArg = addCodeArg; -function optimize(expr) { - let i = 1; - while (i < expr.length - 1) { - if (expr[i] === plus) { - const res = mergeExprItems(expr[i - 1], expr[i + 1]); - if (res !== undefined) { - expr.splice(i - 1, 3, res); - continue; - } - expr[i++] = "+"; - } - i++; - } -} -function mergeExprItems(a, b) { - if (b === '""') - return a; - if (a === '""') - return b; - if (typeof a == "string") { - if (b instanceof Name || a[a.length - 1] !== '"') - return; - if (typeof b != "string") - return `${a.slice(0, -1)}${b}"`; - if (b[0] === '"') - return a.slice(0, -1) + b.slice(1); - return; - } - if (typeof b == "string" && b[0] === '"' && !(a instanceof Name)) - return `"${a}${b.slice(1)}`; - return; -} -function strConcat(c1, c2) { - return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`; -} -exports.strConcat = strConcat; -// TODO do not allow arrays here -function interpolate(x) { - return typeof x == "number" || typeof x == "boolean" || x === null - ? x - : safeStringify(Array.isArray(x) ? x.join(",") : x); -} -function stringify(x) { - return new _Code(safeStringify(x)); -} -exports.stringify = stringify; -function safeStringify(x) { - return JSON.stringify(x) - .replace(/\u2028/g, "\\u2028") - .replace(/\u2029/g, "\\u2029"); -} -exports.safeStringify = safeStringify; -function getProperty(key) { - return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`; -} -exports.getProperty = getProperty; -function regexpCode(rx) { - return new _Code(rx.toString()); -} -exports.regexpCode = regexpCode; -//# sourceMappingURL=code.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/code.js.map b/node_modules/table/node_modules/ajv/dist/compile/codegen/code.js.map deleted file mode 100644 index 3422d25dc..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/code.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"code.js","sourceRoot":"","sources":["../../../lib/compile/codegen/code.ts"],"names":[],"mappings":";;;AAAA,MAAsB,WAAW;CAKhC;AALD,k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,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACvD,CAAC;AAED,SAAgB,SAAS,CAAC,CAAU;IAClC,OAAO,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;AACpC,CAAC;AAFD,8BAEC;AAED,SAAgB,aAAa,CAAC,CAAU;IACtC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;SAC7B,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;AAClC,CAAC;AAJD,sCAIC;AAED,SAAgB,WAAW,CAAC,GAA2B;IACrD,OAAO,OAAO,GAAG,IAAI,QAAQ,IAAI,kBAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,IAAI,GAAG,GAAG,CAAA;AAC5F,CAAC;AAFD,kCAEC;AAED,SAAgB,UAAU,CAAC,EAAU;IACnC,OAAO,IAAI,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;AACjC,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/index.d.ts b/node_modules/table/node_modules/ajv/dist/compile/codegen/index.d.ts deleted file mode 100644 index db9101ddb..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/index.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { ScopeValueSets, NameValue, ValueScope, ValueScopeName } from "./scope"; -import { _Code, Code, Name } from "./code"; -import { Scope } from "./scope"; -export { _, str, strConcat, nil, getProperty, stringify, regexpCode, Name, Code } from "./code"; -export { Scope, ScopeStore, ValueScope, ValueScopeName, ScopeValueSets, varKinds } from "./scope"; -export declare type SafeExpr = Code | number | boolean | null; -export declare type Block = Code | (() => void); -export declare const operators: { - GT: _Code; - GTE: _Code; - LT: _Code; - LTE: _Code; - EQ: _Code; - NEQ: _Code; - NOT: _Code; - OR: _Code; - AND: _Code; - ADD: _Code; -}; -export interface CodeGenOptions { - es5?: boolean; - lines?: boolean; - ownProperties?: boolean; -} -export declare class CodeGen { - readonly _scope: Scope; - readonly _extScope: ValueScope; - readonly _values: ScopeValueSets; - private readonly _nodes; - private readonly _blockStarts; - private readonly _constants; - private readonly opts; - constructor(extScope: ValueScope, opts?: CodeGenOptions); - toString(): string; - name(prefix: string): Name; - scopeName(prefix: string): ValueScopeName; - scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name; - getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined; - scopeRefs(scopeName: Name): Code; - scopeCode(): Code; - private _def; - const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name; - let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name; - var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name; - assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen; - add(lhs: Code, rhs: SafeExpr): CodeGen; - code(c: Block | SafeExpr): CodeGen; - object(...keyValues: [Name | string, SafeExpr | string][]): _Code; - if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen; - elseIf(condition: Code | boolean): CodeGen; - else(): CodeGen; - endIf(): CodeGen; - private _for; - for(iteration: Code, forBody?: Block): CodeGen; - forRange(nameOrPrefix: Name | string, from: SafeExpr, to: SafeExpr, forBody: (index: Name) => void, varKind?: Code): CodeGen; - forOf(nameOrPrefix: Name | string, iterable: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen; - forIn(nameOrPrefix: Name | string, obj: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen; - endFor(): CodeGen; - label(label: Name): CodeGen; - break(label?: Code): CodeGen; - return(value: Block | SafeExpr): CodeGen; - try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen; - throw(error: Code): CodeGen; - block(body?: Block, nodeCount?: number): CodeGen; - endBlock(nodeCount?: number): CodeGen; - func(name: Name, args?: Code, async?: boolean, funcBody?: Block): CodeGen; - endFunc(): CodeGen; - optimize(n?: number): void; - private _leafNode; - private _blockNode; - private _endBlockNode; - private _elseNode; - private get _root(); - private get _currNode(); - private set _currNode(value); -} -export declare function not(x: T): T; -export declare function and(...args: Code[]): Code; -export declare function or(...args: Code[]): Code; diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js b/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js deleted file mode 100644 index 0667fb6e2..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js +++ /dev/null @@ -1,697 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0; -const code_1 = require("./code"); -const scope_1 = require("./scope"); -var code_2 = require("./code"); -Object.defineProperty(exports, "_", { enumerable: true, get: function () { return code_2._; } }); -Object.defineProperty(exports, "str", { enumerable: true, get: function () { return code_2.str; } }); -Object.defineProperty(exports, "strConcat", { enumerable: true, get: function () { return code_2.strConcat; } }); -Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return code_2.nil; } }); -Object.defineProperty(exports, "getProperty", { enumerable: true, get: function () { return code_2.getProperty; } }); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return code_2.stringify; } }); -Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function () { return code_2.regexpCode; } }); -Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return code_2.Name; } }); -var scope_2 = require("./scope"); -Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return scope_2.Scope; } }); -Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function () { return scope_2.ValueScope; } }); -Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function () { return scope_2.ValueScopeName; } }); -Object.defineProperty(exports, "varKinds", { enumerable: true, get: function () { return scope_2.varKinds; } }); -exports.operators = { - GT: new code_1._Code(">"), - GTE: new code_1._Code(">="), - LT: new code_1._Code("<"), - LTE: new code_1._Code("<="), - EQ: new code_1._Code("==="), - NEQ: new code_1._Code("!=="), - NOT: new code_1._Code("!"), - OR: new code_1._Code("||"), - AND: new code_1._Code("&&"), - ADD: new code_1._Code("+"), -}; -class Node { - optimizeNodes() { - return this; - } - optimizeNames(_names, _constants) { - return this; - } -} -class Def extends Node { - constructor(varKind, name, rhs) { - super(); - this.varKind = varKind; - this.name = name; - this.rhs = rhs; - } - render({ es5, _n }) { - const varKind = es5 ? scope_1.varKinds.var : this.varKind; - const rhs = this.rhs === undefined ? "" : ` = ${this.rhs}`; - return `${varKind} ${this.name}${rhs};` + _n; - } - optimizeNames(names, constants) { - if (!names[this.name.str]) - return; - if (this.rhs) - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - return this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {}; - } -} -class Assign extends Node { - constructor(lhs, rhs, sideEffects) { - super(); - this.lhs = lhs; - this.rhs = rhs; - this.sideEffects = sideEffects; - } - render({ _n }) { - return `${this.lhs} = ${this.rhs};` + _n; - } - optimizeNames(names, constants) { - if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) - return; - this.rhs = optimizeExpr(this.rhs, names, constants); - return this; - } - get names() { - const names = this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }; - return addExprNames(names, this.rhs); - } -} -class AssignOp extends Assign { - constructor(lhs, op, rhs, sideEffects) { - super(lhs, rhs, sideEffects); - this.op = op; - } - render({ _n }) { - return `${this.lhs} ${this.op}= ${this.rhs};` + _n; - } -} -class Label extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - return `${this.label}:` + _n; - } -} -class Break extends Node { - constructor(label) { - super(); - this.label = label; - this.names = {}; - } - render({ _n }) { - const label = this.label ? ` ${this.label}` : ""; - return `break${label};` + _n; - } -} -class Throw extends Node { - constructor(error) { - super(); - this.error = error; - } - render({ _n }) { - return `throw ${this.error};` + _n; - } - get names() { - return this.error.names; - } -} -class AnyCode extends Node { - constructor(code) { - super(); - this.code = code; - } - render({ _n }) { - return `${this.code};` + _n; - } - optimizeNodes() { - return `${this.code}` ? this : undefined; - } - optimizeNames(names, constants) { - this.code = optimizeExpr(this.code, names, constants); - return this; - } - get names() { - return this.code instanceof code_1._CodeOrName ? this.code.names : {}; - } -} -class ParentNode extends Node { - constructor(nodes = []) { - super(); - this.nodes = nodes; - } - render(opts) { - return this.nodes.reduce((code, n) => code + n.render(opts), ""); - } - optimizeNodes() { - const { nodes } = this; - let i = nodes.length; - while (i--) { - const n = nodes[i].optimizeNodes(); - if (Array.isArray(n)) - nodes.splice(i, 1, ...n); - else if (n) - nodes[i] = n; - else - nodes.splice(i, 1); - } - return nodes.length > 0 ? this : undefined; - } - optimizeNames(names, constants) { - const { nodes } = this; - let i = nodes.length; - while (i--) { - // iterating backwards improves 1-pass optimization - const n = nodes[i]; - if (n.optimizeNames(names, constants)) - continue; - subtractNames(names, n.names); - nodes.splice(i, 1); - } - return nodes.length > 0 ? this : undefined; - } - get names() { - return this.nodes.reduce((names, n) => addNames(names, n.names), {}); - } -} -class BlockNode extends ParentNode { - render(opts) { - return "{" + opts._n + super.render(opts) + "}" + opts._n; - } -} -class Root extends ParentNode { -} -class Else extends BlockNode { -} -Else.kind = "else"; -class If extends BlockNode { - constructor(condition, nodes) { - super(nodes); - this.condition = condition; - } - render(opts) { - let code = `if(${this.condition})` + super.render(opts); - if (this.else) - code += "else " + this.else.render(opts); - return code; - } - optimizeNodes() { - super.optimizeNodes(); - const cond = this.condition; - if (cond === true) - return this.nodes; // else is ignored here - let e = this.else; - if (e) { - const ns = e.optimizeNodes(); - e = this.else = Array.isArray(ns) ? new Else(ns) : ns; - } - if (e) { - if (cond === false) - return e instanceof If ? e : e.nodes; - if (this.nodes.length) - return this; - return new If(not(cond), e instanceof If ? [e] : e.nodes); - } - if (cond === false || !this.nodes.length) - return undefined; - return this; - } - optimizeNames(names, constants) { - var _a; - this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - if (!(super.optimizeNames(names, constants) || this.else)) - return; - this.condition = optimizeExpr(this.condition, names, constants); - return this; - } - get names() { - const names = super.names; - addExprNames(names, this.condition); - if (this.else) - addNames(names, this.else.names); - return names; - } -} -If.kind = "if"; -class For extends BlockNode { -} -For.kind = "for"; -class ForLoop extends For { - constructor(iteration) { - super(); - this.iteration = iteration; - } - render(opts) { - return `for(${this.iteration})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iteration = optimizeExpr(this.iteration, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iteration.names); - } -} -class ForRange extends For { - constructor(varKind, name, from, to) { - super(); - this.varKind = varKind; - this.name = name; - this.from = from; - this.to = to; - } - render(opts) { - const varKind = opts.es5 ? scope_1.varKinds.var : this.varKind; - const { name, from, to } = this; - return `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts); - } - get names() { - const names = addExprNames(super.names, this.from); - return addExprNames(names, this.to); - } -} -class ForIter extends For { - constructor(loop, varKind, name, iterable) { - super(); - this.loop = loop; - this.varKind = varKind; - this.name = name; - this.iterable = iterable; - } - render(opts) { - return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts); - } - optimizeNames(names, constants) { - if (!super.optimizeNames(names, constants)) - return; - this.iterable = optimizeExpr(this.iterable, names, constants); - return this; - } - get names() { - return addNames(super.names, this.iterable.names); - } -} -class Func extends BlockNode { - constructor(name, args, async) { - super(); - this.name = name; - this.args = args; - this.async = async; - } - render(opts) { - const _async = this.async ? "async " : ""; - return `${_async}function ${this.name}(${this.args})` + super.render(opts); - } -} -Func.kind = "func"; -class Return extends ParentNode { - render(opts) { - return "return " + super.render(opts); - } -} -Return.kind = "return"; -class Try extends BlockNode { - render(opts) { - let code = "try" + super.render(opts); - if (this.catch) - code += this.catch.render(opts); - if (this.finally) - code += this.finally.render(opts); - return code; - } - optimizeNodes() { - var _a, _b; - super.optimizeNodes(); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNodes(); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes(); - return this; - } - optimizeNames(names, constants) { - var _a, _b; - super.optimizeNames(names, constants); - (_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants); - (_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants); - return this; - } - get names() { - const names = super.names; - if (this.catch) - addNames(names, this.catch.names); - if (this.finally) - addNames(names, this.finally.names); - return names; - } -} -class Catch extends BlockNode { - constructor(error) { - super(); - this.error = error; - } - render(opts) { - return `catch(${this.error})` + super.render(opts); - } -} -Catch.kind = "catch"; -class Finally extends BlockNode { - render(opts) { - return "finally" + super.render(opts); - } -} -Finally.kind = "finally"; -class CodeGen { - constructor(extScope, opts = {}) { - this._values = {}; - this._blockStarts = []; - this._constants = {}; - this.opts = { ...opts, _n: opts.lines ? "\n" : "" }; - this._extScope = extScope; - this._scope = new scope_1.Scope({ parent: extScope }); - this._nodes = [new Root()]; - } - toString() { - return this._root.render(this.opts); - } - // returns unique name in the internal scope - name(prefix) { - return this._scope.name(prefix); - } - // reserves unique name in the external scope - scopeName(prefix) { - return this._extScope.name(prefix); - } - // reserves unique name in the external scope and assigns value to it - scopeValue(prefixOrName, value) { - const name = this._extScope.value(prefixOrName, value); - const vs = this._values[name.prefix] || (this._values[name.prefix] = new Set()); - vs.add(name); - return name; - } - getScopeValue(prefix, keyOrRef) { - return this._extScope.getValue(prefix, keyOrRef); - } - // return code that assigns values in the external scope to the names that are used internally - // (same names that were returned by gen.scopeName or gen.scopeValue) - scopeRefs(scopeName) { - return this._extScope.scopeRefs(scopeName, this._values); - } - scopeCode() { - return this._extScope.scopeCode(this._values); - } - _def(varKind, nameOrPrefix, rhs, constant) { - const name = this._scope.toName(nameOrPrefix); - if (rhs !== undefined && constant) - this._constants[name.str] = rhs; - this._leafNode(new Def(varKind, name, rhs)); - return name; - } - // `const` declaration (`var` in es5 mode) - const(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant); - } - // `let` declaration with optional assignment (`var` in es5 mode) - let(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant); - } - // `var` declaration with optional assignment - var(nameOrPrefix, rhs, _constant) { - return this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant); - } - // assignment code - assign(lhs, rhs, sideEffects) { - return this._leafNode(new Assign(lhs, rhs, sideEffects)); - } - // `+=` code - add(lhs, rhs) { - return this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs)); - } - // appends passed SafeExpr to code or executes Block - code(c) { - if (typeof c == "function") - c(); - else if (c !== code_1.nil) - this._leafNode(new AnyCode(c)); - return this; - } - // returns code for object literal for the passed argument list of key-value pairs - object(...keyValues) { - const code = ["{"]; - for (const [key, value] of keyValues) { - if (code.length > 1) - code.push(","); - code.push(key); - if (key !== value || this.opts.es5) { - code.push(":"); - code_1.addCodeArg(code, value); - } - } - code.push("}"); - return new code_1._Code(code); - } - // `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed) - if(condition, thenBody, elseBody) { - this._blockNode(new If(condition)); - if (thenBody && elseBody) { - this.code(thenBody).else().code(elseBody).endIf(); - } - else if (thenBody) { - this.code(thenBody).endIf(); - } - else if (elseBody) { - throw new Error('CodeGen: "else" body without "then" body'); - } - return this; - } - // `else if` clause - invalid without `if` or after `else` clauses - elseIf(condition) { - return this._elseNode(new If(condition)); - } - // `else` clause - only valid after `if` or `else if` clauses - else() { - return this._elseNode(new Else()); - } - // end `if` statement (needed if gen.if was used only with condition) - endIf() { - return this._endBlockNode(If, Else); - } - _for(node, forBody) { - this._blockNode(node); - if (forBody) - this.code(forBody).endFor(); - return this; - } - // a generic `for` clause (or statement if `forBody` is passed) - for(iteration, forBody) { - return this._for(new ForLoop(iteration), forBody); - } - // `for` statement for a range of values - forRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) { - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForRange(varKind, name, from, to), () => forBody(name)); - } - // `for-of` statement (in es5 mode replace with a normal for loop) - forOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) { - const name = this._scope.toName(nameOrPrefix); - if (this.opts.es5) { - const arr = iterable instanceof code_1.Name ? iterable : this.var("_arr", iterable); - return this.forRange("_i", 0, code_1._ `${arr}.length`, (i) => { - this.var(name, code_1._ `${arr}[${i}]`); - forBody(name); - }); - } - return this._for(new ForIter("of", varKind, name, iterable), () => forBody(name)); - } - // `for-in` statement. - // With option `ownProperties` replaced with a `for-of` loop for object keys - forIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) { - if (this.opts.ownProperties) { - return this.forOf(nameOrPrefix, code_1._ `Object.keys(${obj})`, forBody); - } - const name = this._scope.toName(nameOrPrefix); - return this._for(new ForIter("in", varKind, name, obj), () => forBody(name)); - } - // end `for` loop - endFor() { - return this._endBlockNode(For); - } - // `label` statement - label(label) { - return this._leafNode(new Label(label)); - } - // `break` statement - break(label) { - return this._leafNode(new Break(label)); - } - // `return` statement - return(value) { - const node = new Return(); - this._blockNode(node); - this.code(value); - if (node.nodes.length !== 1) - throw new Error('CodeGen: "return" should have one node'); - return this._endBlockNode(Return); - } - // `try` statement - try(tryBody, catchCode, finallyCode) { - if (!catchCode && !finallyCode) - throw new Error('CodeGen: "try" without "catch" and "finally"'); - const node = new Try(); - this._blockNode(node); - this.code(tryBody); - if (catchCode) { - const error = this.name("e"); - this._currNode = node.catch = new Catch(error); - catchCode(error); - } - if (finallyCode) { - this._currNode = node.finally = new Finally(); - this.code(finallyCode); - } - return this._endBlockNode(Catch, Finally); - } - // `throw` statement - throw(error) { - return this._leafNode(new Throw(error)); - } - // start self-balancing block - block(body, nodeCount) { - this._blockStarts.push(this._nodes.length); - if (body) - this.code(body).endBlock(nodeCount); - return this; - } - // end the current self-balancing block - endBlock(nodeCount) { - const len = this._blockStarts.pop(); - if (len === undefined) - throw new Error("CodeGen: not in self-balancing block"); - const toClose = this._nodes.length - len; - if (toClose < 0 || (nodeCount !== undefined && toClose !== nodeCount)) { - throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`); - } - this._nodes.length = len; - return this; - } - // `function` heading (or definition if funcBody is passed) - func(name, args = code_1.nil, async, funcBody) { - this._blockNode(new Func(name, args, async)); - if (funcBody) - this.code(funcBody).endFunc(); - return this; - } - // end function definition - endFunc() { - return this._endBlockNode(Func); - } - optimize(n = 1) { - while (n-- > 0) { - this._root.optimizeNodes(); - this._root.optimizeNames(this._root.names, this._constants); - } - } - _leafNode(node) { - this._currNode.nodes.push(node); - return this; - } - _blockNode(node) { - this._currNode.nodes.push(node); - this._nodes.push(node); - } - _endBlockNode(N1, N2) { - const n = this._currNode; - if (n instanceof N1 || (N2 && n instanceof N2)) { - this._nodes.pop(); - return this; - } - throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`); - } - _elseNode(node) { - const n = this._currNode; - if (!(n instanceof If)) { - throw new Error('CodeGen: "else" without "if"'); - } - this._currNode = n.else = node; - return this; - } - get _root() { - return this._nodes[0]; - } - get _currNode() { - const ns = this._nodes; - return ns[ns.length - 1]; - } - set _currNode(node) { - const ns = this._nodes; - ns[ns.length - 1] = node; - } -} -exports.CodeGen = CodeGen; -function addNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) + (from[n] || 0); - return names; -} -function addExprNames(names, from) { - return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names; -} -function optimizeExpr(expr, names, constants) { - if (expr instanceof code_1.Name) - return replaceName(expr); - if (!canOptimize(expr)) - return expr; - return new code_1._Code(expr._items.reduce((items, c) => { - if (c instanceof code_1.Name) - c = replaceName(c); - if (c instanceof code_1._Code) - items.push(...c._items); - else - items.push(c); - return items; - }, [])); - function replaceName(n) { - const c = constants[n.str]; - if (c === undefined || names[n.str] !== 1) - return n; - delete names[n.str]; - return c; - } - function canOptimize(e) { - return (e instanceof code_1._Code && - e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== undefined)); - } -} -function subtractNames(names, from) { - for (const n in from) - names[n] = (names[n] || 0) - (from[n] || 0); -} -function not(x) { - return typeof x == "boolean" || typeof x == "number" || x === null ? !x : code_1._ `!${par(x)}`; -} -exports.not = not; -const andCode = mappend(exports.operators.AND); -// boolean AND (&&) expression with the passed arguments -function and(...args) { - return args.reduce(andCode); -} -exports.and = and; -const orCode = mappend(exports.operators.OR); -// boolean OR (||) expression with the passed arguments -function or(...args) { - return args.reduce(orCode); -} -exports.or = or; -function mappend(op) { - return (x, y) => (x === code_1.nil ? y : y === code_1.nil ? x : code_1._ `${par(x)} ${op} ${par(y)}`); -} -function par(x) { - return x instanceof code_1.Name ? x : code_1._ `(${x})`; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js.map b/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js.map deleted file mode 100644 index 060753a81..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/compile/codegen/index.ts"],"names":[],"mappings":";;;AACA,iCAA8F;AAC9F,mCAAuC;AAEvC,+BAA6F;AAArF,yFAAA,CAAC,OAAA;AAAE,2FAAA,GAAG,OAAA;AAAE,iGAAA,SAAS,OAAA;AAAE,2FAAA,GAAG,OAAA;AAAE,mGAAA,WAAW,OAAA;AAAE,iGAAA,SAAS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AAC,MAAM,CAAC,CAAA;AAC5B,CAAC;AAFD,gBAEC;AAID,SAAS,OAAO,CAAC,EAAQ;IACvB,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,UAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,UAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAC,CAAA,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;AACjF,CAAC;AAED,SAAS,GAAG,CAAC,CAAO;IAClB,OAAO,CAAC,YAAY,WAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAC,CAAA,IAAI,CAAC,GAAG,CAAA;AAC1C,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.d.ts b/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.d.ts deleted file mode 100644 index 3c351bb63..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Code, Name } from "./code"; -interface NameGroup { - prefix: string; - index: number; -} -export interface NameValue { - ref: ValueReference; - key?: unknown; - code?: Code; -} -export declare type ValueReference = unknown; -interface ScopeOptions { - prefixes?: Set; - parent?: Scope; -} -interface ValueScopeOptions extends ScopeOptions { - scope: ScopeStore; - es5?: boolean; - lines?: boolean; -} -export declare type ScopeStore = Record; -declare type ScopeValues = { - [Prefix in string]?: Map; -}; -export declare type ScopeValueSets = { - [Prefix in string]?: Set; -}; -export declare enum UsedValueState { - Started = 0, - Completed = 1 -} -export declare type UsedScopeValues = { - [Prefix in string]?: Map; -}; -export declare const varKinds: { - const: Name; - let: Name; - var: Name; -}; -export declare class Scope { - protected readonly _names: { - [Prefix in string]?: NameGroup; - }; - protected readonly _prefixes?: Set; - protected readonly _parent?: Scope; - constructor({ prefixes, parent }?: ScopeOptions); - toName(nameOrPrefix: Name | string): Name; - name(prefix: string): Name; - protected _newName(prefix: string): string; - private _nameGroup; -} -interface ScopePath { - property: string; - itemIndex: number; -} -export declare class ValueScopeName extends Name { - readonly prefix: string; - value?: NameValue; - scopePath?: Code; - constructor(prefix: string, nameStr: string); - setValue(value: NameValue, { property, itemIndex }: ScopePath): void; -} -interface VSOptions extends ValueScopeOptions { - _n: Code; -} -export declare class ValueScope extends Scope { - protected readonly _values: ScopeValues; - protected readonly _scope: ScopeStore; - readonly opts: VSOptions; - constructor(opts: ValueScopeOptions); - get(): ScopeStore; - name(prefix: string): ValueScopeName; - value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName; - getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined; - scopeRefs(scopeName: Name, values?: ScopeValues | ScopeValueSets): Code; - scopeCode(values?: ScopeValues | ScopeValueSets, usedValues?: UsedScopeValues, getCode?: (n: ValueScopeName) => Code | undefined): Code; - private _reduceValues; -} -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js b/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js deleted file mode 100644 index 91919e888..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0; -const code_1 = require("./code"); -class ValueError extends Error { - constructor(name) { - super(`CodeGen: "code" for ${name} not defined`); - this.value = name.value; - } -} -var UsedValueState; -(function (UsedValueState) { - UsedValueState[UsedValueState["Started"] = 0] = "Started"; - UsedValueState[UsedValueState["Completed"] = 1] = "Completed"; -})(UsedValueState = exports.UsedValueState || (exports.UsedValueState = {})); -exports.varKinds = { - const: new code_1.Name("const"), - let: new code_1.Name("let"), - var: new code_1.Name("var"), -}; -class Scope { - constructor({ prefixes, parent } = {}) { - this._names = {}; - this._prefixes = prefixes; - this._parent = parent; - } - toName(nameOrPrefix) { - return nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix); - } - name(prefix) { - return new code_1.Name(this._newName(prefix)); - } - _newName(prefix) { - const ng = this._names[prefix] || this._nameGroup(prefix); - return `${prefix}${ng.index++}`; - } - _nameGroup(prefix) { - var _a, _b; - if (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || (this._prefixes && !this._prefixes.has(prefix))) { - throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`); - } - return (this._names[prefix] = { prefix, index: 0 }); - } -} -exports.Scope = Scope; -class ValueScopeName extends code_1.Name { - constructor(prefix, nameStr) { - super(nameStr); - this.prefix = prefix; - } - setValue(value, { property, itemIndex }) { - this.value = value; - this.scopePath = code_1._ `.${new code_1.Name(property)}[${itemIndex}]`; - } -} -exports.ValueScopeName = ValueScopeName; -const line = code_1._ `\n`; -class ValueScope extends Scope { - constructor(opts) { - super(opts); - this._values = {}; - this._scope = opts.scope; - this.opts = { ...opts, _n: opts.lines ? line : code_1.nil }; - } - get() { - return this._scope; - } - name(prefix) { - return new ValueScopeName(prefix, this._newName(prefix)); - } - value(nameOrPrefix, value) { - var _a; - if (value.ref === undefined) - throw new Error("CodeGen: ref must be passed in value"); - const name = this.toName(nameOrPrefix); - const { prefix } = name; - const valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref; - let vs = this._values[prefix]; - if (vs) { - const _name = vs.get(valueKey); - if (_name) - return _name; - } - else { - vs = this._values[prefix] = new Map(); - } - vs.set(valueKey, name); - const s = this._scope[prefix] || (this._scope[prefix] = []); - const itemIndex = s.length; - s[itemIndex] = value.ref; - name.setValue(value, { property: prefix, itemIndex }); - return name; - } - getValue(prefix, keyOrRef) { - const vs = this._values[prefix]; - if (!vs) - return; - return vs.get(keyOrRef); - } - scopeRefs(scopeName, values = this._values) { - return this._reduceValues(values, (name) => { - if (name.scopePath === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return code_1._ `${scopeName}${name.scopePath}`; - }); - } - scopeCode(values = this._values, usedValues, getCode) { - return this._reduceValues(values, (name) => { - if (name.value === undefined) - throw new Error(`CodeGen: name "${name}" has no value`); - return name.value.code; - }, usedValues, getCode); - } - _reduceValues(values, valueCode, usedValues = {}, getCode) { - let code = code_1.nil; - for (const prefix in values) { - const vs = values[prefix]; - if (!vs) - continue; - const nameSet = (usedValues[prefix] = usedValues[prefix] || new Map()); - vs.forEach((name) => { - if (nameSet.has(name)) - return; - nameSet.set(name, UsedValueState.Started); - let c = valueCode(name); - if (c) { - const def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const; - code = code_1._ `${code}${def} ${name} = ${c};${this.opts._n}`; - } - else if ((c = getCode === null || getCode === void 0 ? void 0 : getCode(name))) { - code = code_1._ `${code}${c}${this.opts._n}`; - } - else { - throw new ValueError(name); - } - nameSet.set(name, UsedValueState.Completed); - }); - } - return code; - } -} -exports.ValueScope = ValueScope; -//# sourceMappingURL=scope.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js.map b/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js.map deleted file mode 100644 index 26db7bb90..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/codegen/scope.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../../lib/compile/codegen/scope.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAezC,MAAM,UAAW,SAAQ,KAAK;IAE5B,YAAY,IAAoB;QAC9B,KAAK,CAAC,uBAAuB,IAAI,cAAc,CAAC,CAAA;QAChD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;IACzB,CAAC;CACF;AAuBD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,yDAAO,CAAA;IACP,6DAAS,CAAA;AACX,CAAC,EAHW,cAAc,G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I,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,gBAAQ,CAAC,KAAK,CAAA;oBACzD,IAAI,GAAG,QAAC,CAAA,GAAG,IAAI,GAAG,GAAG,IAAI,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAA;iBACvD;qBAAM,IAAI,CAAC,CAAC,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,IAAI,CAAC,CAAC,EAAE;oBAChC,IAAI,GAAG,QAAC,CAAA,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,CAAA;iBACrC;qBAAM;oBACL,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;iBAC3B;gBACD,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;YAC7C,CAAC,CAAC,CAAA;SACH;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAjGD,gCAiGC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/errors.d.ts b/node_modules/table/node_modules/ajv/dist/compile/errors.d.ts deleted file mode 100644 index 74eef7e21..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/errors.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { KeywordErrorCxt, KeywordErrorDefinition } from "../types"; -import { CodeGen, Code, Name } from "./codegen"; -export declare const keywordError: KeywordErrorDefinition; -export declare const keyword$DataError: KeywordErrorDefinition; -export interface ErrorPaths { - instancePath?: Code; - schemaPath?: string; - parentSchema?: boolean; -} -export declare function reportError(cxt: KeywordErrorCxt, error?: KeywordErrorDefinition, errorPaths?: ErrorPaths, overrideAllErrors?: boolean): void; -export declare function reportExtraError(cxt: KeywordErrorCxt, error?: KeywordErrorDefinition, errorPaths?: ErrorPaths): void; -export declare function resetErrorsCount(gen: CodeGen, errsCount: Name): void; -export declare function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }: KeywordErrorCxt): void; diff --git a/node_modules/table/node_modules/ajv/dist/compile/errors.js b/node_modules/table/node_modules/ajv/dist/compile/errors.js deleted file mode 100644 index 0dcf28bc5..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/errors.js +++ /dev/null @@ -1,123 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0; -const codegen_1 = require("./codegen"); -const util_1 = require("./util"); -const names_1 = require("./names"); -exports.keywordError = { - message: ({ keyword }) => codegen_1.str `should pass "${keyword}" keyword validation`, -}; -exports.keyword$DataError = { - message: ({ keyword, schemaType }) => schemaType - ? codegen_1.str `"${keyword}" keyword must be ${schemaType} ($data)` - : codegen_1.str `"${keyword}" keyword is invalid ($data)`, -}; -function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : (compositeRule || allErrors)) { - addError(gen, errObj); - } - else { - returnErrors(it, codegen_1._ `[${errObj}]`); - } -} -exports.reportError = reportError; -function reportExtraError(cxt, error = exports.keywordError, errorPaths) { - const { it } = cxt; - const { gen, compositeRule, allErrors } = it; - const errObj = errorObjectCode(cxt, error, errorPaths); - addError(gen, errObj); - if (!(compositeRule || allErrors)) { - returnErrors(it, names_1.default.vErrors); - } -} -exports.reportExtraError = reportExtraError; -function resetErrorsCount(gen, errsCount) { - gen.assign(names_1.default.errors, errsCount); - gen.if(codegen_1._ `${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign(codegen_1._ `${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null))); -} -exports.resetErrorsCount = resetErrorsCount; -function extendErrors({ gen, keyword, schemaValue, data, errsCount, it, }) { - /* istanbul ignore if */ - if (errsCount === undefined) - throw new Error("ajv implementation error"); - const err = gen.name("err"); - gen.forRange("i", errsCount, names_1.default.errors, (i) => { - gen.const(err, codegen_1._ `${names_1.default.vErrors}[${i}]`); - gen.if(codegen_1._ `${err}.instancePath === undefined`, () => gen.assign(codegen_1._ `${err}.instancePath`, codegen_1.strConcat(names_1.default.instancePath, it.errorPath))); - gen.assign(codegen_1._ `${err}.schemaPath`, codegen_1.str `${it.errSchemaPath}/${keyword}`); - if (it.opts.verbose) { - gen.assign(codegen_1._ `${err}.schema`, schemaValue); - gen.assign(codegen_1._ `${err}.data`, data); - } - }); -} -exports.extendErrors = extendErrors; -function addError(gen, errObj) { - const err = gen.const("err", errObj); - gen.if(codegen_1._ `${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, codegen_1._ `[${err}]`), codegen_1._ `${names_1.default.vErrors}.push(${err})`); - gen.code(codegen_1._ `${names_1.default.errors}++`); -} -function returnErrors(it, errs) { - const { gen, validateName, schemaEnv } = it; - if (schemaEnv.$async) { - gen.throw(codegen_1._ `new ${it.ValidationError}(${errs})`); - } - else { - gen.assign(codegen_1._ `${validateName}.errors`, errs); - gen.return(false); - } -} -const E = { - keyword: new codegen_1.Name("keyword"), - schemaPath: new codegen_1.Name("schemaPath"), - params: new codegen_1.Name("params"), - propertyName: new codegen_1.Name("propertyName"), - message: new codegen_1.Name("message"), - schema: new codegen_1.Name("schema"), - parentSchema: new codegen_1.Name("parentSchema"), -}; -function errorObjectCode(cxt, error, errorPaths) { - const { createErrors } = cxt.it; - if (createErrors === false) - return codegen_1._ `{}`; - return errorObject(cxt, error, errorPaths); -} -function errorObject(cxt, error, errorPaths = {}) { - const { gen, it } = cxt; - const keyValues = [ - errorInstancePath(it, errorPaths), - errorSchemaPath(cxt, errorPaths), - ]; - extraErrorProps(cxt, error, keyValues); - return gen.object(...keyValues); -} -function errorInstancePath({ errorPath }, { instancePath }) { - const instPath = instancePath - ? codegen_1.str `${errorPath}${util_1.getErrorPath(instancePath, util_1.Type.Str)}` - : errorPath; - return [names_1.default.instancePath, codegen_1.strConcat(names_1.default.instancePath, instPath)]; -} -function errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) { - let schPath = parentSchema ? errSchemaPath : codegen_1.str `${errSchemaPath}/${keyword}`; - if (schemaPath) { - schPath = codegen_1.str `${schPath}${util_1.getErrorPath(schemaPath, util_1.Type.Str)}`; - } - return [E.schemaPath, schPath]; -} -function extraErrorProps(cxt, { params, message }, keyValues) { - const { keyword, data, schemaValue, it } = cxt; - const { opts, propertyName, topSchemaRef, schemaPath } = it; - keyValues.push([E.keyword, keyword], [E.params, typeof params == "function" ? params(cxt) : params || codegen_1._ `{}`]); - if (opts.messages) { - keyValues.push([E.message, typeof message == "function" ? message(cxt) : message]); - } - if (opts.verbose) { - keyValues.push([E.schema, schemaValue], [E.parentSchema, codegen_1._ `${topSchemaRef}${schemaPath}`], [names_1.default.data, data]); - } - if (propertyName) - keyValues.push([E.propertyName, propertyName]); -} -//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/errors.js.map b/node_modules/table/node_modules/ajv/dist/compile/errors.js.map deleted file mode 100644 index a6c10309d..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../lib/compile/errors.ts"],"names":[],"mappings":";;;AAEA,uCAAgE;AAEhE,iCAAyC;AACzC,mCAAuB;AAEV,QAAA,YAAY,GAA2B;IAClD,OAAO,EAAE,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE,CAAC,aAAG,CAAA,gBAAgB,OAAO,sBAAsB;CACzE,CAAA;AAEY,QAAA,iBAAiB,GAA2B;IACvD,OAAO,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC,EAAE,EAAE,CACjC,UAAU;QACR,CAAC,CAAC,aAAG,C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AAC,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,EACvB,CAAC,CAAC,CAAC,YAAY,EAAE,WAAC,CAAA,GAAG,YAAY,GAAG,UAAU,EAAE,CAAC,EACjD,CAAC,eAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CACf,CAAA;KACF;IACD,IAAI,YAAY;QAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC,CAAA;AAClE,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/index.d.ts b/node_modules/table/node_modules/ajv/dist/compile/index.d.ts deleted file mode 100644 index 57291962e..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/index.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -import type { AnySchema, AnySchemaObject, AnyValidateFunction, EvaluatedProperties, EvaluatedItems } from "../types"; -import type Ajv from "../core"; -import type { InstanceOptions } from "../core"; -import { CodeGen, Name, Code, ValueScopeName } from "./codegen"; -import { LocalRefs } from "./resolve"; -import { JSONType } from "./rules"; -export declare type SchemaRefs = { - [Ref in string]?: SchemaEnv | AnySchema; -}; -export interface SchemaCxt { - readonly gen: CodeGen; - readonly allErrors?: boolean; - readonly data: Name; - readonly parentData: Name; - readonly parentDataProperty: Code | number; - readonly dataNames: Name[]; - readonly dataPathArr: (Code | number)[]; - readonly dataLevel: number; - dataTypes: JSONType[]; - definedProperties: Set; - readonly topSchemaRef: Code; - readonly validateName: Name; - evaluated?: Name; - readonly ValidationError?: Name; - readonly schema: AnySchema; - readonly schemaEnv: SchemaEnv; - readonly rootId: string; - baseId: string; - readonly schemaPath: Code; - readonly errSchemaPath: string; - readonly errorPath: Code; - readonly propertyName?: Name; - readonly compositeRule?: boolean; - props?: EvaluatedProperties | Name; - items?: EvaluatedItems | Name; - jtdDiscriminator?: string; - jtdMetadata?: boolean; - readonly createErrors?: boolean; - readonly opts: InstanceOptions; - readonly self: Ajv; -} -export interface SchemaObjCxt extends SchemaCxt { - readonly schema: AnySchemaObject; -} -interface SchemaEnvArgs { - readonly schema: AnySchema; - readonly root?: SchemaEnv; - readonly baseId?: string; - readonly schemaPath?: string; - readonly localRefs?: LocalRefs; - readonly meta?: boolean; -} -export declare class SchemaEnv implements SchemaEnvArgs { - readonly schema: AnySchema; - readonly root: SchemaEnv; - baseId: string; - schemaPath?: string; - localRefs?: LocalRefs; - readonly meta?: boolean; - readonly $async?: boolean; - readonly refs: SchemaRefs; - readonly dynamicAnchors: { - [Ref in string]?: true; - }; - validate?: AnyValidateFunction; - validateName?: ValueScopeName; - serialize?: (data: unknown) => string; - serializeName?: ValueScopeName; - parse?: (data: string) => unknown; - parseName?: ValueScopeName; - constructor(env: SchemaEnvArgs); -} -export declare function compileSchema(this: Ajv, sch: SchemaEnv): SchemaEnv; -export declare function resolveRef(this: Ajv, root: SchemaEnv, baseId: string, ref: string): AnySchema | SchemaEnv | undefined; -export declare function getCompilingSchema(this: Ajv, schEnv: SchemaEnv): SchemaEnv | void; -export declare function resolveSchema(this: Ajv, root: SchemaEnv, // root object with properties schema, refs TODO below SchemaEnv is assigned to it -ref: string): SchemaEnv | undefined; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/compile/index.js b/node_modules/table/node_modules/ajv/dist/compile/index.js deleted file mode 100644 index a74adf221..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/index.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0; -const codegen_1 = require("./codegen"); -const validation_error_1 = require("../runtime/validation_error"); -const names_1 = require("./names"); -const resolve_1 = require("./resolve"); -const util_1 = require("./util"); -const validate_1 = require("./validate"); -const URI = require("uri-js"); -class SchemaEnv { - constructor(env) { - var _a; - this.refs = {}; - this.dynamicAnchors = {}; - let schema; - if (typeof env.schema == "object") - schema = env.schema; - this.schema = env.schema; - this.root = env.root || this; - this.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : resolve_1.normalizeId(schema === null || schema === void 0 ? void 0 : schema.$id); - this.schemaPath = env.schemaPath; - this.localRefs = env.localRefs; - this.meta = env.meta; - this.$async = schema === null || schema === void 0 ? void 0 : schema.$async; - this.refs = {}; - } -} -exports.SchemaEnv = SchemaEnv; -// let codeSize = 0 -// let nodeCount = 0 -// Compiles schema in SchemaEnv -function compileSchema(sch) { - // TODO refactor - remove compilations - const _sch = getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const rootId = resolve_1.getFullPath(sch.root.baseId); // TODO if getFullPath removed 1 tests fails - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - let _ValidationError; - if (sch.$async) { - _ValidationError = gen.scopeValue("Error", { - ref: validation_error_1.default, - code: codegen_1._ `require("ajv/dist/runtime/validation_error").default`, - }); - } - const validateName = gen.scopeName("validate"); - sch.validateName = validateName; - const schemaCxt = { - gen, - allErrors: this.opts.allErrors, - data: names_1.default.data, - parentData: names_1.default.parentData, - parentDataProperty: names_1.default.parentDataProperty, - dataNames: [names_1.default.data], - dataPathArr: [codegen_1.nil], - dataLevel: 0, - dataTypes: [], - definedProperties: new Set(), - topSchemaRef: gen.scopeValue("schema", this.opts.code.source === true - ? { ref: sch.schema, code: codegen_1.stringify(sch.schema) } - : { ref: sch.schema }), - validateName, - ValidationError: _ValidationError, - schema: sch.schema, - schemaEnv: sch, - rootId, - baseId: sch.baseId || rootId, - schemaPath: codegen_1.nil, - errSchemaPath: sch.schemaPath || (this.opts.jtd ? "" : "#"), - errorPath: codegen_1._ `""`, - opts: this.opts, - self: this, - }; - let sourceCode; - try { - this._compilations.add(sch); - validate_1.validateFunctionCode(schemaCxt); - gen.optimize(this.opts.code.optimize); - // gen.optimize(1) - const validateCode = gen.toString(); - sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`; - // console.log((codeSize += sourceCode.length), (nodeCount += gen.nodeCount)) - if (this.opts.code.process) - sourceCode = this.opts.code.process(sourceCode, sch); - // console.log("\n\n\n *** \n", sourceCode) - const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode); - const validate = makeValidate(this, this.scope.get()); - this.scope.value(validateName, { ref: validate }); - validate.errors = null; - validate.schema = sch.schema; - validate.schemaEnv = sch; - if (sch.$async) - validate.$async = true; - if (this.opts.code.source === true) { - validate.source = { validateName, validateCode, scopeValues: gen._values }; - } - if (this.opts.unevaluated) { - const { props, items } = schemaCxt; - validate.evaluated = { - props: props instanceof codegen_1.Name ? undefined : props, - items: items instanceof codegen_1.Name ? undefined : items, - dynamicProps: props instanceof codegen_1.Name, - dynamicItems: items instanceof codegen_1.Name, - }; - if (validate.source) - validate.source.evaluated = codegen_1.stringify(validate.evaluated); - } - sch.validate = validate; - return sch; - } - catch (e) { - delete sch.validate; - delete sch.validateName; - if (sourceCode) - this.logger.error("Error compiling schema, function code:", sourceCode); - // console.log("\n\n\n *** \n", sourceCode, this.opts) - throw e; - } - finally { - this._compilations.delete(sch); - } -} -exports.compileSchema = compileSchema; -function resolveRef(root, baseId, ref) { - var _a; - ref = resolve_1.resolveUrl(baseId, ref); - const schOrFunc = root.refs[ref]; - if (schOrFunc) - return schOrFunc; - let _sch = resolve.call(this, root, ref); - if (_sch === undefined) { - const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref]; // TODO maybe localRefs should hold SchemaEnv - if (schema) - _sch = new SchemaEnv({ schema, root, baseId }); - } - if (_sch === undefined) - return; - return (root.refs[ref] = inlineOrCompile.call(this, _sch)); -} -exports.resolveRef = resolveRef; -function inlineOrCompile(sch) { - if (resolve_1.inlineRef(sch.schema, this.opts.inlineRefs)) - return sch.schema; - return sch.validate ? sch : compileSchema.call(this, sch); -} -// Index of schema compilation in the currently compiled list -function getCompilingSchema(schEnv) { - for (const sch of this._compilations) { - if (sameSchemaEnv(sch, schEnv)) - return sch; - } -} -exports.getCompilingSchema = getCompilingSchema; -function sameSchemaEnv(s1, s2) { - return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId; -} -// resolve and compile the references ($ref) -// TODO returns AnySchemaObject (if the schema can be inlined) or validation function -function resolve(root, // information about the root schema for the current schema -ref // reference to resolve -) { - let sch; - while (typeof (sch = this.refs[ref]) == "string") - ref = sch; - return sch || this.schemas[ref] || resolveSchema.call(this, root, ref); -} -// Resolve schema, its root and baseId -function resolveSchema(root, // root object with properties schema, refs TODO below SchemaEnv is assigned to it -ref // reference to resolve -) { - const p = URI.parse(ref); - const refPath = resolve_1._getFullPath(p); - let baseId = resolve_1.getFullPath(root.baseId); - // TODO `Object.keys(root.schema).length > 0` should not be needed - but removing breaks 2 tests - if (Object.keys(root.schema).length > 0 && refPath === baseId) { - return getJsonPointer.call(this, p, root); - } - const id = resolve_1.normalizeId(refPath); - const schOrRef = this.refs[id] || this.schemas[id]; - if (typeof schOrRef == "string") { - const sch = resolveSchema.call(this, root, schOrRef); - if (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== "object") - return; - return getJsonPointer.call(this, p, sch); - } - if (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== "object") - return; - if (!schOrRef.validate) - compileSchema.call(this, schOrRef); - if (id === resolve_1.normalizeId(ref)) { - const { schema } = schOrRef; - if (schema.$id) - baseId = resolve_1.resolveUrl(baseId, schema.$id); - return new SchemaEnv({ schema, root, baseId }); - } - return getJsonPointer.call(this, p, schOrRef); -} -exports.resolveSchema = resolveSchema; -const PREVENT_SCOPE_CHANGE = new Set([ - "properties", - "patternProperties", - "enum", - "dependencies", - "definitions", -]); -function getJsonPointer(parsedRef, { baseId, schema, root }) { - var _a; - if (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== "/") - return; - for (const part of parsedRef.fragment.slice(1).split("/")) { - if (typeof schema == "boolean") - return; - schema = schema[util_1.unescapeFragment(part)]; - if (schema === undefined) - return; - // TODO PREVENT_SCOPE_CHANGE could be defined in keyword def? - if (!PREVENT_SCOPE_CHANGE.has(part) && typeof schema == "object" && schema.$id) { - baseId = resolve_1.resolveUrl(baseId, schema.$id); - } - } - let env; - if (typeof schema != "boolean" && schema.$ref && !util_1.schemaHasRulesButRef(schema, this.RULES)) { - const $ref = resolve_1.resolveUrl(baseId, schema.$ref); - env = resolveSchema.call(this, root, $ref); - } - // even though resolution failed we need to return SchemaEnv to throw exception - // so that compileAsync loads missing schema. - env = env || new SchemaEnv({ schema, root, baseId }); - if (env.schema !== env.root.schema) - return env; - return undefined; -} -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/index.js.map b/node_modules/table/node_modules/ajv/dist/compile/index.js.map deleted file mode 100644 index 5de0c7483..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/compile/index.ts"],"names":[],"mappings":";;;AAUA,uCAAgF;AAChF,kEAAyD;AACzD,mCAAuB;AACvB,uCAAkG;AAClG,iCAA6D;AAC7D,yCAA+C;AAC/C,8BAA6B;AAwD7B,MAAa,SAAS;IAiBpB,YAAY,GAAkB;;QATrB,SAAI,GAAe,EAAE,CAAA;QACrB,mBAAc,GAA6B,EAAE,CAAA;QASpD,IAAI,MAAmC,CAAA;QACvC,IAAI,OAAO,GAAG,CAAC,MAAM,IAAI,QAAQ;YAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QACtD,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,IAAI,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAA,GAAG,CAAC,MAAM,mCAAI,qBAAW,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,GAAG,CAAC,CAAA;QACpD,IAAI,CAAC,UAAU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AE;YAC9E,MAAM,GAAG,oBAAU,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;SACxC;KACF;IACD,IAAI,GAA0B,CAAA;IAC9B,IAAI,OAAO,MAAM,IAAI,SAAS,IAAI,MAAM,CAAC,IAAI,IAAI,CAAC,2BAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE;QAC1F,MAAM,IAAI,GAAG,oBAAU,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;QAC5C,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;KAC3C;IACD,+EAA+E;IAC/E,6CAA6C;IAC7C,GAAG,GAAG,GAAG,IAAI,IAAI,SAAS,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC,CAAA;IAClD,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,MAAM;QAAE,OAAO,GAAG,CAAA;IAC9C,OAAO,SAAS,CAAA;AAClB,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.d.ts b/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.d.ts deleted file mode 100644 index 618c64aea..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type Ajv from "../../core"; -import { SchemaObjectMap } from "./types"; -import { SchemaEnv } from ".."; -export default function compileParser(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv; diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js b/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js deleted file mode 100644 index aa0be5b30..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js +++ /dev/null @@ -1,337 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const types_1 = require("./types"); -const __1 = require(".."); -const codegen_1 = require("../codegen"); -const ref_error_1 = require("../ref_error"); -const names_1 = require("../names"); -const code_1 = require("../../vocabularies/code"); -const ref_1 = require("../../vocabularies/jtd/ref"); -const type_1 = require("../../vocabularies/jtd/type"); -const parseJson_1 = require("../../runtime/parseJson"); -const util_1 = require("../util"); -const timestamp_1 = require("../../runtime/timestamp"); -const genParse = { - elements: parseElements, - values: parseValues, - discriminator: parseDiscriminator, - properties: parseProperties, - optionalProperties: parseProperties, - enum: parseEnum, - type: parseType, - ref: parseRef, -}; -function compileParser(sch, definitions) { - const _sch = __1.getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - const parseName = gen.scopeName("parse"); - const cxt = { - self: this, - gen, - schema: sch.schema, - schemaEnv: sch, - definitions, - data: names_1.default.data, - parseName, - char: gen.name("c"), - }; - let sourceCode; - try { - this._compilations.add(sch); - sch.parseName = parseName; - parserFunction(cxt); - gen.optimize(this.opts.code.optimize); - const parseFuncCode = gen.toString(); - sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${parseFuncCode}`; - const makeParse = new Function(`${names_1.default.scope}`, sourceCode); - const parse = makeParse(this.scope.get()); - this.scope.value(parseName, { ref: parse }); - sch.parse = parse; - } - catch (e) { - if (sourceCode) - this.logger.error("Error compiling parser, function code:", sourceCode); - delete sch.parse; - delete sch.parseName; - throw e; - } - finally { - this._compilations.delete(sch); - } - return sch; -} -exports.default = compileParser; -const undef = codegen_1._ `undefined`; -function parserFunction(cxt) { - const { gen, parseName, char } = cxt; - gen.func(parseName, codegen_1._ `${names_1.default.json}, ${names_1.default.jsonPos}, ${names_1.default.jsonPart}`, false, () => { - gen.let(names_1.default.data); - gen.let(char); - gen.assign(codegen_1._ `${parseName}.message`, undef); - gen.assign(codegen_1._ `${parseName}.position`, undef); - gen.assign(names_1.default.jsonPos, codegen_1._ `${names_1.default.jsonPos} || 0`); - gen.const(names_1.default.jsonLen, codegen_1._ `${names_1.default.json}.length`); - parseCode(cxt); - skipWhitespace(cxt); - gen.if(names_1.default.jsonPart, () => { - gen.assign(codegen_1._ `${parseName}.position`, names_1.default.jsonPos); - gen.return(names_1.default.data); - }); - gen.if(codegen_1._ `${names_1.default.jsonPos} === ${names_1.default.jsonLen}`, () => gen.return(names_1.default.data)); - jsonSyntaxError(cxt); - }); -} -function parseCode(cxt) { - let form; - for (const key of types_1.jtdForms) { - if (key in cxt.schema) { - form = key; - break; - } - } - if (form) - parseNullable(cxt, genParse[form]); - else - parseEmpty(cxt); -} -const parseBoolean = parseBooleanToken(true, parseBooleanToken(false, jsonSyntaxError)); -function parseNullable(cxt, parseForm) { - const { gen, schema, data } = cxt; - if (!schema.nullable) - return parseForm(cxt); - tryParseToken(cxt, "null", parseForm, () => gen.assign(data, null)); -} -function parseElements(cxt) { - const { gen, schema, data } = cxt; - parseToken(cxt, "["); - const ix = gen.let("i", 0); - gen.assign(data, codegen_1._ `[]`); - parseItems(cxt, "]", () => { - const el = gen.let("el"); - parseCode({ ...cxt, schema: schema.elements, data: el }); - gen.assign(codegen_1._ `${data}[${ix}++]`, el); - }); -} -function parseValues(cxt) { - const { gen, schema, data } = cxt; - parseToken(cxt, "{"); - gen.assign(data, codegen_1._ `{}`); - parseItems(cxt, "}", () => parseKeyValue(cxt, schema.values)); -} -function parseItems(cxt, endToken, block) { - tryParseItems(cxt, endToken, block); - parseToken(cxt, endToken); -} -function tryParseItems(cxt, endToken, block) { - const { gen } = cxt; - gen.for(codegen_1._ `;${names_1.default.jsonPos}<${names_1.default.jsonLen} && ${jsonSlice(1)}!==${endToken};`, () => { - block(); - tryParseToken(cxt, ",", () => gen.break(), hasItem); - }); - function hasItem() { - tryParseToken(cxt, endToken, () => { }, jsonSyntaxError); - } -} -function parseKeyValue(cxt, schema) { - const { gen } = cxt; - const key = gen.let("key"); - parseString({ ...cxt, data: key }); - parseToken(cxt, ":"); - parsePropertyValue(cxt, key, schema); -} -function parseDiscriminator(cxt) { - const { gen, data, schema } = cxt; - const { discriminator, mapping } = schema; - parseToken(cxt, "{"); - gen.assign(data, codegen_1._ `{}`); - const startPos = gen.const("pos", names_1.default.jsonPos); - const value = gen.let("value"); - const tag = gen.let("tag"); - tryParseItems(cxt, "}", () => { - const key = gen.let("key"); - parseString({ ...cxt, data: key }); - parseToken(cxt, ":"); - gen.if(codegen_1._ `${key} === ${discriminator}`, () => { - parseString({ ...cxt, data: tag }); - gen.assign(codegen_1._ `${data}[${key}]`, tag); - gen.break(); - }, () => parseEmpty({ ...cxt, data: value }) // can be discarded/skipped - ); - }); - gen.assign(names_1.default.jsonPos, startPos); - gen.if(codegen_1._ `${tag} === undefined`); - parsingError(cxt, codegen_1.str `discriminator tag not found`); - for (const tagValue in mapping) { - gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); - parseSchemaProperties({ ...cxt, schema: mapping[tagValue] }, discriminator); - } - gen.else(); - parsingError(cxt, codegen_1.str `discriminator value not in schema`); - gen.endIf(); -} -function parseProperties(cxt) { - const { gen, data } = cxt; - parseToken(cxt, "{"); - gen.assign(data, codegen_1._ `{}`); - parseSchemaProperties(cxt); -} -function parseSchemaProperties(cxt, discriminator) { - const { gen, schema, data } = cxt; - const { properties, optionalProperties, additionalProperties } = schema; - parseItems(cxt, "}", () => { - const key = gen.let("key"); - parseString({ ...cxt, data: key }); - parseToken(cxt, ":"); - gen.if(false); - parseDefinedProperty(cxt, key, properties); - parseDefinedProperty(cxt, key, optionalProperties); - if (discriminator) { - gen.elseIf(codegen_1._ `${key} === ${discriminator}`); - const tag = gen.let("tag"); - parseString({ ...cxt, data: tag }); // can be discarded, it is already assigned - } - gen.else(); - if (additionalProperties) { - parseEmpty({ ...cxt, data: codegen_1._ `${data}[${key}]` }); - } - else { - parsingError(cxt, codegen_1.str `property ${key} not allowed`); - } - gen.endIf(); - }); - if (properties) { - const hasProp = code_1.hasPropFunc(gen); - const allProps = codegen_1.and(...Object.keys(properties).map((p) => codegen_1._ `${hasProp}.call(${data}, ${p})`)); - gen.if(codegen_1.not(allProps), () => parsingError(cxt, codegen_1.str `missing required properties`)); - } -} -function parseDefinedProperty(cxt, key, schemas = {}) { - const { gen } = cxt; - for (const prop in schemas) { - gen.elseIf(codegen_1._ `${key} === ${prop}`); - parsePropertyValue(cxt, key, schemas[prop]); - } -} -function parsePropertyValue(cxt, key, schema) { - parseCode({ ...cxt, schema, data: codegen_1._ `${cxt.data}[${key}]` }); -} -function parseType(cxt) { - const { gen, schema, data } = cxt; - switch (schema.type) { - case "boolean": - parseBoolean(cxt); - break; - case "string": - parseString(cxt); - break; - case "timestamp": { - // TODO parse timestamp? - parseString(cxt); - const vts = util_1.useFunc(gen, timestamp_1.default); - gen.if(codegen_1._ `!${vts}(${data})`, () => parsingError(cxt, codegen_1.str `invalid timestamp`)); - break; - } - case "float32": - case "float64": - parseNumber(cxt); - break; - default: { - const [min, max, maxDigits] = type_1.intRange[schema.type]; - parseNumber(cxt, maxDigits); - gen.if(codegen_1._ `${data} < ${min} || ${data} > ${max}`, () => parsingError(cxt, codegen_1.str `integer out of range`)); - } - } -} -function parseString(cxt) { - parseToken(cxt, '"'); - parseWith(cxt, parseJson_1.parseJsonString); -} -function parseEnum(cxt) { - const { gen, data, schema } = cxt; - const enumSch = schema.enum; - parseToken(cxt, '"'); - // TODO loopEnum - gen.if(false); - for (const value of enumSch) { - const valueStr = JSON.stringify(value).slice(1); // remove starting quote - gen.elseIf(codegen_1._ `${jsonSlice(valueStr.length)} === ${valueStr}`); - gen.assign(data, codegen_1.str `${value}`); - gen.add(names_1.default.jsonPos, valueStr.length); - } - gen.else(); - jsonSyntaxError(cxt); - gen.endIf(); -} -function parseNumber(cxt, maxDigits) { - const { gen } = cxt; - skipWhitespace(cxt); - gen.if(codegen_1._ `"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits)); -} -function parseBooleanToken(bool, fail) { - return (cxt) => { - const { gen, data } = cxt; - tryParseToken(cxt, `${bool}`, () => fail(cxt), () => gen.assign(data, bool)); - }; -} -function parseRef(cxt) { - const { gen, self, definitions, schema, schemaEnv } = cxt; - const { ref } = schema; - const refSchema = definitions[ref]; - if (!refSchema) - throw new ref_error_1.default("", ref, `No definition ${ref}`); - if (!ref_1.hasRef(refSchema)) - return parseCode({ ...cxt, schema: refSchema }); - const { root } = schemaEnv; - const sch = compileParser.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions); - partialParse(cxt, getParser(gen, sch), true); -} -function getParser(gen, sch) { - return sch.parse - ? gen.scopeValue("parse", { ref: sch.parse }) - : codegen_1._ `${gen.scopeValue("wrapper", { ref: sch })}.parse`; -} -function parseEmpty(cxt) { - parseWith(cxt, parseJson_1.parseJson); -} -function parseWith(cxt, parseFunc, args) { - partialParse(cxt, util_1.useFunc(cxt.gen, parseFunc), args); -} -function partialParse(cxt, parseFunc, args) { - const { gen, data } = cxt; - gen.assign(data, codegen_1._ `${parseFunc}(${names_1.default.json}, ${names_1.default.jsonPos}${args ? codegen_1._ `, ${args}` : codegen_1.nil})`); - gen.assign(names_1.default.jsonPos, codegen_1._ `${parseFunc}.position`); - gen.if(codegen_1._ `${data} === undefined`, () => parsingError(cxt, codegen_1._ `${parseFunc}.message`)); -} -function parseToken(cxt, tok) { - tryParseToken(cxt, tok, jsonSyntaxError); -} -function tryParseToken(cxt, tok, fail, success) { - const { gen } = cxt; - const n = tok.length; - skipWhitespace(cxt); - gen.if(codegen_1._ `${jsonSlice(n)} === ${tok}`, () => { - gen.add(names_1.default.jsonPos, n); - success === null || success === void 0 ? void 0 : success(cxt); - }, () => fail(cxt)); -} -function skipWhitespace({ gen, char: c }) { - gen.code(codegen_1._ `while((${c}=${names_1.default.json}[${names_1.default.jsonPos}],${c}===" "||${c}==="\\n"||${c}==="\\r"||${c}==="\\t"))${names_1.default.jsonPos}++;`); -} -function jsonSlice(len) { - return len === 1 - ? codegen_1._ `${names_1.default.json}[${names_1.default.jsonPos}]` - : codegen_1._ `${names_1.default.json}.slice(${names_1.default.jsonPos}, ${names_1.default.jsonPos}+${len})`; -} -function jsonSyntaxError(cxt) { - parsingError(cxt, codegen_1._ `"unexpected token " + ${names_1.default.json}[${names_1.default.jsonPos}]`); -} -function parsingError({ gen, parseName }, msg) { - gen.assign(codegen_1._ `${parseName}.message`, msg); - gen.assign(codegen_1._ `${parseName}.position`, names_1.default.jsonPos); - gen.return(undef); -} -//# sourceMappingURL=parse.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js.map b/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js.map deleted file mode 100644 index 16a6a0dbf..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/parse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../../lib/compile/jtd/parse.ts"],"names":[],"mappings":";;AAEA,mCAA0D;AAC1D,0BAAgD;AAChD,wCAA+E;AAC/E,4CAA0C;AAC1C,oCAAwB;AACxB,kDAAmD;AACnD,oDAAiD;AACjD,sDAA6D;AAC7D,uDAAmF;AACnF,kCAA+B;AAC/B,uDAAoD;AAIpD,MAAM,QAAQ,GAA+B;IAC3C,QAAQ,EAAE,aAAa;IACvB,MAAM,EAAE,WAAW;IACnB,aAAa,EAAE,kBAAkB;IACjC,UAAU,EAAE,eAAe;IAC3B,kBAAkB,EAAE,eAAe;IACnC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,QAAQ;CACd,CAAA;AAaD,SAAwB,aAAa,CAEnC,GAAc,EACd,WAA4B;IAE5B,MAAM,IAAI,GAAG,sBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC/C,IAAI,IAAI;QAAE,OAAO,IAAI,CAAA;IACrB,MAAM,EAAC,GAAG,EAAE,KAAK,EAAC,GAAG,IA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C;AAED,SAAS,eAAe,CAAC,GAAa;IACpC,YAAY,CAAC,GAAG,EAAE,WAAC,CAAA,yBAAyB,eAAC,CAAC,IAAI,IAAI,eAAC,CAAC,OAAO,GAAG,CAAC,CAAA;AACrE,CAAC;AAED,SAAS,YAAY,CAAC,EAAC,GAAG,EAAE,SAAS,EAAW,EAAE,GAAS;IACzD,GAAG,CAAC,MAAM,CAAC,WAAC,CAAA,GAAG,SAAS,UAAU,EAAE,GAAG,CAAC,CAAA;IACxC,GAAG,CAAC,MAAM,CAAC,WAAC,CAAA,GAAG,SAAS,WAAW,EAAE,eAAC,CAAC,OAAO,CAAC,CAAA;IAC/C,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACnB,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.d.ts b/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.d.ts deleted file mode 100644 index b0413d716..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type Ajv from "../../core"; -import { SchemaObjectMap } from "./types"; -import { SchemaEnv } from ".."; -export default function compileSerializer(this: Ajv, sch: SchemaEnv, definitions: SchemaObjectMap): SchemaEnv; diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js b/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js deleted file mode 100644 index 69f0f563c..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js +++ /dev/null @@ -1,218 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const types_1 = require("./types"); -const __1 = require(".."); -const codegen_1 = require("../codegen"); -const ref_error_1 = require("../ref_error"); -const names_1 = require("../names"); -const code_1 = require("../../vocabularies/code"); -const ref_1 = require("../../vocabularies/jtd/ref"); -const util_1 = require("../util"); -const quote_1 = require("../../runtime/quote"); -const genSerialize = { - elements: serializeElements, - values: serializeValues, - discriminator: serializeDiscriminator, - properties: serializeProperties, - optionalProperties: serializeProperties, - enum: serializeString, - type: serializeType, - ref: serializeRef, -}; -function compileSerializer(sch, definitions) { - const _sch = __1.getCompilingSchema.call(this, sch); - if (_sch) - return _sch; - const { es5, lines } = this.opts.code; - const { ownProperties } = this.opts; - const gen = new codegen_1.CodeGen(this.scope, { es5, lines, ownProperties }); - const serializeName = gen.scopeName("serialize"); - const cxt = { - self: this, - gen, - schema: sch.schema, - schemaEnv: sch, - definitions, - data: names_1.default.data, - }; - let sourceCode; - try { - this._compilations.add(sch); - sch.serializeName = serializeName; - gen.func(serializeName, names_1.default.data, false, () => { - gen.let(names_1.default.json, codegen_1.str ``); - serializeCode(cxt); - gen.return(names_1.default.json); - }); - gen.optimize(this.opts.code.optimize); - const serializeFuncCode = gen.toString(); - sourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${serializeFuncCode}`; - const makeSerialize = new Function(`${names_1.default.scope}`, sourceCode); - const serialize = makeSerialize(this.scope.get()); - this.scope.value(serializeName, { ref: serialize }); - sch.serialize = serialize; - } - catch (e) { - if (sourceCode) - this.logger.error("Error compiling serializer, function code:", sourceCode); - delete sch.serialize; - delete sch.serializeName; - throw e; - } - finally { - this._compilations.delete(sch); - } - return sch; -} -exports.default = compileSerializer; -function serializeCode(cxt) { - let form; - for (const key of types_1.jtdForms) { - if (key in cxt.schema) { - form = key; - break; - } - } - serializeNullable(cxt, form ? genSerialize[form] : serializeEmpty); -} -function serializeNullable(cxt, serializeForm) { - const { gen, schema, data } = cxt; - if (!schema.nullable) - return serializeForm(cxt); - gen.if(codegen_1._ `${data} === undefined || ${data} === null`, () => gen.add(names_1.default.json, codegen_1._ `"null"`), () => serializeForm(cxt)); -} -function serializeElements(cxt) { - const { gen, schema, data } = cxt; - gen.add(names_1.default.json, codegen_1.str `[`); - const first = gen.let("first", true); - gen.forOf("el", data, (el) => { - addComma(cxt, first); - serializeCode({ ...cxt, schema: schema.elements, data: el }); - }); - gen.add(names_1.default.json, codegen_1.str `]`); -} -function serializeValues(cxt) { - const { gen, schema, data } = cxt; - gen.add(names_1.default.json, codegen_1.str `{`); - const first = gen.let("first", true); - gen.forIn("key", data, (key) => serializeKeyValue(cxt, key, schema.values, first)); - gen.add(names_1.default.json, codegen_1.str `}`); -} -function serializeKeyValue(cxt, key, schema, first) { - const { gen, data } = cxt; - addComma(cxt, first); - serializeString({ ...cxt, data: key }); - gen.add(names_1.default.json, codegen_1.str `:`); - const value = gen.const("value", codegen_1._ `${data}${codegen_1.getProperty(key)}`); - serializeCode({ ...cxt, schema, data: value }); -} -function serializeDiscriminator(cxt) { - const { gen, schema, data } = cxt; - const { discriminator } = schema; - gen.add(names_1.default.json, codegen_1.str `{${JSON.stringify(discriminator)}:`); - const tag = gen.const("tag", codegen_1._ `${data}${codegen_1.getProperty(discriminator)}`); - serializeString({ ...cxt, data: tag }); - gen.if(false); - for (const tagValue in schema.mapping) { - gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); - const sch = schema.mapping[tagValue]; - serializeSchemaProperties({ ...cxt, schema: sch }, discriminator); - } - gen.endIf(); - gen.add(names_1.default.json, codegen_1.str `}`); -} -function serializeProperties(cxt) { - const { gen } = cxt; - gen.add(names_1.default.json, codegen_1.str `{`); - serializeSchemaProperties(cxt); - gen.add(names_1.default.json, codegen_1.str `}`); -} -function serializeSchemaProperties(cxt, discriminator) { - const { gen, schema, data } = cxt; - const { properties, optionalProperties } = schema; - const props = keys(properties); - const optProps = keys(optionalProperties); - const allProps = allProperties(props.concat(optProps)); - let first = !discriminator; - for (const key of props) { - serializeProperty(key, properties[key], keyValue(key)); - } - for (const key of optProps) { - const value = keyValue(key); - gen.if(codegen_1.and(codegen_1._ `${value} !== undefined`, code_1.isOwnProperty(gen, data, key)), () => serializeProperty(key, optionalProperties[key], value)); - } - if (schema.additionalProperties) { - gen.forIn("key", data, (key) => gen.if(isAdditional(key, allProps), () => serializeKeyValue(cxt, key, {}, gen.let("first", first)))); - } - function keys(ps) { - return ps ? Object.keys(ps) : []; - } - function allProperties(ps) { - if (discriminator) - ps.push(discriminator); - if (new Set(ps).size !== ps.length) { - throw new Error("JTD: properties/optionalProperties/disciminator overlap"); - } - return ps; - } - function keyValue(key) { - return gen.const("value", codegen_1._ `${data}${codegen_1.getProperty(key)}`); - } - function serializeProperty(key, propSchema, value) { - if (first) - first = false; - else - gen.add(names_1.default.json, codegen_1.str `,`); - gen.add(names_1.default.json, codegen_1.str `${JSON.stringify(key)}:`); - serializeCode({ ...cxt, schema: propSchema, data: value }); - } - function isAdditional(key, ps) { - return ps.length ? codegen_1.and(...ps.map((p) => codegen_1._ `${key} !== ${p}`)) : true; - } -} -function serializeType(cxt) { - const { gen, schema, data } = cxt; - switch (schema.type) { - case "boolean": - gen.add(names_1.default.json, codegen_1._ `${data} ? "true" : "false"`); - break; - case "string": - serializeString(cxt); - break; - case "timestamp": - gen.if(codegen_1._ `${data} instanceof Date`, () => gen.add(names_1.default.json, codegen_1._ `${data}.toISOString()`), () => serializeString(cxt)); - break; - default: - serializeNumber(cxt); - } -} -function serializeString({ gen, data }) { - gen.add(names_1.default.json, codegen_1._ `${util_1.useFunc(gen, quote_1.default)}(${data})`); -} -function serializeNumber({ gen, data }) { - gen.add(names_1.default.json, codegen_1._ `"" + ${data}`); -} -function serializeRef(cxt) { - const { gen, self, data, definitions, schema, schemaEnv } = cxt; - const { ref } = schema; - const refSchema = definitions[ref]; - if (!refSchema) - throw new ref_error_1.default("", ref, `No definition ${ref}`); - if (!ref_1.hasRef(refSchema)) - return serializeCode({ ...cxt, schema: refSchema }); - const { root } = schemaEnv; - const sch = compileSerializer.call(self, new __1.SchemaEnv({ schema: refSchema, root }), definitions); - gen.add(names_1.default.json, codegen_1._ `${getSerialize(gen, sch)}(${data})`); -} -function getSerialize(gen, sch) { - return sch.serialize - ? gen.scopeValue("serialize", { ref: sch.serialize }) - : codegen_1._ `${gen.scopeValue("wrapper", { ref: sch })}.serialize`; -} -function serializeEmpty({ gen, data }) { - gen.add(names_1.default.json, codegen_1._ `JSON.stringify(${data})`); -} -function addComma({ gen }, first) { - gen.if(first, () => gen.assign(first, false), () => gen.add(names_1.default.json, codegen_1.str `,`)); -} -//# sourceMappingURL=serialize.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js.map b/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js.map deleted file mode 100644 index b3b9c305f..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"serialize.js","sourceRoot":"","sources":["../../../lib/compile/jtd/serialize.ts"],"names":[],"mappings":";;AAEA,mCAA0D;AAC1D,0BAAgD;AAChD,wCAAwE;AACxE,4CAA0C;AAC1C,oCAAwB;AACxB,kDAAqD;AACrD,oDAAiD;AACjD,kCAA+B;AAC/B,+CAAuC;AAEvC,MAAM,YAAY,GAAkD;IAClE,QAAQ,EAAE,iBAAiB;IAC3B,MAAM,EAAE,eAAe;IACvB,aAAa,EAAE,sBAAsB;IACrC,UAAU,EAAE,mBAAmB;IAC/B,kBAAkB,EAAE,mBAAmB;IACvC,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,aAAa;IACnB,GAAG,EAAE,YAAY;CAClB,CAAA;AAWD,SAAwB,iBAAiB,CAEvC,GAAc,EACd,WAA4B;IAE5B,MAAM,IAAI,GAAG,sBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC/C,IAAI,IAAI;QAAE,OAAO,IAAI,CAAA;IACrB,MAAM,EAAC,GAAG,EAAE,KAAK,EAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;IACnC,MAAM,EAAC,aAAa,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;IACjC,MAAM,GAAG,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,KAAK,EAAE,EAAC,GAAG,EAAE,KAAK,EAAE,aAAa,EAAC,CAAC,CAAA;IAChE,M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QAClB,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,EAAC,GAAG,EAAE,GAAG,CAAC,SAAS,EAAC,CAAC;QACnD,CAAC,CAAC,WAAC,CAAA,GAAG,GAAG,CAAC,UAAU,CAAC,SAAS,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,CAAC,YAAY,CAAA;AAC3D,CAAC;AAED,SAAS,cAAc,CAAC,EAAC,GAAG,EAAE,IAAI,EAAe;IAC/C,GAAG,CAAC,GAAG,CAAC,eAAC,CAAC,IAAI,EAAE,WAAC,CAAA,kBAAkB,IAAI,GAAG,CAAC,CAAA;AAC7C,CAAC;AAED,SAAS,QAAQ,CAAC,EAAC,GAAG,EAAe,EAAE,KAAW;IAChD,GAAG,CAAC,EAAE,CACJ,KAAK,EACL,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EAC9B,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,eAAC,CAAC,IAAI,EAAE,aAAG,CAAA,GAAG,CAAC,CAC9B,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/types.d.ts b/node_modules/table/node_modules/ajv/dist/compile/jtd/types.d.ts deleted file mode 100644 index 38c8bea7f..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/types.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SchemaObject } from "../../types"; -export declare type SchemaObjectMap = { - [Ref in string]?: SchemaObject; -}; -export declare const jtdForms: readonly ["elements", "values", "discriminator", "properties", "optionalProperties", "enum", "type", "ref"]; -export declare type JTDForm = typeof jtdForms[number]; diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js b/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js deleted file mode 100644 index b9c60a90f..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.jtdForms = void 0; -exports.jtdForms = [ - "elements", - "values", - "discriminator", - "properties", - "optionalProperties", - "enum", - "type", - "ref", -]; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js.map b/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js.map deleted file mode 100644 index 53439e002..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/jtd/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/compile/jtd/types.ts"],"names":[],"mappings":";;;AAIa,QAAA,QAAQ,GAAG;IACtB,UAAU;IACV,QAAQ;IACR,eAAe;IACf,YAAY;IACZ,oBAAoB;IACpB,MAAM;IACN,MAAM;IACN,KAAK;CACG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/names.d.ts b/node_modules/table/node_modules/ajv/dist/compile/names.d.ts deleted file mode 100644 index 5740e82c6..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/names.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Name } from "./codegen"; -declare const names: { - data: Name; - valCxt: Name; - instancePath: Name; - parentData: Name; - parentDataProperty: Name; - rootData: Name; - dynamicAnchors: Name; - vErrors: Name; - errors: Name; - this: Name; - self: Name; - scope: Name; - json: Name; - jsonPos: Name; - jsonLen: Name; - jsonPart: Name; -}; -export default names; diff --git a/node_modules/table/node_modules/ajv/dist/compile/names.js b/node_modules/table/node_modules/ajv/dist/compile/names.js deleted file mode 100644 index 015334bd5..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/names.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("./codegen"); -const names = { - // validation function arguments - data: new codegen_1.Name("data"), - // args passed from referencing schema - valCxt: new codegen_1.Name("valCxt"), - instancePath: new codegen_1.Name("instancePath"), - parentData: new codegen_1.Name("parentData"), - parentDataProperty: new codegen_1.Name("parentDataProperty"), - rootData: new codegen_1.Name("rootData"), - dynamicAnchors: new codegen_1.Name("dynamicAnchors"), - // function scoped variables - vErrors: new codegen_1.Name("vErrors"), - errors: new codegen_1.Name("errors"), - this: new codegen_1.Name("this"), - // "globals" - self: new codegen_1.Name("self"), - scope: new codegen_1.Name("scope"), - // JTD serialize/parse name for JSON string and position - json: new codegen_1.Name("json"), - jsonPos: new codegen_1.Name("jsonPos"), - jsonLen: new codegen_1.Name("jsonLen"), - jsonPart: new codegen_1.Name("jsonPart"), -}; -exports.default = names; -//# sourceMappingURL=names.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/names.js.map b/node_modules/table/node_modules/ajv/dist/compile/names.js.map deleted file mode 100644 index 9bbe8e275..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/names.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"names.js","sourceRoot":"","sources":["../../lib/compile/names.ts"],"names":[],"mappings":";;AAAA,uCAA8B;AAE9B,MAAM,KAAK,GAAG;IACZ,gCAAgC;IAChC,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,sCAAsC;IACtC,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC;IAC1B,YAAY,EAAE,IAAI,cAAI,CAAC,cAAc,CAAC;IACtC,UAAU,EAAE,IAAI,cAAI,CAAC,YAAY,CAAC;IAClC,kBAAkB,EAAE,IAAI,cAAI,CAAC,oBAAoB,CAAC;IAClD,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC;IAC9B,cAAc,EAAE,IAAI,cAAI,CAAC,gBAAgB,CAAC;IAC1C,4BAA4B;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,MAAM,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC;IAC1B,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,YAAY;IACZ,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,KAAK,EAAE,IAAI,cAAI,CAAC,OAAO,CAAC;IACxB,wDAAwD;IACxD,IAAI,EAAE,IAAI,cAAI,CAAC,MAAM,CAAC;IACtB,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,cAAI,CAAC,SAAS,CAAC;IAC5B,QAAQ,EAAE,IAAI,cAAI,CAAC,UAAU,CAAC;CAC/B,CAAA;AAED,kBAAe,KAAK,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/ref_error.d.ts b/node_modules/table/node_modules/ajv/dist/compile/ref_error.d.ts deleted file mode 100644 index 33e06e6e8..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/ref_error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default class MissingRefError extends Error { - readonly missingRef: string; - readonly missingSchema: string; - constructor(baseId: string, ref: string, msg?: string); -} diff --git a/node_modules/table/node_modules/ajv/dist/compile/ref_error.js b/node_modules/table/node_modules/ajv/dist/compile/ref_error.js deleted file mode 100644 index b4c8cc360..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/ref_error.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const resolve_1 = require("./resolve"); -class MissingRefError extends Error { - constructor(baseId, ref, msg) { - super(msg || `can't resolve reference ${ref} from id ${baseId}`); - this.missingRef = resolve_1.resolveUrl(baseId, ref); - this.missingSchema = resolve_1.normalizeId(resolve_1.getFullPath(this.missingRef)); - } -} -exports.default = MissingRefError; -//# sourceMappingURL=ref_error.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/ref_error.js.map b/node_modules/table/node_modules/ajv/dist/compile/ref_error.js.map deleted file mode 100644 index d57dfb3c0..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/ref_error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ref_error.js","sourceRoot":"","sources":["../../lib/compile/ref_error.ts"],"names":[],"mappings":";;AAAA,uCAA8D;AAE9D,MAAqB,eAAgB,SAAQ,KAAK;IAIhD,YAAY,MAAc,EAAE,GAAW,EAAE,GAAY;QACnD,KAAK,CAAC,GAAG,IAAI,2BAA2B,GAAG,YAAY,MAAM,EAAE,CAAC,CAAA;QAChE,IAAI,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QACzC,IAAI,CAAC,aAAa,GAAG,qBAAW,CAAC,qBAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;IAChE,CAAC;CACF;AATD,kCASC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/resolve.d.ts b/node_modules/table/node_modules/ajv/dist/compile/resolve.d.ts deleted file mode 100644 index 7a84126b4..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/resolve.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { AnySchema, AnySchemaObject } from "../types"; -import type Ajv from "../ajv"; -import * as URI from "uri-js"; -export declare type LocalRefs = { - [Ref in string]?: AnySchemaObject; -}; -export declare function inlineRef(schema: AnySchema, limit?: boolean | number): boolean; -export declare function getFullPath(id?: string, normalize?: boolean): string; -export declare function _getFullPath(p: URI.URIComponents): string; -export declare function normalizeId(id: string | undefined): string; -export declare function resolveUrl(baseId: string, id: string): string; -export declare function getSchemaRefs(this: Ajv, schema: AnySchema): LocalRefs; diff --git a/node_modules/table/node_modules/ajv/dist/compile/resolve.js b/node_modules/table/node_modules/ajv/dist/compile/resolve.js deleted file mode 100644 index 37eb9a865..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/resolve.js +++ /dev/null @@ -1,152 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0; -const util_1 = require("./util"); -const equal = require("fast-deep-equal"); -const traverse = require("json-schema-traverse"); -const URI = require("uri-js"); -// TODO refactor to use keyword definitions -const SIMPLE_INLINED = new Set([ - "type", - "format", - "pattern", - "maxLength", - "minLength", - "maxProperties", - "minProperties", - "maxItems", - "minItems", - "maximum", - "minimum", - "uniqueItems", - "multipleOf", - "required", - "enum", - "const", -]); -function inlineRef(schema, limit = true) { - if (typeof schema == "boolean") - return true; - if (limit === true) - return !hasRef(schema); - if (!limit) - return false; - return countKeys(schema) <= limit; -} -exports.inlineRef = inlineRef; -const REF_KEYWORDS = new Set([ - "$ref", - "$recursiveRef", - "$recursiveAnchor", - "$dynamicRef", - "$dynamicAnchor", -]); -function hasRef(schema) { - for (const key in schema) { - if (REF_KEYWORDS.has(key)) - return true; - const sch = schema[key]; - if (Array.isArray(sch) && sch.some(hasRef)) - return true; - if (typeof sch == "object" && hasRef(sch)) - return true; - } - return false; -} -function countKeys(schema) { - let count = 0; - for (const key in schema) { - if (key === "$ref") - return Infinity; - count++; - if (SIMPLE_INLINED.has(key)) - continue; - if (typeof schema[key] == "object") { - util_1.eachItem(schema[key], (sch) => (count += countKeys(sch))); - } - if (count === Infinity) - return Infinity; - } - return count; -} -function getFullPath(id = "", normalize) { - if (normalize !== false) - id = normalizeId(id); - const p = URI.parse(id); - return _getFullPath(p); -} -exports.getFullPath = getFullPath; -function _getFullPath(p) { - return URI.serialize(p).split("#")[0] + "#"; -} -exports._getFullPath = _getFullPath; -const TRAILING_SLASH_HASH = /#\/?$/; -function normalizeId(id) { - return id ? id.replace(TRAILING_SLASH_HASH, "") : ""; -} -exports.normalizeId = normalizeId; -function resolveUrl(baseId, id) { - id = normalizeId(id); - return URI.resolve(baseId, id); -} -exports.resolveUrl = resolveUrl; -const ANCHOR = /^[a-z_][-a-z0-9._]*$/i; -function getSchemaRefs(schema) { - if (typeof schema == "boolean") - return {}; - const schemaId = normalizeId(schema.$id); - const baseIds = { "": schemaId }; - const pathPrefix = getFullPath(schemaId, false); - const localRefs = {}; - const schemaRefs = new Set(); - traverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => { - if (parentJsonPtr === undefined) - return; - const fullPath = pathPrefix + jsonPtr; - let baseId = baseIds[parentJsonPtr]; - if (typeof sch.$id == "string") - baseId = addRef.call(this, sch.$id); - addAnchor.call(this, sch.$anchor); - addAnchor.call(this, sch.$dynamicAnchor); - baseIds[jsonPtr] = baseId; - function addRef(ref) { - ref = normalizeId(baseId ? URI.resolve(baseId, ref) : ref); - if (schemaRefs.has(ref)) - throw ambiguos(ref); - schemaRefs.add(ref); - let schOrRef = this.refs[ref]; - if (typeof schOrRef == "string") - schOrRef = this.refs[schOrRef]; - if (typeof schOrRef == "object") { - checkAmbiguosRef(sch, schOrRef.schema, ref); - } - else if (ref !== normalizeId(fullPath)) { - if (ref[0] === "#") { - checkAmbiguosRef(sch, localRefs[ref], ref); - localRefs[ref] = sch; - } - else { - this.refs[ref] = fullPath; - } - } - return ref; - } - function addAnchor(anchor) { - if (typeof anchor == "string") { - if (!ANCHOR.test(anchor)) - throw new Error(`invalid anchor "${anchor}"`); - addRef.call(this, `#${anchor}`); - } - } - }); - return localRefs; - function checkAmbiguosRef(sch1, sch2, ref) { - if (sch2 !== undefined && !equal(sch1, sch2)) - throw ambiguos(ref); - } - function ambiguos(ref) { - return new Error(`reference "${ref}" resolves to more than one schema`); - } -} -exports.getSchemaRefs = getSchemaRefs; -//# sourceMappingURL=resolve.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/resolve.js.map b/node_modules/table/node_modules/ajv/dist/compile/resolve.js.map deleted file mode 100644 index 84ca44c03..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/resolve.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../lib/compile/resolve.ts"],"names":[],"mappings":";;;AAEA,iCAA+B;AAC/B,yCAAwC;AACxC,iDAAgD;AAChD,8BAA6B;AAK7B,2CAA2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AS,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC;YAAE,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAA;IACnE,CAAC;IAED,SAAS,QAAQ,CAAC,GAAW;QAC3B,OAAO,IAAI,KAAK,CAAC,cAAc,GAAG,oCAAoC,CAAC,CAAA;IACzE,CAAC;AACH,CAAC;AArDD,sCAqDC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/rules.d.ts b/node_modules/table/node_modules/ajv/dist/compile/rules.d.ts deleted file mode 100644 index 7def4b5a3..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/rules.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { AddedKeywordDefinition } from "../types"; -declare const _jsonTypes: readonly ["string", "number", "integer", "boolean", "null", "object", "array"]; -export declare type JSONType = typeof _jsonTypes[number]; -export declare function isJSONType(x: unknown): x is JSONType; -declare type ValidationTypes = { - [K in JSONType]: boolean | RuleGroup | undefined; -}; -export interface ValidationRules { - rules: RuleGroup[]; - post: RuleGroup; - all: { - [Key in string]?: boolean | Rule; - }; - keywords: { - [Key in string]?: boolean; - }; - types: ValidationTypes; -} -export interface RuleGroup { - type?: JSONType; - rules: Rule[]; -} -export interface Rule { - keyword: string; - definition: AddedKeywordDefinition; -} -export declare function getRules(): ValidationRules; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/compile/rules.js b/node_modules/table/node_modules/ajv/dist/compile/rules.js deleted file mode 100644 index 82a591ff4..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/rules.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getRules = exports.isJSONType = void 0; -const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; -const jsonTypes = new Set(_jsonTypes); -function isJSONType(x) { - return typeof x == "string" && jsonTypes.has(x); -} -exports.isJSONType = isJSONType; -function getRules() { - const groups = { - number: { type: "number", rules: [] }, - string: { type: "string", rules: [] }, - array: { type: "array", rules: [] }, - object: { type: "object", rules: [] }, - }; - return { - types: { ...groups, integer: true, boolean: true, null: true }, - rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], - post: { rules: [] }, - all: {}, - keywords: {}, - }; -} -exports.getRules = getRules; -//# sourceMappingURL=rules.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/rules.js.map b/node_modules/table/node_modules/ajv/dist/compile/rules.js.map deleted file mode 100644 index 084c70f82..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/rules.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"rules.js","sourceRoot":"","sources":["../../lib/compile/rules.ts"],"names":[],"mappings":";;;AAEA,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAA;AAIjG,MAAM,SAAS,GAAgB,IAAI,GAAG,CAAC,UAAU,CAAC,CAAA;AAElD,SAAgB,UAAU,CAAC,CAAU;IACnC,OAAO,OAAO,CAAC,IAAI,QAAQ,IAAI,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC;AAFD,gCAEC;AAyBD,SAAgB,QAAQ;IACtB,MAAM,MAAM,GAAgE;QAC1E,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;QACnC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;QACnC,KAAK,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAC;QACjC,MAAM,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAC;KACpC,CAAA;IACD,OAAO;QACL,KAAK,EAAE,EAAC,GAAG,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC;QAC5D,KAAK,EAAE,CAAC,EAAC,KAAK,EAAE,EAAE,EAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC;QAC/E,IAAI,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC;QACjB,GAAG,EAAE,EAAE;QACP,QAAQ,EAAE,EAAE;KACb,CAAA;AACH,CAAC;AAdD,4BAcC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/util.d.ts b/node_modules/table/node_modules/ajv/dist/compile/util.d.ts deleted file mode 100644 index 17042cf0e..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/util.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { AnySchema, EvaluatedProperties, EvaluatedItems } from "../types"; -import type { SchemaCxt, SchemaObjCxt } from "."; -import { Code, Name, CodeGen } from "./codegen"; -import type { Rule, ValidationRules } from "./rules"; -export declare function toHash(arr: T[]): { - [K in T]?: true; -}; -export declare function alwaysValidSchema(it: SchemaCxt, schema: AnySchema): boolean | void; -export declare function checkUnknownRules(it: SchemaCxt, schema?: AnySchema): void; -export declare function schemaHasRules(schema: AnySchema, rules: { - [Key in string]?: boolean | Rule; -}): boolean; -export declare function schemaHasRulesButRef(schema: AnySchema, RULES: ValidationRules): boolean; -export declare function schemaRefOrVal({ topSchemaRef, schemaPath }: SchemaObjCxt, schema: unknown, keyword: string, $data?: string | false): Code | number | boolean; -export declare function unescapeFragment(str: string): string; -export declare function escapeFragment(str: string | number): string; -export declare function escapeJsonPointer(str: string | number): string; -export declare function unescapeJsonPointer(str: string): string; -export declare function eachItem(xs: T | T[], f: (x: T) => void): void; -declare type SomeEvaluated = EvaluatedProperties | EvaluatedItems; -declare type MergeEvaluatedFunc = (gen: CodeGen, from: Name | T, to: Name | Exclude | undefined, toName?: typeof Name) => Name | T; -interface MergeEvaluated { - props: MergeEvaluatedFunc; - items: MergeEvaluatedFunc; -} -export declare const mergeEvaluated: MergeEvaluated; -export declare function evaluatedPropsToName(gen: CodeGen, ps?: EvaluatedProperties): Name; -export declare function setEvaluated(gen: CodeGen, props: Name, ps: { - [K in string]?: true; -}): void; -export declare function useFunc(gen: CodeGen, f: { - code: string; -}): Name; -export declare enum Type { - Num = 0, - Str = 1 -} -export declare function getErrorPath(dataProp: Name | string | number, dataPropType?: Type, jsPropertySyntax?: boolean): Code | string; -export declare function checkStrictMode(it: SchemaCxt, msg: string, mode?: boolean | "log"): void; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/compile/util.js b/node_modules/table/node_modules/ajv/dist/compile/util.js deleted file mode 100644 index b877ea746..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/util.js +++ /dev/null @@ -1,178 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0; -const codegen_1 = require("./codegen"); -const code_1 = require("./codegen/code"); -// TODO refactor to use Set -function toHash(arr) { - const hash = {}; - for (const item of arr) - hash[item] = true; - return hash; -} -exports.toHash = toHash; -function alwaysValidSchema(it, schema) { - if (typeof schema == "boolean") - return schema; - if (Object.keys(schema).length === 0) - return true; - checkUnknownRules(it, schema); - return !schemaHasRules(schema, it.self.RULES.all); -} -exports.alwaysValidSchema = alwaysValidSchema; -function checkUnknownRules(it, schema = it.schema) { - const { opts, self } = it; - if (!opts.strictSchema) - return; - if (typeof schema === "boolean") - return; - const rules = self.RULES.keywords; - for (const key in schema) { - if (!rules[key]) - checkStrictMode(it, `unknown keyword: "${key}"`); - } -} -exports.checkUnknownRules = checkUnknownRules; -function schemaHasRules(schema, rules) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (rules[key]) - return true; - return false; -} -exports.schemaHasRules = schemaHasRules; -function schemaHasRulesButRef(schema, RULES) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (key !== "$ref" && RULES.all[key]) - return true; - return false; -} -exports.schemaHasRulesButRef = schemaHasRulesButRef; -function schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) { - if (!$data) { - if (typeof schema == "number" || typeof schema == "boolean") - return schema; - if (typeof schema == "string") - return codegen_1._ `${schema}`; - } - return codegen_1._ `${topSchemaRef}${schemaPath}${codegen_1.getProperty(keyword)}`; -} -exports.schemaRefOrVal = schemaRefOrVal; -function unescapeFragment(str) { - return unescapeJsonPointer(decodeURIComponent(str)); -} -exports.unescapeFragment = unescapeFragment; -function escapeFragment(str) { - return encodeURIComponent(escapeJsonPointer(str)); -} -exports.escapeFragment = escapeFragment; -function escapeJsonPointer(str) { - if (typeof str == "number") - return `${str}`; - return str.replace(/~/g, "~0").replace(/\//g, "~1"); -} -exports.escapeJsonPointer = escapeJsonPointer; -function unescapeJsonPointer(str) { - return str.replace(/~1/g, "/").replace(/~0/g, "~"); -} -exports.unescapeJsonPointer = unescapeJsonPointer; -function eachItem(xs, f) { - if (Array.isArray(xs)) { - for (const x of xs) - f(x); - } - else { - f(xs); - } -} -exports.eachItem = eachItem; -function makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName, }) { - return (gen, from, to, toName) => { - const res = to === undefined - ? from - : to instanceof codegen_1.Name - ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) - : from instanceof codegen_1.Name - ? (mergeToName(gen, to, from), from) - : mergeValues(from, to); - return toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res; - }; -} -exports.mergeEvaluated = { - props: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if(codegen_1._ `${to} !== true && ${from} !== undefined`, () => { - gen.if(codegen_1._ `${from} === true`, () => gen.assign(to, true), () => gen.assign(to, codegen_1._ `${to} || {}`).code(codegen_1._ `Object.assign(${to}, ${from})`)); - }), - mergeToName: (gen, from, to) => gen.if(codegen_1._ `${to} !== true`, () => { - if (from === true) { - gen.assign(to, true); - } - else { - gen.assign(to, codegen_1._ `${to} || {}`); - setEvaluated(gen, to, from); - } - }), - mergeValues: (from, to) => (from === true ? true : { ...from, ...to }), - resultToName: evaluatedPropsToName, - }), - items: makeMergeEvaluated({ - mergeNames: (gen, from, to) => gen.if(codegen_1._ `${to} !== true && ${from} !== undefined`, () => gen.assign(to, codegen_1._ `${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), - mergeToName: (gen, from, to) => gen.if(codegen_1._ `${to} !== true`, () => gen.assign(to, from === true ? true : codegen_1._ `${to} > ${from} ? ${to} : ${from}`)), - mergeValues: (from, to) => (from === true ? true : Math.max(from, to)), - resultToName: (gen, items) => gen.var("items", items), - }), -}; -function evaluatedPropsToName(gen, ps) { - if (ps === true) - return gen.var("props", true); - const props = gen.var("props", codegen_1._ `{}`); - if (ps !== undefined) - setEvaluated(gen, props, ps); - return props; -} -exports.evaluatedPropsToName = evaluatedPropsToName; -function setEvaluated(gen, props, ps) { - Object.keys(ps).forEach((p) => gen.assign(codegen_1._ `${props}${codegen_1.getProperty(p)}`, true)); -} -exports.setEvaluated = setEvaluated; -const snippets = {}; -function useFunc(gen, f) { - return gen.scopeValue("func", { - ref: f, - code: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code)), - }); -} -exports.useFunc = useFunc; -var Type; -(function (Type) { - Type[Type["Num"] = 0] = "Num"; - Type[Type["Str"] = 1] = "Str"; -})(Type = exports.Type || (exports.Type = {})); -function getErrorPath(dataProp, dataPropType, jsPropertySyntax) { - // let path - if (dataProp instanceof codegen_1.Name) { - const isNumber = dataPropType === Type.Num; - return jsPropertySyntax - ? isNumber - ? codegen_1._ `"[" + ${dataProp} + "]"` - : codegen_1._ `"['" + ${dataProp} + "']"` - : isNumber - ? codegen_1._ `"/" + ${dataProp}` - : codegen_1._ `"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`; // TODO maybe use global escapePointer - } - return jsPropertySyntax ? codegen_1.getProperty(dataProp).toString() : "/" + escapeJsonPointer(dataProp); -} -exports.getErrorPath = getErrorPath; -function checkStrictMode(it, msg, mode = it.opts.strictSchema) { - if (!mode) - return; - msg = `strict mode: ${msg}`; - if (mode === true) - throw new Error(msg); - it.self.logger.warn(msg); -} -exports.checkStrictMode = checkStrictMode; -//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/util.js.map b/node_modules/table/node_modules/ajv/dist/compile/util.js.map deleted file mode 100644 index 46a9949a7..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/util.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"util.js","sourceRoot":"","sources":["../../lib/compile/util.ts"],"names":[],"mappings":";;;AAEA,uCAA6D;AAC7D,yCAAoC;AAGpC,2BAA2B;AAC3B,SAAgB,MAAM,CAA4B,GAAQ;IACxD,MAAM,IAAI,GAAsB,EAAE,CAAA;IAClC,KAAK,MAAM,IAAI,IAAI,GAAG;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IACzC,OAAO,IAAI,CAAA;AACb,CAAC;AAJD,wBAIC;AAED,SAAgB,iBAAiB,CAAC,EAAa,EAAE,MAAiB;IAChE,IAAI,OAAO,MAAM,IAAI,SAAS;QAAE,OAAO,MAAM,CAAA;IAC7C,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACjD,iBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IAC7B,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AACnD,CAA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CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC;AATD,0CASC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.d.ts deleted file mode 100644 index 165d375dc..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { AnySchemaObject } from "../../types"; -import type { SchemaObjCxt } from ".."; -import type { JSONType, RuleGroup, Rule } from "../rules"; -export declare function schemaHasRulesForType({ schema, self }: SchemaObjCxt, type: JSONType): boolean | undefined; -export declare function shouldUseGroup(schema: AnySchemaObject, group: RuleGroup): boolean; -export declare function shouldUseRule(schema: AnySchemaObject, rule: Rule): boolean | undefined; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js b/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js deleted file mode 100644 index 6187dbbee..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0; -function schemaHasRulesForType({ schema, self }, type) { - const group = self.RULES.types[type]; - return group && group !== true && shouldUseGroup(schema, group); -} -exports.schemaHasRulesForType = schemaHasRulesForType; -function shouldUseGroup(schema, group) { - return group.rules.some((rule) => shouldUseRule(schema, rule)); -} -exports.shouldUseGroup = shouldUseGroup; -function shouldUseRule(schema, rule) { - var _a; - return (schema[rule.keyword] !== undefined || - ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== undefined))); -} -exports.shouldUseRule = shouldUseRule; -//# sourceMappingURL=applicability.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js.map deleted file mode 100644 index 450cfe75a..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/applicability.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"applicability.js","sourceRoot":"","sources":["../../../lib/compile/validate/applicability.ts"],"names":[],"mappings":";;;AAIA,SAAgB,qBAAqB,CACnC,EAAC,MAAM,EAAE,IAAI,EAAe,EAC5B,IAAc;IAEd,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACpC,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AACjE,CAAC;AAND,sDAMC;AAED,SAAgB,cAAc,CAAC,MAAuB,EAAE,KAAgB;IACtE,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;AAChE,CAAC;AAFD,wCAEC;AAED,SAAgB,aAAa,CAAC,MAAuB,EAAE,IAAU;;IAC/D,OAAO,CACL,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,SAAS;SAClC,MAAA,IAAI,CAAC,UAAU,CAAC,UAAU,0CAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAA,CACrE,CAAA;AACH,CAAC;AALD,sCAKC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.d.ts deleted file mode 100644 index 0ce795201..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { SchemaCxt } from ".."; -import { Name } from "../codegen"; -export declare function topBoolOrEmptySchema(it: SchemaCxt): void; -export declare function boolOrEmptySchema(it: SchemaCxt, valid: Name): void; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js b/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js deleted file mode 100644 index 42fdd1f6a..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js +++ /dev/null @@ -1,50 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0; -const errors_1 = require("../errors"); -const codegen_1 = require("../codegen"); -const names_1 = require("../names"); -const boolError = { - message: "boolean schema is false", -}; -function topBoolOrEmptySchema(it) { - const { gen, schema, validateName } = it; - if (schema === false) { - falseSchemaError(it, false); - } - else if (typeof schema == "object" && schema.$async === true) { - gen.return(names_1.default.data); - } - else { - gen.assign(codegen_1._ `${validateName}.errors`, null); - gen.return(true); - } -} -exports.topBoolOrEmptySchema = topBoolOrEmptySchema; -function boolOrEmptySchema(it, valid) { - const { gen, schema } = it; - if (schema === false) { - gen.var(valid, false); // TODO var - falseSchemaError(it); - } - else { - gen.var(valid, true); // TODO var - } -} -exports.boolOrEmptySchema = boolOrEmptySchema; -function falseSchemaError(it, overrideAllErrors) { - const { gen, data } = it; - // TODO maybe some other interface should be used for non-keyword validation errors... - const cxt = { - gen, - keyword: "false schema", - data, - schema: false, - schemaCode: false, - schemaValue: false, - params: {}, - it, - }; - errors_1.reportError(cxt, boolError, undefined, overrideAllErrors); -} -//# sourceMappingURL=boolSchema.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js.map deleted file mode 100644 index 3b92ecc0d..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/boolSchema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"boolSchema.js","sourceRoot":"","sources":["../../../lib/compile/validate/boolSchema.ts"],"names":[],"mappings":";;;AAEA,sCAAqC;AACrC,wCAAkC;AAClC,oCAA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E;QACV,EAAE;KACH,CAAA;IACD,oBAAW,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAA;AAC3D,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.d.ts deleted file mode 100644 index 65c1268ec..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ErrorObject, AnySchemaObject } from "../../types"; -import type { SchemaObjCxt } from ".."; -import { JSONType } from "../rules"; -import { Code, Name } from "../codegen"; -export declare enum DataType { - Correct = 0, - Wrong = 1 -} -export declare function getSchemaTypes(schema: AnySchemaObject): JSONType[]; -export declare function getJSONTypes(ts: unknown | unknown[]): JSONType[]; -export declare function coerceAndCheckDataType(it: SchemaObjCxt, types: JSONType[]): boolean; -export declare function checkDataType(dataType: JSONType, data: Name, strictNums?: boolean | "log", correct?: DataType): Code; -export declare function checkDataTypes(dataTypes: JSONType[], data: Name, strictNums?: boolean | "log", correct?: DataType): Code; -export declare type TypeError = ErrorObject<"type", { - type: string; -}>; -export declare function reportTypeError(it: SchemaObjCxt): void; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js b/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js deleted file mode 100644 index 6319e76c2..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js +++ /dev/null @@ -1,202 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0; -const rules_1 = require("../rules"); -const applicability_1 = require("./applicability"); -const errors_1 = require("../errors"); -const codegen_1 = require("../codegen"); -const util_1 = require("../util"); -var DataType; -(function (DataType) { - DataType[DataType["Correct"] = 0] = "Correct"; - DataType[DataType["Wrong"] = 1] = "Wrong"; -})(DataType = exports.DataType || (exports.DataType = {})); -function getSchemaTypes(schema) { - const types = getJSONTypes(schema.type); - const hasNull = types.includes("null"); - if (hasNull) { - if (schema.nullable === false) - throw new Error("type: null contradicts nullable: false"); - } - else { - if (!types.length && schema.nullable !== undefined) { - throw new Error('"nullable" cannot be used without "type"'); - } - if (schema.nullable === true) - types.push("null"); - } - return types; -} -exports.getSchemaTypes = getSchemaTypes; -function getJSONTypes(ts) { - const types = Array.isArray(ts) ? ts : ts ? [ts] : []; - if (types.every(rules_1.isJSONType)) - return types; - throw new Error("type must be JSONType or JSONType[]: " + types.join(",")); -} -exports.getJSONTypes = getJSONTypes; -function coerceAndCheckDataType(it, types) { - const { gen, data, opts } = it; - const coerceTo = coerceToTypes(types, opts.coerceTypes); - const checkTypes = types.length > 0 && - !(coerceTo.length === 0 && types.length === 1 && applicability_1.schemaHasRulesForType(it, types[0])); - if (checkTypes) { - const wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong); - gen.if(wrongType, () => { - if (coerceTo.length) - coerceData(it, types, coerceTo); - else - reportTypeError(it); - }); - } - return checkTypes; -} -exports.coerceAndCheckDataType = coerceAndCheckDataType; -const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]); -function coerceToTypes(types, coerceTypes) { - return coerceTypes - ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array")) - : []; -} -function coerceData(it, types, coerceTo) { - const { gen, data, opts } = it; - const dataType = gen.let("dataType", codegen_1._ `typeof ${data}`); - const coerced = gen.let("coerced", codegen_1._ `undefined`); - if (opts.coerceTypes === "array") { - gen.if(codegen_1._ `${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen - .assign(data, codegen_1._ `${data}[0]`) - .assign(dataType, codegen_1._ `typeof ${data}`) - .if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data))); - } - gen.if(codegen_1._ `${coerced} !== undefined`); - for (const t of coerceTo) { - if (COERCIBLE.has(t) || (t === "array" && opts.coerceTypes === "array")) { - coerceSpecificType(t); - } - } - gen.else(); - reportTypeError(it); - gen.endIf(); - gen.if(codegen_1._ `${coerced} !== undefined`, () => { - gen.assign(data, coerced); - assignParentData(it, coerced); - }); - function coerceSpecificType(t) { - switch (t) { - case "string": - gen - .elseIf(codegen_1._ `${dataType} == "number" || ${dataType} == "boolean"`) - .assign(coerced, codegen_1._ `"" + ${data}`) - .elseIf(codegen_1._ `${data} === null`) - .assign(coerced, codegen_1._ `""`); - return; - case "number": - gen - .elseIf(codegen_1._ `${dataType} == "boolean" || ${data} === null - || (${dataType} == "string" && ${data} && ${data} == +${data})`) - .assign(coerced, codegen_1._ `+${data}`); - return; - case "integer": - gen - .elseIf(codegen_1._ `${dataType} === "boolean" || ${data} === null - || (${dataType} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`) - .assign(coerced, codegen_1._ `+${data}`); - return; - case "boolean": - gen - .elseIf(codegen_1._ `${data} === "false" || ${data} === 0 || ${data} === null`) - .assign(coerced, false) - .elseIf(codegen_1._ `${data} === "true" || ${data} === 1`) - .assign(coerced, true); - return; - case "null": - gen.elseIf(codegen_1._ `${data} === "" || ${data} === 0 || ${data} === false`); - gen.assign(coerced, null); - return; - case "array": - gen - .elseIf(codegen_1._ `${dataType} === "string" || ${dataType} === "number" - || ${dataType} === "boolean" || ${data} === null`) - .assign(coerced, codegen_1._ `[${data}]`); - } - } -} -function assignParentData({ gen, parentData, parentDataProperty }, expr) { - // TODO use gen.property - gen.if(codegen_1._ `${parentData} !== undefined`, () => gen.assign(codegen_1._ `${parentData}[${parentDataProperty}]`, expr)); -} -function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { - const EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ; - let cond; - switch (dataType) { - case "null": - return codegen_1._ `${data} ${EQ} null`; - case "array": - cond = codegen_1._ `Array.isArray(${data})`; - break; - case "object": - cond = codegen_1._ `${data} && typeof ${data} == "object" && !Array.isArray(${data})`; - break; - case "integer": - cond = numCond(codegen_1._ `!(${data} % 1) && !isNaN(${data})`); - break; - case "number": - cond = numCond(); - break; - default: - return codegen_1._ `typeof ${data} ${EQ} ${dataType}`; - } - return correct === DataType.Correct ? cond : codegen_1.not(cond); - function numCond(_cond = codegen_1.nil) { - return codegen_1.and(codegen_1._ `typeof ${data} == "number"`, _cond, strictNums ? codegen_1._ `isFinite(${data})` : codegen_1.nil); - } -} -exports.checkDataType = checkDataType; -function checkDataTypes(dataTypes, data, strictNums, correct) { - if (dataTypes.length === 1) { - return checkDataType(dataTypes[0], data, strictNums, correct); - } - let cond; - const types = util_1.toHash(dataTypes); - if (types.array && types.object) { - const notObj = codegen_1._ `typeof ${data} != "object"`; - cond = types.null ? notObj : codegen_1._ `!${data} || ${notObj}`; - delete types.null; - delete types.array; - delete types.object; - } - else { - cond = codegen_1.nil; - } - if (types.number) - delete types.integer; - for (const t in types) - cond = codegen_1.and(cond, checkDataType(t, data, strictNums, correct)); - return cond; -} -exports.checkDataTypes = checkDataTypes; -const typeError = { - message: ({ schema }) => `must be ${schema}`, - params: ({ schema, schemaValue }) => typeof schema == "string" ? codegen_1._ `{type: ${schema}}` : codegen_1._ `{type: ${schemaValue}}`, -}; -function reportTypeError(it) { - const cxt = getTypeErrorContext(it); - errors_1.reportError(cxt, typeError); -} -exports.reportTypeError = reportTypeError; -function getTypeErrorContext(it) { - const { gen, data, schema } = it; - const schemaCode = util_1.schemaRefOrVal(it, schema, "type"); - return { - gen, - keyword: "type", - data, - schema: schema.type, - schemaCode, - schemaValue: schemaCode, - parentSchema: schema, - params: {}, - it, - }; -} -//# sourceMappingURL=dataType.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js.map deleted file mode 100644 index f25ee4cd7..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/dataType.js.map +++ /dev/null @@ -1 +0,0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E,MAAM,CAAC,IAAI;QACnB,UAAU;QACV,WAAW,EAAE,UAAU;QACvB,YAAY,EAAE,MAAM;QACpB,MAAM,EAAE,EAAE;QACV,EAAE;KACH,CAAA;AACH,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.d.ts deleted file mode 100644 index 02ba453b2..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type { SchemaObjCxt } from ".."; -export declare function assignDefaults(it: SchemaObjCxt, ty?: string): void; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js b/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js deleted file mode 100644 index 41ca3fd94..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.assignDefaults = void 0; -const codegen_1 = require("../codegen"); -const util_1 = require("../util"); -function assignDefaults(it, ty) { - const { properties, items } = it.schema; - if (ty === "object" && properties) { - for (const key in properties) { - assignDefault(it, key, properties[key].default); - } - } - else if (ty === "array" && Array.isArray(items)) { - items.forEach((sch, i) => assignDefault(it, i, sch.default)); - } -} -exports.assignDefaults = assignDefaults; -function assignDefault(it, prop, defaultValue) { - const { gen, compositeRule, data, opts } = it; - if (defaultValue === undefined) - return; - const childData = codegen_1._ `${data}${codegen_1.getProperty(prop)}`; - if (compositeRule) { - util_1.checkStrictMode(it, `default is ignored for: ${childData}`); - return; - } - let condition = codegen_1._ `${childData} === undefined`; - if (opts.useDefaults === "empty") { - condition = codegen_1._ `${condition} || ${childData} === null || ${childData} === ""`; - } - // `${childData} === undefined` + - // (opts.useDefaults === "empty" ? ` || ${childData} === null || ${childData} === ""` : "") - gen.if(condition, codegen_1._ `${childData} = ${codegen_1.stringify(defaultValue)}`); -} -//# sourceMappingURL=defaults.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js.map deleted file mode 100644 index a4e3e74fe..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/defaults.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../lib/compile/validate/defaults.ts"],"names":[],"mappings":";;;AACA,wCAAoD;AACpD,kCAAuC;AAEvC,SAAgB,cAAc,CAAC,EAAgB,EAAE,EAAW;IAC1D,MAAM,EAAC,UAAU,EAAE,KAAK,EAAC,GAAG,EAAE,CAAC,MAAM,CAAA;IACrC,IAAI,EAAE,KAAK,QAAQ,IAAI,UAAU,EAAE;QACjC,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;YAC5B,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAA;SAChD;KACF;SAAM,IAAI,EAAE,KAAK,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACjD,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;KACrE;AACH,CAAC;AATD,wCASC;AAED,SAAS,aAAa,CAAC,EAAgB,EAAE,IAAqB,EAAE,YAAqB;IACnF,MAAM,EAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAC,GAAG,EAAE,CAAA;IAC3C,IAAI,YAAY,KAAK,SAAS;QAAE,OAAM;IACtC,MAAM,SAAS,GAAG,WAAC,CAAA,GAAG,IAAI,GAAG,qBAAW,CAAC,IAAI,CAAC,EAAE,CAAA;IAChD,IAAI,aAAa,EAAE;QACjB,sBAAe,CAAC,EAAE,EAAE,2BAA2B,SAAS,EAAE,CAAC,CAAA;QAC3D,OAAM;KACP;IAED,IAAI,SAAS,GAAG,WAAC,CAAA,GAAG,SAAS,gBAAgB,CAAA;IAC7C,IAAI,IAAI,CAAC,WAAW,KAAK,OAAO,EAAE;QAChC,SAAS,GAAG,WAAC,CAAA,GAAG,SAAS,OAAO,SAAS,gBAAgB,SAAS,SAAS,CAAA;KAC5E;IACD,iCAAiC;IACjC,2FAA2F;IAC3F,GAAG,CAAC,EAAE,CAAC,SAAS,EAAE,WAAC,CAAA,GAAG,SAAS,MAAM,mBAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAA;AACjE,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/index.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/index.d.ts deleted file mode 100644 index 1dd71b539..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/index.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { AddedKeywordDefinition, AnySchemaObject, KeywordErrorCxt, KeywordCxtParams } from "../../types"; -import type { SchemaCxt, SchemaObjCxt } from ".."; -import { SubschemaArgs } from "./subschema"; -import { Code, Name, CodeGen } from "../codegen"; -import type { JSONType } from "../rules"; -import { ErrorPaths } from "../errors"; -export declare function validateFunctionCode(it: SchemaCxt): void; -export declare class KeywordCxt implements KeywordErrorCxt { - readonly gen: CodeGen; - readonly allErrors?: boolean; - readonly keyword: string; - readonly data: Name; - readonly $data?: string | false; - schema: any; - readonly schemaValue: Code | number | boolean; - readonly schemaCode: Code | number | boolean; - readonly schemaType: JSONType[]; - readonly parentSchema: AnySchemaObject; - readonly errsCount?: Name; - params: KeywordCxtParams; - readonly it: SchemaObjCxt; - readonly def: AddedKeywordDefinition; - constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string); - result(condition: Code, successAction?: () => void, failAction?: () => void): void; - pass(condition: Code, failAction?: () => void): void; - fail(condition?: Code): void; - fail$data(condition: Code): void; - error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void; - private _error; - $dataError(): void; - reset(): void; - ok(cond: Code | boolean): void; - setParams(obj: KeywordCxtParams, assign?: true): void; - block$data(valid: Name, codeBlock: () => void, $dataValid?: Code): void; - check$data(valid?: Name, $dataValid?: Code): void; - invalid$data(): Code; - subschema(appl: SubschemaArgs, valid: Name): SchemaCxt; - mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void; - mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void; -} -export declare function getData($data: string, { dataLevel, dataNames, dataPathArr }: SchemaCxt): Code | number; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/index.js b/node_modules/table/node_modules/ajv/dist/compile/validate/index.js deleted file mode 100644 index 074ff49b8..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/index.js +++ /dev/null @@ -1,507 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0; -const boolSchema_1 = require("./boolSchema"); -const dataType_1 = require("./dataType"); -const applicability_1 = require("./applicability"); -const dataType_2 = require("./dataType"); -const defaults_1 = require("./defaults"); -const keyword_1 = require("./keyword"); -const subschema_1 = require("./subschema"); -const codegen_1 = require("../codegen"); -const names_1 = require("../names"); -const resolve_1 = require("../resolve"); -const util_1 = require("../util"); -const errors_1 = require("../errors"); -// schema compilation - generates validation function, subschemaCode (below) is used for subschemas -function validateFunctionCode(it) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - topSchemaObjCode(it); - return; - } - } - validateFunction(it, () => boolSchema_1.topBoolOrEmptySchema(it)); -} -exports.validateFunctionCode = validateFunctionCode; -function validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) { - if (opts.code.es5) { - gen.func(validateName, codegen_1._ `${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => { - gen.code(codegen_1._ `"use strict"; ${funcSourceUrl(schema, opts)}`); - destructureValCxtES5(gen, opts); - gen.code(body); - }); - } - else { - gen.func(validateName, codegen_1._ `${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body)); - } -} -function destructureValCxt(opts) { - return codegen_1._ `{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? codegen_1._ `, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`; -} -function destructureValCxtES5(gen, opts) { - gen.if(names_1.default.valCxt, () => { - gen.var(names_1.default.instancePath, codegen_1._ `${names_1.default.valCxt}.${names_1.default.instancePath}`); - gen.var(names_1.default.parentData, codegen_1._ `${names_1.default.valCxt}.${names_1.default.parentData}`); - gen.var(names_1.default.parentDataProperty, codegen_1._ `${names_1.default.valCxt}.${names_1.default.parentDataProperty}`); - gen.var(names_1.default.rootData, codegen_1._ `${names_1.default.valCxt}.${names_1.default.rootData}`); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, codegen_1._ `${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`); - }, () => { - gen.var(names_1.default.instancePath, codegen_1._ `""`); - gen.var(names_1.default.parentData, codegen_1._ `undefined`); - gen.var(names_1.default.parentDataProperty, codegen_1._ `undefined`); - gen.var(names_1.default.rootData, names_1.default.data); - if (opts.dynamicRef) - gen.var(names_1.default.dynamicAnchors, codegen_1._ `{}`); - }); -} -function topSchemaObjCode(it) { - const { schema, opts, gen } = it; - validateFunction(it, () => { - if (opts.$comment && schema.$comment) - commentKeyword(it); - checkNoDefault(it); - gen.let(names_1.default.vErrors, null); - gen.let(names_1.default.errors, 0); - if (opts.unevaluated) - resetEvaluated(it); - typeAndKeywords(it); - returnResults(it); - }); - return; -} -function resetEvaluated(it) { - // TODO maybe some hook to execute it in the end to check whether props/items are Name, as in assignEvaluated - const { gen, validateName } = it; - it.evaluated = gen.const("evaluated", codegen_1._ `${validateName}.evaluated`); - gen.if(codegen_1._ `${it.evaluated}.dynamicProps`, () => gen.assign(codegen_1._ `${it.evaluated}.props`, codegen_1._ `undefined`)); - gen.if(codegen_1._ `${it.evaluated}.dynamicItems`, () => gen.assign(codegen_1._ `${it.evaluated}.items`, codegen_1._ `undefined`)); -} -function funcSourceUrl(schema, opts) { - return typeof schema == "object" && schema.$id && (opts.code.source || opts.code.process) - ? codegen_1._ `/*# sourceURL=${schema.$id} */` - : codegen_1.nil; -} -// schema compilation - this function is used recursively to generate code for sub-schemas -function subschemaCode(it, valid) { - if (isSchemaObj(it)) { - checkKeywords(it); - if (schemaCxtHasRules(it)) { - subSchemaObjCode(it, valid); - return; - } - } - boolSchema_1.boolOrEmptySchema(it, valid); -} -function schemaCxtHasRules({ schema, self }) { - if (typeof schema == "boolean") - return !schema; - for (const key in schema) - if (self.RULES.all[key]) - return true; - return false; -} -function isSchemaObj(it) { - return typeof it.schema != "boolean"; -} -function subSchemaObjCode(it, valid) { - const { schema, gen, opts } = it; - if (opts.$comment && schema.$comment) - commentKeyword(it); - updateContext(it); - checkAsyncSchema(it); - const errsCount = gen.const("_errs", names_1.default.errors); - typeAndKeywords(it, errsCount); - // TODO var - gen.var(valid, codegen_1._ `${errsCount} === ${names_1.default.errors}`); -} -function checkKeywords(it) { - util_1.checkUnknownRules(it); - checkRefsAndKeywords(it); -} -function typeAndKeywords(it, errsCount) { - if (it.opts.jtd) - return schemaKeywords(it, [], false, errsCount); - const types = dataType_1.getSchemaTypes(it.schema); - const checkedTypes = dataType_1.coerceAndCheckDataType(it, types); - schemaKeywords(it, types, !checkedTypes, errsCount); -} -function checkRefsAndKeywords(it) { - const { schema, errSchemaPath, opts, self } = it; - if (schema.$ref && opts.ignoreKeywordsWithRef && util_1.schemaHasRulesButRef(schema, self.RULES)) { - self.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`); - } -} -function checkNoDefault(it) { - const { schema, opts } = it; - if (schema.default !== undefined && opts.useDefaults && opts.strictSchema) { - util_1.checkStrictMode(it, "default is ignored in the schema root"); - } -} -function updateContext(it) { - if (it.schema.$id) - it.baseId = resolve_1.resolveUrl(it.baseId, it.schema.$id); -} -function checkAsyncSchema(it) { - if (it.schema.$async && !it.schemaEnv.$async) - throw new Error("async schema in sync schema"); -} -function commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) { - const msg = schema.$comment; - if (opts.$comment === true) { - gen.code(codegen_1._ `${names_1.default.self}.logger.log(${msg})`); - } - else if (typeof opts.$comment == "function") { - const schemaPath = codegen_1.str `${errSchemaPath}/$comment`; - const rootName = gen.scopeValue("root", { ref: schemaEnv.root }); - gen.code(codegen_1._ `${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`); - } -} -function returnResults(it) { - const { gen, schemaEnv, validateName, ValidationError, opts } = it; - if (schemaEnv.$async) { - // TODO assign unevaluated - gen.if(codegen_1._ `${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw(codegen_1._ `new ${ValidationError}(${names_1.default.vErrors})`)); - } - else { - gen.assign(codegen_1._ `${validateName}.errors`, names_1.default.vErrors); - if (opts.unevaluated) - assignEvaluated(it); - gen.return(codegen_1._ `${names_1.default.errors} === 0`); - } -} -function assignEvaluated({ gen, evaluated, props, items }) { - if (props instanceof codegen_1.Name) - gen.assign(codegen_1._ `${evaluated}.props`, props); - if (items instanceof codegen_1.Name) - gen.assign(codegen_1._ `${evaluated}.items`, items); -} -function schemaKeywords(it, types, typeErrors, errsCount) { - const { gen, schema, data, allErrors, opts, self } = it; - const { RULES } = self; - if (schema.$ref && (opts.ignoreKeywordsWithRef || !util_1.schemaHasRulesButRef(schema, RULES))) { - gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition)); // TODO typecast - return; - } - if (!opts.jtd) - checkStrictTypes(it, types); - gen.block(() => { - for (const group of RULES.rules) - groupKeywords(group); - groupKeywords(RULES.post); - }); - function groupKeywords(group) { - if (!applicability_1.shouldUseGroup(schema, group)) - return; - if (group.type) { - gen.if(dataType_2.checkDataType(group.type, data, opts.strictNumbers)); - iterateKeywords(it, group); - if (types.length === 1 && types[0] === group.type && typeErrors) { - gen.else(); - dataType_2.reportTypeError(it); - } - gen.endIf(); - } - else { - iterateKeywords(it, group); - } - // TODO make it "ok" call? - if (!allErrors) - gen.if(codegen_1._ `${names_1.default.errors} === ${errsCount || 0}`); - } -} -function iterateKeywords(it, group) { - const { gen, schema, opts: { useDefaults }, } = it; - if (useDefaults) - defaults_1.assignDefaults(it, group.type); - gen.block(() => { - for (const rule of group.rules) { - if (applicability_1.shouldUseRule(schema, rule)) { - keywordCode(it, rule.keyword, rule.definition, group.type); - } - } - }); -} -function checkStrictTypes(it, types) { - if (it.schemaEnv.meta || !it.opts.strictTypes) - return; - checkContextTypes(it, types); - if (!it.opts.allowUnionTypes) - checkMultipleTypes(it, types); - checkKeywordTypes(it, it.dataTypes); -} -function checkContextTypes(it, types) { - if (!types.length) - return; - if (!it.dataTypes.length) { - it.dataTypes = types; - return; - } - types.forEach((t) => { - if (!includesType(it.dataTypes, t)) { - strictTypesError(it, `type "${t}" not allowed by context "${it.dataTypes.join(",")}"`); - } - }); - it.dataTypes = it.dataTypes.filter((t) => includesType(types, t)); -} -function checkMultipleTypes(it, ts) { - if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) { - strictTypesError(it, "use allowUnionTypes to allow union type keyword"); - } -} -function checkKeywordTypes(it, ts) { - const rules = it.self.RULES.all; - for (const keyword in rules) { - const rule = rules[keyword]; - if (typeof rule == "object" && applicability_1.shouldUseRule(it.schema, rule)) { - const { type } = rule.definition; - if (type.length && !type.some((t) => hasApplicableType(ts, t))) { - strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`); - } - } - } -} -function hasApplicableType(schTs, kwdT) { - return schTs.includes(kwdT) || (kwdT === "number" && schTs.includes("integer")); -} -function includesType(ts, t) { - return ts.includes(t) || (t === "integer" && ts.includes("number")); -} -function strictTypesError(it, msg) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - msg += ` at "${schemaPath}" (strictTypes)`; - util_1.checkStrictMode(it, msg, it.opts.strictTypes); -} -class KeywordCxt { - constructor(it, def, keyword) { - keyword_1.validateKeywordUsage(it, def, keyword); - this.gen = it.gen; - this.allErrors = it.allErrors; - this.keyword = keyword; - this.data = it.data; - this.schema = it.schema[keyword]; - this.$data = def.$data && it.opts.$data && this.schema && this.schema.$data; - this.schemaValue = util_1.schemaRefOrVal(it, this.schema, keyword, this.$data); - this.schemaType = def.schemaType; - this.parentSchema = it.schema; - this.params = {}; - this.it = it; - this.def = def; - if (this.$data) { - this.schemaCode = it.gen.const("vSchema", getData(this.$data, it)); - } - else { - this.schemaCode = this.schemaValue; - if (!keyword_1.validSchemaType(this.schema, def.schemaType, def.allowUndefined)) { - throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`); - } - } - if ("code" in def ? def.trackErrors : def.errors !== false) { - this.errsCount = it.gen.const("_errs", names_1.default.errors); - } - } - result(condition, successAction, failAction) { - this.gen.if(codegen_1.not(condition)); - if (failAction) - failAction(); - else - this.error(); - if (successAction) { - this.gen.else(); - successAction(); - if (this.allErrors) - this.gen.endIf(); - } - else { - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - } - pass(condition, failAction) { - this.result(condition, undefined, failAction); - } - fail(condition) { - if (condition === undefined) { - this.error(); - if (!this.allErrors) - this.gen.if(false); // this branch will be removed by gen.optimize - return; - } - this.gen.if(condition); - this.error(); - if (this.allErrors) - this.gen.endIf(); - else - this.gen.else(); - } - fail$data(condition) { - if (!this.$data) - return this.fail(condition); - const { schemaCode } = this; - this.fail(codegen_1._ `${schemaCode} !== undefined && (${codegen_1.or(this.invalid$data(), condition)})`); - } - error(append, errorParams, errorPaths) { - if (errorParams) { - this.setParams(errorParams); - this._error(append, errorPaths); - this.setParams({}); - return; - } - this._error(append, errorPaths); - } - _error(append, errorPaths) { - ; - (append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths); - } - $dataError() { - errors_1.reportError(this, this.def.$dataError || errors_1.keyword$DataError); - } - reset() { - if (this.errsCount === undefined) - throw new Error('add "trackErrors" to keyword definition'); - errors_1.resetErrorsCount(this.gen, this.errsCount); - } - ok(cond) { - if (!this.allErrors) - this.gen.if(cond); - } - setParams(obj, assign) { - if (assign) - Object.assign(this.params, obj); - else - this.params = obj; - } - block$data(valid, codeBlock, $dataValid = codegen_1.nil) { - this.gen.block(() => { - this.check$data(valid, $dataValid); - codeBlock(); - }); - } - check$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) { - if (!this.$data) - return; - const { gen, schemaCode, schemaType, def } = this; - gen.if(codegen_1.or(codegen_1._ `${schemaCode} === undefined`, $dataValid)); - if (valid !== codegen_1.nil) - gen.assign(valid, true); - if (schemaType.length || def.validateSchema) { - gen.elseIf(this.invalid$data()); - this.$dataError(); - if (valid !== codegen_1.nil) - gen.assign(valid, false); - } - gen.else(); - } - invalid$data() { - const { gen, schemaCode, schemaType, def, it } = this; - return codegen_1.or(wrong$DataType(), invalid$DataSchema()); - function wrong$DataType() { - if (schemaType.length) { - /* istanbul ignore if */ - if (!(schemaCode instanceof codegen_1.Name)) - throw new Error("ajv implementation error"); - const st = Array.isArray(schemaType) ? schemaType : [schemaType]; - return codegen_1._ `${dataType_2.checkDataTypes(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`; - } - return codegen_1.nil; - } - function invalid$DataSchema() { - if (def.validateSchema) { - const validateSchemaRef = gen.scopeValue("validate$data", { ref: def.validateSchema }); // TODO value.code for standalone - return codegen_1._ `!${validateSchemaRef}(${schemaCode})`; - } - return codegen_1.nil; - } - } - subschema(appl, valid) { - const subschema = subschema_1.getSubschema(this.it, appl); - subschema_1.extendSubschemaData(subschema, this.it, appl); - subschema_1.extendSubschemaMode(subschema, appl); - const nextContext = { ...this.it, ...subschema, items: undefined, props: undefined }; - subschemaCode(nextContext, valid); - return nextContext; - } - mergeEvaluated(schemaCxt, toName) { - const { it, gen } = this; - if (!it.opts.unevaluated) - return; - if (it.props !== true && schemaCxt.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName); - } - if (it.items !== true && schemaCxt.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName); - } - } - mergeValidEvaluated(schemaCxt, valid) { - const { it, gen } = this; - if (it.opts.unevaluated && (it.props !== true || it.items !== true)) { - gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name)); - return true; - } - } -} -exports.KeywordCxt = KeywordCxt; -function keywordCode(it, keyword, def, ruleType) { - const cxt = new KeywordCxt(it, def, keyword); - if ("code" in def) { - def.code(cxt, ruleType); - } - else if (cxt.$data && def.validate) { - keyword_1.funcKeywordCode(cxt, def); - } - else if ("macro" in def) { - keyword_1.macroKeywordCode(cxt, def); - } - else if (def.compile || def.validate) { - keyword_1.funcKeywordCode(cxt, def); - } -} -const JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/; -const RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/; -function getData($data, { dataLevel, dataNames, dataPathArr }) { - let jsonPointer; - let data; - if ($data === "") - return names_1.default.rootData; - if ($data[0] === "/") { - if (!JSON_POINTER.test($data)) - throw new Error(`Invalid JSON-pointer: ${$data}`); - jsonPointer = $data; - data = names_1.default.rootData; - } - else { - const matches = RELATIVE_JSON_POINTER.exec($data); - if (!matches) - throw new Error(`Invalid JSON-pointer: ${$data}`); - const up = +matches[1]; - jsonPointer = matches[2]; - if (jsonPointer === "#") { - if (up >= dataLevel) - throw new Error(errorMsg("property/index", up)); - return dataPathArr[dataLevel - up]; - } - if (up > dataLevel) - throw new Error(errorMsg("data", up)); - data = dataNames[dataLevel - up]; - if (!jsonPointer) - return data; - } - let expr = data; - const segments = jsonPointer.split("/"); - for (const segment of segments) { - if (segment) { - data = codegen_1._ `${data}${codegen_1.getProperty(util_1.unescapeJsonPointer(segment))}`; - expr = codegen_1._ `${expr} && ${data}`; - } - } - return expr; - function errorMsg(pointerType, up) { - return `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`; - } -} -exports.getData = getData; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/index.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/index.js.map deleted file mode 100644 index bbf6496a6..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/compile/validate/index.ts"],"names":[],"mappings":";;;AASA,6CAAoE;AACpE,yCAAiE;AACjE,mDAA6D;AAC7D,yCAAmF;AACnF,yCAAyC;AACzC,uCAAkG;AAClG,2CAAiG;AACjG,wCAAwF;AACxF,oCAAwB;AACxB,wCAAqC;AACrC,kCAOgB;AAEhB,sCAMkB;AAElB,mGAAmG;AACnG,SAAgB,oBAAoB,CAAC,EAAa;IAChD,IAAI,WAAW,CAAC,EAAE,CAAC,EAAE;QACnB,aAAa,CAAC,EAAE,CAAC,CAAA;QACjB,IAAI,iBAAiB,CAAC,EAAE,CAAC,EAAE;YACzB,gBAAgB,CAAC,EAAE,CAAC,CAAA;YACpB,OAAM;SACP;KACF;IACD,gBAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,iCAAoB,CAAC,EAAE,CAAC,CAAC,CAAA;AACtD,CAAC;AATD,oDASC;AAED,SAAS,gBAAgB,CACvB,EAAC,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAY,EACvD,IAAW;IAEX,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACjB,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,WAAC,CAAA,GAAG,eAAC,CAAC,IAAI,KAAK,eAAC,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE;YACvE,GAAG,CAAC,IA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ChC,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,CAAA;KAC9B;IAED,IAAI,IAAI,GAAG,IAAI,CAAA;IACf,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACvC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,IAAI,OAAO,EAAE;YACX,IAAI,GAAG,WAAC,CAAA,GAAG,IAAI,GAAG,qBAAW,CAAC,0BAAmB,CAAC,OAAO,CAAC,CAAC,EAAE,CAAA;YAC7D,IAAI,GAAG,WAAC,CAAA,GAAG,IAAI,OAAO,IAAI,EAAE,CAAA;SAC7B;KACF;IACD,OAAO,IAAI,CAAA;IAEX,SAAS,QAAQ,CAAC,WAAmB,EAAE,EAAU;QAC/C,OAAO,iBAAiB,WAAW,IAAI,EAAE,gCAAgC,SAAS,EAAE,CAAA;IACtF,CAAC;AACH,CAAC;AAtCD,0BAsCC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.d.ts deleted file mode 100644 index 1858c3a73..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { KeywordCxt } from "."; -import type { AddedKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition } from "../../types"; -import type { SchemaObjCxt } from ".."; -import type { JSONType } from "../rules"; -export declare function macroKeywordCode(cxt: KeywordCxt, def: MacroKeywordDefinition): void; -export declare function funcKeywordCode(cxt: KeywordCxt, def: FuncKeywordDefinition): void; -export declare function validSchemaType(schema: unknown, schemaType: JSONType[], allowUndefined?: boolean): boolean; -export declare function validateKeywordUsage({ schema, opts, self }: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string): void; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js b/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js deleted file mode 100644 index 42b2e7a33..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js +++ /dev/null @@ -1,123 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0; -const codegen_1 = require("../codegen"); -const names_1 = require("../names"); -const code_1 = require("../../vocabularies/code"); -const errors_1 = require("../errors"); -function macroKeywordCode(cxt, def) { - const { gen, keyword, schema, parentSchema, it } = cxt; - const macroSchema = def.macro.call(it.self, schema, parentSchema, it); - const schemaRef = useKeyword(gen, keyword, macroSchema); - if (it.opts.validateSchema !== false) - it.self.validateSchema(macroSchema, true); - const valid = gen.name("valid"); - cxt.subschema({ - schema: macroSchema, - schemaPath: codegen_1.nil, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - topSchemaRef: schemaRef, - compositeRule: true, - }, valid); - cxt.pass(valid, () => cxt.error(true)); -} -exports.macroKeywordCode = macroKeywordCode; -function funcKeywordCode(cxt, def) { - var _a; - const { gen, keyword, schema, parentSchema, $data, it } = cxt; - checkAsyncKeyword(it, def); - const validate = !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate; - const validateRef = useKeyword(gen, keyword, validate); - const valid = gen.let("valid"); - cxt.block$data(valid, validateKeyword); - cxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid); - function validateKeyword() { - if (def.errors === false) { - assignValid(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => cxt.error()); - } - else { - const ruleErrs = def.async ? validateAsync() : validateSync(); - if (def.modifying) - modifyData(cxt); - reportErrs(() => addErrs(cxt, ruleErrs)); - } - } - function validateAsync() { - const ruleErrs = gen.let("ruleErrs", null); - gen.try(() => assignValid(codegen_1._ `await `), (e) => gen.assign(valid, false).if(codegen_1._ `${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, codegen_1._ `${e}.errors`), () => gen.throw(e))); - return ruleErrs; - } - function validateSync() { - const validateErrs = codegen_1._ `${validateRef}.errors`; - gen.assign(validateErrs, null); - assignValid(codegen_1.nil); - return validateErrs; - } - function assignValid(_await = def.async ? codegen_1._ `await ` : codegen_1.nil) { - const passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self; - const passSchema = !(("compile" in def && !$data) || def.schema === false); - gen.assign(valid, codegen_1._ `${_await}${code_1.callValidateCode(cxt, validateRef, passCxt, passSchema)}`, def.modifying); - } - function reportErrs(errors) { - var _a; - gen.if(codegen_1.not((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors); - } -} -exports.funcKeywordCode = funcKeywordCode; -function modifyData(cxt) { - const { gen, data, it } = cxt; - gen.if(it.parentData, () => gen.assign(data, codegen_1._ `${it.parentData}[${it.parentDataProperty}]`)); -} -function addErrs(cxt, errs) { - const { gen } = cxt; - gen.if(codegen_1._ `Array.isArray(${errs})`, () => { - gen - .assign(names_1.default.vErrors, codegen_1._ `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`) - .assign(names_1.default.errors, codegen_1._ `${names_1.default.vErrors}.length`); - errors_1.extendErrors(cxt); - }, () => cxt.error()); -} -function checkAsyncKeyword({ schemaEnv }, def) { - if (def.async && !schemaEnv.$async) - throw new Error("async keyword in sync schema"); -} -function useKeyword(gen, keyword, result) { - if (result === undefined) - throw new Error(`keyword "${keyword}" failed to compile`); - return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: codegen_1.stringify(result) }); -} -function validSchemaType(schema, schemaType, allowUndefined = false) { - // TODO add tests - return (!schemaType.length || - schemaType.some((st) => st === "array" - ? Array.isArray(schema) - : st === "object" - ? schema && typeof schema == "object" && !Array.isArray(schema) - : typeof schema == st || (allowUndefined && typeof schema == "undefined"))); -} -exports.validSchemaType = validSchemaType; -function validateKeywordUsage({ schema, opts, self }, def, keyword) { - /* istanbul ignore if */ - if (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) { - throw new Error("ajv implementation error"); - } - const deps = def.dependencies; - if (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) { - throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(",")}`); - } - if (def.validateSchema) { - const valid = def.validateSchema(schema[keyword]); - if (!valid) { - const msg = "keyword value is invalid: " + self.errorsText(def.validateSchema.errors); - if (opts.validateSchema === "log") - self.logger.error(msg); - else - throw new Error(msg); - } - } -} -exports.validateKeywordUsage = validateKeywordUsage; -//# sourceMappingURL=keyword.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js.map deleted file mode 100644 index d39595b98..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/keyword.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"keyword.js","sourceRoot":"","sources":["../../../lib/compile/validate/keyword.ts"],"names":[],"mappings":";;;AAUA,wCAAsE;AACtE,oCAAwB;AAExB,kDAAwD;AACxD,sCAAsC;AAItC,SAAgB,gBAAgB,CAAC,GAAe,EAAE,GAA2B;IAC3E,MAAM,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;IACpD,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,CAAC,CAAA;IACrE,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,WAAW,CAAC,CAAA;IACvD,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,KAAK,KAAK;QAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IAE/E,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC/B,GAAG,CAAC,SAAS,CACX;QACE,MAAM,E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/table/node_modules/ajv/dist/compile/validate/subschema.d.ts b/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.d.ts deleted file mode 100644 index 8544271ab..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { AnySchema } from "../../types"; -import type { SchemaObjCxt } from ".."; -import { Code, Name } from "../codegen"; -import { Type } from "../util"; -import type { JSONType } from "../rules"; -export interface SubschemaContext { - schema: AnySchema; - schemaPath: Code; - errSchemaPath: string; - topSchemaRef?: Code; - errorPath?: Code; - dataLevel?: number; - dataTypes?: JSONType[]; - data?: Name; - parentData?: Name; - parentDataProperty?: Code | number; - dataNames?: Name[]; - dataPathArr?: (Code | number)[]; - propertyName?: Name; - jtdDiscriminator?: string; - jtdMetadata?: boolean; - compositeRule?: true; - createErrors?: boolean; - allErrors?: boolean; -} -export declare type SubschemaArgs = Partial<{ - keyword: string; - schemaProp: string | number; - schema: AnySchema; - schemaPath: Code; - errSchemaPath: string; - topSchemaRef: Code; - data: Name | Code; - dataProp: Code | string | number; - dataTypes: JSONType[]; - definedProperties: Set; - propertyName: Name; - dataPropType: Type; - jtdDiscriminator: string; - jtdMetadata: boolean; - compositeRule: true; - createErrors: boolean; - allErrors: boolean; -}>; -export declare function getSubschema(it: SchemaObjCxt, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }: SubschemaArgs): SubschemaContext; -export declare function extendSubschemaData(subschema: SubschemaContext, it: SchemaObjCxt, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }: SubschemaArgs): void; -export declare function extendSubschemaMode(subschema: SubschemaContext, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }: SubschemaArgs): void; diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js b/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js deleted file mode 100644 index 5fab01dda..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0; -const codegen_1 = require("../codegen"); -const util_1 = require("../util"); -function getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) { - if (keyword !== undefined && schema !== undefined) { - throw new Error('both "keyword" and "schema" passed, only one allowed'); - } - if (keyword !== undefined) { - const sch = it.schema[keyword]; - return schemaProp === undefined - ? { - schema: sch, - schemaPath: codegen_1._ `${it.schemaPath}${codegen_1.getProperty(keyword)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}`, - } - : { - schema: sch[schemaProp], - schemaPath: codegen_1._ `${it.schemaPath}${codegen_1.getProperty(keyword)}${codegen_1.getProperty(schemaProp)}`, - errSchemaPath: `${it.errSchemaPath}/${keyword}/${util_1.escapeFragment(schemaProp)}`, - }; - } - if (schema !== undefined) { - if (schemaPath === undefined || errSchemaPath === undefined || topSchemaRef === undefined) { - throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"'); - } - return { - schema, - schemaPath, - topSchemaRef, - errSchemaPath, - }; - } - throw new Error('either "keyword" or "schema" must be passed'); -} -exports.getSubschema = getSubschema; -function extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) { - if (data !== undefined && dataProp !== undefined) { - throw new Error('both "data" and "dataProp" passed, only one allowed'); - } - const { gen } = it; - if (dataProp !== undefined) { - const { errorPath, dataPathArr, opts } = it; - const nextData = gen.let("data", codegen_1._ `${it.data}${codegen_1.getProperty(dataProp)}`, true); - dataContextProps(nextData); - subschema.errorPath = codegen_1.str `${errorPath}${util_1.getErrorPath(dataProp, dpType, opts.jsPropertySyntax)}`; - subschema.parentDataProperty = codegen_1._ `${dataProp}`; - subschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty]; - } - if (data !== undefined) { - const nextData = data instanceof codegen_1.Name ? data : gen.let("data", data, true); // replaceable if used once? - dataContextProps(nextData); - if (propertyName !== undefined) - subschema.propertyName = propertyName; - // TODO something is possibly wrong here with not changing parentDataProperty and not appending dataPathArr - } - if (dataTypes) - subschema.dataTypes = dataTypes; - function dataContextProps(_nextData) { - subschema.data = _nextData; - subschema.dataLevel = it.dataLevel + 1; - subschema.dataTypes = []; - it.definedProperties = new Set(); - subschema.parentData = it.data; - subschema.dataNames = [...it.dataNames, _nextData]; - } -} -exports.extendSubschemaData = extendSubschemaData; -function extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) { - if (compositeRule !== undefined) - subschema.compositeRule = compositeRule; - if (createErrors !== undefined) - subschema.createErrors = createErrors; - if (allErrors !== undefined) - subschema.allErrors = allErrors; - subschema.jtdDiscriminator = jtdDiscriminator; // not inherited - subschema.jtdMetadata = jtdMetadata; // not inherited -} -exports.extendSubschemaMode = extendSubschemaMode; -//# sourceMappingURL=subschema.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js.map b/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js.map deleted file mode 100644 index 3a4892991..000000000 --- a/node_modules/table/node_modules/ajv/dist/compile/validate/subschema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"subschema.js","sourceRoot":"","sources":["../../../lib/compile/validate/subschema.ts"],"names":[],"mappings":";;;AAEA,wCAA0D;AAC1D,kCAA0D;AA6C1D,SAAgB,YAAY,CAC1B,EAAgB,EAChB,EAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAgB;IAErF,IAAI,OAAO,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE;QACjD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;KACxE;IAED,IAAI,OAAO,KAAK,SAAS,EAAE;QACzB,MAAM,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QAC9B,OAA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C,SAAS,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IACpD,CAAC;AACH,CAAC;AArCD,kDAqCC;AAED,SAAgB,mBAAmB,CACjC,SAA2B,EAC3B,EAAC,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAgB;IAEtF,IAAI,aAAa,KAAK,SAAS;QAAE,SAAS,CAAC,aAAa,GAAG,aAAa,CAAA;IACxE,IAAI,YAAY,KAAK,SAAS;QAAE,SAAS,CAAC,YAAY,GAAG,YAAY,CAAA;IACrE,IAAI,SAAS,KAAK,SAAS;QAAE,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5D,SAAS,CAAC,gBAAgB,GAAG,gBAAgB,CAAA,CAAC,gBAAgB;IAC9D,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA,CAAC,gBAAgB;AACtD,CAAC;AATD,kDASC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/core.d.ts b/node_modules/table/node_modules/ajv/dist/core.d.ts deleted file mode 100644 index eb0576077..000000000 --- a/node_modules/table/node_modules/ajv/dist/core.d.ts +++ /dev/null @@ -1,161 +0,0 @@ -export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, AnyValidateFunction, ErrorObject, ErrorNoParams, } from "./types"; -export { SchemaCxt, SchemaObjCxt } from "./compile"; -export interface Plugin { - (ajv: Ajv, options?: Opts): Ajv; - [prop: string]: any; -} -export { KeywordCxt } from "./compile/validate"; -export { DefinedError } from "./vocabularies/errors"; -export { JSONType } from "./compile/rules"; -export { JSONSchemaType } from "./types/json-schema"; -export { JTDSchemaType } from "./types/jtd-schema"; -export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen"; -import type { Schema, AnySchema, AnySchemaObject, SchemaObject, AsyncSchema, Vocabulary, KeywordDefinition, AddedKeywordDefinition, AnyValidateFunction, ValidateFunction, AsyncValidateFunction, ErrorObject, Format, AddedFormat } from "./types"; -import type { JSONSchemaType } from "./types/json-schema"; -import type { JTDSchemaType } from "./types/jtd-schema"; -import ValidationError from "./runtime/validation_error"; -import MissingRefError from "./compile/ref_error"; -import { ValidationRules } from "./compile/rules"; -import { SchemaEnv } from "./compile"; -import { Code, ValueScope } from "./compile/codegen"; -export declare type Options = CurrentOptions & DeprecatedOptions; -export interface CurrentOptions { - strict?: boolean | "log"; - strictSchema?: boolean | "log"; - strictNumbers?: boolean | "log"; - strictTypes?: boolean | "log"; - strictTuples?: boolean | "log"; - strictRequired?: boolean | "log"; - allowMatchingProperties?: boolean; - allowUnionTypes?: boolean; - validateFormats?: boolean; - $data?: boolean; - allErrors?: boolean; - verbose?: boolean; - discriminator?: boolean; - $comment?: true | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown); - formats?: { - [Name in string]?: Format; - }; - keywords?: Vocabulary; - schemas?: AnySchema[] | { - [Key in string]?: AnySchema; - }; - logger?: Logger | false; - loadSchema?: (uri: string) => Promise; - removeAdditional?: boolean | "all" | "failing"; - useDefaults?: boolean | "empty"; - coerceTypes?: boolean | "array"; - next?: boolean; - unevaluated?: boolean; - dynamicRef?: boolean; - jtd?: boolean; - meta?: SchemaObject | boolean; - defaultMeta?: string | AnySchemaObject; - validateSchema?: boolean | "log"; - addUsedSchema?: boolean; - inlineRefs?: boolean | number; - passContext?: boolean; - loopRequired?: number; - loopEnum?: number; - ownProperties?: boolean; - multipleOfPrecision?: number; - messages?: boolean; - code?: CodeOptions; -} -export interface CodeOptions { - es5?: boolean; - lines?: boolean; - optimize?: boolean | number; - formats?: Code; - source?: boolean; - process?: (code: string, schema?: SchemaEnv) => string; -} -interface InstanceCodeOptions extends CodeOptions { - optimize: number; -} -interface DeprecatedOptions { - /** @deprecated */ - ignoreKeywordsWithRef?: boolean; - /** @deprecated */ - jsPropertySyntax?: boolean; - /** @deprecated */ - unicode?: boolean; -} -declare type RequiredInstanceOptions = { - [K in "strictSchema" | "strictNumbers" | "strictTypes" | "strictTuples" | "strictRequired" | "inlineRefs" | "loopRequired" | "loopEnum" | "meta" | "messages" | "addUsedSchema" | "validateSchema" | "validateFormats"]: NonNullable; -} & { - code: InstanceCodeOptions; -}; -export declare type InstanceOptions = Options & RequiredInstanceOptions; -export interface Logger { - log(...args: unknown[]): unknown; - warn(...args: unknown[]): unknown; - error(...args: unknown[]): unknown; -} -export default class Ajv { - opts: InstanceOptions; - errors?: ErrorObject[] | null; - logger: Logger; - readonly scope: ValueScope; - readonly schemas: { - [Key in string]?: SchemaEnv; - }; - readonly refs: { - [Ref in string]?: SchemaEnv | string; - }; - readonly formats: { - [Name in string]?: AddedFormat; - }; - readonly RULES: ValidationRules; - readonly _compilations: Set; - private readonly _loading; - private readonly _cache; - private readonly _metaOpts; - static ValidationError: typeof ValidationError; - static MissingRefError: typeof MissingRefError; - constructor(opts?: Options); - _addVocabularies(): void; - _addDefaultMetaSchema(): void; - defaultMeta(): string | AnySchemaObject | undefined; - validate(schema: Schema | string, data: unknown): boolean; - validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise; - validate(schema: Schema | JSONSchemaType | string, data: unknown): data is T; - validate(schema: JTDSchemaType, data: unknown): data is T; - validate(schema: AsyncSchema, data: unknown | T): Promise; - validate(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise; - compile(schema: Schema | JSONSchemaType, _meta?: boolean): ValidateFunction; - compile(schema: JTDSchemaType, _meta?: boolean): ValidateFunction; - compile(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction; - compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction; - compileAsync(schema: SchemaObject | JSONSchemaType, _meta?: boolean): Promise>; - compileAsync(schema: JTDSchemaType, _meta?: boolean): Promise>; - compileAsync(schema: AsyncSchema, meta?: boolean): Promise>; - compileAsync(schema: AnySchemaObject, meta?: boolean): Promise>; - addSchema(schema: AnySchema | AnySchema[], // If array is passed, `key` will be ignored - key?: string, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - _meta?: boolean, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - _validateSchema?: boolean | "log"): Ajv; - addMetaSchema(schema: AnySchemaObject, key?: string, // schema key - _validateSchema?: boolean | "log"): Ajv; - validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise; - getSchema(keyRef: string): AnyValidateFunction | undefined; - removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv; - addVocabulary(definitions: Vocabulary): Ajv; - addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv; - getKeyword(keyword: string): AddedKeywordDefinition | boolean; - removeKeyword(keyword: string): Ajv; - addFormat(name: string, format: Format): Ajv; - errorsText(errors?: ErrorObject[] | null | undefined, // optional array of validation errors - { separator, dataVar }?: ErrorsTextOptions): string; - $dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject; - private _removeAllSchemas; - _addSchema(schema: AnySchema, meta?: boolean, baseId?: string, validateSchema?: boolean | "log", addSchema?: boolean): SchemaEnv; - private _checkUnique; - private _compileSchemaEnv; - private _compileMetaSchema; -} -export interface ErrorsTextOptions { - separator?: string; - dataVar?: string; -} diff --git a/node_modules/table/node_modules/ajv/dist/core.js b/node_modules/table/node_modules/ajv/dist/core.js deleted file mode 100644 index 9eba9f49d..000000000 --- a/node_modules/table/node_modules/ajv/dist/core.js +++ /dev/null @@ -1,599 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -var validate_1 = require("./compile/validate"); -Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); -var codegen_1 = require("./compile/codegen"); -Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } }); -Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } }); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); -Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); -Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); -Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); -const validation_error_1 = require("./runtime/validation_error"); -const ref_error_1 = require("./compile/ref_error"); -const rules_1 = require("./compile/rules"); -const compile_1 = require("./compile"); -const codegen_2 = require("./compile/codegen"); -const resolve_1 = require("./compile/resolve"); -const dataType_1 = require("./compile/validate/dataType"); -const util_1 = require("./compile/util"); -const $dataRefSchema = require("./refs/data.json"); -const META_IGNORE_OPTIONS = ["removeAdditional", "useDefaults", "coerceTypes"]; -const EXT_SCOPE_NAMES = new Set([ - "validate", - "serialize", - "parse", - "wrapper", - "root", - "schema", - "keyword", - "pattern", - "formats", - "validate$data", - "func", - "obj", - "Error", -]); -const removedOptions = { - errorDataPath: "", - format: "`validateFormats: false` can be used instead.", - nullable: '"nullable" keyword is supported by default.', - jsonPointers: "Deprecated jsPropertySyntax can be used instead.", - extendRefs: "Deprecated ignoreKeywordsWithRef can be used instead.", - missingRefs: "Pass empty schema with $id that should be ignored to ajv.addSchema.", - processCode: "Use option `code: {process: (code, schemaEnv: object) => string}`", - sourceCode: "Use option `code: {source: true}`", - schemaId: "JSON Schema draft-04 is not supported in Ajv v7/8.", - strictDefaults: "It is default now, see option `strict`.", - strictKeywords: "It is default now, see option `strict`.", - uniqueItems: '"uniqueItems" keyword is always validated.', - unknownFormats: "Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).", - cache: "Map is used as cache, schema object as key.", - serialize: "Map is used as cache, schema object as key.", - ajvErrors: "It is default now, see option `strict`.", -}; -const deprecatedOptions = { - ignoreKeywordsWithRef: "", - jsPropertySyntax: "", - unicode: '"minLength"/"maxLength" account for unicode characters by default.', -}; -const MAX_EXPRESSION = 200; -// eslint-disable-next-line complexity -function requiredOptions(o) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u; - const s = o.strict; - const _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize; - const optimize = _optz === true || _optz === undefined ? 1 : _optz || 0; - return { - strictSchema: (_c = (_b = o.strictSchema) !== null && _b !== void 0 ? _b : s) !== null && _c !== void 0 ? _c : true, - strictNumbers: (_e = (_d = o.strictNumbers) !== null && _d !== void 0 ? _d : s) !== null && _e !== void 0 ? _e : true, - strictTypes: (_g = (_f = o.strictTypes) !== null && _f !== void 0 ? _f : s) !== null && _g !== void 0 ? _g : "log", - strictTuples: (_j = (_h = o.strictTuples) !== null && _h !== void 0 ? _h : s) !== null && _j !== void 0 ? _j : "log", - strictRequired: (_l = (_k = o.strictRequired) !== null && _k !== void 0 ? _k : s) !== null && _l !== void 0 ? _l : false, - code: o.code ? { ...o.code, optimize } : { optimize }, - loopRequired: (_m = o.loopRequired) !== null && _m !== void 0 ? _m : MAX_EXPRESSION, - loopEnum: (_o = o.loopEnum) !== null && _o !== void 0 ? _o : MAX_EXPRESSION, - meta: (_p = o.meta) !== null && _p !== void 0 ? _p : true, - messages: (_q = o.messages) !== null && _q !== void 0 ? _q : true, - inlineRefs: (_r = o.inlineRefs) !== null && _r !== void 0 ? _r : true, - addUsedSchema: (_s = o.addUsedSchema) !== null && _s !== void 0 ? _s : true, - validateSchema: (_t = o.validateSchema) !== null && _t !== void 0 ? _t : true, - validateFormats: (_u = o.validateFormats) !== null && _u !== void 0 ? _u : true, - }; -} -class Ajv { - constructor(opts = {}) { - this.schemas = {}; - this.refs = {}; - this.formats = {}; - this._compilations = new Set(); - this._loading = {}; - this._cache = new Map(); - opts = this.opts = { ...opts, ...requiredOptions(opts) }; - const { es5, lines } = this.opts.code; - this.scope = new codegen_2.ValueScope({ scope: {}, prefixes: EXT_SCOPE_NAMES, es5, lines }); - this.logger = getLogger(opts.logger); - const formatOpt = opts.validateFormats; - opts.validateFormats = false; - this.RULES = rules_1.getRules(); - checkOptions.call(this, removedOptions, opts, "NOT SUPPORTED"); - checkOptions.call(this, deprecatedOptions, opts, "DEPRECATED", "warn"); - this._metaOpts = getMetaSchemaOptions.call(this); - if (opts.formats) - addInitialFormats.call(this); - this._addVocabularies(); - this._addDefaultMetaSchema(); - if (opts.keywords) - addInitialKeywords.call(this, opts.keywords); - if (typeof opts.meta == "object") - this.addMetaSchema(opts.meta); - addInitialSchemas.call(this); - opts.validateFormats = formatOpt; - } - _addVocabularies() { - this.addKeyword("$async"); - } - _addDefaultMetaSchema() { - const { $data, meta } = this.opts; - if (meta && $data) - this.addMetaSchema($dataRefSchema, $dataRefSchema.$id, false); - } - defaultMeta() { - const { meta } = this.opts; - return (this.opts.defaultMeta = typeof meta == "object" ? meta.$id || meta : undefined); - } - validate(schemaKeyRef, // key, ref or schema object - data // to be validated - ) { - let v; - if (typeof schemaKeyRef == "string") { - v = this.getSchema(schemaKeyRef); - if (!v) - throw new Error(`no schema with key or ref "${schemaKeyRef}"`); - } - else { - v = this.compile(schemaKeyRef); - } - const valid = v(data); - if (!("$async" in v)) - this.errors = v.errors; - return valid; - } - compile(schema, _meta) { - const sch = this._addSchema(schema, _meta); - return (sch.validate || this._compileSchemaEnv(sch)); - } - compileAsync(schema, meta) { - if (typeof this.opts.loadSchema != "function") { - throw new Error("options.loadSchema should be a function"); - } - const { loadSchema } = this.opts; - return runCompileAsync.call(this, schema, meta); - async function runCompileAsync(_schema, _meta) { - await loadMetaSchema.call(this, _schema.$schema); - const sch = this._addSchema(_schema, _meta); - return sch.validate || _compileAsync.call(this, sch); - } - async function loadMetaSchema($ref) { - if ($ref && !this.getSchema($ref)) { - await runCompileAsync.call(this, { $ref }, true); - } - } - async function _compileAsync(sch) { - try { - return this._compileSchemaEnv(sch); - } - catch (e) { - if (!(e instanceof ref_error_1.default)) - throw e; - checkLoaded.call(this, e); - await loadMissingSchema.call(this, e.missingSchema); - return _compileAsync.call(this, sch); - } - } - function checkLoaded({ missingSchema: ref, missingRef }) { - if (this.refs[ref]) { - throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`); - } - } - async function loadMissingSchema(ref) { - const _schema = await _loadSchema.call(this, ref); - if (!this.refs[ref]) - await loadMetaSchema.call(this, _schema.$schema); - if (!this.refs[ref]) - this.addSchema(_schema, ref, meta); - } - async function _loadSchema(ref) { - const p = this._loading[ref]; - if (p) - return p; - try { - return await (this._loading[ref] = loadSchema(ref)); - } - finally { - delete this._loading[ref]; - } - } - } - // Adds schema to the instance - addSchema(schema, // If array is passed, `key` will be ignored - key, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. - _meta, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. - _validateSchema = this.opts.validateSchema // false to skip schema validation. Used internally, option validateSchema should be used instead. - ) { - if (Array.isArray(schema)) { - for (const sch of schema) - this.addSchema(sch, undefined, _meta, _validateSchema); - return this; - } - let id; - if (typeof schema === "object") { - id = schema.$id; - if (id !== undefined && typeof id != "string") - throw new Error("schema $id must be string"); - } - key = resolve_1.normalizeId(key || id); - this._checkUnique(key); - this.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true); - return this; - } - // Add schema that will be used to validate other schemas - // options in META_IGNORE_OPTIONS are alway set to false - addMetaSchema(schema, key, // schema key - _validateSchema = this.opts.validateSchema // false to skip schema validation, can be used to override validateSchema option for meta-schema - ) { - this.addSchema(schema, key, true, _validateSchema); - return this; - } - // Validate schema against its meta-schema - validateSchema(schema, throwOrLogError) { - if (typeof schema == "boolean") - return true; - let $schema; - $schema = schema.$schema; - if ($schema !== undefined && typeof $schema != "string") { - throw new Error("$schema must be a string"); - } - $schema = $schema || this.opts.defaultMeta || this.defaultMeta(); - if (!$schema) { - this.logger.warn("meta-schema not available"); - this.errors = null; - return true; - } - const valid = this.validate($schema, schema); - if (!valid && throwOrLogError) { - const message = "schema is invalid: " + this.errorsText(); - if (this.opts.validateSchema === "log") - this.logger.error(message); - else - throw new Error(message); - } - return valid; - } - // Get compiled schema by `key` or `ref`. - // (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id) - getSchema(keyRef) { - let sch; - while (typeof (sch = getSchEnv.call(this, keyRef)) == "string") - keyRef = sch; - if (sch === undefined) { - const root = new compile_1.SchemaEnv({ schema: {} }); - sch = compile_1.resolveSchema.call(this, root, keyRef); - if (!sch) - return; - this.refs[keyRef] = sch; - } - return (sch.validate || this._compileSchemaEnv(sch)); - } - // Remove cached schema(s). - // If no parameter is passed all schemas but meta-schemas are removed. - // If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. - // Even if schema is referenced by other schemas it still can be removed as other schemas have local references. - removeSchema(schemaKeyRef) { - if (schemaKeyRef instanceof RegExp) { - this._removeAllSchemas(this.schemas, schemaKeyRef); - this._removeAllSchemas(this.refs, schemaKeyRef); - return this; - } - switch (typeof schemaKeyRef) { - case "undefined": - this._removeAllSchemas(this.schemas); - this._removeAllSchemas(this.refs); - this._cache.clear(); - return this; - case "string": { - const sch = getSchEnv.call(this, schemaKeyRef); - if (typeof sch == "object") - this._cache.delete(sch.schema); - delete this.schemas[schemaKeyRef]; - delete this.refs[schemaKeyRef]; - return this; - } - case "object": { - const cacheKey = schemaKeyRef; - this._cache.delete(cacheKey); - let id = schemaKeyRef.$id; - if (id) { - id = resolve_1.normalizeId(id); - delete this.schemas[id]; - delete this.refs[id]; - } - return this; - } - default: - throw new Error("ajv.removeSchema: invalid parameter"); - } - } - // add "vocabulary" - a collection of keywords - addVocabulary(definitions) { - for (const def of definitions) - this.addKeyword(def); - return this; - } - addKeyword(kwdOrDef, def // deprecated - ) { - let keyword; - if (typeof kwdOrDef == "string") { - keyword = kwdOrDef; - if (typeof def == "object") { - this.logger.warn("these parameters are deprecated, see docs for addKeyword"); - def.keyword = keyword; - } - } - else if (typeof kwdOrDef == "object" && def === undefined) { - def = kwdOrDef; - keyword = def.keyword; - if (Array.isArray(keyword) && !keyword.length) { - throw new Error("addKeywords: keyword must be string or non-empty array"); - } - } - else { - throw new Error("invalid addKeywords parameters"); - } - checkKeyword.call(this, keyword, def); - if (!def) { - util_1.eachItem(keyword, (kwd) => addRule.call(this, kwd)); - return this; - } - keywordMetaschema.call(this, def); - const definition = { - ...def, - type: dataType_1.getJSONTypes(def.type), - schemaType: dataType_1.getJSONTypes(def.schemaType), - }; - util_1.eachItem(keyword, definition.type.length === 0 - ? (k) => addRule.call(this, k, definition) - : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t))); - return this; - } - getKeyword(keyword) { - const rule = this.RULES.all[keyword]; - return typeof rule == "object" ? rule.definition : !!rule; - } - // Remove keyword - removeKeyword(keyword) { - // TODO return type should be Ajv - const { RULES } = this; - delete RULES.keywords[keyword]; - delete RULES.all[keyword]; - for (const group of RULES.rules) { - const i = group.rules.findIndex((rule) => rule.keyword === keyword); - if (i >= 0) - group.rules.splice(i, 1); - } - return this; - } - // Add format - addFormat(name, format) { - if (typeof format == "string") - format = new RegExp(format); - this.formats[name] = format; - return this; - } - errorsText(errors = this.errors, // optional array of validation errors - { separator = ", ", dataVar = "data" } = {} // optional options with properties `separator` and `dataVar` - ) { - if (!errors || errors.length === 0) - return "No errors"; - return errors - .map((e) => `${dataVar}${e.instancePath} ${e.message}`) - .reduce((text, msg) => text + separator + msg); - } - $dataMetaSchema(metaSchema, keywordsJsonPointers) { - const rules = this.RULES.all; - metaSchema = JSON.parse(JSON.stringify(metaSchema)); - for (const jsonPointer of keywordsJsonPointers) { - const segments = jsonPointer.split("/").slice(1); // first segment is an empty string - let keywords = metaSchema; - for (const seg of segments) - keywords = keywords[seg]; - for (const key in rules) { - const rule = rules[key]; - if (typeof rule != "object") - continue; - const { $data } = rule.definition; - const schema = keywords[key]; - if ($data && schema) - keywords[key] = schemaOrData(schema); - } - } - return metaSchema; - } - _removeAllSchemas(schemas, regex) { - for (const keyRef in schemas) { - const sch = schemas[keyRef]; - if (!regex || regex.test(keyRef)) { - if (typeof sch == "string") { - delete schemas[keyRef]; - } - else if (sch && !sch.meta) { - this._cache.delete(sch.schema); - delete schemas[keyRef]; - } - } - } - } - _addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) { - let id; - if (typeof schema == "object") { - id = schema.$id; - } - else { - if (this.opts.jtd) - throw new Error("schema must be object"); - else if (typeof schema != "boolean") - throw new Error("schema must be object or boolean"); - } - let sch = this._cache.get(schema); - if (sch !== undefined) - return sch; - const localRefs = resolve_1.getSchemaRefs.call(this, schema); - baseId = resolve_1.normalizeId(id || baseId); - sch = new compile_1.SchemaEnv({ schema, meta, baseId, localRefs }); - this._cache.set(sch.schema, sch); - if (addSchema && !baseId.startsWith("#")) { - // TODO atm it is allowed to overwrite schemas without id (instead of not adding them) - if (baseId) - this._checkUnique(baseId); - this.refs[baseId] = sch; - } - if (validateSchema) - this.validateSchema(schema, true); - return sch; - } - _checkUnique(id) { - if (this.schemas[id] || this.refs[id]) { - throw new Error(`schema with key or id "${id}" already exists`); - } - } - _compileSchemaEnv(sch) { - if (sch.meta) - this._compileMetaSchema(sch); - else - compile_1.compileSchema.call(this, sch); - /* istanbul ignore if */ - if (!sch.validate) - throw new Error("ajv implementation error"); - return sch.validate; - } - _compileMetaSchema(sch) { - const currentOpts = this.opts; - this.opts = this._metaOpts; - try { - compile_1.compileSchema.call(this, sch); - } - finally { - this.opts = currentOpts; - } - } -} -exports.default = Ajv; -Ajv.ValidationError = validation_error_1.default; -Ajv.MissingRefError = ref_error_1.default; -function checkOptions(checkOpts, options, msg, log = "error") { - for (const key in checkOpts) { - const opt = key; - if (opt in options) - this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`); - } -} -function getSchEnv(keyRef) { - keyRef = resolve_1.normalizeId(keyRef); // TODO tests fail without this line - return this.schemas[keyRef] || this.refs[keyRef]; -} -function addInitialSchemas() { - const optsSchemas = this.opts.schemas; - if (!optsSchemas) - return; - if (Array.isArray(optsSchemas)) - this.addSchema(optsSchemas); - else - for (const key in optsSchemas) - this.addSchema(optsSchemas[key], key); -} -function addInitialFormats() { - for (const name in this.opts.formats) { - const format = this.opts.formats[name]; - if (format) - this.addFormat(name, format); - } -} -function addInitialKeywords(defs) { - if (Array.isArray(defs)) { - this.addVocabulary(defs); - return; - } - this.logger.warn("keywords option as map is deprecated, pass array"); - for (const keyword in defs) { - const def = defs[keyword]; - if (!def.keyword) - def.keyword = keyword; - this.addKeyword(def); - } -} -function getMetaSchemaOptions() { - const metaOpts = { ...this.opts }; - for (const opt of META_IGNORE_OPTIONS) - delete metaOpts[opt]; - return metaOpts; -} -const noLogs = { log() { }, warn() { }, error() { } }; -function getLogger(logger) { - if (logger === false) - return noLogs; - if (logger === undefined) - return console; - if (logger.log && logger.warn && logger.error) - return logger; - throw new Error("logger must implement log, warn and error methods"); -} -const KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i; -function checkKeyword(keyword, def) { - const { RULES } = this; - util_1.eachItem(keyword, (kwd) => { - if (RULES.keywords[kwd]) - throw new Error(`Keyword ${kwd} is already defined`); - if (!KEYWORD_NAME.test(kwd)) - throw new Error(`Keyword ${kwd} has invalid name`); - }); - if (!def) - return; - if (def.$data && !("code" in def || "validate" in def)) { - throw new Error('$data keyword must have "code" or "validate" function'); - } -} -function addRule(keyword, definition, dataType) { - var _a; - const post = definition === null || definition === void 0 ? void 0 : definition.post; - if (dataType && post) - throw new Error('keyword with "post" flag cannot have "type"'); - const { RULES } = this; - let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType); - if (!ruleGroup) { - ruleGroup = { type: dataType, rules: [] }; - RULES.rules.push(ruleGroup); - } - RULES.keywords[keyword] = true; - if (!definition) - return; - const rule = { - keyword, - definition: { - ...definition, - type: dataType_1.getJSONTypes(definition.type), - schemaType: dataType_1.getJSONTypes(definition.schemaType), - }, - }; - if (definition.before) - addBeforeRule.call(this, ruleGroup, rule, definition.before); - else - ruleGroup.rules.push(rule); - RULES.all[keyword] = rule; - (_a = definition.implements) === null || _a === void 0 ? void 0 : _a.forEach((kwd) => this.addKeyword(kwd)); -} -function addBeforeRule(ruleGroup, rule, before) { - const i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before); - if (i >= 0) { - ruleGroup.rules.splice(i, 0, rule); - } - else { - ruleGroup.rules.push(rule); - this.logger.warn(`rule ${before} is not defined`); - } -} -function keywordMetaschema(def) { - let { metaSchema } = def; - if (metaSchema === undefined) - return; - if (def.$data && this.opts.$data) - metaSchema = schemaOrData(metaSchema); - def.validateSchema = this.compile(metaSchema, true); -} -const $dataRef = { - $ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", -}; -function schemaOrData(schema) { - return { anyOf: [schema, $dataRef] }; -} -//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/core.js.map b/node_modules/table/node_modules/ajv/dist/core.js.map deleted file mode 100644 index 5b5aeb2d8..000000000 --- a/node_modules/table/node_modules/ajv/dist/core.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../lib/core.ts"],"names":[],"mappings":";;;AA4BA,+CAA6C;AAArC,sGAAA,UAAU,OAAA;AAKlB,6CAA6F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA;AAoBnD,iEAAwD;AACxD,mDAAiD;AACjD,2CAAoF;AACpF,uCAAiE;AACjE,+CAAkD;AAClD,+CAA4D;AAC5D,0DAAwD;AACxD,yCAAuC;AAEvC,mDAAkD;AAElD,MAAM,mBAAmB,GAAsB,CAAC,kBAAkB,EAAE,aAAa,EAAE,aAAa,CA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AAA;IACzB,MAAA,UAAU,CAAC,UAAU,0CAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;AAC/D,CAAC;AAED,SAAS,aAAa,CAAY,SAAoB,EAAE,IAAU,EAAE,MAAc;IAChF,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC,CAAA;IACxE,IAAI,CAAC,IAAI,CAAC,EAAE;QACV,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;KACnC;SAAM;QACL,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,MAAM,iBAAiB,CAAC,CAAA;KAClD;AACH,CAAC;AAED,SAAS,iBAAiB,CAAY,GAAsB;IAC1D,IAAI,EAAC,UAAU,EAAC,GAAG,GAAG,CAAA;IACtB,IAAI,UAAU,KAAK,SAAS;QAAE,OAAM;IACpC,IAAI,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK;QAAE,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;IACvE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACrD,CAAC;AAED,MAAM,QAAQ,GAAG;IACf,IAAI,EAAE,gFAAgF;CACvF,CAAA;AAED,SAAS,YAAY,CAAC,MAAiB;IACrC,OAAO,EAAC,KAAK,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAC,CAAA;AACpC,CAAC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/jtd.d.ts b/node_modules/table/node_modules/ajv/dist/jtd.d.ts deleted file mode 100644 index 851a76b9f..000000000 --- a/node_modules/table/node_modules/ajv/dist/jtd.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { AnySchemaObject, SchemaObject, JTDParser } from "./types"; -import type { JTDSchemaType, JTDDataType } from "./types/jtd-schema"; -import AjvCore, { CurrentOptions } from "./core"; -declare type JTDOptions = CurrentOptions & { - strict?: never; - allowMatchingProperties?: never; - allowUnionTypes?: never; - validateFormats?: never; - $data?: never; - verbose?: boolean; - $comment?: never; - formats?: never; - loadSchema?: never; - useDefaults?: never; - coerceTypes?: never; - next?: never; - unevaluated?: never; - dynamicRef?: never; - meta?: boolean; - defaultMeta?: never; - inlineRefs?: boolean; - loopRequired?: never; - multipleOfPrecision?: never; -}; -declare class Ajv extends AjvCore { - constructor(opts?: JTDOptions); - _addVocabularies(): void; - _addDefaultMetaSchema(): void; - defaultMeta(): string | AnySchemaObject | undefined; - compileSerializer(schema: SchemaObject): (data: T) => string; - compileSerializer(schema: JTDSchemaType): (data: T) => string; - compileParser(schema: SchemaObject): JTDParser; - compileParser(schema: JTDSchemaType): JTDParser; - private _compileSerializer; - private _compileParser; -} -export default Ajv; -export { Format, FormatDefinition, AsyncFormatDefinition, KeywordDefinition, KeywordErrorDefinition, CodeKeywordDefinition, MacroKeywordDefinition, FuncKeywordDefinition, Vocabulary, Schema, SchemaObject, AnySchemaObject, AsyncSchema, AnySchema, ValidateFunction, AsyncValidateFunction, ErrorObject, ErrorNoParams, JTDParser, } from "./types"; -export { Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions } from "./core"; -export { SchemaCxt, SchemaObjCxt } from "./compile"; -export { KeywordCxt } from "./compile/validate"; -export { JTDErrorObject } from "./vocabularies/jtd"; -export { _, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions } from "./compile/codegen"; -export { JTDSchemaType, JTDDataType }; -export { JTDOptions }; diff --git a/node_modules/table/node_modules/ajv/dist/jtd.js b/node_modules/table/node_modules/ajv/dist/jtd.js deleted file mode 100644 index dfb34ddd5..000000000 --- a/node_modules/table/node_modules/ajv/dist/jtd.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0; -const core_1 = require("./core"); -const jtd_1 = require("./vocabularies/jtd"); -const jtd_schema_1 = require("./refs/jtd-schema"); -const serialize_1 = require("./compile/jtd/serialize"); -const parse_1 = require("./compile/jtd/parse"); -const META_SCHEMA_ID = "JTD-meta-schema"; -class Ajv extends core_1.default { - constructor(opts = {}) { - super({ - ...opts, - jtd: true, - }); - } - _addVocabularies() { - super._addVocabularies(); - this.addVocabulary(jtd_1.default); - } - _addDefaultMetaSchema() { - super._addDefaultMetaSchema(); - if (!this.opts.meta) - return; - this.addMetaSchema(jtd_schema_1.default, META_SCHEMA_ID, false); - } - defaultMeta() { - return (this.opts.defaultMeta = - super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined)); - } - compileSerializer(schema) { - const sch = this._addSchema(schema); - return sch.serialize || this._compileSerializer(sch); - } - compileParser(schema) { - const sch = this._addSchema(schema); - return (sch.parse || this._compileParser(sch)); - } - _compileSerializer(sch) { - serialize_1.default.call(this, sch, sch.schema.definitions || {}); - /* istanbul ignore if */ - if (!sch.serialize) - throw new Error("ajv implementation error"); - return sch.serialize; - } - _compileParser(sch) { - parse_1.default.call(this, sch, sch.schema.definitions || {}); - /* istanbul ignore if */ - if (!sch.parse) - throw new Error("ajv implementation error"); - return sch.parse; - } -} -module.exports = exports = Ajv; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = Ajv; -var validate_1 = require("./compile/validate"); -Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } }); -var codegen_1 = require("./compile/codegen"); -Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } }); -Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } }); -Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } }); -Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } }); -Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } }); -Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } }); -//# sourceMappingURL=jtd.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/jtd.js.map b/node_modules/table/node_modules/ajv/dist/jtd.js.map deleted file mode 100644 index 6f253789f..000000000 --- a/node_modules/table/node_modules/ajv/dist/jtd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jtd.js","sourceRoot":"","sources":["../lib/jtd.ts"],"names":[],"mappings":";;;AAEA,iCAA8C;AAC9C,4CAA8C;AAC9C,kDAA6C;AAC7C,uDAAuD;AACvD,+CAA+C;AAG/C,MAAM,cAAc,GAAG,iBAAiB,CAAA;AA4BxC,MAAM,GAAI,SAAQ,cAAO;IACvB,YAAY,OAAmB,EAAE;QAC/B,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,GAAG,EAAE,IAAI;SACV,CAAC,CAAA;IACJ,CAAC;IAED,gBAAgB;QACd,KAAK,CAAC,gBAAgB,EAAE,CAAA;QACxB,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,CAAA;IACnC,CAAC;IAED,qBAAqB;QACnB,KAAK,CAAC,qBAAqB,EAAE,CAAA;QAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAM;QAC3B,IAAI,CAAC,aAAa,CAAC,oBAAa,EAAE,cAAc,EAAE,KAAK,CAAC,CAAA;IAC1D,CAAC;IAED,WAAW;QACT,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW;YAC3B,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CA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F;AAArF,4FAAA,CAAC,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,oGAAA,SAAS,OAAA;AAAE,8FAAA,GAAG,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAQ,kGAAA,OAAO,OAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/refs/data.json b/node_modules/table/node_modules/ajv/dist/refs/data.json deleted file mode 100644 index 9ffc9f5ce..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/data.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#", - "description": "Meta-schema for $data reference (JSON AnySchema extension proposal)", - "type": "object", - "required": ["$data"], - "properties": { - "$data": { - "type": "string", - "anyOf": [{"format": "relative-json-pointer"}, {"format": "json-pointer"}] - } - }, - "additionalProperties": false -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts deleted file mode 100644 index cf008331f..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type Ajv from "../../core"; -export default function addMetaSchema2019(this: Ajv, $data?: boolean): Ajv; diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js deleted file mode 100644 index e86496282..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const metaSchema = require("./schema.json"); -const applicator = require("./meta/applicator.json"); -const content = require("./meta/content.json"); -const core = require("./meta/core.json"); -const format = require("./meta/format.json"); -const metadata = require("./meta/meta-data.json"); -const validation = require("./meta/validation.json"); -const META_SUPPORT_DATA = ["/properties"]; -function addMetaSchema2019($data) { - ; - [ - metaSchema, - applicator, - content, - core, - with$data(this, format), - metadata, - with$data(this, validation), - ].forEach((sch) => this.addMetaSchema(sch, undefined, false)); - return this; - function with$data(ajv, sch) { - return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; - } -} -exports.default = addMetaSchema2019; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map deleted file mode 100644 index 9b8a36d61..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/refs/json-schema-2019-09/index.ts"],"names":[],"mappings":";;AAEA,4CAA2C;AAC3C,qDAAoD;AACpD,+CAA8C;AAC9C,yCAAwC;AACxC,6CAA4C;AAC5C,kDAAiD;AACjD,qDAAoD;AAEpD,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,SAAwB,iBAAiB,CAAY,KAAe;IAClE,CAAC;IAAA;QACC,UAAU;QACV,UAAU;QACV,OAAO;QACP,IAAI;QACJ,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;QACvB,QAAQ;QACR,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;KAC5B,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;IAC7D,OAAO,IAAI,CAAA;IAEX,SAAS,SAAS,CAAC,GAAQ,EAAE,GAAoB;QAC/C,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IAClE,CAAC;AACH,CAAC;AAfD,oCAeC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json deleted file mode 100644 index c5e91cf2a..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/applicator", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/applicator": true - }, - "$recursiveAnchor": true, - - "title": "Applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "additionalItems": {"$recursiveRef": "#"}, - "unevaluatedItems": {"$recursiveRef": "#"}, - "items": { - "anyOf": [{"$recursiveRef": "#"}, {"$ref": "#/$defs/schemaArray"}] - }, - "contains": {"$recursiveRef": "#"}, - "additionalProperties": {"$recursiveRef": "#"}, - "unevaluatedProperties": {"$recursiveRef": "#"}, - "properties": { - "type": "object", - "additionalProperties": {"$recursiveRef": "#"}, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": {"$recursiveRef": "#"}, - "propertyNames": {"format": "regex"}, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - }, - "propertyNames": {"$recursiveRef": "#"}, - "if": {"$recursiveRef": "#"}, - "then": {"$recursiveRef": "#"}, - "else": {"$recursiveRef": "#"}, - "allOf": {"$ref": "#/$defs/schemaArray"}, - "anyOf": {"$ref": "#/$defs/schemaArray"}, - "oneOf": {"$ref": "#/$defs/schemaArray"}, - "not": {"$recursiveRef": "#"} - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": {"$recursiveRef": "#"} - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json deleted file mode 100644 index b8f637343..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/content", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentMediaType": {"type": "string"}, - "contentEncoding": {"type": "string"}, - "contentSchema": {"$recursiveRef": "#"} - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json deleted file mode 100644 index f71adbff0..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/core", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true - }, - "$recursiveAnchor": true, - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveRef": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveAnchor": { - "type": "boolean", - "default": false - }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": {"$recursiveRef": "#"}, - "default": {} - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json deleted file mode 100644 index 03ccfce26..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/format", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/format": true - }, - "$recursiveAnchor": true, - - "title": "Format vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "format": {"type": "string"} - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json deleted file mode 100644 index 0e194326f..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/meta-data": true - }, - "$recursiveAnchor": true, - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json deleted file mode 100644 index 7027a1279..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/validation", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/validation": true - }, - "$recursiveAnchor": true, - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": {"$ref": "#/$defs/nonNegativeInteger"}, - "minLength": {"$ref": "#/$defs/nonNegativeIntegerDefault0"}, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": {"$ref": "#/$defs/nonNegativeInteger"}, - "minItems": {"$ref": "#/$defs/nonNegativeIntegerDefault0"}, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": {"$ref": "#/$defs/nonNegativeInteger"}, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": {"$ref": "#/$defs/nonNegativeInteger"}, - "minProperties": {"$ref": "#/$defs/nonNegativeIntegerDefault0"}, - "required": {"$ref": "#/$defs/stringArray"}, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - {"$ref": "#/$defs/simpleTypes"}, - { - "type": "array", - "items": {"$ref": "#/$defs/simpleTypes"}, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": {"type": "string"}, - "uniqueItems": true, - "default": [] - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json deleted file mode 100644 index 54eb7157a..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": false, - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - {"$ref": "meta/core"}, - {"$ref": "meta/applicator"}, - {"$ref": "meta/validation"}, - {"$ref": "meta/meta-data"}, - {"$ref": "meta/format"}, - {"$ref": "meta/content"} - ], - "type": ["object", "boolean"], - "properties": { - "definitions": { - "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", - "type": "object", - "additionalProperties": {"$recursiveRef": "#"}, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", - "type": "object", - "additionalProperties": { - "anyOf": [{"$recursiveRef": "#"}, {"$ref": "meta/validation#/$defs/stringArray"}] - } - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts deleted file mode 100644 index c232ab05c..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import type Ajv from "../../core"; -export default function addMetaSchema2020(this: Ajv, $data?: boolean): Ajv; diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js deleted file mode 100644 index d92567564..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const metaSchema = require("./schema.json"); -const applicator = require("./meta/applicator.json"); -const unevaluated = require("./meta/unevaluated.json"); -const content = require("./meta/content.json"); -const core = require("./meta/core.json"); -const format = require("./meta/format-annotation.json"); -const metadata = require("./meta/meta-data.json"); -const validation = require("./meta/validation.json"); -const META_SUPPORT_DATA = ["/properties"]; -function addMetaSchema2020($data) { - ; - [ - metaSchema, - applicator, - unevaluated, - content, - core, - with$data(this, format), - metadata, - with$data(this, validation), - ].forEach((sch) => this.addMetaSchema(sch, undefined, false)); - return this; - function with$data(ajv, sch) { - return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch; - } -} -exports.default = addMetaSchema2020; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map deleted file mode 100644 index eb90027dd..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/refs/json-schema-2020-12/index.ts"],"names":[],"mappings":";;AAEA,4CAA2C;AAC3C,qDAAoD;AACpD,uDAAsD;AACtD,+CAA8C;AAC9C,yCAAwC;AACxC,wDAAuD;AACvD,kDAAiD;AACjD,qDAAoD;AAEpD,MAAM,iBAAiB,GAAG,CAAC,aAAa,CAAC,CAAA;AAEzC,SAAwB,iBAAiB,CAAY,KAAe;IAClE,CAAC;IAAA;QACC,UAAU;QACV,UAAU;QACV,WAAW;QACX,OAAO;QACP,IAAI;QACJ,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC;QACvB,QAAQ;QACR,SAAS,CAAC,IAAI,EAAE,UAAU,CAAC;KAC5B,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC,CAAA;IAC7D,OAAO,IAAI,CAAA;IAEX,SAAS,SAAS,CAAC,GAAQ,EAAE,GAAoB;QAC/C,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;IAClE,CAAC;AACH,CAAC;AAhBD,oCAgBC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json deleted file mode 100644 index 674c913da..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/applicator", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/applicator": true - }, - "$dynamicAnchor": "meta", - - "title": "Applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "prefixItems": {"$ref": "#/$defs/schemaArray"}, - "items": {"$dynamicRef": "#meta"}, - "contains": {"$dynamicRef": "#meta"}, - "additionalProperties": {"$dynamicRef": "#meta"}, - "properties": { - "type": "object", - "additionalProperties": {"$dynamicRef": "#meta"}, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": {"$dynamicRef": "#meta"}, - "propertyNames": {"format": "regex"}, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": {"$dynamicRef": "#meta"}, - "default": {} - }, - "propertyNames": {"$dynamicRef": "#meta"}, - "if": {"$dynamicRef": "#meta"}, - "then": {"$dynamicRef": "#meta"}, - "else": {"$dynamicRef": "#meta"}, - "allOf": {"$ref": "#/$defs/schemaArray"}, - "anyOf": {"$ref": "#/$defs/schemaArray"}, - "oneOf": {"$ref": "#/$defs/schemaArray"}, - "not": {"$dynamicRef": "#meta"} - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": {"$dynamicRef": "#meta"} - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json deleted file mode 100644 index 2ae23ddb5..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/content", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - "$dynamicAnchor": "meta", - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentEncoding": {"type": "string"}, - "contentMediaType": {"type": "string"}, - "contentSchema": {"$dynamicRef": "#meta"} - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json deleted file mode 100644 index 4c8e5cb61..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/core", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - }, - "$dynamicAnchor": "meta", - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "$ref": "#/$defs/uriReferenceString", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": {"$ref": "#/$defs/uriString"}, - "$ref": {"$ref": "#/$defs/uriReferenceString"}, - "$anchor": {"$ref": "#/$defs/anchorString"}, - "$dynamicRef": {"$ref": "#/$defs/uriReferenceString"}, - "$dynamicAnchor": {"$ref": "#/$defs/anchorString"}, - "$vocabulary": { - "type": "object", - "propertyNames": {"$ref": "#/$defs/uriString"}, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": {"$dynamicRef": "#meta"} - } - }, - "$defs": { - "anchorString": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - "uriString": { - "type": "string", - "format": "uri" - }, - "uriReferenceString": { - "type": "string", - "format": "uri-reference" - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json deleted file mode 100644 index 83c26e35f..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true - }, - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for annotation results", - "type": ["object", "boolean"], - "properties": { - "format": {"type": "string"} - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json deleted file mode 100644 index 11946fb50..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/meta-data": true - }, - "$dynamicAnchor": "meta", - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json deleted file mode 100644 index 5e4b203b2..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true - }, - "$dynamicAnchor": "meta", - - "title": "Unevaluated applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "unevaluatedItems": {"$dynamicRef": "#meta"}, - "unevaluatedProperties": {"$dynamicRef": "#meta"} - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json deleted file mode 100644 index e0ae13d9d..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/validation", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/validation": true - }, - "$dynamicAnchor": "meta", - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "type": { - "anyOf": [ - {"$ref": "#/$defs/simpleTypes"}, - { - "type": "array", - "items": {"$ref": "#/$defs/simpleTypes"}, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": {"$ref": "#/$defs/nonNegativeInteger"}, - "minLength": {"$ref": "#/$defs/nonNegativeIntegerDefault0"}, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": {"$ref": "#/$defs/nonNegativeInteger"}, - "minItems": {"$ref": "#/$defs/nonNegativeIntegerDefault0"}, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": {"$ref": "#/$defs/nonNegativeInteger"}, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": {"$ref": "#/$defs/nonNegativeInteger"}, - "minProperties": {"$ref": "#/$defs/nonNegativeIntegerDefault0"}, - "required": {"$ref": "#/$defs/stringArray"}, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": {"type": "string"}, - "uniqueItems": true, - "default": [] - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json deleted file mode 100644 index 1c68270fd..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - "$dynamicAnchor": "meta", - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - {"$ref": "meta/core"}, - {"$ref": "meta/applicator"}, - {"$ref": "meta/unevaluated"}, - {"$ref": "meta/validation"}, - {"$ref": "meta/meta-data"}, - {"$ref": "meta/format-annotation"}, - {"$ref": "meta/content"} - ], - "type": ["object", "boolean"], - "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", - "properties": { - "definitions": { - "$comment": "\"definitions\" has been replaced by \"$defs\".", - "type": "object", - "additionalProperties": {"$dynamicRef": "#meta"}, - "deprecated": true, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.", - "type": "object", - "additionalProperties": { - "anyOf": [{"$dynamicRef": "#meta"}, {"$ref": "meta/validation#/$defs/stringArray"}] - }, - "deprecated": true, - "default": {} - }, - "$recursiveAnchor": { - "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".", - "$ref": "meta/core#/$defs/anchorString", - "deprecated": true - }, - "$recursiveRef": { - "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", - "$ref": "meta/core#/$defs/uriReferenceString", - "deprecated": true - } - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-06.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-06.json deleted file mode 100644 index 5410064ba..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-06.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "http://json-schema.org/draft-06/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": {"$ref": "#"} - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}] - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": {"type": "string"}, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "examples": { - "type": "array", - "items": {} - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": {"$ref": "#/definitions/nonNegativeInteger"}, - "minLength": {"$ref": "#/definitions/nonNegativeIntegerDefault0"}, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": {"$ref": "#"}, - "items": { - "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}], - "default": {} - }, - "maxItems": {"$ref": "#/definitions/nonNegativeInteger"}, - "minItems": {"$ref": "#/definitions/nonNegativeIntegerDefault0"}, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": {"$ref": "#"}, - "maxProperties": {"$ref": "#/definitions/nonNegativeInteger"}, - "minProperties": {"$ref": "#/definitions/nonNegativeIntegerDefault0"}, - "required": {"$ref": "#/definitions/stringArray"}, - "additionalProperties": {"$ref": "#"}, - "definitions": { - "type": "object", - "additionalProperties": {"$ref": "#"}, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": {"$ref": "#"}, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": {"$ref": "#"}, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}] - } - }, - "propertyNames": {"$ref": "#"}, - "const": {}, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - {"$ref": "#/definitions/simpleTypes"}, - { - "type": "array", - "items": {"$ref": "#/definitions/simpleTypes"}, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": {"type": "string"}, - "allOf": {"$ref": "#/definitions/schemaArray"}, - "anyOf": {"$ref": "#/definitions/schemaArray"}, - "oneOf": {"$ref": "#/definitions/schemaArray"}, - "not": {"$ref": "#"} - }, - "default": {} -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-07.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-07.json deleted file mode 100644 index 6a7485104..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-draft-07.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": {"$ref": "#"} - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}] - }, - "simpleTypes": { - "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] - }, - "stringArray": { - "type": "array", - "items": {"type": "string"}, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": {"$ref": "#/definitions/nonNegativeInteger"}, - "minLength": {"$ref": "#/definitions/nonNegativeIntegerDefault0"}, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": {"$ref": "#"}, - "items": { - "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}], - "default": true - }, - "maxItems": {"$ref": "#/definitions/nonNegativeInteger"}, - "minItems": {"$ref": "#/definitions/nonNegativeIntegerDefault0"}, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": {"$ref": "#"}, - "maxProperties": {"$ref": "#/definitions/nonNegativeInteger"}, - "minProperties": {"$ref": "#/definitions/nonNegativeIntegerDefault0"}, - "required": {"$ref": "#/definitions/stringArray"}, - "additionalProperties": {"$ref": "#"}, - "definitions": { - "type": "object", - "additionalProperties": {"$ref": "#"}, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": {"$ref": "#"}, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": {"$ref": "#"}, - "propertyNames": {"format": "regex"}, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}] - } - }, - "propertyNames": {"$ref": "#"}, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - {"$ref": "#/definitions/simpleTypes"}, - { - "type": "array", - "items": {"$ref": "#/definitions/simpleTypes"}, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": {"type": "string"}, - "contentMediaType": {"type": "string"}, - "contentEncoding": {"type": "string"}, - "if": {"$ref": "#"}, - "then": {"$ref": "#"}, - "else": {"$ref": "#"}, - "allOf": {"$ref": "#/definitions/schemaArray"}, - "anyOf": {"$ref": "#/definitions/schemaArray"}, - "oneOf": {"$ref": "#/definitions/schemaArray"}, - "not": {"$ref": "#"} - }, - "default": true -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/json-schema-secure.json b/node_modules/table/node_modules/ajv/dist/refs/json-schema-secure.json deleted file mode 100644 index 3968abd5d..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/json-schema-secure.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/json-schema-secure.json#", - "title": "Meta-schema for the security assessment of JSON Schemas", - "description": "If a JSON AnySchema fails validation against this meta-schema, it may be unsafe to validate untrusted data", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": {"$ref": "#"} - } - }, - "dependencies": { - "patternProperties": { - "description": "prevent slow validation of large property names", - "required": ["propertyNames"], - "properties": { - "propertyNames": { - "required": ["maxLength"] - } - } - }, - "uniqueItems": { - "description": "prevent slow validation of large non-scalar arrays", - "if": { - "properties": { - "uniqueItems": {"const": true}, - "items": { - "properties": { - "type": { - "anyOf": [ - { - "enum": ["object", "array"] - }, - { - "type": "array", - "contains": {"enum": ["object", "array"]} - } - ] - } - } - } - } - }, - "then": { - "required": ["maxItems"] - } - }, - "pattern": { - "description": "prevent slow pattern matching of large strings", - "required": ["maxLength"] - }, - "format": { - "description": "prevent slow format validation of large strings", - "required": ["maxLength"] - } - }, - "properties": { - "additionalItems": {"$ref": "#"}, - "additionalProperties": {"$ref": "#"}, - "dependencies": { - "additionalProperties": { - "anyOf": [{"type": "array"}, {"$ref": "#"}] - } - }, - "items": { - "anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}] - }, - "definitions": { - "additionalProperties": {"$ref": "#"} - }, - "patternProperties": { - "additionalProperties": {"$ref": "#"} - }, - "properties": { - "additionalProperties": {"$ref": "#"} - }, - "if": {"$ref": "#"}, - "then": {"$ref": "#"}, - "else": {"$ref": "#"}, - "allOf": {"$ref": "#/definitions/schemaArray"}, - "anyOf": {"$ref": "#/definitions/schemaArray"}, - "oneOf": {"$ref": "#/definitions/schemaArray"}, - "not": {"$ref": "#"}, - "contains": {"$ref": "#"}, - "propertyNames": {"$ref": "#"} - } -} diff --git a/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.d.ts b/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.d.ts deleted file mode 100644 index 932797a38..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { SchemaObject } from "../types"; -declare const jtdMetaSchema: SchemaObject; -export default jtdMetaSchema; diff --git a/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js b/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js deleted file mode 100644 index 1ee940afb..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const shared = (root) => { - const sch = { - nullable: { type: "boolean" }, - metadata: { - optionalProperties: { - union: { elements: { ref: "schema" } }, - }, - additionalProperties: true, - }, - }; - if (root) - sch.definitions = { values: { ref: "schema" } }; - return sch; -}; -const emptyForm = (root) => ({ - optionalProperties: shared(root), -}); -const refForm = (root) => ({ - properties: { - ref: { type: "string" }, - }, - optionalProperties: shared(root), -}); -const typeForm = (root) => ({ - properties: { - type: { - enum: [ - "boolean", - "timestamp", - "string", - "float32", - "float64", - "int8", - "uint8", - "int16", - "uint16", - "int32", - "uint32", - ], - }, - }, - optionalProperties: shared(root), -}); -const enumForm = (root) => ({ - properties: { - enum: { elements: { type: "string" } }, - }, - optionalProperties: shared(root), -}); -const elementsForm = (root) => ({ - properties: { - elements: { ref: "schema" }, - }, - optionalProperties: shared(root), -}); -const propertiesForm = (root) => ({ - properties: { - properties: { values: { ref: "schema" } }, - }, - optionalProperties: { - optionalProperties: { values: { ref: "schema" } }, - additionalProperties: { type: "boolean" }, - ...shared(root), - }, -}); -const optionalPropertiesForm = (root) => ({ - properties: { - optionalProperties: { values: { ref: "schema" } }, - }, - optionalProperties: { - additionalProperties: { type: "boolean" }, - ...shared(root), - }, -}); -const discriminatorForm = (root) => ({ - properties: { - discriminator: { type: "string" }, - mapping: { - values: { - metadata: { - union: [propertiesForm(false), optionalPropertiesForm(false)], - }, - }, - }, - }, - optionalProperties: shared(root), -}); -const valuesForm = (root) => ({ - properties: { - values: { ref: "schema" }, - }, - optionalProperties: shared(root), -}); -const schema = (root) => ({ - metadata: { - union: [ - emptyForm, - refForm, - typeForm, - enumForm, - elementsForm, - propertiesForm, - optionalPropertiesForm, - discriminatorForm, - valuesForm, - ].map((s) => s(root)), - }, -}); -const jtdMetaSchema = { - definitions: { - schema: schema(false), - }, - ...schema(true), -}; -exports.default = jtdMetaSchema; -//# sourceMappingURL=jtd-schema.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js.map b/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js.map deleted file mode 100644 index d46755b21..000000000 --- a/node_modules/table/node_modules/ajv/dist/refs/jtd-schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jtd-schema.js","sourceRoot":"","sources":["../../lib/refs/jtd-schema.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAe,CAAC,IAAI,EAAE,EAAE;IAClC,MAAM,GAAG,GAAiB;QACxB,QAAQ,EAAE,EAAC,IAAI,EAAE,SAAS,EAAC;QAC3B,QAAQ,EAAE;YACR,kBAAkB,EAAE;gBAClB,KAAK,EAAE,EAAC,QAAQ,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,EAAC;aACnC;YACD,oBAAoB,EAAE,IAAI;SAC3B;KACF,CAAA;IACD,IAAI,IAAI;QAAE,GAAG,CAAC,WAAW,GAAG,EAAC,MAAM,EAAE,EAAC,GAAG,EAAE,QAAQ,EAAC,EAAC,CAAA;IACrD,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,SAAS,GAAe,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvC,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAAC;CACjC,CAAC,CAAA;AAEF,MAAM,OAAO,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C,WAAW,EAAE;QACX,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC;KACtB;IACD,GAAG,MAAM,CAAC,IAAI,CAAC;CAChB,CAAA;AAED,kBAAe,aAAa,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/equal.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/equal.d.ts deleted file mode 100644 index 56149ea2e..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/equal.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import * as equal from "fast-deep-equal"; -declare type Equal = typeof equal & { - code: string; -}; -declare const _default: Equal; -export default _default; diff --git a/node_modules/table/node_modules/ajv/dist/runtime/equal.js b/node_modules/table/node_modules/ajv/dist/runtime/equal.js deleted file mode 100644 index 774bba05a..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/equal.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// https://github.com/ajv-validator/ajv/issues/889 -const equal = require("fast-deep-equal"); -equal.code = 'require("ajv/dist/runtime/equal").default'; -exports.default = equal; -//# sourceMappingURL=equal.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/equal.js.map b/node_modules/table/node_modules/ajv/dist/runtime/equal.js.map deleted file mode 100644 index 0e17901c3..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/equal.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"equal.js","sourceRoot":"","sources":["../../lib/runtime/equal.ts"],"names":[],"mappings":";;AAAA,kDAAkD;AAClD,yCAAwC;AAGtC,KAAe,CAAC,IAAI,GAAG,2CAA2C,CAAA;AAEpE,kBAAe,KAAc,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/parseJson.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/parseJson.d.ts deleted file mode 100644 index 85f1d5670..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/parseJson.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export declare function parseJson(s: string, pos: number): unknown; -export declare namespace parseJson { - var message: string | undefined; - var position: number; - var code: string; -} -export declare function parseJsonNumber(s: string, pos: number, maxDigits?: number): number | undefined; -export declare namespace parseJsonNumber { - var message: string | undefined; - var position: number; - var code: string; -} -export declare function parseJsonString(s: string, pos: number): string | undefined; -export declare namespace parseJsonString { - var message: string | undefined; - var position: number; - var code: string; -} diff --git a/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js b/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js deleted file mode 100644 index 2576a6e17..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js +++ /dev/null @@ -1,182 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseJsonString = exports.parseJsonNumber = exports.parseJson = void 0; -const rxParseJson = /position\s(\d+)$/; -function parseJson(s, pos) { - let endPos; - parseJson.message = undefined; - let matches; - if (pos) - s = s.slice(pos); - try { - parseJson.position = pos + s.length; - return JSON.parse(s); - } - catch (e) { - matches = rxParseJson.exec(e.message); - if (!matches) { - parseJson.message = "unexpected end"; - return undefined; - } - endPos = +matches[1]; - const c = s[endPos]; - s = s.slice(0, endPos); - parseJson.position = pos + endPos; - try { - return JSON.parse(s); - } - catch (e1) { - parseJson.message = `unexpected token ${c}`; - return undefined; - } - } -} -exports.parseJson = parseJson; -parseJson.message = undefined; -parseJson.position = 0; -parseJson.code = 'require("ajv/dist/runtime/parseJson").parseJson'; -function parseJsonNumber(s, pos, maxDigits) { - let numStr = ""; - let c; - parseJsonNumber.message = undefined; - if (s[pos] === "-") { - numStr += "-"; - pos++; - } - if (s[pos] === "0") { - numStr += "0"; - pos++; - } - else { - if (!parseDigits(maxDigits)) { - errorMessage(); - return undefined; - } - } - if (maxDigits) { - parseJsonNumber.position = pos; - return +numStr; - } - if (s[pos] === ".") { - numStr += "."; - pos++; - if (!parseDigits()) { - errorMessage(); - return undefined; - } - } - if (((c = s[pos]), c === "e" || c === "E")) { - numStr += "e"; - pos++; - if (((c = s[pos]), c === "+" || c === "-")) { - numStr += c; - pos++; - } - if (!parseDigits()) { - errorMessage(); - return undefined; - } - } - parseJsonNumber.position = pos; - return +numStr; - function parseDigits(maxLen) { - let digit = false; - while (((c = s[pos]), c >= "0" && c <= "9" && (maxLen === undefined || maxLen-- > 0))) { - digit = true; - numStr += c; - pos++; - } - return digit; - } - function errorMessage() { - parseJsonNumber.position = pos; - parseJsonNumber.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end"; - } -} -exports.parseJsonNumber = parseJsonNumber; -parseJsonNumber.message = undefined; -parseJsonNumber.position = 0; -parseJsonNumber.code = 'require("ajv/dist/runtime/parseJson").parseJsonNumber'; -const escapedChars = { - b: "\b", - f: "\f", - n: "\n", - r: "\r", - t: "\t", - '"': '"', - "/": "/", - "\\": "\\", -}; -const CODE_A = "a".charCodeAt(0); -const CODE_0 = "0".charCodeAt(0); -function parseJsonString(s, pos) { - let str = ""; - let c; - parseJsonString.message = undefined; - // eslint-disable-next-line no-constant-condition, @typescript-eslint/no-unnecessary-condition - while (true) { - c = s[pos++]; - if (c === '"') - break; - if (c === "\\") { - c = s[pos]; - if (c in escapedChars) { - str += escapedChars[c]; - pos++; - } - else if (c === "u") { - pos++; - let count = 4; - let code = 0; - while (count--) { - code <<= 4; - c = s[pos].toLowerCase(); - if (c >= "a" && c <= "f") { - code += c.charCodeAt(0) - CODE_A + 10; - } - else if (c >= "0" && c <= "9") { - code += c.charCodeAt(0) - CODE_0; - } - else if (c === undefined) { - errorMessage("unexpected end"); - return undefined; - } - else { - errorMessage(`unexpected token ${c}`); - return undefined; - } - pos++; - } - str += String.fromCharCode(code); - } - else { - errorMessage(`unexpected token ${c}`); - return undefined; - } - } - else if (c === undefined) { - errorMessage("unexpected end"); - return undefined; - } - else { - if (c.charCodeAt(0) >= 0x20) { - str += c; - } - else { - errorMessage(`unexpected token ${c}`); - return undefined; - } - } - } - parseJsonString.position = pos; - return str; - function errorMessage(msg) { - parseJsonString.position = pos; - parseJsonString.message = msg; - } -} -exports.parseJsonString = parseJsonString; -parseJsonString.message = undefined; -parseJsonString.position = 0; -parseJsonString.code = 'require("ajv/dist/runtime/parseJson").parseJsonString'; -//# sourceMappingURL=parseJson.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js.map b/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js.map deleted file mode 100644 index a13a1f04f..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/parseJson.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"parseJson.js","sourceRoot":"","sources":["../../lib/runtime/parseJson.ts"],"names":[],"mappings":";;;AAAA,MAAM,WAAW,GAAG,kBAAkB,CAAA;AAEtC,SAAgB,SAAS,CAAC,CAAS,EAAE,GAAW;IAC9C,IAAI,MAA0B,CAAA;IAC9B,SAAS,CAAC,OAAO,GAAG,SAAS,CAAA;IAC7B,IAAI,OAA+B,CAAA;IACnC,IAAI,GAAG;QAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACzB,IAAI;QACF,SAAS,CAAC,QAAQ,GAAG,GAAG,GAAG,CAAC,CAAC,MAAM,CAAA;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;KACrB;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,EAAE;YACZ,SAAS,CAAC,OAAO,GAAG,gBAAgB,CAAA;YACpC,OAAO,SAAS,CAAA;SACjB;QACD,MAAM,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;QACpB,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;QACnB,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAA;Q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A"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/quote.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/quote.d.ts deleted file mode 100644 index 0579dd3c6..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/quote.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function quote(s: string): string; -declare namespace quote { - var code: string; -} -export default quote; diff --git a/node_modules/table/node_modules/ajv/dist/runtime/quote.js b/node_modules/table/node_modules/ajv/dist/runtime/quote.js deleted file mode 100644 index 9e81ca25d..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/quote.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// eslint-disable-next-line no-control-regex, no-misleading-character-class -const rxEscapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g; -const escaped = { - "\b": "\\b", - "\t": "\\t", - "\n": "\\n", - "\f": "\\f", - "\r": "\\r", - '"': '\\"', - "\\": "\\\\", -}; -function quote(s) { - rxEscapable.lastIndex = 0; - return ('"' + - (rxEscapable.test(s) - ? s.replace(rxEscapable, (a) => { - const c = escaped[a]; - return typeof c === "string" - ? c - : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4); - }) - : s) + - '"'); -} -exports.default = quote; -quote.code = 'require("ajv/dist/runtime/quote").default'; -//# sourceMappingURL=quote.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/quote.js.map b/node_modules/table/node_modules/ajv/dist/runtime/quote.js.map deleted file mode 100644 index 49e32d007..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/quote.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"quote.js","sourceRoot":"","sources":["../../lib/runtime/quote.ts"],"names":[],"mappings":";;AAAA,2EAA2E;AAC3E,MAAM,WAAW,GAAG,iIAAiI,CAAA;AAErJ,MAAM,OAAO,GAA6B;IACxC,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACb,CAAA;AAED,SAAwB,KAAK,CAAC,CAAS;IACrC,WAAW,CAAC,SAAS,GAAG,CAAC,CAAA;IACzB,OAAO,CACL,GAAG;QACH,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;gBAC3B,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;gBACpB,OAAO,OAAO,CAAC,KAAK,QAAQ;oBAC1B,CAAC,CAAC,CAAC;oBACH,CAAC,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;YAC/D,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC,CAAC;QACN,GAAG,CACJ,CAAA;AACH,CAAC;AAdD,wBAcC;AAED,KAAK,CAAC,IAAI,GAAG,2CAA2C,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/timestamp.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/timestamp.d.ts deleted file mode 100644 index 11512b653..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/timestamp.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function validTimestamp(str: string): boolean; -declare namespace validTimestamp { - var code: string; -} -export default validTimestamp; diff --git a/node_modules/table/node_modules/ajv/dist/runtime/timestamp.js b/node_modules/table/node_modules/ajv/dist/runtime/timestamp.js deleted file mode 100644 index 470abf6bc..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/timestamp.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const DATE_TIME = /^(\d\d\d\d)-(\d\d)-(\d\d)(?:t|\s)(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i; -const DAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -function validTimestamp(str) { - // http://tools.ietf.org/html/rfc3339#section-5.6 - const matches = DATE_TIME.exec(str); - if (!matches) - return false; - const y = +matches[1]; - const m = +matches[2]; - const d = +matches[3]; - const hr = +matches[4]; - const min = +matches[5]; - const sec = +matches[6]; - const tzH = +(matches[7] || 0); - const tzM = +(matches[8] || 0); - return (m >= 1 && - m <= 12 && - d >= 1 && - (d <= DAYS[m] || - // leap year: https://tools.ietf.org/html/rfc3339#appendix-C - (m === 2 && d === 29 && (y % 100 === 0 ? y % 400 === 0 : y % 4 === 0))) && - ((hr <= 23 && min <= 59 && sec <= 59) || - // leap second - (hr - tzH === 23 && min - tzM === 59 && sec === 60))); -} -exports.default = validTimestamp; -validTimestamp.code = 'require("ajv/dist/runtime/timestamp").default'; -//# sourceMappingURL=timestamp.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/timestamp.js.map b/node_modules/table/node_modules/ajv/dist/runtime/timestamp.js.map deleted file mode 100644 index b6f4dd146..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/timestamp.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../lib/runtime/timestamp.ts"],"names":[],"mappings":";;AAAA,MAAM,SAAS,GAAG,gGAAgG,CAAA;AAClH,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE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,IAAI,GAAG,GAAG,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CACvD,CAAA;AACH,CAAC;AAvBD,iCAuBC;AAED,cAAc,CAAC,IAAI,GAAG,+CAA+C,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.d.ts deleted file mode 100644 index ecbee69c5..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare function ucs2length(str: string): number; -declare namespace ucs2length { - var code: string; -} -export default ucs2length; diff --git a/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js b/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js deleted file mode 100644 index 92ea0c08a..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -// https://mathiasbynens.be/notes/javascript-encoding -// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode -function ucs2length(str) { - const len = str.length; - let length = 0; - let pos = 0; - let value; - while (pos < len) { - length++; - value = str.charCodeAt(pos++); - if (value >= 0xd800 && value <= 0xdbff && pos < len) { - // high surrogate, and there is a next character - value = str.charCodeAt(pos); - if ((value & 0xfc00) === 0xdc00) - pos++; // low surrogate - } - } - return length; -} -exports.default = ucs2length; -ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default'; -//# sourceMappingURL=ucs2length.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js.map b/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js.map deleted file mode 100644 index 7c7f78865..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/ucs2length.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ucs2length.js","sourceRoot":"","sources":["../../lib/runtime/ucs2length.ts"],"names":[],"mappings":";;AAAA,qDAAqD;AACrD,iEAAiE;AACjE,SAAwB,UAAU,CAAC,GAAW;IAC5C,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAA;IACtB,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,IAAI,GAAG,GAAG,CAAC,CAAA;IACX,IAAI,KAAa,CAAA;IACjB,OAAO,GAAG,GAAG,GAAG,EAAE;QAChB,MAAM,EAAE,CAAA;QACR,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAA;QAC7B,IAAI,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,MAAM,IAAI,GAAG,GAAG,GAAG,EAAE;YACnD,gDAAgD;YAChD,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;YAC3B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,MAAM;gBAAE,GAAG,EAAE,CAAA,CAAC,gBAAgB;SACxD;KACF;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAfD,6BAeC;AAED,UAAU,CAAC,IAAI,GAAG,gDAAgD,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/validation_error.d.ts b/node_modules/table/node_modules/ajv/dist/runtime/validation_error.d.ts deleted file mode 100644 index b0ee9698f..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/validation_error.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ErrorObject } from "../types"; -export default class ValidationError extends Error { - readonly errors: Partial[]; - readonly ajv: true; - readonly validation: true; - constructor(errors: Partial[]); -} diff --git a/node_modules/table/node_modules/ajv/dist/runtime/validation_error.js b/node_modules/table/node_modules/ajv/dist/runtime/validation_error.js deleted file mode 100644 index 353502c08..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/validation_error.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -class ValidationError extends Error { - constructor(errors) { - super("validation failed"); - this.errors = errors; - this.ajv = this.validation = true; - } -} -exports.default = ValidationError; -//# sourceMappingURL=validation_error.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/runtime/validation_error.js.map b/node_modules/table/node_modules/ajv/dist/runtime/validation_error.js.map deleted file mode 100644 index 70206fbc1..000000000 --- a/node_modules/table/node_modules/ajv/dist/runtime/validation_error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"validation_error.js","sourceRoot":"","sources":["../../lib/runtime/validation_error.ts"],"names":[],"mappings":";;AAEA,MAAqB,eAAgB,SAAQ,KAAK;IAKhD,YAAY,MAA8B;QACxC,KAAK,CAAC,mBAAmB,CAAC,CAAA;QAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAA;IACnC,CAAC;CACF;AAVD,kCAUC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/standalone/index.d.ts b/node_modules/table/node_modules/ajv/dist/standalone/index.d.ts deleted file mode 100644 index e9976d1d8..000000000 --- a/node_modules/table/node_modules/ajv/dist/standalone/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type AjvCore from "../core"; -import type { AnyValidateFunction } from "../types"; -export default function standaloneCode(ajv: AjvCore, refsOrFunc?: { - [K in string]?: string; -} | AnyValidateFunction): string; diff --git a/node_modules/table/node_modules/ajv/dist/standalone/index.js b/node_modules/table/node_modules/ajv/dist/standalone/index.js deleted file mode 100644 index f58ebb697..000000000 --- a/node_modules/table/node_modules/ajv/dist/standalone/index.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const scope_1 = require("../compile/codegen/scope"); -const code_1 = require("../compile/codegen/code"); -function standaloneCode(ajv, refsOrFunc) { - if (!ajv.opts.code.source) { - throw new Error("moduleCode: ajv instance must have code.source option"); - } - const { _n } = ajv.scope.opts; - return typeof refsOrFunc == "function" - ? funcExportCode(refsOrFunc.source) - : refsOrFunc !== undefined - ? multiExportsCode(refsOrFunc, getValidate) - : multiExportsCode(ajv.schemas, (sch) => sch.meta ? undefined : ajv.compile(sch.schema)); - function getValidate(id) { - const v = ajv.getSchema(id); - if (!v) - throw new Error(`moduleCode: no schema with id ${id}`); - return v; - } - function funcExportCode(source) { - const usedValues = {}; - const n = source === null || source === void 0 ? void 0 : source.validateName; - const vCode = validateCode(usedValues, source); - return `"use strict";${_n}module.exports = ${n};${_n}module.exports.default = ${n};${_n}${vCode}`; - } - function multiExportsCode(schemas, getValidateFunc) { - var _a; - const usedValues = {}; - let code = code_1._ `"use strict";`; - for (const name in schemas) { - const v = getValidateFunc(schemas[name]); - if (v) { - const vCode = validateCode(usedValues, v.source); - code = code_1._ `${code}${_n}exports${code_1.getProperty(name)} = ${(_a = v.source) === null || _a === void 0 ? void 0 : _a.validateName};${_n}${vCode}`; - } - } - return `${code}`; - } - function validateCode(usedValues, s) { - if (!s) - throw new Error('moduleCode: function does not have "source" property'); - if (usedState(s.validateName) === scope_1.UsedValueState.Completed) - return code_1.nil; - setUsedState(s.validateName, scope_1.UsedValueState.Started); - const scopeCode = ajv.scope.scopeCode(s.scopeValues, usedValues, refValidateCode); - const code = new code_1._Code(`${scopeCode}${_n}${s.validateCode}`); - return s.evaluated ? code_1._ `${code}${s.validateName}.evaluated = ${s.evaluated};${_n}` : code; - function refValidateCode(n) { - var _a; - const vRef = (_a = n.value) === null || _a === void 0 ? void 0 : _a.ref; - if (n.prefix === "validate" && typeof vRef == "function") { - const v = vRef; - return validateCode(usedValues, v.source); - } - else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") { - const { validate, validateName } = vRef; - if (!validateName) - throw new Error("ajv internal error"); - const def = ajv.opts.code.es5 ? scope_1.varKinds.var : scope_1.varKinds.const; - const wrapper = code_1._ `${def} ${n} = {validate: ${validateName}};`; - if (usedState(validateName) === scope_1.UsedValueState.Started) - return wrapper; - const vCode = validateCode(usedValues, validate === null || validate === void 0 ? void 0 : validate.source); - return code_1._ `${wrapper}${_n}${vCode}`; - } - return undefined; - } - function usedState(name) { - var _a; - return (_a = usedValues[name.prefix]) === null || _a === void 0 ? void 0 : _a.get(name); - } - function setUsedState(name, state) { - const { prefix } = name; - const names = (usedValues[prefix] = usedValues[prefix] || new Map()); - names.set(name, state); - } - } -} -exports.default = standaloneCode; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/standalone/index.js.map b/node_modules/table/node_modules/ajv/dist/standalone/index.js.map deleted file mode 100644 index 00ed6d0d2..000000000 --- a/node_modules/table/node_modules/ajv/dist/standalone/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/standalone/index.ts"],"names":[],"mappings":";;AAGA,oDAAkG;AAClG,kDAAwE;AAExE,SAAwB,cAAc,CACpC,GAAY,EACZ,UAA2D;IAE3D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;KACzE;IACD,MAAM,EAAC,EAAE,EAAC,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAA;IAC3B,OAAO,OAAO,UAAU,IAAI,UAAU;QACpC,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC;QACnC,CAAC,CAAC,UAAU,KAAK,SAAS;YAC1B,CAAC,CAAC,gBAAgB,CAAS,UAAU,EAAE,WAAW,CAAC;YACnD,CAAC,CAAC,gBAAgB,CAAY,GAAG,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAC/C,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAC/C,CAAA;IAEL,SAAS,WAAW,CAAC,EAAU;QAC7B,MAAM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AAC,KAAK,CAAA;gBAC7D,MAAM,OAAO,GAAG,QAAC,CAAA,GAAG,GAAG,IAAI,CAAC,iBAAiB,YAAY,IAAI,CAAA;gBAC7D,IAAI,SAAS,CAAC,YAAY,CAAC,KAAK,sBAAc,CAAC,OAAO;oBAAE,OAAO,OAAO,CAAA;gBACtE,MAAM,KAAK,GAAG,YAAY,CAAC,UAAU,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM,CAAC,CAAA;gBACxD,OAAO,QAAC,CAAA,GAAG,OAAO,GAAG,EAAE,GAAG,KAAK,EAAE,CAAA;aAClC;YACD,OAAO,SAAS,CAAA;QAClB,CAAC;QAED,SAAS,SAAS,CAAC,IAAoB;;YACrC,OAAO,MAAA,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,0CAAE,GAAG,CAAC,IAAI,CAAC,CAAA;QAC3C,CAAC;QAED,SAAS,YAAY,CAAC,IAAoB,EAAE,KAAqB;YAC/D,MAAM,EAAC,MAAM,EAAC,GAAG,IAAI,CAAA;YACrB,MAAM,KAAK,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC,CAAA;YACpE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;AACH,CAAC;AAjFD,iCAiFC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/standalone/instance.d.ts b/node_modules/table/node_modules/ajv/dist/standalone/instance.d.ts deleted file mode 100644 index 156ac3226..000000000 --- a/node_modules/table/node_modules/ajv/dist/standalone/instance.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import Ajv, { AnySchema, AnyValidateFunction, ErrorObject } from "../core"; -export default class AjvPack { - readonly ajv: Ajv; - errors?: ErrorObject[] | null; - constructor(ajv: Ajv); - validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise; - compile(schema: AnySchema, meta?: boolean): AnyValidateFunction; - getSchema(keyRef: string): AnyValidateFunction | undefined; - private getStandalone; - addSchema(...args: Parameters): AjvPack; - addKeyword(...args: Parameters): AjvPack; -} diff --git a/node_modules/table/node_modules/ajv/dist/standalone/instance.js b/node_modules/table/node_modules/ajv/dist/standalone/instance.js deleted file mode 100644 index aa43ac561..000000000 --- a/node_modules/table/node_modules/ajv/dist/standalone/instance.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const core_1 = require("../core"); -const _1 = require("."); -const requireFromString = require("require-from-string"); -class AjvPack { - constructor(ajv) { - this.ajv = ajv; - } - validate(schemaKeyRef, data) { - return core_1.default.prototype.validate.call(this, schemaKeyRef, data); - } - compile(schema, meta) { - return this.getStandalone(this.ajv.compile(schema, meta)); - } - getSchema(keyRef) { - const v = this.ajv.getSchema(keyRef); - if (!v) - return undefined; - return this.getStandalone(v); - } - getStandalone(v) { - return requireFromString(_1.default(this.ajv, v)); - } - addSchema(...args) { - this.ajv.addSchema.call(this.ajv, ...args); - return this; - } - addKeyword(...args) { - this.ajv.addKeyword.call(this.ajv, ...args); - return this; - } -} -exports.default = AjvPack; -//# sourceMappingURL=instance.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/standalone/instance.js.map b/node_modules/table/node_modules/ajv/dist/standalone/instance.js.map deleted file mode 100644 index 2b5852c4c..000000000 --- a/node_modules/table/node_modules/ajv/dist/standalone/instance.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"instance.js","sourceRoot":"","sources":["../../lib/standalone/instance.ts"],"names":[],"mappings":";;AAAA,kCAAwE;AACxE,wBAA8B;AAC9B,yDAAwD;AAExD,MAAqB,OAAO;IAE1B,YAAqB,GAAQ;QAAR,QAAG,GAAH,GAAG,CAAK;IAAG,CAAC;IAEjC,QAAQ,CAAC,YAAgC,EAAE,IAAa;QACtD,OAAO,cAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,CAAA;IAC9D,CAAC;IAED,OAAO,CAAc,MAAiB,EAAE,IAAc;QACpD,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAI,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;IAC9D,CAAC;IAED,SAAS,CAAc,MAAc;QACnC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAI,MAAM,CAAC,CAAA;QACvC,IAAI,CAAC,CAAC;YAAE,OAAO,SAAS,CAAA;QACxB,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAA;IAC9B,CAAC;IAEO,aAAa,CAAc,CAAyB;QAC1D,OAAO,iBAAiB,CAAC,UAAc,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAA2B,CAAA;IACjF,CAAC;IAED,SAAS,CAAC,GAAG,IAAgD;QAC3D,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,UAAU,CAAC,GAAG,IAAiD;QAC7D,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA/BD,0BA+BC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/types/index.d.ts b/node_modules/table/node_modules/ajv/dist/types/index.d.ts deleted file mode 100644 index 6581cef36..000000000 --- a/node_modules/table/node_modules/ajv/dist/types/index.d.ts +++ /dev/null @@ -1,168 +0,0 @@ -import type { CodeGen, Code, Name, ScopeValueSets, ValueScopeName } from "../compile/codegen"; -import type { SchemaEnv, SchemaCxt, SchemaObjCxt } from "../compile"; -import type { JSONType } from "../compile/rules"; -import type { KeywordCxt } from "../compile/validate"; -import type Ajv from "../core"; -interface _SchemaObject { - $id?: string; - $schema?: string; - [x: string]: any; -} -export interface SchemaObject extends _SchemaObject { - $id?: string; - $schema?: string; - $async?: false; - [x: string]: any; -} -export interface AsyncSchema extends _SchemaObject { - $async: true; -} -export declare type AnySchemaObject = SchemaObject | AsyncSchema; -export declare type Schema = SchemaObject | boolean; -export declare type AnySchema = Schema | AsyncSchema; -export declare type SchemaMap = { - [Key in string]?: AnySchema; -}; -export interface SourceCode { - validateName: ValueScopeName; - validateCode: string; - scopeValues: ScopeValueSets; - evaluated?: Code; -} -export interface DataValidationCxt { - instancePath: string; - parentData: { - [K in T]: any; - }; - parentDataProperty: T; - rootData: Record | any[]; - dynamicAnchors: { - [Ref in string]?: ValidateFunction; - }; -} -export interface ValidateFunction { - (this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T; - errors?: null | ErrorObject[]; - evaluated?: Evaluated; - schema: AnySchema; - schemaEnv: SchemaEnv; - source?: SourceCode; -} -export interface JTDParser { - (json: string): T | undefined; - message?: string; - position?: number; -} -export declare type EvaluatedProperties = { - [K in string]?: true; -} | true; -export declare type EvaluatedItems = number | true; -export interface Evaluated { - props?: EvaluatedProperties; - items?: EvaluatedItems; - dynamicProps: boolean; - dynamicItems: boolean; -} -export interface AsyncValidateFunction extends ValidateFunction { - (...args: Parameters>): Promise; - $async: true; -} -export declare type AnyValidateFunction = ValidateFunction | AsyncValidateFunction; -export interface ErrorObject, S = unknown> { - keyword: K; - instancePath: string; - schemaPath: string; - params: P; - propertyName?: string; - message?: string; - schema?: S; - parentSchema?: AnySchemaObject; - data?: unknown; -} -export declare type ErrorNoParams = ErrorObject, S>; -interface _KeywordDef { - keyword: string | string[]; - type?: JSONType | JSONType[]; - schemaType?: JSONType | JSONType[]; - allowUndefined?: boolean; - $data?: boolean; - implements?: string[]; - before?: string; - post?: boolean; - metaSchema?: AnySchemaObject; - validateSchema?: AnyValidateFunction; - dependencies?: string[]; - error?: KeywordErrorDefinition; - $dataError?: KeywordErrorDefinition; -} -export interface CodeKeywordDefinition extends _KeywordDef { - code: (cxt: KeywordCxt, ruleType?: string) => void; - trackErrors?: boolean; -} -export declare type MacroKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaCxt) => AnySchema; -export declare type CompileKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaObjCxt) => DataValidateFunction; -export interface DataValidateFunction { - (...args: Parameters): boolean | Promise; - errors?: Partial[]; -} -export interface SchemaValidateFunction { - (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise; - errors?: Partial[]; -} -export interface FuncKeywordDefinition extends _KeywordDef { - validate?: SchemaValidateFunction | DataValidateFunction; - compile?: CompileKeywordFunc; - schema?: boolean; - modifying?: boolean; - async?: boolean; - valid?: boolean; - errors?: boolean | "full"; -} -export interface MacroKeywordDefinition extends FuncKeywordDefinition { - macro: MacroKeywordFunc; -} -export declare type KeywordDefinition = CodeKeywordDefinition | FuncKeywordDefinition | MacroKeywordDefinition; -export declare type AddedKeywordDefinition = KeywordDefinition & { - type: JSONType[]; - schemaType: JSONType[]; -}; -export interface KeywordErrorDefinition { - message: string | Code | ((cxt: KeywordErrorCxt) => string | Code); - params?: Code | ((cxt: KeywordErrorCxt) => Code); -} -export declare type Vocabulary = (KeywordDefinition | string)[]; -export interface KeywordErrorCxt { - gen: CodeGen; - keyword: string; - data: Name; - $data?: string | false; - schema: any; - parentSchema?: AnySchemaObject; - schemaCode: Code | number | boolean; - schemaValue: Code | number | boolean; - schemaType?: JSONType[]; - errsCount?: Name; - params: KeywordCxtParams; - it: SchemaCxt; -} -export declare type KeywordCxtParams = { - [P in string]?: Code | string | number; -}; -export declare type FormatValidator = (data: T) => boolean; -export declare type FormatCompare = (data1: T, data2: T) => number | undefined; -export declare type AsyncFormatValidator = (data: T) => Promise; -export interface FormatDefinition { - type?: T extends string ? "string" | undefined : "number"; - validate: FormatValidator | (T extends string ? string | RegExp : never); - async?: false | undefined; - compare?: FormatCompare; -} -export interface AsyncFormatDefinition { - type?: T extends string ? "string" | undefined : "number"; - validate: AsyncFormatValidator; - async: true; - compare?: FormatCompare; -} -export declare type AddedFormat = true | RegExp | FormatValidator | FormatDefinition | FormatDefinition | AsyncFormatDefinition | AsyncFormatDefinition; -export declare type Format = AddedFormat | string; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/types/index.js.map b/node_modules/table/node_modules/ajv/dist/types/index.js.map deleted file mode 100644 index 1f80f85ec..000000000 --- a/node_modules/table/node_modules/ajv/dist/types/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/types/index.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/types/json-schema.d.ts b/node_modules/table/node_modules/ajv/dist/types/json-schema.d.ts deleted file mode 100644 index 57d09a7bc..000000000 --- a/node_modules/table/node_modules/ajv/dist/types/json-schema.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -export declare type SomeJSONSchema = JSONSchemaType; -export declare type PartialSchema = Partial>; -declare type JSONType = _partial extends true ? T | undefined : T; -interface NumberKeywords { - minimum?: number; - maximum?: number; - exclusiveMinimum?: number; - exclusiveMaximum?: number; - multipleOf?: number; - format?: string; -} -interface StringKeywords { - minLength?: number; - maxLength?: number; - pattern?: string; - format?: string; -} -export declare type JSONSchemaType = (// these two unions allow arbitrary unions of types -{ - anyOf: readonly JSONSchemaType[]; -} | { - oneOf: readonly JSONSchemaType[]; -} | ({ - type: (T extends number ? JSONType<"number" | "integer", _partial> : T extends string ? JSONType<"string", _partial> : T extends boolean ? JSONType<"boolean", _partial> : never)[]; -} & (T extends number ? NumberKeywords : T extends string ? StringKeywords : T extends boolean ? unknown : never)) | ((T extends number ? { - type: JSONType<"number" | "integer", _partial>; -} & NumberKeywords : T extends string ? { - type: JSONType<"string", _partial>; -} & StringKeywords : T extends boolean ? { - type: "boolean"; -} : T extends [any, ...any[]] ? { - type: JSONType<"array", _partial>; - items: { - readonly [K in keyof T]-?: JSONSchemaType & Nullable; - } & { - length: T["length"]; - }; - minItems: T["length"]; -} & ({ - maxItems: T["length"]; -} | { - additionalItems: false; -}) : T extends readonly any[] ? { - type: JSONType<"array", _partial>; - items: JSONSchemaType; - contains?: PartialSchema; - minItems?: number; - maxItems?: number; - minContains?: number; - maxContains?: number; - uniqueItems?: true; - additionalItems?: never; -} : T extends Record ? { - type: JSONType<"object", _partial>; - required: _partial extends true ? Readonly<(keyof T)[]> : Readonly[]>; - additionalProperties?: boolean | JSONSchemaType; - unevaluatedProperties?: boolean | JSONSchemaType; - properties?: _partial extends true ? Partial> : PropertiesSchema; - patternProperties?: { - [Pattern in string]?: JSONSchemaType; - }; - propertyNames?: JSONSchemaType; - dependencies?: { - [K in keyof T]?: Readonly<(keyof T)[]> | PartialSchema; - }; - dependentRequired?: { - [K in keyof T]?: Readonly<(keyof T)[]>; - }; - dependentSchemas?: { - [K in keyof T]?: PartialSchema; - }; - minProperties?: number; - maxProperties?: number; -} : T extends null ? { - nullable: true; -} : never) & { - allOf?: Readonly[]>; - anyOf?: Readonly[]>; - oneOf?: Readonly[]>; - if?: PartialSchema; - then?: PartialSchema; - else?: PartialSchema; - not?: PartialSchema; -})) & { - [keyword: string]: any; - $id?: string; - $ref?: string; - $defs?: { - [Key in string]?: JSONSchemaType; - }; - definitions?: { - [Key in string]?: JSONSchemaType; - }; -}; -declare type Known = KnownRecord | [Known, ...Known[]] | Known[] | number | string | boolean | null; -interface KnownRecord extends Record { -} -export declare type PropertiesSchema = { - [K in keyof T]-?: (JSONSchemaType & Nullable) | { - $ref: string; - }; -}; -export declare type RequiredMembers = { - [K in keyof T]-?: undefined extends T[K] ? never : K; -}[keyof T]; -declare type Nullable = undefined extends T ? { - nullable: true; - const?: never; - enum?: Readonly<(T | null)[]>; - default?: T | null; -} : { - const?: T; - enum?: Readonly; - default?: T; -}; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/types/json-schema.js.map b/node_modules/table/node_modules/ajv/dist/types/json-schema.js.map deleted file mode 100644 index ae6b4d0fe..000000000 --- a/node_modules/table/node_modules/ajv/dist/types/json-schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"json-schema.js","sourceRoot":"","sources":["../../lib/types/json-schema.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/types/jtd-schema.d.ts b/node_modules/table/node_modules/ajv/dist/types/jtd-schema.d.ts deleted file mode 100644 index d06b3a2d8..000000000 --- a/node_modules/table/node_modules/ajv/dist/types/jtd-schema.d.ts +++ /dev/null @@ -1,136 +0,0 @@ -/** required keys of an object, not undefined */ -declare type RequiredKeys = { - [K in keyof T]-?: undefined extends T[K] ? never : K; -}[keyof T]; -/** optional or undifined-able keys of an object */ -declare type OptionalKeys = { - [K in keyof T]-?: undefined extends T[K] ? K : never; -}[keyof T]; -/** type is true if T is a union type */ -declare type IsUnion_ = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true; -declare type IsUnion = IsUnion_; -/** type is true if T is identically E */ -declare type TypeEquality = [T] extends [E] ? ([E] extends [T] ? true : false) : false; -/** type is true if T or null is identically E or null*/ -declare type NullTypeEquality = TypeEquality; -/** gets only the string literals of a type or null if a type isn't a string literal */ -declare type EnumString = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null; -/** true if type is a union of string literals */ -declare type IsEnum = null extends EnumString> ? false : true; -/** true only if all types are array types (not tuples) */ -declare type IsElements = false extends IsUnion ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false; -/** true if the the type is a values type */ -declare type IsValues = false extends IsUnion> ? TypeEquality, string> : false; -/** true if type is a proeprties type and Union is false, or type is a discriminator type and Union is true */ -declare type IsRecord = Union extends IsUnion> ? null extends EnumString> ? false : true : false; -/** numeric strings */ -declare type NumberType = "float32" | "float64" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32"; -/** string strings */ -declare type StringType = "string" | "timestamp"; -/** actual schema */ -export declare type JTDSchemaType = Record> = (// refs - where null wasn't specified, must match exactly -(null extends EnumString ? never : ({ - [K in keyof D]: [T] extends [D[K]] ? { - ref: K; - } : never; -}[keyof D] & { - nullable?: false; -}) | (null extends T ? { - [K in keyof D]: [Exclude] extends [Exclude] ? { - ref: K; - } : never; -}[keyof D] & { - nullable: true; -} : never)) | (unknown extends T ? { - nullable?: boolean; -} : never) | ((true extends NullTypeEquality ? { - type: NumberType; -} : true extends NullTypeEquality ? { - type: "boolean"; -} : true extends NullTypeEquality ? { - type: StringType; -} : true extends NullTypeEquality ? { - type: "timestamp"; -} : true extends IsEnum ? { - enum: EnumString>[]; -} : true extends IsElements> ? T extends readonly (infer E)[] ? { - elements: JTDSchemaType; -} : never : true extends IsValues ? T extends Record ? { - values: JTDSchemaType; -} : never : true extends IsRecord ? ([RequiredKeys>] extends [never] ? { - properties?: Record; -} : { - properties: { - [K in RequiredKeys]: JTDSchemaType; - }; -}) & ([OptionalKeys>] extends [never] ? { - optionalProperties?: Record; -} : { - optionalProperties: { - [K in OptionalKeys]: JTDSchemaType, D>; - }; -}) & { - additionalProperties?: boolean; -} : true extends IsRecord ? { - [K in keyof Exclude]-?: Exclude[K] extends string ? { - discriminator: K; - mapping: { - [M in Exclude[K]]: JTDSchemaType, D>; - }; - } : never; -}[keyof Exclude] : never) & (null extends T ? { - nullable: true; -} : { - nullable?: false; -}))) & { - metadata?: Record; - definitions?: { - [K in keyof D]: JTDSchemaType; - }; -}; -declare type JTDDataDef> = (S extends { - ref: string; -} ? JTDDataDef : S extends { - type: NumberType; -} ? number : S extends { - type: "string"; -} ? string : S extends { - type: "timestamp"; -} ? string | Date : S extends { - enum: readonly (infer E)[]; -} ? string extends E ? never : [E] extends [string] ? E : never : S extends { - elements: infer E; -} ? JTDDataDef[] : S extends { - properties: Record; - optionalProperties?: Record; - additionalProperties?: boolean; -} ? { - -readonly [K in keyof S["properties"]]-?: JTDDataDef; -} & { - -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef; -} & ([S["additionalProperties"]] extends [true] ? Record : unknown) : S extends { - properties?: Record; - optionalProperties: Record; - additionalProperties?: boolean; -} ? { - -readonly [K in keyof S["properties"]]-?: JTDDataDef; -} & { - -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef; -} & ([S["additionalProperties"]] extends [true] ? Record : unknown) : S extends { - values: infer V; -} ? Record> : S extends { - discriminator: infer M; - mapping: Record; -} ? [M] extends [string] ? { - [K in keyof S["mapping"]]: JTDDataDef & { - [KM in M]: K; - }; -}[keyof S["mapping"]] : never : unknown) | (S extends { - nullable: true; -} ? null : never); -export declare type JTDDataType = S extends { - definitions: Record; -} ? JTDDataDef : JTDDataDef>; -export {}; diff --git a/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js.map b/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js.map deleted file mode 100644 index add89bd77..000000000 --- a/node_modules/table/node_modules/ajv/dist/types/jtd-schema.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jtd-schema.js","sourceRoot":"","sources":["../../lib/types/jtd-schema.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts deleted file mode 100644 index 89a73f8dd..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -export declare type AdditionalItemsError = ErrorObject<"additionalItems", { - limit: number; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export declare function validateAdditionalItems(cxt: KeywordCxt, items: AnySchema[]): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js deleted file mode 100644 index 587a8bc74..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAdditionalItems = void 0; -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: ({ params: { len } }) => codegen_1.str `must NOT have more than ${len} items`, - params: ({ params: { len } }) => codegen_1._ `{limit: ${len}}`, -}; -const def = { - keyword: "additionalItems", - type: "array", - schemaType: ["boolean", "object"], - before: "uniqueItems", - error, - code(cxt) { - const { parentSchema, it } = cxt; - const { items } = parentSchema; - if (!Array.isArray(items)) { - util_1.checkStrictMode(it, '"additionalItems" is ignored when "items" is not an array of schemas'); - return; - } - validateAdditionalItems(cxt, items); - }, -}; -function validateAdditionalItems(cxt, items) { - const { gen, schema, data, keyword, it } = cxt; - it.items = true; - const len = gen.const("len", codegen_1._ `${data}.length`); - if (schema === false) { - cxt.setParams({ len: items.length }); - cxt.pass(codegen_1._ `${len} <= ${items.length}`); - } - else if (typeof schema == "object" && !util_1.alwaysValidSchema(it, schema)) { - const valid = gen.var("valid", codegen_1._ `${len} <= ${items.length}`); // TODO var - gen.if(codegen_1.not(valid), () => validateItems(valid)); - cxt.ok(valid); - } - function validateItems(valid) { - gen.forRange("i", items.length, len, (i) => { - cxt.subschema({ keyword, dataProp: i, dataPropType: util_1.Type.Num }, valid); - if (!it.allErrors) - gen.if(codegen_1.not(valid), () => gen.break()); - }); - } -} -exports.validateAdditionalItems = validateAdditionalItems; -exports.default = def; -//# sourceMappingURL=additionalItems.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map deleted file mode 100644 index 5038c7ffc..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +++ /dev/null @@ -1 +0,0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CAAC,EAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAC,CAAC,CAAA;QAClC,GAAG,CAAC,IAAI,CAAC,WAAC,CAAA,GAAG,GAAG,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;KACvC;SAAM,IAAI,OAAO,MAAM,IAAI,QAAQ,IAAI,CAAC,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE;QACtE,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,WAAC,CAAA,GAAG,GAAG,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA,CAAC,WAAW;QACxE,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;QAC9C,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;KACd;IAED,SAAS,aAAa,CAAC,KAAW;QAChC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;YACzC,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,YAAY,EAAE,WAAI,CAAC,GAAG,EAAC,EAAE,KAAK,CAAC,CAAA;YACpE,IAAI,CAAC,EAAE,CAAC,SAAS;gBAAE,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;QAC1D,CAAC,CAAC,CAAA;IACJ,CAAC;AACH,CAAC;AAnBD,0DAmBC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts deleted file mode 100644 index f24ba3f5f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, AddedKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type AdditionalPropertiesError = ErrorObject<"additionalProperties", { - additionalProperty: string; -}, AnySchema>; -declare const def: CodeKeywordDefinition & AddedKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js deleted file mode 100644 index 91672bc08..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +++ /dev/null @@ -1,106 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const code_1 = require("../code"); -const codegen_1 = require("../../compile/codegen"); -const names_1 = require("../../compile/names"); -const util_1 = require("../../compile/util"); -const error = { - message: "must NOT have additional properties", - params: ({ params }) => codegen_1._ `{additionalProperty: ${params.additionalProperty}}`, -}; -const def = { - keyword: "additionalProperties", - type: ["object"], - schemaType: ["boolean", "object"], - allowUndefined: true, - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, errsCount, it } = cxt; - /* istanbul ignore if */ - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, opts } = it; - it.props = true; - if (opts.removeAdditional !== "all" && util_1.alwaysValidSchema(it, schema)) - return; - const props = code_1.allSchemaProperties(parentSchema.properties); - const patProps = code_1.allSchemaProperties(parentSchema.patternProperties); - checkAdditionalProperties(); - cxt.ok(codegen_1._ `${errsCount} === ${names_1.default.errors}`); - function checkAdditionalProperties() { - gen.forIn("key", data, (key) => { - if (!props.length && !patProps.length) - additionalPropertyCode(key); - else - gen.if(isAdditional(key), () => additionalPropertyCode(key)); - }); - } - function isAdditional(key) { - let definedProp; - if (props.length > 8) { - // TODO maybe an option instead of hard-coded 8? - const propsSchema = util_1.schemaRefOrVal(it, parentSchema.properties, "properties"); - definedProp = code_1.isOwnProperty(gen, propsSchema, key); - } - else if (props.length) { - definedProp = codegen_1.or(...props.map((p) => codegen_1._ `${key} === ${p}`)); - } - else { - definedProp = codegen_1.nil; - } - if (patProps.length) { - definedProp = codegen_1.or(definedProp, ...patProps.map((p) => codegen_1._ `${code_1.usePattern(gen, p)}.test(${key})`)); - } - return codegen_1.not(definedProp); - } - function deleteAdditional(key) { - gen.code(codegen_1._ `delete ${data}[${key}]`); - } - function additionalPropertyCode(key) { - if (opts.removeAdditional === "all" || (opts.removeAdditional && schema === false)) { - deleteAdditional(key); - return; - } - if (schema === false) { - cxt.setParams({ additionalProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; - } - if (typeof schema == "object" && !util_1.alwaysValidSchema(it, schema)) { - const valid = gen.name("valid"); - if (opts.removeAdditional === "failing") { - applyAdditionalSchema(key, valid, false); - gen.if(codegen_1.not(valid), () => { - cxt.reset(); - deleteAdditional(key); - }); - } - else { - applyAdditionalSchema(key, valid); - if (!allErrors) - gen.if(codegen_1.not(valid), () => gen.break()); - } - } - } - function applyAdditionalSchema(key, valid, errors) { - const subschema = { - keyword: "additionalProperties", - dataProp: key, - dataPropType: util_1.Type.Str, - }; - if (errors === false) { - Object.assign(subschema, { - compositeRule: true, - createErrors: false, - allErrors: false, - }); - } - cxt.subschema(subschema, valid); - } - }, -}; -exports.default = def; -//# sourceMappingURL=additionalProperties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map deleted file mode 100644 index 7d161a1dd..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"additionalProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/additionalProperties.ts"],"names":[],"mappings":";;AAOA,kCAAsE;AACtE,mDAAiE;AACjE,+CAAmC;AAEnC,6CAA0E;AAQ1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KAAK,KAAK,EAAE;gBACpB,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;oBACvB,aAAa,EAAE,IAAI;oBACnB,YAAY,EAAE,KAAK;oBACnB,SAAS,EAAE,KAAK;iBACjB,CAAC,CAAA;aACH;YACD,GAAG,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;QACjC,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js deleted file mode 100644 index acda3d16b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util_1 = require("../../compile/util"); -const def = { - keyword: "allOf", - schemaType: "array", - code(cxt) { - const { gen, schema, it } = cxt; - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const valid = gen.name("valid"); - schema.forEach((sch, i) => { - if (util_1.alwaysValidSchema(it, sch)) - return; - const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i }, valid); - cxt.ok(valid); - cxt.mergeEvaluated(schCxt); - }); - }, -}; -exports.default = def; -//# sourceMappingURL=allOf.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map deleted file mode 100644 index 70fb826ee..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"allOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/allOf.ts"],"names":[],"mappings":";;AAEA,6CAAoD;AAEpD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC7B,wBAAwB;QACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACvE,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,MAAM,CAAC,OAAO,CAAC,CAAC,GAAc,EAAE,CAAS,EAAE,EAAE;YAC3C,IAAI,wBAAiB,CAAC,EAAE,EAAE,GAAG,CAAC;gBAAE,OAAM;YACtC,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,EAAC,EAAE,KAAK,CAAC,CAAA;YACtE,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;YACb,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts deleted file mode 100644 index db3fc0e28..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CodeKeywordDefinition, ErrorNoParams, AnySchema } from "../../types"; -export declare type AnyOfError = ErrorNoParams<"anyOf", AnySchema[]>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js deleted file mode 100644 index 66cfce2cc..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const code_1 = require("../code"); -const def = { - keyword: "anyOf", - schemaType: "array", - trackErrors: true, - code: code_1.validateUnion, - error: { message: "must match a schema in anyOf" }, -}; -exports.default = def; -//# sourceMappingURL=anyOf.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map deleted file mode 100644 index 537ffcbeb..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"anyOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/anyOf.ts"],"names":[],"mappings":";;AACA,kCAAqC;AAIrC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,EAAC,OAAO,EAAE,8BAA8B,EAAC;CACjD,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts deleted file mode 100644 index 7e4e96a0e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type ContainsError = ErrorObject<"contains", { - minContains: number; - maxContains?: number; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js deleted file mode 100644 index 4c254a5c9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: ({ params: { min, max } }) => max === undefined - ? codegen_1.str `must contain at least ${min} valid item(s)` - : codegen_1.str `must contain at least ${min} and no more than ${max} valid item(s)`, - params: ({ params: { min, max } }) => max === undefined ? codegen_1._ `{minContains: ${min}}` : codegen_1._ `{minContains: ${min}, maxContains: ${max}}`, -}; -const def = { - keyword: "contains", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - let min; - let max; - const { minContains, maxContains } = parentSchema; - if (it.opts.next) { - min = minContains === undefined ? 1 : minContains; - max = maxContains; - } - else { - min = 1; - } - const len = gen.const("len", codegen_1._ `${data}.length`); - cxt.setParams({ min, max }); - if (max === undefined && min === 0) { - util_1.checkStrictMode(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`); - return; - } - if (max !== undefined && min > max) { - util_1.checkStrictMode(it, `"minContains" > "maxContains" is always invalid`); - cxt.fail(); - return; - } - if (util_1.alwaysValidSchema(it, schema)) { - let cond = codegen_1._ `${len} >= ${min}`; - if (max !== undefined) - cond = codegen_1._ `${cond} && ${len} <= ${max}`; - cxt.pass(cond); - return; - } - it.items = true; - const valid = gen.name("valid"); - if (max === undefined && min === 1) { - validateItems(valid, () => gen.if(valid, () => gen.break())); - } - else { - gen.let(valid, false); - const schValid = gen.name("_valid"); - const count = gen.let("count", 0); - validateItems(schValid, () => gen.if(schValid, () => checkLimits(count))); - } - cxt.result(valid, () => cxt.reset()); - function validateItems(_valid, block) { - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword: "contains", - dataProp: i, - dataPropType: util_1.Type.Num, - compositeRule: true, - }, _valid); - block(); - }); - } - function checkLimits(count) { - gen.code(codegen_1._ `${count}++`); - if (max === undefined) { - gen.if(codegen_1._ `${count} >= ${min}`, () => gen.assign(valid, true).break()); - } - else { - gen.if(codegen_1._ `${count} > ${max}`, () => gen.assign(valid, false).break()); - if (min === 1) - gen.assign(valid, true); - else - gen.if(codegen_1._ `${count} >= ${min}`, () => gen.assign(valid, true)); - } - } - }, -}; -exports.default = def; -//# sourceMappingURL=contains.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js.map deleted file mode 100644 index 4e46683ac..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"contains.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/contains.ts"],"names":[],"mappings":";;AAOA,mDAAkD;AAClD,6CAA2E;AAQ3E,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,EAAC,EAAE,EAAE,CAChC,GAAG,KAAK,SAAS;QACf,CAAC,CAAC,aAAG,CAAA,yBAAyB,GAAG,gBAAgB;QACjD,CAAC,CAAC,aAAG,CAAA,yBAAyB,GAAG,qBAAqB,GAAG,gBAAgB;IAC7E,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAE,GAAG,EAAC,EAAC,EAAE,EAAE,CAC/B,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,WAAC,CAAA,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAC,WAAC,CAAA,iBAAiB,GAAG,kBAAkB,GAAG,GAAG;C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;iBACpB,EACD,MAAM,CACP,CAAA;gBACD,KAAK,EAAE,CAAA;YACT,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,SAAS,WAAW,CAAC,KAAW;YAC9B,GAAG,CAAC,IAAI,CAAC,WAAC,CAAA,GAAG,KAAK,IAAI,CAAC,CAAA;YACvB,IAAI,GAAG,KAAK,SAAS,EAAE;gBACrB,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,GAAG,KAAK,OAAO,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;aACrE;iBAAM;gBACL,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,GAAG,KAAK,MAAM,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;gBACpE,IAAI,GAAG,KAAK,CAAC;oBAAE,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;;oBACjC,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,GAAG,KAAK,OAAO,GAAG,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAA;aAClE;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts deleted file mode 100644 index b28cfe421..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition, SchemaMap, AnySchema } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -export declare type PropertyDependencies = { - [K in string]?: string[]; -}; -export interface DependenciesErrorParams { - property: string; - missingProperty: string; - depsCount: number; - deps: string; -} -export declare type DependenciesError = ErrorObject<"dependencies", DependenciesErrorParams, { - [K in string]?: string[] | AnySchema; -}>; -export declare const error: KeywordErrorDefinition; -declare const def: CodeKeywordDefinition; -export declare function validatePropertyDeps(cxt: KeywordCxt, propertyDeps?: { - [K in string]?: string[]; -}): void; -export declare function validateSchemaDeps(cxt: KeywordCxt, schemaDeps?: SchemaMap): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js deleted file mode 100644 index ba968df15..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0; -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const code_1 = require("../code"); -exports.error = { - message: ({ params: { property, depsCount, deps } }) => { - const property_ies = depsCount === 1 ? "property" : "properties"; - return codegen_1.str `must have ${property_ies} ${deps} when property ${property} is present`; - }, - params: ({ params: { property, depsCount, deps, missingProperty } }) => codegen_1._ `{property: ${property}, - missingProperty: ${missingProperty}, - depsCount: ${depsCount}, - deps: ${deps}}`, // TODO change to reference -}; -const def = { - keyword: "dependencies", - type: "object", - schemaType: "object", - error: exports.error, - code(cxt) { - const [propDeps, schDeps] = splitDependencies(cxt); - validatePropertyDeps(cxt, propDeps); - validateSchemaDeps(cxt, schDeps); - }, -}; -function splitDependencies({ schema }) { - const propertyDeps = {}; - const schemaDeps = {}; - for (const key in schema) { - if (key === "__proto__") - continue; - const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps; - deps[key] = schema[key]; - } - return [propertyDeps, schemaDeps]; -} -function validatePropertyDeps(cxt, propertyDeps = cxt.schema) { - const { gen, data, it } = cxt; - if (Object.keys(propertyDeps).length === 0) - return; - const missing = gen.let("missing"); - for (const prop in propertyDeps) { - const deps = propertyDeps[prop]; - if (deps.length === 0) - continue; - const hasProperty = code_1.propertyInData(gen, data, prop, it.opts.ownProperties); - cxt.setParams({ - property: prop, - depsCount: deps.length, - deps: deps.join(", "), - }); - if (it.allErrors) { - gen.if(hasProperty, () => { - for (const depProp of deps) { - code_1.checkReportMissingProp(cxt, depProp); - } - }); - } - else { - gen.if(codegen_1._ `${hasProperty} && (${code_1.checkMissingProp(cxt, deps, missing)})`); - code_1.reportMissingProp(cxt, missing); - gen.else(); - } - } -} -exports.validatePropertyDeps = validatePropertyDeps; -function validateSchemaDeps(cxt, schemaDeps = cxt.schema) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - for (const prop in schemaDeps) { - if (util_1.alwaysValidSchema(it, schemaDeps[prop])) - continue; - gen.if(code_1.propertyInData(gen, data, prop, it.opts.ownProperties), () => { - const schCxt = cxt.subschema({ keyword, schemaProp: prop }, valid); - cxt.mergeValidEvaluated(schCxt, valid); - }, () => gen.var(valid, true) // TODO var - ); - cxt.ok(valid); - } -} -exports.validateSchemaDeps = validateSchemaDeps; -exports.default = def; -//# sourceMappingURL=dependencies.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map deleted file mode 100644 index ba4bb31e2..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/dependencies.ts"],"names":[],"mappings":";;;AAQA,mDAA4C;AAC5C,6CAAoD;AACpD,kCAAmG;AAmBtF,QAAA,KAAK,GAA2B;IAC3C,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAC,EA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AAe,EAAE,aAAwB,GAAG,CAAC,MAAM;IACpF,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;IACpC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC/B,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE;QAC7B,IAAI,wBAAiB,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAc,CAAC;YAAE,SAAQ;QAClE,GAAG,CAAC,EAAE,CACJ,qBAAc,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,EACtD,GAAG,EAAE;YACH,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;YAChE,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;QACxC,CAAC,EACD,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,WAAW;SACvC,CAAA;QACD,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;KACd;AACH,CAAC;AAfD,gDAeC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js deleted file mode 100644 index 5801980ae..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dependencies_1 = require("./dependencies"); -const def = { - keyword: "dependentSchemas", - type: "object", - schemaType: "object", - code: (cxt) => dependencies_1.validateSchemaDeps(cxt), -}; -exports.default = def; -//# sourceMappingURL=dependentSchemas.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map deleted file mode 100644 index e14007c90..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dependentSchemas.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/dependentSchemas.ts"],"names":[],"mappings":";;AACA,iDAAiD;AAEjD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,kBAAkB;IAC3B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,iCAAkB,CAAC,GAAG,CAAC;CACvC,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.d.ts deleted file mode 100644 index 3c3e78dd6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type IfKeywordError = ErrorObject<"if", { - failingKeyword: string; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js deleted file mode 100644 index 507686f22..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: ({ params }) => codegen_1.str `must match "${params.ifClause}" schema`, - params: ({ params }) => codegen_1._ `{failingKeyword: ${params.ifClause}}`, -}; -const def = { - keyword: "if", - schemaType: ["object", "boolean"], - trackErrors: true, - error, - code(cxt) { - const { gen, parentSchema, it } = cxt; - if (parentSchema.then === undefined && parentSchema.else === undefined) { - util_1.checkStrictMode(it, '"if" without "then" and "else" is ignored'); - } - const hasThen = hasSchema(it, "then"); - const hasElse = hasSchema(it, "else"); - if (!hasThen && !hasElse) - return; - const valid = gen.let("valid", true); - const schValid = gen.name("_valid"); - validateIf(); - cxt.reset(); - if (hasThen && hasElse) { - const ifClause = gen.let("ifClause"); - cxt.setParams({ ifClause }); - gen.if(schValid, validateClause("then", ifClause), validateClause("else", ifClause)); - } - else if (hasThen) { - gen.if(schValid, validateClause("then")); - } - else { - gen.if(codegen_1.not(schValid), validateClause("else")); - } - cxt.pass(valid, () => cxt.error(true)); - function validateIf() { - const schCxt = cxt.subschema({ - keyword: "if", - compositeRule: true, - createErrors: false, - allErrors: false, - }, schValid); - cxt.mergeEvaluated(schCxt); - } - function validateClause(keyword, ifClause) { - return () => { - const schCxt = cxt.subschema({ keyword }, schValid); - gen.assign(valid, schValid); - cxt.mergeValidEvaluated(schCxt, valid); - if (ifClause) - gen.assign(ifClause, codegen_1._ `${keyword}`); - else - cxt.setParams({ ifClause: keyword }); - }; - } - }, -}; -function hasSchema(it, keyword) { - const schema = it.schema[keyword]; - return schema !== undefined && !util_1.alwaysValidSchema(it, schema); -} -exports.default = def; -//# sourceMappingURL=if.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js.map deleted file mode 100644 index 4e3c53339..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/if.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"if.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/if.ts"],"names":[],"mappings":";;AAQA,mDAAuD;AACvD,6CAAqE;AAIrE,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,aAAG,CAAA,eAAe,MAAM,CAAC,QAAQ,UAAU;IAClE,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,oBAAoB,MAAM,CAAC,QAAQ,GAAG;CAC9D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,WAAW,EAAE,IAAI;IACjB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,EAAE;YACtE,sBAAe,CAAC,EAAE,EAAE,2CAA2C,CAAC,CAAA;SACjE;QACD,MAAM,OAAO,GAAG,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QACrC,MAAM,OAAO,GAAG,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO;YAAE,OAAM;QAEhC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QACpC,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACnC,UAAU,EAAE,CAAA;QACZ,GAAG,CAAC,KAAK,EAAE,CAA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,EAAE,WAAC,CAAA,GAAG,OAAO,EAAE,CAAC,CAAA;;oBAC5C,GAAG,CAAC,SAAS,CAAC,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAA;YACzC,CAAC,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,SAAS,SAAS,CAAC,EAAgB,EAAE,OAAe;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACjC,OAAO,MAAM,KAAK,SAAS,IAAI,CAAC,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;AAC/D,CAAC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.d.ts deleted file mode 100644 index f45239bd5..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { ErrorNoParams, Vocabulary } from "../../types"; -import { AdditionalItemsError } from "./additionalItems"; -import { ItemsError } from "./items2020"; -import { ContainsError } from "./contains"; -import { DependenciesError } from "./dependencies"; -import { PropertyNamesError } from "./propertyNames"; -import { AdditionalPropertiesError } from "./additionalProperties"; -import { NotKeywordError } from "./not"; -import { AnyOfError } from "./anyOf"; -import { OneOfError } from "./oneOf"; -import { IfKeywordError } from "./if"; -export default function getApplicator(draft2020?: boolean): Vocabulary; -export declare type ApplicatorKeywordError = ErrorNoParams<"false schema"> | AdditionalItemsError | ItemsError | ContainsError | AdditionalPropertiesError | DependenciesError | IfKeywordError | AnyOfError | OneOfError | NotKeywordError | PropertyNamesError; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js deleted file mode 100644 index cf592f279..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const additionalItems_1 = require("./additionalItems"); -const prefixItems_1 = require("./prefixItems"); -const items_1 = require("./items"); -const items2020_1 = require("./items2020"); -const contains_1 = require("./contains"); -const dependencies_1 = require("./dependencies"); -const propertyNames_1 = require("./propertyNames"); -const additionalProperties_1 = require("./additionalProperties"); -const properties_1 = require("./properties"); -const patternProperties_1 = require("./patternProperties"); -const not_1 = require("./not"); -const anyOf_1 = require("./anyOf"); -const oneOf_1 = require("./oneOf"); -const allOf_1 = require("./allOf"); -const if_1 = require("./if"); -const thenElse_1 = require("./thenElse"); -function getApplicator(draft2020 = false) { - const applicator = [ - // any - not_1.default, - anyOf_1.default, - oneOf_1.default, - allOf_1.default, - if_1.default, - thenElse_1.default, - // object - propertyNames_1.default, - additionalProperties_1.default, - dependencies_1.default, - properties_1.default, - patternProperties_1.default, - ]; - // array - if (draft2020) - applicator.push(prefixItems_1.default, items2020_1.default); - else - applicator.push(additionalItems_1.default, items_1.default); - applicator.push(contains_1.default); - return applicator; -} -exports.default = getApplicator; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js.map deleted file mode 100644 index ebcb8534d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/index.ts"],"names":[],"mappings":";;AACA,uDAAuE;AACvE,+CAAuC;AACvC,mCAA2B;AAC3B,2CAAiD;AACjD,yCAAkD;AAClD,iDAA8D;AAC9D,mDAAiE;AACjE,iEAAsF;AACtF,6CAAqC;AACrC,2DAAmD;AACnD,+BAAiD;AACjD,mCAAyC;AACzC,mCAAyC;AACzC,mCAA2B;AAC3B,6BAA8C;AAC9C,yCAAiC;AAEjC,SAAwB,aAAa,CAAC,SAAS,GAAG,KAAK;IACrD,MAAM,UAAU,GAAG;QACjB,MAAM;QACN,aAAU;QACV,eAAK;QACL,eAAK;QACL,eAAK;QACL,YAAS;QACT,kBAAQ;QACR,SAAS;QACT,uBAAa;QACb,8BAAoB;QACpB,sBAAY;QACZ,oBAAU;QACV,2BAAiB;KAClB,CAAA;IACD,QAAQ;IACR,IAAI,SAAS;QAAE,UAAU,CAAC,IAAI,CAAC,qBAAW,EAAE,mBAAS,CAAC,CAAA;;QACjD,UAAU,CAAC,IAAI,CAAC,yBAAe,EAAE,eAAK,CAAC,CAAA;IAC5C,UAAU,CAAC,IAAI,CAAC,kBAAQ,CAAC,CAAA;IACzB,OAAO,UAAU,CAAA;AACnB,CAAC;AArBD,gCAqBC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.d.ts deleted file mode 100644 index 8e608ca9c..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition, AnySchema } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -declare const def: CodeKeywordDefinition; -export declare function validateTuple(cxt: KeywordCxt, extraItems: string, schArr?: AnySchema[]): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js deleted file mode 100644 index 3e6af92c6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateTuple = void 0; -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const code_1 = require("../code"); -const def = { - keyword: "items", - type: "array", - schemaType: ["object", "array", "boolean"], - before: "uniqueItems", - code(cxt) { - const { schema, it } = cxt; - if (Array.isArray(schema)) - return validateTuple(cxt, "additionalItems", schema); - it.items = true; - if (util_1.alwaysValidSchema(it, schema)) - return; - cxt.ok(code_1.validateArray(cxt)); - }, -}; -function validateTuple(cxt, extraItems, schArr = cxt.schema) { - const { gen, parentSchema, data, keyword, it } = cxt; - checkStrictTuple(parentSchema); - if (it.opts.unevaluated && schArr.length && it.items !== true) { - it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items); - } - const valid = gen.name("valid"); - const len = gen.const("len", codegen_1._ `${data}.length`); - schArr.forEach((sch, i) => { - if (util_1.alwaysValidSchema(it, sch)) - return; - gen.if(codegen_1._ `${len} > ${i}`, () => cxt.subschema({ - keyword, - schemaProp: i, - dataProp: i, - }, valid)); - cxt.ok(valid); - }); - function checkStrictTuple(sch) { - const { opts, errSchemaPath } = it; - const l = schArr.length; - const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false); - if (opts.strictTuples && !fullTuple) { - const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`; - util_1.checkStrictMode(it, msg, opts.strictTuples); - } - } -} -exports.validateTuple = validateTuple; -exports.default = def; -//# sourceMappingURL=items.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js.map deleted file mode 100644 index cdddc1f5a..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"items.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/items.ts"],"names":[],"mappings":";;;AAEA,mDAAuC;AACvC,6CAAqF;AACrF,kCAAqC;AAErC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC;IAC1C,MAAM,EAAE,aAAa;IACrB,IAAI,CAAC,GAAe;QA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AS,CACX;YACE,OAAO;YACP,UAAU,EAAE,CAAC;YACb,QAAQ,EAAE,CAAC;SACZ,EACD,KAAK,CACN,CACF,CAAA;QACD,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC,CAAC,CAAA;IAEF,SAAS,gBAAgB,CAAC,GAAoB;QAC5C,MAAM,EAAC,IAAI,EAAE,aAAa,EAAC,GAAG,EAAE,CAAA;QAChC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAA;QACvB,MAAM,SAAS,GAAG,CAAC,KAAK,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,KAAK,CAAC,CAAA;QACzF,IAAI,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS,EAAE;YACnC,MAAM,GAAG,GAAG,IAAI,OAAO,QAAQ,CAAC,oCAAoC,UAAU,4CAA4C,aAAa,GAAG,CAAA;YAC1I,sBAAe,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;SAC5C;IACH,CAAC;AACH,CAAC;AApCD,sCAoCC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts deleted file mode 100644 index 4168c7f96..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type ItemsError = ErrorObject<"items", { - limit: number; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js deleted file mode 100644 index cd5c5c4bc..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const code_1 = require("../code"); -const additionalItems_1 = require("./additionalItems"); -const error = { - message: ({ params: { len } }) => codegen_1.str `must NOT have more than ${len} items`, - params: ({ params: { len } }) => codegen_1._ `{limit: ${len}}`, -}; -const def = { - keyword: "items", - type: "array", - schemaType: ["object", "boolean"], - before: "uniqueItems", - error, - code(cxt) { - const { schema, parentSchema, it } = cxt; - const { prefixItems } = parentSchema; - it.items = true; - if (util_1.alwaysValidSchema(it, schema)) - return; - if (prefixItems) - additionalItems_1.validateAdditionalItems(cxt, prefixItems); - else - cxt.ok(code_1.validateArray(cxt)); - }, -}; -exports.default = def; -//# sourceMappingURL=items2020.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map deleted file mode 100644 index f478fe45f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"items2020.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/items2020.ts"],"names":[],"mappings":";;AAOA,mDAA4C;AAC5C,6CAAoD;AACpD,kCAAqC;AACrC,uDAAyD;AAIzD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,EAAE,CAAC,aAAG,CAAA,2BAA2B,GAAG,QAAQ;IACvE,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,WAAW,GAAG,GAAG;CAChD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,MAAM,EAAE,aAAa;IACrB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,MAAM,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACtC,MAAM,EAAC,WAAW,EAAC,GAAG,YAAY,CAAA;QAClC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAA;QACf,IAAI,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,IAAI,WAAW;YAAE,yCAAuB,CAAC,GAAG,EAAE,WAAW,CAAC,CAAA;;YACrD,GAAG,CAAC,EAAE,CAAC,oBAAa,CAAC,GAAG,CAAC,CAAC,CAAA;IACjC,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.d.ts deleted file mode 100644 index b8c37cab6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CodeKeywordDefinition, ErrorNoParams, AnySchema } from "../../types"; -export declare type NotKeywordError = ErrorNoParams<"not", AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js deleted file mode 100644 index 60ad2b9a7..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util_1 = require("../../compile/util"); -const def = { - keyword: "not", - schemaType: ["object", "boolean"], - trackErrors: true, - code(cxt) { - const { gen, schema, it } = cxt; - if (util_1.alwaysValidSchema(it, schema)) { - cxt.fail(); - return; - } - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "not", - compositeRule: true, - createErrors: false, - allErrors: false, - }, valid); - cxt.result(valid, () => cxt.error(), () => cxt.reset()); - }, - error: { message: "must NOT be valid" }, -}; -exports.default = def; -//# sourceMappingURL=not.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js.map deleted file mode 100644 index ad22e7b4e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"not.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/not.ts"],"names":[],"mappings":";;AAEA,6CAAoD;AAIpD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,WAAW,EAAE,IAAI;IACjB,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC7B,IAAI,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE;YACjC,GAAG,CAAC,IAAI,EAAE,CAAA;YACV,OAAM;SACP;QAED,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,GAAG,CAAC,SAAS,CACX;YACE,OAAO,EAAE,KAAK;YACd,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,KAAK;YACnB,SAAS,EAAE,KAAK;SACjB,EACD,KAAK,CACN,CAAA;QAED,GAAG,CAAC,MAAM,CACR,KAAK,EACL,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,EACjB,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAClB,CAAA;IACH,CAAC;IACD,KAAK,EAAE,EAAC,OAAO,EAAE,mBAAmB,EAAC;CACtC,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts deleted file mode 100644 index 01df87ab4..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type OneOfError = ErrorObject<"oneOf", { - passingSchemas: [number, number] | null; -}, AnySchema[]>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js deleted file mode 100644 index 8fa5b0b18..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: "must match exactly one schema in oneOf", - params: ({ params }) => codegen_1._ `{passingSchemas: ${params.passing}}`, -}; -const def = { - keyword: "oneOf", - schemaType: "array", - trackErrors: true, - error, - code(cxt) { - const { gen, schema, parentSchema, it } = cxt; - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - if (it.opts.discriminator && parentSchema.discriminator) - return; - const schArr = schema; - const valid = gen.let("valid", false); - const passing = gen.let("passing", null); - const schValid = gen.name("_valid"); - cxt.setParams({ passing }); - // TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas - gen.block(validateOneOf); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); - function validateOneOf() { - schArr.forEach((sch, i) => { - let schCxt; - if (util_1.alwaysValidSchema(it, sch)) { - gen.var(schValid, true); - } - else { - schCxt = cxt.subschema({ - keyword: "oneOf", - schemaProp: i, - compositeRule: true, - }, schValid); - } - if (i > 0) { - gen - .if(codegen_1._ `${schValid} && ${valid}`) - .assign(valid, false) - .assign(passing, codegen_1._ `[${passing}, ${i}]`) - .else(); - } - gen.if(schValid, () => { - gen.assign(valid, true); - gen.assign(passing, i); - if (schCxt) - cxt.mergeEvaluated(schCxt, codegen_1.Name); - }); - }); - } - }, -}; -exports.default = def; -//# sourceMappingURL=oneOf.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map deleted file mode 100644 index 43dffd328..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"oneOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/oneOf.ts"],"names":[],"mappings":";;AAOA,mDAA6C;AAC7C,6CAAoD;AASpD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,wCAAwC;IACjD,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,oBAAoB,MAAM,CAAC,OAAO,GAAG;CAC7D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,IAAI;IACjB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC3C,wBAAwB;QACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACvE,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,YAAY,CAAC,aAAa;YAAE,OAAM;QAC/D,MAAM,MAAM,GAAgB,MAAM,CAAA;QAClC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACrC,MAAM,OAAO,GAAG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AAC,CAAC,CAAA;oBACtB,IAAI,MAAM;wBAAE,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,cAAI,CAAC,CAAA;gBAC9C,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js deleted file mode 100644 index 1f2f9fe71..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const code_1 = require("../code"); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const util_2 = require("../../compile/util"); -const def = { - keyword: "patternProperties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, data, parentSchema, it } = cxt; - const { opts } = it; - const patterns = code_1.schemaProperties(it, schema); - // TODO mark properties matching patterns with always valid schemas as evaluated - if (patterns.length === 0) - return; - const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties; - const valid = gen.name("valid"); - if (it.props !== true && !(it.props instanceof codegen_1.Name)) { - it.props = util_2.evaluatedPropsToName(gen, it.props); - } - const { props } = it; - validatePatternProperties(); - function validatePatternProperties() { - for (const pat of patterns) { - if (checkProperties) - checkMatchingProperties(pat); - if (it.allErrors) { - validateProperties(pat); - } - else { - gen.var(valid, true); // TODO var - validateProperties(pat); - gen.if(valid); - } - } - } - function checkMatchingProperties(pat) { - for (const prop in checkProperties) { - if (new RegExp(pat).test(prop)) { - util_1.checkStrictMode(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`); - } - } - } - function validateProperties(pat) { - gen.forIn("key", data, (key) => { - gen.if(codegen_1._ `${code_1.usePattern(gen, pat)}.test(${key})`, () => { - cxt.subschema({ - keyword: "patternProperties", - schemaProp: pat, - dataProp: key, - dataPropType: util_2.Type.Str, - }, valid); - if (it.opts.unevaluated && props !== true) { - gen.assign(codegen_1._ `${props}[${key}]`, true); - } - else if (!it.allErrors) { - // can short-circuit if `unevaluatedProperties` is not supported (opts.next === false) - // or if all properties were evaluated (props === true) - gen.if(codegen_1.not(valid), () => gen.break()); - } - }); - }); - } - }, -}; -exports.default = def; -//# sourceMappingURL=patternProperties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map deleted file mode 100644 index b38f0615e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"patternProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/patternProperties.ts"],"names":[],"mappings":";;AAEA,kCAAoD;AACpD,mDAAkD;AAClD,6CAAkD;AAClD,6CAA6D;AAE7D,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACjD,MAAM,EAAC,IAAI,EAAC,GAAG,EAAE,CAAA;QACjB,MAAM,QAAQ,GAAG,uBAAgB,CAAC,EAAE,EAAE,MAAM,CAAC,CAA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AAK,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;gBAC7B,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,GAAG,iBAAU,CAAC,GAAG,EAAE,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,EAAE;oBACnD,GAAG,CAAC,SAAS,CACX;wBACE,OAAO,EAAE,mBAAmB;wBAC5B,UAAU,EAAE,GAAG;wBACf,QAAQ,EAAE,GAAG;wBACb,YAAY,EAAE,WAAI,CAAC,GAAG;qBACvB,EACD,KAAK,CACN,CAAA;oBACD,IAAI,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,KAAK,KAAK,IAAI,EAAE;wBACzC,GAAG,CAAC,MAAM,CAAC,WAAC,CAAA,GAAG,KAAK,IAAI,GAAG,GAAG,EAAE,IAAI,CAAC,CAAA;qBACtC;yBAAM,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE;wBACxB,sFAAsF;wBACtF,uDAAuD;wBACvD,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;qBACtC;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js deleted file mode 100644 index 4f3b4cbc8..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const items_1 = require("./items"); -const def = { - keyword: "prefixItems", - type: "array", - schemaType: ["array"], - before: "uniqueItems", - code: (cxt) => items_1.validateTuple(cxt, "items"), -}; -exports.default = def; -//# sourceMappingURL=prefixItems.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map deleted file mode 100644 index 19b10cf85..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"prefixItems.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/prefixItems.ts"],"names":[],"mappings":";;AACA,mCAAqC;AAErC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,qBAAa,CAAC,GAAG,EAAE,OAAO,CAAC;CAC3C,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js deleted file mode 100644 index ff9349555..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js +++ /dev/null @@ -1,54 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const validate_1 = require("../../compile/validate"); -const code_1 = require("../code"); -const util_1 = require("../../compile/util"); -const additionalProperties_1 = require("./additionalProperties"); -const def = { - keyword: "properties", - type: "object", - schemaType: "object", - code(cxt) { - const { gen, schema, parentSchema, data, it } = cxt; - if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === undefined) { - additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, "additionalProperties")); - } - const allProps = code_1.allSchemaProperties(schema); - for (const prop of allProps) { - it.definedProperties.add(prop); - } - if (it.opts.unevaluated && allProps.length && it.props !== true) { - it.props = util_1.mergeEvaluated.props(gen, util_1.toHash(allProps), it.props); - } - const properties = allProps.filter((p) => !util_1.alwaysValidSchema(it, schema[p])); - if (properties.length === 0) - return; - const valid = gen.name("valid"); - for (const prop of properties) { - if (hasDefault(prop)) { - applyPropertySchema(prop); - } - else { - gen.if(code_1.propertyInData(gen, data, prop, it.opts.ownProperties)); - applyPropertySchema(prop); - if (!it.allErrors) - gen.else().var(valid, true); - gen.endIf(); - } - cxt.it.definedProperties.add(prop); - cxt.ok(valid); - } - function hasDefault(prop) { - return it.opts.useDefaults && !it.compositeRule && schema[prop].default !== undefined; - } - function applyPropertySchema(prop) { - cxt.subschema({ - keyword: "properties", - schemaProp: prop, - dataProp: prop, - }, valid); - } - }, -}; -exports.default = def; -//# sourceMappingURL=properties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js.map deleted file mode 100644 index b8c7aa2c2..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/properties.ts"],"names":[],"mappings":";;AACA,qDAAiD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AAC,IAAI,CAAC,EAAE;gBACpB,mBAAmB,CAAC,IAAI,CAAC,CAAA;aAC1B;iBAAM;gBACL,GAAG,CAAC,EAAE,CAAC,qBAAc,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;gBAC9D,mBAAmB,CAAC,IAAI,CAAC,CAAA;gBACzB,IAAI,CAAC,EAAE,CAAC,SAAS;oBAAE,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;gBAC9C,GAAG,CAAC,KAAK,EAAE,CAAA;aACZ;YACD,GAAG,CAAC,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;YAClC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;SACd;QAED,SAAS,UAAU,CAAC,IAAY;YAC9B,OAAO,EAAE,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,SAAS,CAAA;QACvF,CAAC;QAED,SAAS,mBAAmB,CAAC,IAAY;YACvC,GAAG,CAAC,SAAS,CACX;gBACE,OAAO,EAAE,YAAY;gBACrB,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,IAAI;aACf,EACD,KAAK,CACN,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts deleted file mode 100644 index 90f7ad5b2..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type PropertyNamesError = ErrorObject<"propertyNames", { - propertyName: string; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js deleted file mode 100644 index b898253ae..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: "property name must be valid", - params: ({ params }) => codegen_1._ `{propertyName: ${params.propertyName}}`, -}; -const def = { - keyword: "propertyNames", - type: "object", - schemaType: ["object", "boolean"], - error, - code(cxt) { - const { gen, schema, data, it } = cxt; - if (util_1.alwaysValidSchema(it, schema)) - return; - const valid = gen.name("valid"); - gen.forIn("key", data, (key) => { - cxt.setParams({ propertyName: key }); - cxt.subschema({ - keyword: "propertyNames", - data: key, - dataTypes: ["string"], - propertyName: key, - compositeRule: true, - }, valid); - gen.if(codegen_1.not(valid), () => { - cxt.error(true); - if (!it.allErrors) - gen.break(); - }); - }); - cxt.ok(valid); - }, -}; -exports.default = def; -//# sourceMappingURL=propertyNames.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map deleted file mode 100644 index 8efeab652..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"propertyNames.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/propertyNames.ts"],"names":[],"mappings":";;AAOA,mDAA4C;AAC5C,6CAAoD;AAIpD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,kBAAkB,MAAM,CAAC,YAAY,GAAG;CAChE,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAE/B,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7B,GAAG,CAAC,SAAS,CAAC,EAAC,YAAY,EAAE,GAAG,EAAC,CAAC,CAAA;YAClC,GAAG,CAAC,SAAS,CACX;gBACE,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,GAAG;gBACT,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,YAAY,EAAE,GAAG;gBACjB,aAAa,EAAE,IAAI;aACpB,EACD,KAAK,CACN,CAAA;YACD,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE;gBACtB,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBACf,IAAI,CAAC,EAAE,CAAC,SAAS;oBAAE,GAAG,CAAC,KAAK,EAAE,CAAA;YAChC,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js deleted file mode 100644 index 8386c7fc2..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util_1 = require("../../compile/util"); -const def = { - keyword: ["then", "else"], - schemaType: ["object", "boolean"], - code({ keyword, parentSchema, it }) { - if (parentSchema.if === undefined) - util_1.checkStrictMode(it, `"${keyword}" without "if" is ignored`); - }, -}; -exports.default = def; -//# sourceMappingURL=thenElse.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map deleted file mode 100644 index 2bc608a95..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"thenElse.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/thenElse.ts"],"names":[],"mappings":";;AAEA,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;IACjC,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAa;QAC1C,IAAI,YAAY,CAAC,EAAE,KAAK,SAAS;YAAE,sBAAe,CAAC,EAAE,EAAE,IAAI,OAAO,2BAA2B,CAAC,CAAA;IAChG,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/code.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/code.d.ts deleted file mode 100644 index f0f287ca5..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/code.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { SchemaMap } from "../types"; -import type { SchemaCxt } from "../compile"; -import type { KeywordCxt } from "../compile/validate"; -import { CodeGen, Code, Name } from "../compile/codegen"; -export declare function checkReportMissingProp(cxt: KeywordCxt, prop: string): void; -export declare function checkMissingProp({ gen, data, it: { opts } }: KeywordCxt, properties: string[], missing: Name): Code; -export declare function reportMissingProp(cxt: KeywordCxt, missing: Name): void; -export declare function hasPropFunc(gen: CodeGen): Name; -export declare function isOwnProperty(gen: CodeGen, data: Name, property: Name | string): Code; -export declare function propertyInData(gen: CodeGen, data: Name, property: Name | string, ownProperties?: boolean): Code; -export declare function noPropertyInData(gen: CodeGen, data: Name, property: Name | string, ownProperties?: boolean): Code; -export declare function allSchemaProperties(schemaMap?: SchemaMap): string[]; -export declare function schemaProperties(it: SchemaCxt, schemaMap: SchemaMap): string[]; -export declare function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }: KeywordCxt, func: Code, context: Code, passSchema?: boolean): Code; -export declare function usePattern(gen: CodeGen, pattern: string): Name; -export declare function validateArray(cxt: KeywordCxt): Name; -export declare function validateUnion(cxt: KeywordCxt): void; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/code.js b/node_modules/table/node_modules/ajv/dist/vocabularies/code.js deleted file mode 100644 index 848a72c88..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/code.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0; -const codegen_1 = require("../compile/codegen"); -const util_1 = require("../compile/util"); -const names_1 = require("../compile/names"); -function checkReportMissingProp(cxt, prop) { - const { gen, data, it } = cxt; - gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => { - cxt.setParams({ missingProperty: codegen_1._ `${prop}` }, true); - cxt.error(); - }); -} -exports.checkReportMissingProp = checkReportMissingProp; -function checkMissingProp({ gen, data, it: { opts } }, properties, missing) { - return codegen_1.or(...properties.map((prop) => codegen_1.and(noPropertyInData(gen, data, prop, opts.ownProperties), codegen_1._ `${missing} = ${prop}`))); -} -exports.checkMissingProp = checkMissingProp; -function reportMissingProp(cxt, missing) { - cxt.setParams({ missingProperty: missing }, true); - cxt.error(); -} -exports.reportMissingProp = reportMissingProp; -function hasPropFunc(gen) { - return gen.scopeValue("func", { - // eslint-disable-next-line @typescript-eslint/unbound-method - ref: Object.prototype.hasOwnProperty, - code: codegen_1._ `Object.prototype.hasOwnProperty`, - }); -} -exports.hasPropFunc = hasPropFunc; -function isOwnProperty(gen, data, property) { - return codegen_1._ `${hasPropFunc(gen)}.call(${data}, ${property})`; -} -exports.isOwnProperty = isOwnProperty; -function propertyInData(gen, data, property, ownProperties) { - const cond = codegen_1._ `${data}${codegen_1.getProperty(property)} !== undefined`; - return ownProperties ? codegen_1._ `${cond} && ${isOwnProperty(gen, data, property)}` : cond; -} -exports.propertyInData = propertyInData; -function noPropertyInData(gen, data, property, ownProperties) { - const cond = codegen_1._ `${data}${codegen_1.getProperty(property)} === undefined`; - return ownProperties ? codegen_1.or(cond, codegen_1.not(isOwnProperty(gen, data, property))) : cond; -} -exports.noPropertyInData = noPropertyInData; -function allSchemaProperties(schemaMap) { - return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : []; -} -exports.allSchemaProperties = allSchemaProperties; -function schemaProperties(it, schemaMap) { - return allSchemaProperties(schemaMap).filter((p) => !util_1.alwaysValidSchema(it, schemaMap[p])); -} -exports.schemaProperties = schemaProperties; -function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) { - const dataAndSchema = passSchema ? codegen_1._ `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data; - const valCxt = [ - [names_1.default.instancePath, codegen_1.strConcat(names_1.default.instancePath, errorPath)], - [names_1.default.parentData, it.parentData], - [names_1.default.parentDataProperty, it.parentDataProperty], - [names_1.default.rootData, names_1.default.rootData], - ]; - if (it.opts.dynamicRef) - valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]); - const args = codegen_1._ `${dataAndSchema}, ${gen.object(...valCxt)}`; - return context !== codegen_1.nil ? codegen_1._ `${func}.call(${context}, ${args})` : codegen_1._ `${func}(${args})`; -} -exports.callValidateCode = callValidateCode; -function usePattern(gen, pattern) { - return gen.scopeValue("pattern", { - key: pattern, - ref: new RegExp(pattern, "u"), - code: codegen_1._ `new RegExp(${pattern}, "u")`, - }); -} -exports.usePattern = usePattern; -function validateArray(cxt) { - const { gen, data, keyword, it } = cxt; - const valid = gen.name("valid"); - if (it.allErrors) { - const validArr = gen.let("valid", true); - validateItems(() => gen.assign(validArr, false)); - return validArr; - } - gen.var(valid, true); - validateItems(() => gen.break()); - return valid; - function validateItems(notValid) { - const len = gen.const("len", codegen_1._ `${data}.length`); - gen.forRange("i", 0, len, (i) => { - cxt.subschema({ - keyword, - dataProp: i, - dataPropType: util_1.Type.Num, - }, valid); - gen.if(codegen_1.not(valid), notValid); - }); - } -} -exports.validateArray = validateArray; -function validateUnion(cxt) { - const { gen, schema, keyword, it } = cxt; - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const alwaysValid = schema.some((sch) => util_1.alwaysValidSchema(it, sch)); - if (alwaysValid && !it.opts.unevaluated) - return; - const valid = gen.let("valid", false); - const schValid = gen.name("_valid"); - gen.block(() => schema.forEach((_sch, i) => { - const schCxt = cxt.subschema({ - keyword, - schemaProp: i, - compositeRule: true, - }, schValid); - gen.assign(valid, codegen_1._ `${valid} || ${schValid}`); - const merged = cxt.mergeValidEvaluated(schCxt, schValid); - // can short-circuit if `unevaluatedProperties/Items` not supported (opts.unevaluated !== true) - // or if all properties and items were evaluated (it.props === true && it.items === true) - if (!merged) - gen.if(codegen_1.not(valid)); - })); - cxt.result(valid, () => cxt.reset(), () => cxt.error(true)); -} -exports.validateUnion = validateUnion; -//# sourceMappingURL=code.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/code.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/code.js.map deleted file mode 100644 index 1d8c61499..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/code.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"code.js","sourceRoot":"","sources":["../../lib/vocabularies/code.ts"],"names":[],"mappings":";;;AAGA,gDAAoG;AACpG,0CAAuD;AACvD,4CAAgC;AAEhC,SAAgB,sBAAsB,CAAC,GAAe,EAAE,IAAY;IAClE,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;IAC3B,GAAG,CAAC,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE;QACpE,GAAG,CAAC,SAAS,CAAC,EAAC,eAAe,EAAE,WAAC,CAAA,GAAG,IAAI,EAAE,EAAC,EAAE,IAAI,CAAC,CAAA;QAClD,GAAG,CAAC,KAAK,EAAE,CAAA;IACb,CAAC,CAAC,CAAA;AACJ,CAAC;AAND,wDAMC;AAED,SAAgB,gBAAgB,CAC9B,EAAC,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,EAAC,IAAI,EAAC,EAAa,EACnC,UAAoB,EACpB,OAAa;IAEb,OAAO,YAAE,CACP,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CACzB,aAAG,CAAC,gBAAgB,CAAC,G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AEnC,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CACb,MAAM,CAAC,OAAO,CAAC,CAAC,IAAe,EAAE,CAAS,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAC1B;YACE,OAAO;YACP,UAAU,EAAE,CAAC;YACb,aAAa,EAAE,IAAI;SACpB,EACD,QAAQ,CACT,CAAA;QACD,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,WAAC,CAAA,GAAG,KAAK,OAAO,QAAQ,EAAE,CAAC,CAAA;QAC7C,MAAM,MAAM,GAAG,GAAG,CAAC,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QACxD,+FAA+F;QAC/F,yFAAyF;QACzF,IAAI,CAAC,MAAM;YAAE,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,CAAC,CAAA;IACjC,CAAC,CAAC,CACH,CAAA;IAED,GAAG,CAAC,MAAM,CACR,KAAK,EACL,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,EACjB,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CACtB,CAAA;AACH,CAAC;AAjCD,sCAiCC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js b/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js deleted file mode 100644 index 313598aab..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const def = { - keyword: "id", - code() { - throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID'); - }, -}; -exports.default = def; -//# sourceMappingURL=id.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js.map deleted file mode 100644 index 4eb27eb33..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/id.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"id.js","sourceRoot":"","sources":["../../../lib/vocabularies/core/id.ts"],"names":[],"mappings":";;AAEA,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,IAAI;IACb,IAAI;QACF,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;IACzE,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.d.ts deleted file mode 100644 index f2e34ee36..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../../types"; -declare const core: Vocabulary; -export default core; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js deleted file mode 100644 index 87656d743..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const id_1 = require("./id"); -const ref_1 = require("./ref"); -const core = [ - "$schema", - "$id", - "$defs", - "$vocabulary", - { keyword: "$comment" }, - "definitions", - id_1.default, - ref_1.default, -]; -exports.default = core; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js.map deleted file mode 100644 index 5bf65f941..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/core/index.ts"],"names":[],"mappings":";;AACA,6BAA4B;AAC5B,+BAA8B;AAE9B,MAAM,IAAI,GAAe;IACvB,SAAS;IACT,KAAK;IACL,OAAO;IACP,aAAa;IACb,EAAC,OAAO,EAAE,UAAU,EAAC;IACrB,aAAa;IACb,YAAS;IACT,aAAU;CACX,CAAA;AAED,kBAAe,IAAI,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.d.ts deleted file mode 100644 index 6a0967d15..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -import { Code } from "../../compile/codegen"; -import { SchemaEnv } from "../../compile"; -declare const def: CodeKeywordDefinition; -export declare function getValidate(cxt: KeywordCxt, sch: SchemaEnv): Code; -export declare function callRef(cxt: KeywordCxt, v: Code, sch?: SchemaEnv, $async?: boolean): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js b/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js deleted file mode 100644 index 9b2c87f35..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.callRef = exports.getValidate = void 0; -const ref_error_1 = require("../../compile/ref_error"); -const code_1 = require("../code"); -const codegen_1 = require("../../compile/codegen"); -const names_1 = require("../../compile/names"); -const compile_1 = require("../../compile"); -const util_1 = require("../../compile/util"); -const def = { - keyword: "$ref", - schemaType: "string", - code(cxt) { - const { gen, schema: $ref, it } = cxt; - const { baseId, schemaEnv: env, validateName, opts, self } = it; - const { root } = env; - if (($ref === "#" || $ref === "#/") && baseId === root.baseId) - return callRootRef(); - const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref); - if (schOrEnv === undefined) - throw new ref_error_1.default(baseId, $ref); - if (schOrEnv instanceof compile_1.SchemaEnv) - return callValidate(schOrEnv); - return inlineRefSchema(schOrEnv); - function callRootRef() { - if (env === root) - return callRef(cxt, validateName, env, env.$async); - const rootName = gen.scopeValue("root", { ref: root }); - return callRef(cxt, codegen_1._ `${rootName}.validate`, root, root.$async); - } - function callValidate(sch) { - const v = getValidate(cxt, sch); - callRef(cxt, v, sch, sch.$async); - } - function inlineRefSchema(sch) { - const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: codegen_1.stringify(sch) } : { ref: sch }); - const valid = gen.name("valid"); - const schCxt = cxt.subschema({ - schema: sch, - dataTypes: [], - schemaPath: codegen_1.nil, - topSchemaRef: schName, - errSchemaPath: $ref, - }, valid); - cxt.mergeEvaluated(schCxt); - cxt.ok(valid); - } - }, -}; -function getValidate(cxt, sch) { - const { gen } = cxt; - return sch.validate - ? gen.scopeValue("validate", { ref: sch.validate }) - : codegen_1._ `${gen.scopeValue("wrapper", { ref: sch })}.validate`; -} -exports.getValidate = getValidate; -function callRef(cxt, v, sch, $async) { - const { gen, it } = cxt; - const { allErrors, schemaEnv: env, opts } = it; - const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil; - if ($async) - callAsyncRef(); - else - callSyncRef(); - function callAsyncRef() { - if (!env.$async) - throw new Error("async schema referenced by sync schema"); - const valid = gen.let("valid"); - gen.try(() => { - gen.code(codegen_1._ `await ${code_1.callValidateCode(cxt, v, passCxt)}`); - addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result - if (!allErrors) - gen.assign(valid, true); - }, (e) => { - gen.if(codegen_1._ `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e)); - addErrorsFrom(e); - if (!allErrors) - gen.assign(valid, false); - }); - cxt.ok(valid); - } - function callSyncRef() { - cxt.result(code_1.callValidateCode(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v)); - } - function addErrorsFrom(source) { - const errs = codegen_1._ `${source}.errors`; - gen.assign(names_1.default.vErrors, codegen_1._ `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged - gen.assign(names_1.default.errors, codegen_1._ `${names_1.default.vErrors}.length`); - } - function addEvaluatedFrom(source) { - var _a; - if (!it.opts.unevaluated) - return; - const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated; - // TODO refactor - if (it.props !== true) { - if (schEvaluated && !schEvaluated.dynamicProps) { - if (schEvaluated.props !== undefined) { - it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props); - } - } - else { - const props = gen.var("props", codegen_1._ `${source}.evaluated.props`); - it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name); - } - } - if (it.items !== true) { - if (schEvaluated && !schEvaluated.dynamicItems) { - if (schEvaluated.items !== undefined) { - it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items); - } - } - else { - const items = gen.var("items", codegen_1._ `${source}.evaluated.items`); - it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name); - } - } - } -} -exports.callRef = callRef; -exports.default = def; -//# sourceMappingURL=ref.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js.map deleted file mode 100644 index d1026bec5..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/core/ref.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../../lib/vocabularies/core/ref.ts"],"names":[],"mappings":";;;AAEA,uDAAqD;AACrD,kCAAwC;AACxC,mDAAmE;AACnE,+CAAmC;AACnC,2CAAm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AAK,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,cAAI,CAAC,CAAA;aAC5D;SACF;QACD,IAAI,EAAE,CAAC,KAAK,KAAK,IAAI,EAAE;YACrB,IAAI,YAAY,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;gBAC9C,IAAI,YAAY,CAAC,KAAK,KAAK,SAAS,EAAE;oBACpC,EAAE,CAAC,KAAK,GAAG,qBAAc,CAAC,KAAK,CAAC,GAAG,EAAE,YAAY,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAA;iBACnE;aACF;iBAAM;gBACL,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,WAAC,CAAA,GAAG,MAAM,kBAAkB,CAAC,CAAA;gBAC5D,EAAE,CAAC,KAAK,GAAG,qBAAc,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,cAAI,CAAC,CAAA;aAC5D;SACF;IACH,CAAC;AACH,CAAC;AAhED,0BAgEC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts deleted file mode 100644 index 656b2da52..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -import { DiscrError, DiscrErrorObj } from "../discriminator/types"; -export declare type DiscriminatorError = DiscrErrorObj | DiscrErrorObj; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js deleted file mode 100644 index b11ea81e6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const types_1 = require("../discriminator/types"); -const error = { - message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag - ? `tag "${tagName}" must be string` - : `value of tag "${tagName}" must be in oneOf`, - params: ({ params: { discrError, tag, tagName } }) => codegen_1._ `{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, -}; -const def = { - keyword: "discriminator", - type: "object", - schemaType: "object", - error, - code(cxt) { - const { gen, data, schema, parentSchema, it } = cxt; - const { oneOf } = parentSchema; - if (!it.opts.discriminator) { - throw new Error("discriminator: requires discriminator option"); - } - const tagName = schema.propertyName; - if (typeof tagName != "string") - throw new Error("discriminator: requires propertyName"); - if (schema.mapping) - throw new Error("discriminator: mapping is not supported"); - if (!oneOf) - throw new Error("discriminator: requires oneOf keyword"); - const valid = gen.let("valid", false); - const tag = gen.const("tag", codegen_1._ `${data}${codegen_1.getProperty(tagName)}`); - gen.if(codegen_1._ `typeof ${tag} == "string"`, () => validateMapping(), () => cxt.error(false, { discrError: types_1.DiscrError.Tag, tag, tagName })); - cxt.ok(valid); - function validateMapping() { - const mapping = getMapping(); - gen.if(false); - for (const tagValue in mapping) { - gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); - gen.assign(valid, applyTagSchema(mapping[tagValue])); - } - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag, tagName }); - gen.endIf(); - } - function applyTagSchema(schemaProp) { - const _valid = gen.name("valid"); - const schCxt = cxt.subschema({ keyword: "oneOf", schemaProp }, _valid); - cxt.mergeEvaluated(schCxt, codegen_1.Name); - return _valid; - } - function getMapping() { - var _a; - const oneOfMapping = {}; - const topRequired = hasRequired(parentSchema); - let tagRequired = true; - for (let i = 0; i < oneOf.length; i++) { - const sch = oneOf[i]; - const propSch = (_a = sch.properties) === null || _a === void 0 ? void 0 : _a[tagName]; - if (typeof propSch != "object") { - throw new Error(`discriminator: oneOf schemas must have "properties/${tagName}"`); - } - tagRequired = tagRequired && (topRequired || hasRequired(sch)); - addMappings(propSch, i); - } - if (!tagRequired) - throw new Error(`discriminator: "${tagName}" must be required`); - return oneOfMapping; - function hasRequired({ required }) { - return Array.isArray(required) && required.includes(tagName); - } - function addMappings(sch, i) { - if (sch.const) { - addMapping(sch.const, i); - } - else if (sch.enum) { - for (const tagValue of sch.enum) { - addMapping(tagValue, i); - } - } - else { - throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`); - } - } - function addMapping(tagValue, i) { - if (typeof tagValue != "string" || tagValue in oneOfMapping) { - throw new Error(`discriminator: "${tagName}" values must be unique strings`); - } - oneOfMapping[tagValue] = i; - } - } - }, -}; -exports.default = def; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js.map deleted file mode 100644 index a859c236c..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/discriminator/index.ts"],"names":[],"mappings":";;AAEA,mDAA0D;AAC1D,kDAAgE;AAIhE,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,UAAU,EAAE,OAAO,EAAC,EAAC,EAAE,EAAE,CAC3C,UAAU,KAAK,kBAAU,CAAC,GAAG;QAC3B,CAAC,CAAC,QAAQ,OAAO,kBAAkB;QACnC,CAAC,CAAC,iBAAiB,OAAO,oBAAoB;IAClD,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,UAAU,EAAE,GAAG,EAAE,OAAO,EAAC,EAAC,EAAE,EAAE,CAC/C,WAAC,CAAA,WAAW,UAAU,UAAU,OAAO,eAAe,GAAG,GAAG;CAC/D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,eAAe;IACxB,IAA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AClF;gBACD,WAAW,GAAG,WAAW,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;gBAC9D,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;aACxB;YACD,IAAI,CAAC,WAAW;gBAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,oBAAoB,CAAC,CAAA;YACjF,OAAO,YAAY,CAAA;YAEnB,SAAS,WAAW,CAAC,EAAC,QAAQ,EAAkB;gBAC9C,OAAO,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAC9D,CAAC;YAED,SAAS,WAAW,CAAC,GAAoB,EAAE,CAAS;gBAClD,IAAI,GAAG,CAAC,KAAK,EAAE;oBACb,UAAU,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;iBACzB;qBAAM,IAAI,GAAG,CAAC,IAAI,EAAE;oBACnB,KAAK,MAAM,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE;wBAC/B,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;qBACxB;iBACF;qBAAM;oBACL,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,+BAA+B,CAAC,CAAA;iBACtF;YACH,CAAC;YAED,SAAS,UAAU,CAAC,QAAiB,EAAE,CAAS;gBAC9C,IAAI,OAAO,QAAQ,IAAI,QAAQ,IAAI,QAAQ,IAAI,YAAY,EAAE;oBAC3D,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,iCAAiC,CAAC,CAAA;iBAC7E;gBACD,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;YAC5B,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts deleted file mode 100644 index 6cf5ea51f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ErrorObject } from "../../types"; -export declare enum DiscrError { - Tag = "tag", - Mapping = "mapping" -} -export declare type DiscrErrorObj = ErrorObject<"discriminator", { - error: E; - tag: string; - tagValue: unknown; -}, string>; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js b/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js deleted file mode 100644 index d538f0cee..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DiscrError = void 0; -var DiscrError; -(function (DiscrError) { - DiscrError["Tag"] = "tag"; - DiscrError["Mapping"] = "mapping"; -})(DiscrError = exports.DiscrError || (exports.DiscrError = {})); -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js.map deleted file mode 100644 index 4908a4e9d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../lib/vocabularies/discriminator/types.ts"],"names":[],"mappings":";;;AAEA,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,yBAAW,CAAA;IACX,iCAAmB,CAAA;AACrB,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.d.ts deleted file mode 100644 index d65752c63..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../types"; -declare const draft2020Vocabularies: Vocabulary[]; -export default draft2020Vocabularies; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js b/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js deleted file mode 100644 index f94e27faf..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const core_1 = require("./core"); -const validation_1 = require("./validation"); -const applicator_1 = require("./applicator"); -const dynamic_1 = require("./dynamic"); -const next_1 = require("./next"); -const unevaluated_1 = require("./unevaluated"); -const format_1 = require("./format"); -const metadata_1 = require("./metadata"); -const draft2020Vocabularies = [ - dynamic_1.default, - core_1.default, - validation_1.default, - applicator_1.default(true), - format_1.default, - metadata_1.metadataVocabulary, - metadata_1.contentVocabulary, - next_1.default, - unevaluated_1.default, -]; -exports.default = draft2020Vocabularies; -//# sourceMappingURL=draft2020.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js.map deleted file mode 100644 index 920b73e4f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/draft2020.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"draft2020.js","sourceRoot":"","sources":["../../lib/vocabularies/draft2020.ts"],"names":[],"mappings":";;AACA,iCAAmC;AACnC,6CAA+C;AAC/C,6CAAkD;AAClD,uCAAyC;AACzC,iCAAmC;AACnC,+CAAiD;AACjD,qCAAuC;AACvC,yCAAgE;AAEhE,MAAM,qBAAqB,GAAiB;IAC1C,iBAAiB;IACjB,cAAc;IACd,oBAAoB;IACpB,oBAAuB,CAAC,IAAI,CAAC;IAC7B,gBAAgB;IAChB,6BAAkB;IAClB,4BAAiB;IACjB,cAAc;IACd,qBAAqB;CACtB,CAAA;AAED,kBAAe,qBAAqB,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.d.ts deleted file mode 100644 index 469fb8444..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../types"; -declare const draft7Vocabularies: Vocabulary[]; -export default draft7Vocabularies; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js b/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js deleted file mode 100644 index 255521742..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const core_1 = require("./core"); -const validation_1 = require("./validation"); -const applicator_1 = require("./applicator"); -const format_1 = require("./format"); -const metadata_1 = require("./metadata"); -const draft7Vocabularies = [ - core_1.default, - validation_1.default, - applicator_1.default(), - format_1.default, - metadata_1.metadataVocabulary, - metadata_1.contentVocabulary, -]; -exports.default = draft7Vocabularies; -//# sourceMappingURL=draft7.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js.map deleted file mode 100644 index 7abe8d2c7..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/draft7.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"draft7.js","sourceRoot":"","sources":["../../lib/vocabularies/draft7.ts"],"names":[],"mappings":";;AACA,iCAAmC;AACnC,6CAA+C;AAC/C,6CAAkD;AAClD,qCAAuC;AACvC,yCAAgE;AAEhE,MAAM,kBAAkB,GAAiB;IACvC,cAAc;IACd,oBAAoB;IACpB,oBAAuB,EAAE;IACzB,gBAAgB;IAChB,6BAAkB;IAClB,4BAAiB;CAClB,CAAA;AAED,kBAAe,kBAAkB,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts deleted file mode 100644 index 562121399..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -declare const def: CodeKeywordDefinition; -export declare function dynamicAnchor(cxt: KeywordCxt, anchor: string): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js deleted file mode 100644 index 8beea65ce..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.dynamicAnchor = void 0; -const codegen_1 = require("../../compile/codegen"); -const names_1 = require("../../compile/names"); -const compile_1 = require("../../compile"); -const ref_1 = require("../core/ref"); -const def = { - keyword: "$dynamicAnchor", - schemaType: "string", - code: (cxt) => dynamicAnchor(cxt, cxt.schema), -}; -function dynamicAnchor(cxt, anchor) { - const { gen, it } = cxt; - it.schemaEnv.root.dynamicAnchors[anchor] = true; - const v = codegen_1._ `${names_1.default.dynamicAnchors}${codegen_1.getProperty(anchor)}`; - const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt); - gen.if(codegen_1._ `!${v}`, () => gen.assign(v, validate)); -} -exports.dynamicAnchor = dynamicAnchor; -function _getValidate(cxt) { - const { schemaEnv, schema, self } = cxt.it; - const { root, baseId, localRefs, meta } = schemaEnv.root; - const sch = new compile_1.SchemaEnv({ schema, root, baseId, localRefs, meta }); - compile_1.compileSchema.call(self, sch); - return ref_1.getValidate(cxt, sch); -} -exports.default = def; -//# sourceMappingURL=dynamicAnchor.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map deleted file mode 100644 index 27190e8b6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dynamicAnchor.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/dynamicAnchor.ts"],"names":[],"mappings":";;;AAEA,mDAA0D;AAC1D,+CAAmC;AACnC,2CAAsD;AACtD,qCAAuC;AAEvC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,gBAAgB;IACzB,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;CAC9C,CAAA;AAED,SAAgB,aAAa,CAAC,GAAe,EAAE,MAAc;IAC3D,MAAM,EAAC,GAAG,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;IACrB,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAA;IAC/C,MAAM,CAAC,GAAG,WAAC,CAAA,GAAG,eAAC,CAAC,cAAc,GAAG,qBAAW,CAAC,MAAM,CAAC,EAAE,CAAA;IACtD,MAAM,QAAQ,GAAG,EAAE,CAAC,aAAa,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAC/E,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAA;AACjD,CAAC;AAND,sCAMC;AAED,SAAS,YAAY,CAAC,GAAe;IACnC,MAAM,EAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAC,GAAG,GAAG,CAAC,EAAE,CAAA;IACxC,MAAM,EAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,GAAG,SAAS,CAAC,IAAI,CAAA;IACtD,MAAM,GAAG,GAAG,IAAI,mBAAS,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;IAClE,uBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;IAC7B,OAAO,iBAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAC9B,CAAC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts deleted file mode 100644 index fa2f2b81d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -declare const def: CodeKeywordDefinition; -export declare function dynamicRef(cxt: KeywordCxt, ref: string): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js deleted file mode 100644 index 6e67b1cc9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.dynamicRef = void 0; -const codegen_1 = require("../../compile/codegen"); -const names_1 = require("../../compile/names"); -const ref_1 = require("../core/ref"); -const def = { - keyword: "$dynamicRef", - schemaType: "string", - code: (cxt) => dynamicRef(cxt, cxt.schema), -}; -function dynamicRef(cxt, ref) { - const { gen, keyword, it } = cxt; - if (ref[0] !== "#") - throw new Error(`"${keyword}" only supports hash fragment reference`); - const anchor = ref.slice(1); - if (it.allErrors) { - _dynamicRef(); - } - else { - const valid = gen.let("valid", false); - _dynamicRef(valid); - cxt.ok(valid); - } - function _dynamicRef(valid) { - // TODO the assumption here is that `recursiveRef: #` always points to the root - // of the schema object, which is not correct, because there may be $id that - // makes # point to it, and the target schema may not contain dynamic/recursiveAnchor. - // Because of that 2 tests in recursiveRef.json fail. - // This is a similar problem to #815 (`$id` doesn't alter resolution scope for `{ "$ref": "#" }`). - // (This problem is not tested in JSON-Schema-Test-Suite) - if (it.schemaEnv.root.dynamicAnchors[anchor]) { - const v = gen.let("_v", codegen_1._ `${names_1.default.dynamicAnchors}${codegen_1.getProperty(anchor)}`); - gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid)); - } - else { - _callRef(it.validateName, valid)(); - } - } - function _callRef(validate, valid) { - return valid - ? () => gen.block(() => { - ref_1.callRef(cxt, validate); - gen.let(valid, true); - }) - : () => ref_1.callRef(cxt, validate); - } -} -exports.dynamicRef = dynamicRef; -exports.default = def; -//# sourceMappingURL=dynamicRef.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map deleted file mode 100644 index 25ad7a6af..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dynamicRef.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/dynamicRef.ts"],"names":[],"mappings":";;;AAEA,mDAAgE;AAChE,+CAAmC;AACnC,qCAAmC;AAEnC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;CAC3C,CAAA;AAED,SAAgB,UAAU,CAAC,GA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,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;gBACtB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;YACtB,CAAC,CAAC;YACN,CAAC,CAAC,GAAG,EAAE,CAAC,aAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;IAClC,CAAC;AACH,CAAC;AApCD,gCAoCC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts deleted file mode 100644 index 0c751d93f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../../types"; -declare const dynamic: Vocabulary; -export default dynamic; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js deleted file mode 100644 index f2388a757..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dynamicAnchor_1 = require("./dynamicAnchor"); -const dynamicRef_1 = require("./dynamicRef"); -const recursiveAnchor_1 = require("./recursiveAnchor"); -const recursiveRef_1 = require("./recursiveRef"); -const dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default]; -exports.default = dynamic; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js.map deleted file mode 100644 index f96ba76dd..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/index.ts"],"names":[],"mappings":";;AACA,mDAA2C;AAC3C,6CAAqC;AACrC,uDAA+C;AAC/C,iDAAyC;AAEzC,MAAM,OAAO,GAAe,CAAC,uBAAa,EAAE,oBAAU,EAAE,yBAAe,EAAE,sBAAY,CAAC,CAAA;AAEtF,kBAAe,OAAO,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js deleted file mode 100644 index 91970ea9c..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dynamicAnchor_1 = require("./dynamicAnchor"); -const util_1 = require("../../compile/util"); -const def = { - keyword: "$recursiveAnchor", - schemaType: "boolean", - code(cxt) { - if (cxt.schema) - dynamicAnchor_1.dynamicAnchor(cxt, ""); - else - util_1.checkStrictMode(cxt.it, "$recursiveAnchor: false is ignored"); - }, -}; -exports.default = def; -//# sourceMappingURL=recursiveAnchor.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map deleted file mode 100644 index cdc038c93..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"recursiveAnchor.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/recursiveAnchor.ts"],"names":[],"mappings":";;AACA,mDAA6C;AAC7C,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,kBAAkB;IAC3B,UAAU,EAAE,SAAS;IACrB,IAAI,CAAC,GAAG;QACN,IAAI,GAAG,CAAC,MAAM;YAAE,6BAAa,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;;YACjC,sBAAe,CAAC,GAAG,CAAC,EAAE,EAAE,oCAAoC,CAAC,CAAA;IACpE,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js deleted file mode 100644 index f421c4cbe..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dynamicRef_1 = require("./dynamicRef"); -const def = { - keyword: "$recursiveRef", - schemaType: "string", - code: (cxt) => dynamicRef_1.dynamicRef(cxt, cxt.schema), -}; -exports.default = def; -//# sourceMappingURL=recursiveRef.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map deleted file mode 100644 index da36878d4..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"recursiveRef.js","sourceRoot":"","sources":["../../../lib/vocabularies/dynamic/recursiveRef.ts"],"names":[],"mappings":";;AACA,6CAAuC;AAEvC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,eAAe;IACxB,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAU,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC;CAC3C,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/errors.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/errors.d.ts deleted file mode 100644 index 221aae0e3..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/errors.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { TypeError } from "../compile/validate/dataType"; -import type { ApplicatorKeywordError } from "./applicator"; -import type { ValidationKeywordError } from "./validation"; -import type { FormatError } from "./format/format"; -import type { UnevaluatedPropertiesError } from "./unevaluated/unevaluatedProperties"; -import type { UnevaluatedItemsError } from "./unevaluated/unevaluatedItems"; -import type { DependentRequiredError } from "./validation/dependentRequired"; -import type { DiscriminatorError } from "./discriminator"; -export declare type DefinedError = TypeError | ApplicatorKeywordError | ValidationKeywordError | FormatError | UnevaluatedPropertiesError | UnevaluatedItemsError | DependentRequiredError | DiscriminatorError; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/errors.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/errors.js.map deleted file mode 100644 index 56bad7362..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/errors.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../lib/vocabularies/errors.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.d.ts deleted file mode 100644 index 855d0a2a1..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type FormatError = ErrorObject<"format", { - format: string; -}, string | { - $data: string; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js b/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js deleted file mode 100644 index 653fe29a9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js +++ /dev/null @@ -1,92 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const error = { - message: ({ schemaCode }) => codegen_1.str `must match format "${schemaCode}"`, - params: ({ schemaCode }) => codegen_1._ `{format: ${schemaCode}}`, -}; -const def = { - keyword: "format", - type: ["number", "string"], - schemaType: "string", - $data: true, - error, - code(cxt, ruleType) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - const { opts, errSchemaPath, schemaEnv, self } = it; - if (!opts.validateFormats) - return; - if ($data) - validate$DataFormat(); - else - validateFormat(); - function validate$DataFormat() { - const fmts = gen.scopeValue("formats", { - ref: self.formats, - code: opts.code.formats, - }); - const fDef = gen.const("fDef", codegen_1._ `${fmts}[${schemaCode}]`); - const fType = gen.let("fType"); - const format = gen.let("format"); - // TODO simplify - gen.if(codegen_1._ `typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, codegen_1._ `${fDef}.type || "string"`).assign(format, codegen_1._ `${fDef}.validate`), () => gen.assign(fType, codegen_1._ `"string"`).assign(format, fDef)); - cxt.fail$data(codegen_1.or(unknownFmt(), invalidFmt())); - function unknownFmt() { - if (opts.strictSchema === false) - return codegen_1.nil; - return codegen_1._ `${schemaCode} && !${format}`; - } - function invalidFmt() { - const callFormat = schemaEnv.$async - ? codegen_1._ `(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` - : codegen_1._ `${format}(${data})`; - const validData = codegen_1._ `(typeof ${format} == "function" ? ${callFormat} : ${format}.test(${data}))`; - return codegen_1._ `${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`; - } - } - function validateFormat() { - const formatDef = self.formats[schema]; - if (!formatDef) { - unknownFormat(); - return; - } - if (formatDef === true) - return; - const [fmtType, format, fmtRef] = getFormat(formatDef); - if (fmtType === ruleType) - cxt.pass(validCondition()); - function unknownFormat() { - if (opts.strictSchema === false) { - self.logger.warn(unknownMsg()); - return; - } - throw new Error(unknownMsg()); - function unknownMsg() { - return `unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`; - } - } - function getFormat(fmtDef) { - const code = fmtDef instanceof RegExp - ? codegen_1.regexpCode(fmtDef) - : opts.code.formats - ? codegen_1._ `${opts.code.formats}${codegen_1.getProperty(schema)}` - : undefined; - const fmt = gen.scopeValue("formats", { key: schema, ref: fmtDef, code }); - if (typeof fmtDef == "object" && !(fmtDef instanceof RegExp)) { - return [fmtDef.type || "string", fmtDef.validate, codegen_1._ `${fmt}.validate`]; - } - return ["string", fmtDef, fmt]; - } - function validCondition() { - if (typeof formatDef == "object" && !(formatDef instanceof RegExp) && formatDef.async) { - if (!schemaEnv.$async) - throw new Error("async format in sync schema"); - return codegen_1._ `await ${fmtRef}(${data})`; - } - return typeof format == "function" ? codegen_1._ `${fmtRef}(${data})` : codegen_1._ `${fmtRef}.test(${data})`; - } - } - }, -}; -exports.default = def; -//# sourceMappingURL=format.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js.map deleted file mode 100644 index 50598b97d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/format/format.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../lib/vocabularies/format/format.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AG,CAAC,CAAA;YAChC,CAAC;YAED,SAAS,cAAc;gBACrB,IAAI,OAAO,SAAS,IAAI,QAAQ,IAAI,CAAC,CAAC,SAAS,YAAY,MAAM,CAAC,IAAI,SAAS,CAAC,KAAK,EAAE;oBACrF,IAAI,CAAC,SAAS,CAAC,MAAM;wBAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAA;oBACrE,OAAO,WAAC,CAAA,SAAS,MAAM,IAAI,IAAI,GAAG,CAAA;iBACnC;gBACD,OAAO,OAAO,MAAM,IAAI,UAAU,CAAC,CAAC,CAAC,WAAC,CAAA,GAAG,MAAM,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,WAAC,CAAA,GAAG,MAAM,SAAS,IAAI,GAAG,CAAA;YACzF,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.d.ts deleted file mode 100644 index c8019c9d6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../../types"; -declare const format: Vocabulary; -export default format; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js deleted file mode 100644 index d19023d24..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const format_1 = require("./format"); -const format = [format_1.default]; -exports.default = format; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js.map deleted file mode 100644 index 6315bfe1f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/format/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/format/index.ts"],"names":[],"mappings":";;AACA,qCAAoC;AAEpC,MAAM,MAAM,GAAe,CAAC,gBAAa,CAAC,CAAA;AAE1C,kBAAe,MAAM,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts deleted file mode 100644 index fa27fb771..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -import { _JTDTypeError } from "./error"; -import { DiscrError, DiscrErrorObj } from "../discriminator/types"; -export declare type JTDDiscriminatorError = _JTDTypeError<"discriminator", "object", string> | DiscrErrorObj | DiscrErrorObj; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js deleted file mode 100644 index 16dde0175..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const metadata_1 = require("./metadata"); -const nullable_1 = require("./nullable"); -const error_1 = require("./error"); -const types_1 = require("../discriminator/types"); -const error = { - message: (cxt) => { - const { schema, params } = cxt; - return params.discrError - ? params.discrError === types_1.DiscrError.Tag - ? `tag "${schema}" must be string` - : `value of tag "${schema}" must be in mapping` - : error_1.typeErrorMessage(cxt, "object"); - }, - params: (cxt) => { - const { schema, params } = cxt; - return params.discrError - ? codegen_1._ `{error: ${params.discrError}, tag: ${schema}, tagValue: ${params.tag}}` - : error_1.typeErrorParams(cxt, "object"); - }, -}; -const def = { - keyword: "discriminator", - schemaType: "string", - implements: ["mapping"], - error, - code(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, schema, parentSchema } = cxt; - const [valid, cond] = nullable_1.checkNullableObject(cxt, data); - gen.if(cond); - validateDiscriminator(); - gen.elseIf(codegen_1.not(valid)); - cxt.error(); - gen.endIf(); - cxt.ok(valid); - function validateDiscriminator() { - const tag = gen.const("tag", codegen_1._ `${data}${codegen_1.getProperty(schema)}`); - gen.if(codegen_1._ `${tag} === undefined`); - cxt.error(false, { discrError: types_1.DiscrError.Tag, tag }); - gen.elseIf(codegen_1._ `typeof ${tag} == "string"`); - validateMapping(tag); - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Tag, tag }, { instancePath: schema }); - gen.endIf(); - } - function validateMapping(tag) { - gen.if(false); - for (const tagValue in parentSchema.mapping) { - gen.elseIf(codegen_1._ `${tag} === ${tagValue}`); - gen.assign(valid, applyTagSchema(tagValue)); - } - gen.else(); - cxt.error(false, { discrError: types_1.DiscrError.Mapping, tag }, { instancePath: schema, schemaPath: "mapping", parentSchema: true }); - gen.endIf(); - } - function applyTagSchema(schemaProp) { - const _valid = gen.name("valid"); - cxt.subschema({ - keyword: "mapping", - schemaProp, - jtdDiscriminator: schema, - }, _valid); - return _valid; - } - }, -}; -exports.default = def; -//# sourceMappingURL=discriminator.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map deleted file mode 100644 index 0ac39e977..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"discriminator.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/discriminator.ts"],"names":[],"mappings":";;AAEA,mDAA+D;AAC/D,yCAAwC;AACxC,yCAA8C;AAC9C,mCAAwE;AACxE,kDAAgE;AAOhE,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,GAAG,E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A;YACD,GAAG,CAAC,KAAK,EAAE,CAAA;QACb,CAAC;QAED,SAAS,cAAc,CAAC,UAAkB;YACxC,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAChC,GAAG,CAAC,SAAS,CACX;gBACE,OAAO,EAAE,SAAS;gBAClB,UAAU;gBACV,gBAAgB,EAAE,MAAM;aACzB,EACD,MAAM,CACP,CAAA;YACD,OAAO,MAAM,CAAA;QACf,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts deleted file mode 100644 index 0a1587119..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition, SchemaObject } from "../../types"; -import { _JTDTypeError } from "./error"; -export declare type JTDElementsError = _JTDTypeError<"elements", "array", SchemaObject>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js deleted file mode 100644 index ccfa9a1a6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util_1 = require("../../compile/util"); -const code_1 = require("../code"); -const codegen_1 = require("../../compile/codegen"); -const metadata_1 = require("./metadata"); -const nullable_1 = require("./nullable"); -const error_1 = require("./error"); -const def = { - keyword: "elements", - schemaType: "object", - error: error_1.typeError("array"), - code(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, schema, it } = cxt; - if (util_1.alwaysValidSchema(it, schema)) - return; - const [valid] = nullable_1.checkNullable(cxt); - gen.if(codegen_1.not(valid), () => gen.if(codegen_1._ `Array.isArray(${data})`, () => gen.assign(valid, code_1.validateArray(cxt)), () => cxt.error())); - cxt.ok(valid); - }, -}; -exports.default = def; -//# sourceMappingURL=elements.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js.map deleted file mode 100644 index b192b5b10..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/elements.ts"],"names":[],"mappings":";;AAEA,6CAAoD;AACpD,kCAAqC;AACrC,mDAA4C;AAC5C,yCAAwC;AACxC,yCAAwC;AACxC,mCAAgD;AAIhD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,iBAAS,CAAC,OAAO,CAAC;IACzB,IAAI,CAAC,GAAe;QAClB,wBAAa,CAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,CAAC,KAAK,CAAC,GAAG,wBAAa,CAAC,GAAG,CAAC,CAAA;QAClC,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CACtB,GAAG,CAAC,EAAE,CACJ,WAAC,CAAA,iBAAiB,IAAI,GAAG,EACzB,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,oBAAa,CAAC,GAAG,CAAC,CAAC,EAC3C,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAClB,CACF,CAAA;QACD,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts deleted file mode 100644 index 8df949c06..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type JTDEnumError = ErrorObject<"enum", { - allowedValues: string[]; -}, string[]>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js deleted file mode 100644 index 9e179f8aa..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const metadata_1 = require("./metadata"); -const nullable_1 = require("./nullable"); -const error = { - message: "must be equal to one of the allowed values", - params: ({ schemaCode }) => codegen_1._ `{allowedValues: ${schemaCode}}`, -}; -const def = { - keyword: "enum", - schemaType: "array", - error, - code(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, schema, schemaValue, parentSchema, it } = cxt; - if (schema.length === 0) - throw new Error("enum must have non-empty array"); - if (schema.length !== new Set(schema).size) - throw new Error("enum items must be unique"); - let valid; - const isString = codegen_1._ `typeof ${data} == "string"`; - if (schema.length >= it.opts.loopEnum) { - let cond; - [valid, cond] = nullable_1.checkNullable(cxt, isString); - gen.if(cond, loopEnum); - } - else { - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - valid = codegen_1.and(isString, codegen_1.or(...schema.map((value) => codegen_1._ `${data} === ${value}`))); - if (parentSchema.nullable) - valid = codegen_1.or(codegen_1._ `${data} === null`, valid); - } - cxt.pass(valid); - function loopEnum() { - gen.forOf("v", schemaValue, (v) => gen.if(codegen_1._ `${valid} = ${data} === ${v}`, () => gen.break())); - } - }, -}; -exports.default = def; -//# sourceMappingURL=enum.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js.map deleted file mode 100644 index 75c5ac34d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/enum.ts"],"names":[],"mappings":";;AAEA,mDAAsD;AACtD,yCAAwC;AACxC,yCAAwC;AAIxC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,mBAAmB,UAAU,GAAG;CAC5D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,OAAO;IACnB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,wBAAa,CAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;QACxF,IAAI,KAAW,CAAA;QACf,MAAM,QAAQ,GAAG,WAAC,CAAA,UAAU,IAAI,cAAc,CAAA;QAC9C,IAAI,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;YACrC,IAAI,IAAU,CACb;YAAA,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,wBAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YAC7C,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;SACvB;aAAM;YACL,wBAAwB;YACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;YACvE,KAAK,GAAG,aAAG,CAAC,QAAQ,EAAE,YAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,WAAC,CAAA,GAAG,IAAI,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;YACpF,IAAI,YAAY,CAAC,QAAQ;gBAAE,KAAK,GAAG,YAAE,CAAC,WAAC,CAAA,GAAG,IAAI,WAAW,EAAE,KAAK,CAAC,CAAA;SAClE;QACD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEf,SAAS,QAAQ;YACf,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,WAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CACxC,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,GAAG,KAAK,MAAM,IAAI,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAC1D,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.d.ts deleted file mode 100644 index 0a1e68f97..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { KeywordErrorDefinition, KeywordErrorCxt, ErrorObject } from "../../types"; -import { Code } from "../../compile/codegen"; -export declare type _JTDTypeError = ErrorObject; -export declare function typeError(t: string): KeywordErrorDefinition; -export declare function typeErrorMessage({ parentSchema }: KeywordErrorCxt, t: string): string; -export declare function typeErrorParams({ parentSchema }: KeywordErrorCxt, t: string): Code; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js deleted file mode 100644 index 4988872ab..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.typeErrorParams = exports.typeErrorMessage = exports.typeError = void 0; -const codegen_1 = require("../../compile/codegen"); -function typeError(t) { - return { - message: (cxt) => typeErrorMessage(cxt, t), - params: (cxt) => typeErrorParams(cxt, t), - }; -} -exports.typeError = typeError; -function typeErrorMessage({ parentSchema }, t) { - return (parentSchema === null || parentSchema === void 0 ? void 0 : parentSchema.nullable) ? `must be ${t} or null` : `must be ${t}`; -} -exports.typeErrorMessage = typeErrorMessage; -function typeErrorParams({ parentSchema }, t) { - return codegen_1._ `{type: ${t}, nullable: ${!!(parentSchema === null || parentSchema === void 0 ? void 0 : parentSchema.nullable)}}`; -} -exports.typeErrorParams = typeErrorParams; -//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js.map deleted file mode 100644 index 0ec4fd7b6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/error.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/error.ts"],"names":[],"mappings":";;;AACA,mDAA6C;AAQ7C,SAAgB,SAAS,CAAC,CAAS;IACjC,OAAO;QACL,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,EAAE,CAAC,CAAC;QAC1C,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,EAAE,CAAC,CAAC;KACzC,CAAA;AACH,CAAC;AALD,8BAKC;AAED,SAAgB,gBAAgB,CAAC,EAAC,YAAY,EAAkB,EAAE,CAAS;IACzE,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,EAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAA;AACzE,CAAC;AAFD,4CAEC;AAED,SAAgB,eAAe,CAAC,EAAC,YAAY,EAAkB,EAAE,CAAS;IACxE,OAAO,WAAC,CAAA,UAAU,CAAC,eAAe,CAAC,CAAC,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,QAAQ,CAAA,GAAG,CAAA;AAC/D,CAAC;AAFD,0CAEC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.d.ts deleted file mode 100644 index f9b7fb9d4..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Vocabulary } from "../../types"; -import { JTDTypeError } from "./type"; -import { JTDEnumError } from "./enum"; -import { JTDElementsError } from "./elements"; -import { JTDPropertiesError } from "./properties"; -import { JTDDiscriminatorError } from "./discriminator"; -import { JTDValuesError } from "./values"; -declare const jtdVocabulary: Vocabulary; -export default jtdVocabulary; -export declare type JTDErrorObject = JTDTypeError | JTDEnumError | JTDElementsError | JTDPropertiesError | JTDDiscriminatorError | JTDValuesError; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js deleted file mode 100644 index 18f40ab7a..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const ref_1 = require("./ref"); -const type_1 = require("./type"); -const enum_1 = require("./enum"); -const elements_1 = require("./elements"); -const properties_1 = require("./properties"); -const optionalProperties_1 = require("./optionalProperties"); -const discriminator_1 = require("./discriminator"); -const values_1 = require("./values"); -const union_1 = require("./union"); -const metadata_1 = require("./metadata"); -const jtdVocabulary = [ - "definitions", - ref_1.default, - type_1.default, - enum_1.default, - elements_1.default, - properties_1.default, - optionalProperties_1.default, - discriminator_1.default, - values_1.default, - union_1.default, - metadata_1.default, - { keyword: "additionalProperties", schemaType: "boolean" }, - { keyword: "nullable", schemaType: "boolean" }, -]; -exports.default = jtdVocabulary; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js.map deleted file mode 100644 index 713a1875b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/index.ts"],"names":[],"mappings":";;AACA,+BAA8B;AAC9B,iCAAgD;AAChD,iCAAgD;AAChD,yCAAqD;AACrD,6CAA2D;AAC3D,6DAAqD;AACrD,mDAAoE;AACpE,qCAA+C;AAC/C,mCAA2B;AAC3B,yCAAiC;AAEjC,MAAM,aAAa,GAAe;IAChC,aAAa;IACb,aAAU;IACV,cAAW;IACX,cAAW;IACX,kBAAQ;IACR,oBAAU;IACV,4BAAkB;IAClB,uBAAa;IACb,gBAAM;IACN,eAAK;IACL,kBAAQ;IACR,EAAC,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,SAAS,EAAC;IACxD,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC;CAC7C,CAAA;AAED,kBAAe,aAAa,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts deleted file mode 100644 index 86e15a8ed..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { KeywordCxt } from "../../ajv"; -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export declare function checkMetadata({ it, keyword }: KeywordCxt, metadata?: boolean): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js deleted file mode 100644 index acd00ffca..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkMetadata = void 0; -const util_1 = require("../../compile/util"); -const def = { - keyword: "metadata", - schemaType: "object", - code(cxt) { - checkMetadata(cxt); - const { gen, schema, it } = cxt; - if (util_1.alwaysValidSchema(it, schema)) - return; - const valid = gen.name("valid"); - cxt.subschema({ keyword: "metadata", jtdMetadata: true }, valid); - cxt.ok(valid); - }, -}; -function checkMetadata({ it, keyword }, metadata) { - if (it.jtdMetadata !== metadata) { - throw new Error(`JTD: "${keyword}" cannot be used in this schema location`); - } -} -exports.checkMetadata = checkMetadata; -exports.default = def; -//# sourceMappingURL=metadata.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map deleted file mode 100644 index e1c84d94e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/metadata.ts"],"names":[],"mappings":";;;AAEA,6CAAoD;AAEpD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,GAAe;QAClB,aAAa,CAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC7B,IAAI,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC/B,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;QAC9D,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,SAAgB,aAAa,CAAC,EAAC,EAAE,EAAE,OAAO,EAAa,EAAE,QAAkB;IACzE,IAAI,EAAE,CAAC,WAAW,KAAK,QAAQ,EAAE;QAC/B,MAAM,IAAI,KAAK,CAAC,SAAS,OAAO,0CAA0C,CAAC,CAAA;KAC5E;AACH,CAAC;AAJD,sCAIC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts deleted file mode 100644 index 254f76023..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { KeywordCxt } from "../../compile/validate"; -import { Code, Name } from "../../compile/codegen"; -export declare function checkNullable({ gen, data, parentSchema }: KeywordCxt, cond?: Code): [Name, Code]; -export declare function checkNullableObject(cxt: KeywordCxt, cond: Code): [Name, Code]; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js deleted file mode 100644 index cb1454ee9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.checkNullableObject = exports.checkNullable = void 0; -const codegen_1 = require("../../compile/codegen"); -function checkNullable({ gen, data, parentSchema }, cond = codegen_1.nil) { - const valid = gen.name("valid"); - if (parentSchema.nullable) { - gen.let(valid, codegen_1._ `${data} === null`); - cond = codegen_1.not(valid); - } - else { - gen.let(valid, false); - } - return [valid, cond]; -} -exports.checkNullable = checkNullable; -function checkNullableObject(cxt, cond) { - const [valid, cond_] = checkNullable(cxt, cond); - return [valid, codegen_1._ `${cond_} && typeof ${cxt.data} == "object" && !Array.isArray(${cxt.data})`]; -} -exports.checkNullableObject = checkNullableObject; -//# sourceMappingURL=nullable.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map deleted file mode 100644 index a6cf5080b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"nullable.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/nullable.ts"],"names":[],"mappings":";;;AACA,mDAA6D;AAE7D,SAAgB,aAAa,CAC3B,EAAC,GAAG,EAAE,IAAI,EAAE,YAAY,EAAa,EACrC,OAAa,aAAG;IAEhB,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC/B,IAAI,YAAY,CAAC,QAAQ,EAAE;QACzB,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,WAAC,CAAA,GAAG,IAAI,WAAW,CAAC,CAAA;QACnC,IAAI,GAAG,aAAG,CAAC,KAAK,CAAC,CAAA;KAClB;SAAM;QACL,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;KACtB;IACD,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAZD,sCAYC;AAED,SAAgB,mBAAmB,CAAC,GAAe,EAAE,IAAU;IAC7D,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IAC/C,OAAO,CAAC,KAAK,EAAE,WAAC,CAAA,GAAG,KAAK,cAAc,GAAG,CAAC,IAAI,kCAAkC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;AAC9F,CAAC;AAHD,kDAGC"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js deleted file mode 100644 index 6cb93a55d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const properties_1 = require("./properties"); -const def = { - keyword: "optionalProperties", - schemaType: "object", - error: properties_1.error, - code(cxt) { - if (cxt.parentSchema.properties) - return; - properties_1.validateProperties(cxt); - }, -}; -exports.default = def; -//# sourceMappingURL=optionalProperties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map deleted file mode 100644 index 2fab84947..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"optionalProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/optionalProperties.ts"],"names":[],"mappings":";;AAEA,6CAAsD;AAEtD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,oBAAoB;IAC7B,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAL,kBAAK;IACL,IAAI,CAAC,GAAe;QAClB,IAAI,GAAG,CAAC,YAAY,CAAC,UAAU;YAAE,OAAM;QACvC,+BAAkB,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts deleted file mode 100644 index a1a2219f9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, KeywordErrorDefinition, SchemaObject } from "../../types"; -import type { KeywordCxt } from "../../compile/validate"; -import { _JTDTypeError } from "./error"; -declare enum PropError { - Additional = "additional", - Missing = "missing" -} -declare type PropKeyword = "properties" | "optionalProperties"; -declare type PropSchema = { - [P in string]?: SchemaObject; -}; -export declare type JTDPropertiesError = _JTDTypeError | ErrorObject | ErrorObject; -export declare const error: KeywordErrorDefinition; -declare const def: CodeKeywordDefinition; -export declare function validateProperties(cxt: KeywordCxt): void; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js deleted file mode 100644 index c5be1c50b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js +++ /dev/null @@ -1,146 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateProperties = exports.error = void 0; -const code_1 = require("../code"); -const util_1 = require("../../compile/util"); -const codegen_1 = require("../../compile/codegen"); -const metadata_1 = require("./metadata"); -const nullable_1 = require("./nullable"); -const error_1 = require("./error"); -var PropError; -(function (PropError) { - PropError["Additional"] = "additional"; - PropError["Missing"] = "missing"; -})(PropError || (PropError = {})); -exports.error = { - message: (cxt) => { - const { params } = cxt; - return params.propError - ? params.propError === PropError.Additional - ? "must NOT have additional properties" - : `must have property '${params.missingProperty}'` - : error_1.typeErrorMessage(cxt, "object"); - }, - params: (cxt) => { - const { params } = cxt; - return params.propError - ? params.propError === PropError.Additional - ? codegen_1._ `{error: ${params.propError}, additionalProperty: ${params.additionalProperty}}` - : codegen_1._ `{error: ${params.propError}, missingProperty: ${params.missingProperty}}` - : error_1.typeErrorParams(cxt, "object"); - }, -}; -const def = { - keyword: "properties", - schemaType: "object", - error: exports.error, - code: validateProperties, -}; -// const error: KeywordErrorDefinition = { -// message: "should NOT have additional properties", -// params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`, -// } -function validateProperties(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, parentSchema, it } = cxt; - const { additionalProperties, nullable } = parentSchema; - if (it.jtdDiscriminator && nullable) - throw new Error("JTD: nullable inside discriminator mapping"); - if (commonProperties()) { - throw new Error("JTD: properties and optionalProperties have common members"); - } - const [allProps, properties] = schemaProperties("properties"); - const [allOptProps, optProperties] = schemaProperties("optionalProperties"); - if (properties.length === 0 && optProperties.length === 0 && additionalProperties) { - return; - } - const [valid, cond] = it.jtdDiscriminator === undefined - ? nullable_1.checkNullableObject(cxt, data) - : [gen.let("valid", false), true]; - gen.if(cond, () => gen.assign(valid, true).block(() => { - validateProps(properties, "properties", true); - validateProps(optProperties, "optionalProperties"); - if (!additionalProperties) - validateAdditional(); - })); - cxt.pass(valid); - function commonProperties() { - const props = parentSchema.properties; - const optProps = parentSchema.optionalProperties; - if (!(props && optProps)) - return false; - for (const p in props) { - if (Object.prototype.hasOwnProperty.call(optProps, p)) - return true; - } - return false; - } - function schemaProperties(keyword) { - const schema = parentSchema[keyword]; - const allPs = schema ? code_1.allSchemaProperties(schema) : []; - if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) { - throw new Error(`JTD: discriminator tag used in ${keyword}`); - } - const ps = allPs.filter((p) => !util_1.alwaysValidSchema(it, schema[p])); - return [allPs, ps]; - } - function validateProps(props, keyword, required) { - const _valid = gen.var("valid"); - for (const prop of props) { - gen.if(code_1.propertyInData(gen, data, prop, it.opts.ownProperties), () => applyPropertySchema(prop, keyword, _valid), () => missingProperty(prop)); - cxt.ok(_valid); - } - function missingProperty(prop) { - if (required) { - gen.assign(_valid, false); - cxt.error(false, { propError: PropError.Missing, missingProperty: prop }, { schemaPath: prop }); - } - else { - gen.assign(_valid, true); - } - } - } - function applyPropertySchema(prop, keyword, _valid) { - cxt.subschema({ - keyword, - schemaProp: prop, - dataProp: prop, - }, _valid); - } - function validateAdditional() { - gen.forIn("key", data, (key) => { - const _allProps = it.jtdDiscriminator === undefined ? allProps : [it.jtdDiscriminator].concat(allProps); - const addProp = isAdditional(key, _allProps, "properties"); - const addOptProp = isAdditional(key, allOptProps, "optionalProperties"); - const extra = addProp === true ? addOptProp : addOptProp === true ? addProp : codegen_1.and(addProp, addOptProp); - gen.if(extra, () => { - if (it.opts.removeAdditional) { - gen.code(codegen_1._ `delete ${data}[${key}]`); - } - else { - cxt.error(false, { propError: PropError.Additional, additionalProperty: key }, { instancePath: key, parentSchema: true }); - if (!it.opts.allErrors) - gen.break(); - } - }); - }); - } - function isAdditional(key, props, keyword) { - let additional; - if (props.length > 8) { - // TODO maybe an option instead of hard-coded 8? - const propsSchema = util_1.schemaRefOrVal(it, parentSchema[keyword], keyword); - additional = codegen_1.not(code_1.isOwnProperty(gen, propsSchema, key)); - } - else if (props.length) { - additional = codegen_1.and(...props.map((p) => codegen_1._ `${key} !== ${p}`)); - } - else { - additional = true; - } - return additional; - } -} -exports.validateProperties = validateProperties; -exports.default = def; -//# sourceMappingURL=properties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js.map deleted file mode 100644 index ccfcd5c83..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/properties.ts"],"names":[],"mappings":";;;AAOA,kCAA0E;AAC1E,6CAAoE;AACpE,mDAA6D;AAC7D,yCAAwC;AACxC,yCAA8C;AAC9C,mCAAwE;AAExE,IAAK,SAGJ;AAHD,WAAK,SAAS;IACZ,sCAAyB,CAAA;IACzB,gCAAmB,CAAA;AACrB,CAAC,EAHI,SAAS,KAAT,SAAS,QAGb;AAWY,QAAA,KAAK,GAA2B;IAC3C,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;QACf,MAAM,EAAC,MAAM,EAAC,GAAG,GAAG,CAAA;QACpB,OAAO,MAAM,CAAC,SAAS;YACrB,CAAC,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC,UAAU;gBACzC,CAAC,CAAC,qCAAqC;gBACvC,CAAC,CAAC,uBAAuB,MAAM,CAAC,eAAe,GAAG;YACpD,CAAC,CAAC,wBAAgB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;IACrC,CAAC;IACD,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE;QACd,MAAM,EAAC,MAAM,EAAC,GAAG,GAAG,CAAA;QACpB,OAAO,MAAM,CAAC,SAAS;YACrB,CAAC,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,CAAC,UAAU;gBACzC,CAAC,CAAC,WAAC,CAAA,WAAW,MAAM,CAAC,SAAS,yBAAyB,MAAM,CAAC,kBAAkB,GAAG;gBACnF,CAAC,CAAC,WAAC,CAAA,WAAW,MAAM,CAAC,SAAS,sBAAsB,MAAM,CAAC,eAAe,GAAG;YAC/E,CAAC,CAAC,uBAAe,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;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tE,UAAU,GAAG,aAAG,CAAC,oBAAa,CAAC,GAAG,EAAE,WAAmB,EAAE,GAAG,CAAC,CAAC,CAAA;SAC/D;aAAM,IAAI,KAAK,CAAC,MAAM,EAAE;YACvB,UAAU,GAAG,aAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,WAAC,CAAA,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAA;SAC1D;aAAM;YACL,UAAU,GAAG,IAAI,CAAA;SAClB;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;AACH,CAAC;AAnHD,gDAmHC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts deleted file mode 100644 index ccdf84c0b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { CodeKeywordDefinition, AnySchemaObject } from "../../types"; -declare const def: CodeKeywordDefinition; -export declare function hasRef(schema: AnySchemaObject): boolean; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js deleted file mode 100644 index 25c9bf4ab..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hasRef = void 0; -const compile_1 = require("../../compile"); -const codegen_1 = require("../../compile/codegen"); -const ref_error_1 = require("../../compile/ref_error"); -const names_1 = require("../../compile/names"); -const ref_1 = require("../core/ref"); -const metadata_1 = require("./metadata"); -const def = { - keyword: "ref", - schemaType: "string", - code(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, schema: ref, parentSchema, it } = cxt; - const { schemaEnv: { root }, } = it; - const valid = gen.name("valid"); - if (parentSchema.nullable) { - gen.var(valid, codegen_1._ `${data} === null`); - gen.if(codegen_1.not(valid), validateJtdRef); - } - else { - gen.var(valid, false); - validateJtdRef(); - } - cxt.ok(valid); - function validateJtdRef() { - var _a; - const refSchema = (_a = root.schema.definitions) === null || _a === void 0 ? void 0 : _a[ref]; - if (!refSchema) - throw new ref_error_1.default("", ref, `No definition ${ref}`); - if (hasRef(refSchema) || !it.opts.inlineRefs) - callValidate(refSchema); - else - inlineRefSchema(refSchema); - } - function callValidate(schema) { - const sch = compile_1.compileSchema.call(it.self, new compile_1.SchemaEnv({ schema, root, schemaPath: `/definitions/${ref}` })); - const v = ref_1.getValidate(cxt, sch); - const errsCount = gen.const("_errs", names_1.default.errors); - ref_1.callRef(cxt, v, sch, sch.$async); - gen.assign(valid, codegen_1._ `${errsCount} === ${names_1.default.errors}`); - } - function inlineRefSchema(schema) { - const schName = gen.scopeValue("schema", it.opts.code.source === true ? { ref: schema, code: codegen_1.stringify(schema) } : { ref: schema }); - cxt.subschema({ - schema, - dataTypes: [], - schemaPath: codegen_1.nil, - topSchemaRef: schName, - errSchemaPath: `/definitions/${ref}`, - }, valid); - } - }, -}; -function hasRef(schema) { - for (const key in schema) { - let sch; - if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch))) - return true; - } - return false; -} -exports.hasRef = hasRef; -exports.default = def; -//# sourceMappingURL=ref.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js.map deleted file mode 100644 index efe25695e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ref.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/ref.ts"],"names":[],"mappings":";;;AAEA,2CAAsD;AACtD,mDAA4D;AAC5D,uDAAqD;AACrD,+CAAmC;AACnC,qCAAgD;AAChD,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O,IAAI,CAAA;KAC1F;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAND,wBAMC;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.d.ts deleted file mode 100644 index 321f9aad1..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -import { _JTDTypeError } from "./error"; -export declare type JTDTypeError = _JTDTypeError<"type", JTDType, JTDType>; -export declare type IntType = "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32"; -export declare const intRange: { - [T in IntType]: [number, number, number]; -}; -export declare type JTDType = "boolean" | "string" | "timestamp" | "float32" | "float64" | IntType; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js deleted file mode 100644 index 47aa69f38..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.intRange = void 0; -const codegen_1 = require("../../compile/codegen"); -const timestamp_1 = require("../../runtime/timestamp"); -const util_1 = require("../../compile/util"); -const metadata_1 = require("./metadata"); -const error_1 = require("./error"); -exports.intRange = { - int8: [-128, 127, 3], - uint8: [0, 255, 3], - int16: [-32768, 32767, 5], - uint16: [0, 65535, 5], - int32: [-2147483648, 2147483647, 10], - uint32: [0, 4294967295, 10], -}; -const error = { - message: (cxt) => error_1.typeErrorMessage(cxt, cxt.schema), - params: (cxt) => error_1.typeErrorParams(cxt, cxt.schema), -}; -const def = { - keyword: "type", - schemaType: "string", - error, - code(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, schema, parentSchema } = cxt; - let cond; - switch (schema) { - case "boolean": - case "string": - cond = codegen_1._ `typeof ${data} == ${schema}`; - break; - case "timestamp": { - const vts = util_1.useFunc(gen, timestamp_1.default); - cond = codegen_1._ `${data} instanceof Date || (typeof ${data} == "string" && ${vts}(${data}))`; - break; - } - case "float32": - case "float64": - cond = codegen_1._ `typeof ${data} == "number"`; - break; - default: { - const [min, max] = exports.intRange[schema]; - cond = codegen_1._ `typeof ${data} == "number" && isFinite(${data}) && ${data} >= ${min} && ${data} <= ${max} && !(${data} % 1)`; - } - } - cxt.pass(parentSchema.nullable ? codegen_1.or(codegen_1._ `${data} === null`, cond) : cond); - }, -}; -exports.default = def; -//# sourceMappingURL=type.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js.map deleted file mode 100644 index a56ab677b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/type.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/type.ts"],"names":[],"mappings":";;;AAEA,mDAAiD;AACjD,uDAAoD;AACpD,6CAA0C;AAC1C,yCAAwC;AACxC,mCAAwE;AAM3D,QAAA,QAAQ,GAA+C;IAClE,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAClB,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IACzB,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;IACpC,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,CAAC;CAC5B,CAAA;AAID,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,GAAG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AA,GAAG,IAAI,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACxE,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js deleted file mode 100644 index 01a943994..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const code_1 = require("../code"); -const def = { - keyword: "union", - schemaType: "array", - trackErrors: true, - code: code_1.validateUnion, - error: { message: "must match a schema in union" }, -}; -exports.default = def; -//# sourceMappingURL=union.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js.map deleted file mode 100644 index 4d6eb4119..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/union.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/union.ts"],"names":[],"mappings":";;AACA,kCAAqC;AAErC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,oBAAa;IACnB,KAAK,EAAE,EAAC,OAAO,EAAE,8BAA8B,EAAC;CACjD,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.d.ts deleted file mode 100644 index 1ff367dfb..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition, SchemaObject } from "../../types"; -import { _JTDTypeError } from "./error"; -export declare type JTDValuesError = _JTDTypeError<"values", "object", SchemaObject>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js deleted file mode 100644 index 4dadc6e67..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js +++ /dev/null @@ -1,48 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util_1 = require("../../compile/util"); -const codegen_1 = require("../../compile/codegen"); -const metadata_1 = require("./metadata"); -const nullable_1 = require("./nullable"); -const error_1 = require("./error"); -const def = { - keyword: "values", - schemaType: "object", - error: error_1.typeError("object"), - code(cxt) { - metadata_1.checkMetadata(cxt); - const { gen, data, schema, it } = cxt; - if (util_1.alwaysValidSchema(it, schema)) - return; - const [valid, cond] = nullable_1.checkNullableObject(cxt, data); - gen.if(cond); - gen.assign(valid, validateMap()); - gen.elseIf(codegen_1.not(valid)); - cxt.error(); - gen.endIf(); - cxt.ok(valid); - function validateMap() { - const _valid = gen.name("valid"); - if (it.allErrors) { - const validMap = gen.let("valid", true); - validateValues(() => gen.assign(validMap, false)); - return validMap; - } - gen.var(_valid, true); - validateValues(() => gen.break()); - return _valid; - function validateValues(notValid) { - gen.forIn("key", data, (key) => { - cxt.subschema({ - keyword: "values", - dataProp: key, - dataPropType: util_1.Type.Str, - }, _valid); - gen.if(codegen_1.not(_valid), notValid); - }); - } - } - }, -}; -exports.default = def; -//# sourceMappingURL=values.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js.map deleted file mode 100644 index 4cc93a2f0..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/jtd/values.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"values.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/values.ts"],"names":[],"mappings":";;AAEA,6CAA0D;AAC1D,mDAA+C;AAC/C,yCAAwC;AACxC,yCAA8C;AAC9C,mCAAgD;AAIhD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,iBAAS,CAAC,QAAQ,CAAC;IAC1B,IAAI,CAAC,GAAe;QAClB,wBAAa,CAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,8BAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QACpD,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;QACZ,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC,CAAA;QAChC,GAAG,CAAC,MAAM,CAAC,aAAG,CAAC,KAAK,CAAC,CAAC,CAAA;QACtB,GAAG,CAAC,KAAK,EAAE,CAAA;QACX,GAAG,CAAC,KAAK,EAAE,CAAA;QACX,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;QAEb,SAAS,WAAW;YAClB,MAAM,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAChC,IAAI,EAAE,CAAC,SAAS,EAAE;gBAChB,MAAM,QAAQ,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;gBACvC,cAAc,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAA;gBACjD,OAAO,QAAQ,CAAA;aAChB;YACD,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YACrB,cAAc,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;YACjC,OAAO,MAAM,CAAA;YAEb,SAAS,cAAc,CAAC,QAAoB;gBAC1C,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;oBAC7B,GAAG,CAAC,SAAS,CACX;wBACE,OAAO,EAAE,QAAQ;wBACjB,QAAQ,EAAE,GAAG;wBACb,YAAY,EAAE,WAAI,CAAC,GAAG;qBACvB,EACD,MAAM,CACP,CAAA;oBACD,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAA;gBAC/B,CAAC,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.d.ts deleted file mode 100644 index df9cc07ca..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../types"; -export declare const metadataVocabulary: Vocabulary; -export declare const contentVocabulary: Vocabulary; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js b/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js deleted file mode 100644 index f07bf28b5..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.contentVocabulary = exports.metadataVocabulary = void 0; -exports.metadataVocabulary = [ - "title", - "description", - "default", - "deprecated", - "readOnly", - "writeOnly", - "examples", -]; -exports.contentVocabulary = [ - "contentMediaType", - "contentEncoding", - "contentSchema", -]; -//# sourceMappingURL=metadata.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js.map deleted file mode 100644 index 0d61f0831..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/metadata.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../lib/vocabularies/metadata.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAe;IAC5C,OAAO;IACP,aAAa;IACb,SAAS;IACT,YAAY;IACZ,UAAU;IACV,WAAW;IACX,UAAU;CACX,CAAA;AAEY,QAAA,iBAAiB,GAAe;IAC3C,kBAAkB;IAClB,iBAAiB;IACjB,eAAe;CAChB,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/next.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/next.d.ts deleted file mode 100644 index 7fd5c644b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/next.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../types"; -declare const next: Vocabulary; -export default next; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/next.js b/node_modules/table/node_modules/ajv/dist/vocabularies/next.js deleted file mode 100644 index c861b3243..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/next.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dependentRequired_1 = require("./validation/dependentRequired"); -const dependentSchemas_1 = require("./applicator/dependentSchemas"); -const limitContains_1 = require("./validation/limitContains"); -const next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default]; -exports.default = next; -//# sourceMappingURL=next.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/next.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/next.js.map deleted file mode 100644 index 474a6d4e7..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/next.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"next.js","sourceRoot":"","sources":["../../lib/vocabularies/next.ts"],"names":[],"mappings":";;AACA,sEAA8D;AAC9D,oEAA4D;AAC5D,8DAAsD;AAEtD,MAAM,IAAI,GAAe,CAAC,2BAAiB,EAAE,0BAAgB,EAAE,uBAAa,CAAC,CAAA;AAE7E,kBAAe,IAAI,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts deleted file mode 100644 index ec67e63ea..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { Vocabulary } from "../../types"; -declare const unevaluated: Vocabulary; -export default unevaluated; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js deleted file mode 100644 index 30e316748..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const unevaluatedProperties_1 = require("./unevaluatedProperties"); -const unevaluatedItems_1 = require("./unevaluatedItems"); -const unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default]; -exports.default = unevaluated; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map deleted file mode 100644 index a4872ea43..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/unevaluated/index.ts"],"names":[],"mappings":";;AACA,mEAA2D;AAC3D,yDAAiD;AAEjD,MAAM,WAAW,GAAe,CAAC,+BAAqB,EAAE,0BAAgB,CAAC,CAAA;AAEzE,kBAAe,WAAW,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts deleted file mode 100644 index f108b6e4e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type UnevaluatedItemsError = ErrorObject<"unevaluatedItems", { - limit: number; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js deleted file mode 100644 index f270a278d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +++ /dev/null @@ -1,40 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: ({ params: { len } }) => codegen_1.str `must NOT have more than ${len} items`, - params: ({ params: { len } }) => codegen_1._ `{limit: ${len}}`, -}; -const def = { - keyword: "unevaluatedItems", - type: "array", - schemaType: ["boolean", "object"], - error, - code(cxt) { - const { gen, schema, data, it } = cxt; - const items = it.items || 0; - if (items === true) - return; - const len = gen.const("len", codegen_1._ `${data}.length`); - if (schema === false) { - cxt.setParams({ len: items }); - cxt.fail(codegen_1._ `${len} > ${items}`); - } - else if (typeof schema == "object" && !util_1.alwaysValidSchema(it, schema)) { - const valid = gen.var("valid", codegen_1._ `${len} <= ${items}`); - gen.if(codegen_1.not(valid), () => validateItems(valid, items)); - cxt.ok(valid); - } - it.items = true; - function validateItems(valid, from) { - gen.forRange("i", from, len, (i) => { - cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid); - if (!it.allErrors) - gen.if(codegen_1.not(valid), () => gen.break()); - }); - } - }, -}; -exports.default = def; -//# sourceMappingURL=unevaluatedItems.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map deleted file mode 100644 index d520762e5..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"unevaluatedItems.js","sourceRoot":"","sources":["../../../lib/vocabularies/unevaluated/unevaluatedItems.ts"],"names":[],"mappings":";;AAOA,mDAAuD;AACvD,6CAA0D;AAI1D,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,EAAE,CAAC,aAAG,CAAA,2BAA2B,GAAG,QAAQ;IACvE,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,GAAG,EAAC,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,WAAW,GAAG,GAAG;CAChD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,kBAAkB;IAC3B,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACjC,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,MAAM,KAAK,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KAAK,EAAE,CAAC,CAAA;YAC1D,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts deleted file mode 100644 index 0a041ff75..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject, AnySchema } from "../../types"; -export declare type UnevaluatedPropertiesError = ErrorObject<"unevaluatedProperties", { - unevaluatedProperty: string; -}, AnySchema>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js deleted file mode 100644 index 7552ee14b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const names_1 = require("../../compile/names"); -const error = { - message: "must NOT have unevaluated properties", - params: ({ params }) => codegen_1._ `{unevaluatedProperty: ${params.unevaluatedProperty}}`, -}; -const def = { - keyword: "unevaluatedProperties", - type: "object", - schemaType: ["boolean", "object"], - trackErrors: true, - error, - code(cxt) { - const { gen, schema, data, errsCount, it } = cxt; - /* istanbul ignore if */ - if (!errsCount) - throw new Error("ajv implementation error"); - const { allErrors, props } = it; - if (props instanceof codegen_1.Name) { - gen.if(codegen_1._ `${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key)))); - } - else if (props !== true) { - gen.forIn("key", data, (key) => props === undefined - ? unevaluatedPropCode(key) - : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key))); - } - it.props = true; - cxt.ok(codegen_1._ `${errsCount} === ${names_1.default.errors}`); - function unevaluatedPropCode(key) { - if (schema === false) { - cxt.setParams({ unevaluatedProperty: key }); - cxt.error(); - if (!allErrors) - gen.break(); - return; - } - if (!util_1.alwaysValidSchema(it, schema)) { - const valid = gen.name("valid"); - cxt.subschema({ - keyword: "unevaluatedProperties", - dataProp: key, - dataPropType: util_1.Type.Str, - }, valid); - if (!allErrors) - gen.if(codegen_1.not(valid), () => gen.break()); - } - } - function unevaluatedDynamic(evaluatedProps, key) { - return codegen_1._ `!${evaluatedProps} || !${evaluatedProps}[${key}]`; - } - function unevaluatedStatic(evaluatedProps, key) { - const ps = []; - for (const p in evaluatedProps) { - if (evaluatedProps[p] === true) - ps.push(codegen_1._ `${key} !== ${p}`); - } - return codegen_1.and(...ps); - } - }, -}; -exports.default = def; -//# sourceMappingURL=unevaluatedProperties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map deleted file mode 100644 index 952933ad7..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"unevaluatedProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/unevaluated/unevaluatedProperties.ts"],"names":[],"mappings":";;AAMA,mDAA6D;AAC7D,6CAA0D;AAC1D,+CAAmC;AAQnC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,sCAAsC;IAC/C,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,yBAAyB,MAAM,CAAC,mBAAmB,GAAG;CAC9E,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,uBAAuB;IAChC,IAAI,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MAAM,KAAK,KAAK,EAAE;gBACpB,GAAG,CAAC,SAAS,CAAC,EAAC,mBAAmB,EAAE,GAAG,EAAC,CAAC,CAAA;gBACzC,GAAG,CAAC,KAAK,EAAE,CAAA;gBACX,IAAI,CAAC,SAAS;oBAAE,GAAG,CAAC,KAAK,EAAE,CAAA;gBAC3B,OAAM;aACP;YAED,IAAI,CAAC,wBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE;gBAClC,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;gBAC/B,GAAG,CAAC,SAAS,CACX;oBACE,OAAO,EAAE,uBAAuB;oBAChC,QAAQ,EAAE,GAAG;oBACb,YAAY,EAAE,WAAI,CAAC,GAAG;iBACvB,EACD,KAAK,CACN,CAAA;gBACD,IAAI,CAAC,SAAS;oBAAE,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;aACtD;QACH,CAAC;QAED,SAAS,kBAAkB,CAAC,cAAoB,EAAE,GAAS;YACzD,OAAO,WAAC,CAAA,IAAI,cAAc,QAAQ,cAAc,IAAI,GAAG,GAAG,CAAA;QAC5D,CAAC;QAED,SAAS,iBAAiB,CAAC,cAAsC,EAAE,GAAS;YAC1E,MAAM,EAAE,GAAW,EAAE,CAAA;YACrB,KAAK,MAAM,CAAC,IAAI,cAAc,EAAE;gBAC9B,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI;oBAAE,EAAE,CAAC,IAAI,CAAC,WAAC,CAAA,GAAG,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAA;aAC5D;YACD,OAAO,aAAG,CAAC,GAAG,EAAE,CAAC,CAAA;QACnB,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.d.ts deleted file mode 100644 index 85e11ce52..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type ConstError = ErrorObject<"const", { - allowedValue: any; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js deleted file mode 100644 index 1b4c59555..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const equal_1 = require("../../runtime/equal"); -const error = { - message: "must be equal to constant", - params: ({ schemaCode }) => codegen_1._ `{allowedValue: ${schemaCode}}`, -}; -const def = { - keyword: "const", - $data: true, - error, - code(cxt) { - const { gen, data, schemaCode } = cxt; - // TODO optimize for scalar values in schema - cxt.fail$data(codegen_1._ `!${util_1.useFunc(gen, equal_1.default)}(${data}, ${schemaCode})`); - }, -}; -exports.default = def; -//# sourceMappingURL=const.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js.map deleted file mode 100644 index 526ae1fef..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/const.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/const.ts"],"names":[],"mappings":";;AAEA,mDAAuC;AACvC,6CAA0C;AAC1C,+CAAuC;AAIvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,2BAA2B;IACpC,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,kBAAkB,UAAU,GAAG;CAC3D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,GAAG,CAAA;QACnC,4CAA4C;QAC5C,GAAG,CAAC,SAAS,CAAC,WAAC,CAAA,IAAI,cAAO,CAAC,GAAG,EAAE,eAAK,CAAC,IAAI,IAAI,KAAK,UAAU,GAAG,CAAC,CAAA;IACnE,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts deleted file mode 100644 index 2e25408e6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -import { DependenciesErrorParams, PropertyDependencies } from "../applicator/dependencies"; -export declare type DependentRequiredError = ErrorObject<"dependentRequired", DependenciesErrorParams, PropertyDependencies>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js deleted file mode 100644 index 27c4eb260..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dependencies_1 = require("../applicator/dependencies"); -const def = { - keyword: "dependentRequired", - type: "object", - schemaType: "object", - error: dependencies_1.error, - code: (cxt) => dependencies_1.validatePropertyDeps(cxt), -}; -exports.default = def; -//# sourceMappingURL=dependentRequired.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map deleted file mode 100644 index 0b29911a1..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"dependentRequired.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/dependentRequired.ts"],"names":[],"mappings":";;AACA,6DAKmC;AAQnC,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAL,oBAAK;IACL,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,mCAAoB,CAAC,GAAG,CAAC;CACzC,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.d.ts deleted file mode 100644 index dce653b56..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type EnumError = ErrorObject<"enum", { - allowedValues: any[]; -}, any[] | { - $data: string; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js deleted file mode 100644 index bc76efe1b..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js +++ /dev/null @@ -1,47 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const equal_1 = require("../../runtime/equal"); -const error = { - message: "must be equal to one of the allowed values", - params: ({ schemaCode }) => codegen_1._ `{allowedValues: ${schemaCode}}`, -}; -const def = { - keyword: "enum", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode, it } = cxt; - if (!$data && schema.length === 0) - throw new Error("enum must have non-empty array"); - const useLoop = schema.length >= it.opts.loopEnum; - const eql = util_1.useFunc(gen, equal_1.default); - let valid; - if (useLoop || $data) { - valid = gen.let("valid"); - cxt.block$data(valid, loopEnum); - } - else { - /* istanbul ignore if */ - if (!Array.isArray(schema)) - throw new Error("ajv implementation error"); - const vSchema = gen.const("vSchema", schemaCode); - valid = codegen_1.or(...schema.map((_x, i) => equalCode(vSchema, i))); - } - cxt.pass(valid); - function loopEnum() { - gen.assign(valid, false); - gen.forOf("v", schemaCode, (v) => gen.if(codegen_1._ `${eql}(${data}, ${v})`, () => gen.assign(valid, true).break())); - } - function equalCode(vSchema, i) { - const sch = schema[i]; - return sch && typeof sch === "object" - ? codegen_1._ `${eql}(${data}, ${vSchema}[${i}])` - : codegen_1._ `${data} === ${sch}`; - } - }, -}; -exports.default = def; -//# sourceMappingURL=enum.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js.map deleted file mode 100644 index 7eb04094d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/enum.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/enum.ts"],"names":[],"mappings":";;AAEA,mDAAuD;AACvD,6CAA0C;AAC1C,+CAAuC;AAIvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,mBAAmB,UAAU,GAAG;CAC5D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,OAAO;IACnB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MA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AG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CACxE,CAAA;QACH,CAAC;QAED,SAAS,SAAS,CAAC,OAAa,EAAE,CAAS;YACzC,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACrB,OAAO,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;gBACnC,CAAC,CAAC,WAAC,CAAA,GAAG,GAAG,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI;gBACtC,CAAC,CAAC,WAAC,CAAA,GAAG,IAAI,QAAQ,GAAG,EAAE,CAAA;QAC3B,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.d.ts deleted file mode 100644 index 08cd22396..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ErrorObject, Vocabulary } from "../../types"; -import { LimitNumberError } from "./limitNumber"; -import { MultipleOfError } from "./multipleOf"; -import { PatternError } from "./pattern"; -import { RequiredError } from "./required"; -import { UniqueItemsError } from "./uniqueItems"; -import { ConstError } from "./const"; -import { EnumError } from "./enum"; -declare const validation: Vocabulary; -export default validation; -declare type LimitError = ErrorObject<"maxItems" | "minItems" | "minProperties" | "maxProperties" | "minLength" | "maxLength", { - limit: number; -}, number | { - $data: string; -}>; -export declare type ValidationKeywordError = LimitError | LimitNumberError | MultipleOfError | PatternError | RequiredError | UniqueItemsError | ConstError | EnumError; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js deleted file mode 100644 index 7b56b4e45..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const limitNumber_1 = require("./limitNumber"); -const multipleOf_1 = require("./multipleOf"); -const limitLength_1 = require("./limitLength"); -const pattern_1 = require("./pattern"); -const limitProperties_1 = require("./limitProperties"); -const required_1 = require("./required"); -const limitItems_1 = require("./limitItems"); -const uniqueItems_1 = require("./uniqueItems"); -const const_1 = require("./const"); -const enum_1 = require("./enum"); -const validation = [ - // number - limitNumber_1.default, - multipleOf_1.default, - // string - limitLength_1.default, - pattern_1.default, - // object - limitProperties_1.default, - required_1.default, - // array - limitItems_1.default, - uniqueItems_1.default, - // any - { keyword: "type", schemaType: ["string", "array"] }, - { keyword: "nullable", schemaType: "boolean" }, - const_1.default, - enum_1.default, -]; -exports.default = validation; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js.map deleted file mode 100644 index 69436fb32..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/index.ts"],"names":[],"mappings":";;AACA,+CAA2D;AAC3D,6CAAwD;AACxD,+CAAuC;AACvC,uCAA+C;AAC/C,uDAA+C;AAC/C,yCAAkD;AAClD,6CAAqC;AACrC,+CAA2D;AAC3D,mCAAgD;AAChD,iCAA6C;AAE7C,MAAM,UAAU,GAAe;IAC7B,SAAS;IACT,qBAAW;IACX,oBAAU;IACV,SAAS;IACT,qBAAW;IACX,iBAAO;IACP,SAAS;IACT,yBAAe;IACf,kBAAQ;IACR,QAAQ;IACR,oBAAU;IACV,qBAAW;IACX,MAAM;IACN,EAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAC;IAClD,EAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAC;IAC5C,eAAY;IACZ,cAAW;CACZ,CAAA;AAED,kBAAe,UAAU,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js deleted file mode 100644 index f576c5c40..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const util_1 = require("../../compile/util"); -const def = { - keyword: ["maxContains", "minContains"], - type: "array", - schemaType: "number", - code({ keyword, parentSchema, it }) { - if (parentSchema.contains === undefined) { - util_1.checkStrictMode(it, `"${keyword}" without "contains" is ignored`); - } - }, -}; -exports.default = def; -//# sourceMappingURL=limitContains.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map deleted file mode 100644 index 832fc3645..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"limitContains.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitContains.ts"],"names":[],"mappings":";;AAEA,6CAAkD;AAElD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,aAAa,EAAE,aAAa,CAAC;IACvC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,QAAQ;IACpB,IAAI,CAAC,EAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAa;QAC1C,IAAI,YAAY,CAAC,QAAQ,KAAK,SAAS,EAAE;YACvC,sBAAe,CAAC,EAAE,EAAE,IAAI,OAAO,iCAAiC,CAAC,CAAA;SAClE;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js deleted file mode 100644 index d901c867e..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxItems" ? "more" : "fewer"; - return codegen_1.str `must NOT have ${comp} than ${schemaCode} items`; - }, - params: ({ schemaCode }) => codegen_1._ `{limit: ${schemaCode}}`, -}; -const def = { - keyword: ["maxItems", "minItems"], - type: "array", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxItems" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data(codegen_1._ `${data}.length ${op} ${schemaCode}`); - }, -}; -exports.default = def; -//# sourceMappingURL=limitItems.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map deleted file mode 100644 index f4c0c7d87..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"limitItems.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitItems.ts"],"names":[],"mappings":";;AAEA,mDAAuD;AAEvD,MAAM,KAAK,GAA2B;IACpC,OAAO,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC;QAC3B,MAAM,IAAI,GAAG,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;QACtD,OAAO,aAAG,CAAA,iBAAiB,IAAI,SAAS,UAAU,QAAQ,CAAA;IAC5D,CAAC;IACD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,WAAW,UAAU,GAAG;CACpD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IACjC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,GAAG,CAAA;QACvC,MAAM,EAAE,GAAG,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,mBAAS,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAS,CAAC,EAAE,CAAA;QAC/D,GAAG,CAAC,SAAS,CAAC,WAAC,CAAA,GAAG,IAAI,WAAW,EAAE,IAAI,UAAU,EAAE,CAAC,CAAA;IACtD,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js deleted file mode 100644 index 51daaa5e2..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const ucs2length_1 = require("../../runtime/ucs2length"); -const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxLength" ? "more" : "fewer"; - return codegen_1.str `must NOT have ${comp} than ${schemaCode} characters`; - }, - params: ({ schemaCode }) => codegen_1._ `{limit: ${schemaCode}}`, -}; -const def = { - keyword: ["maxLength", "minLength"], - type: "string", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode, it } = cxt; - const op = keyword === "maxLength" ? codegen_1.operators.GT : codegen_1.operators.LT; - const len = it.opts.unicode === false ? codegen_1._ `${data}.length` : codegen_1._ `${util_1.useFunc(cxt.gen, ucs2length_1.default)}(${data})`; - cxt.fail$data(codegen_1._ `${len} ${op} ${schemaCode}`); - }, -}; -exports.default = def; -//# sourceMappingURL=limitLength.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map deleted file mode 100644 index 103af2951..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"limitLength.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitLength.ts"],"names":[],"mappings":";;AAEA,mDAAuD;AACvD,6CAA0C;AAC1C,yDAAiD;AAEjD,MAAM,KAAK,GAA2B;IACpC,OAAO,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC;QAC3B,MAAM,IAAI,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;QACvD,OAAO,aAAG,CAAA,iBAAiB,IAAI,SAAS,UAAU,aAAa,CAAA;IACjE,CAAC;IACD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,WAAW,UAAU,GAAG;CACpD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;IACnC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC3C,MAAM,EAAE,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,mBAAS,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAS,CAAC,EAAE,CAAA;QAChE,MAAM,GAAG,GACP,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,WAAC,CAAA,GAAG,IAAI,SAAS,CAAC,CAAC,CAAC,WAAC,CAAA,GAAG,cAAO,CAAC,GAAG,CAAC,GAAG,EAAE,oBAAU,CAAC,IAAI,IAAI,GAAG,CAAA;QAC7F,GAAG,CAAC,SAAS,CAAC,WAAC,CAAA,GAAG,GAAG,IAAI,EAAE,IAAI,UAAU,EAAE,CAAC,CAAA;IAC9C,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts deleted file mode 100644 index 2d3890855..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -declare type Kwd = "maximum" | "minimum" | "exclusiveMaximum" | "exclusiveMinimum"; -declare type Comparison = "<=" | ">=" | "<" | ">"; -export declare type LimitNumberError = ErrorObject; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js deleted file mode 100644 index 504cf252f..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const ops = codegen_1.operators; -const KWDs = { - maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT }, - minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT }, - exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE }, - exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }, -}; -const error = { - message: ({ keyword, schemaCode }) => codegen_1.str `must be ${KWDs[keyword].okStr} ${schemaCode}`, - params: ({ keyword, schemaCode }) => codegen_1._ `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, -}; -const def = { - keyword: Object.keys(KWDs), - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - cxt.fail$data(codegen_1._ `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`); - }, -}; -exports.default = def; -//# sourceMappingURL=limitNumber.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map deleted file mode 100644 index b624b2279..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"limitNumber.js","sourceRoot":"","sources":["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AS,CAAC,WAAC,CAAA,GAAG,IAAI,IAAI,IAAI,CAAC,OAAc,CAAC,CAAC,IAAI,IAAI,UAAU,aAAa,IAAI,GAAG,CAAC,CAAA;IACxF,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts deleted file mode 100644 index cde2aa270..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { CodeKeywordDefinition } from "../../types"; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js deleted file mode 100644 index 743b11770..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const error = { - message({ keyword, schemaCode }) { - const comp = keyword === "maxProperties" ? "more" : "fewer"; - return codegen_1.str `must NOT have ${comp} than ${schemaCode} items`; - }, - params: ({ schemaCode }) => codegen_1._ `{limit: ${schemaCode}}`, -}; -const def = { - keyword: ["maxProperties", "minProperties"], - type: "object", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { keyword, data, schemaCode } = cxt; - const op = keyword === "maxProperties" ? codegen_1.operators.GT : codegen_1.operators.LT; - cxt.fail$data(codegen_1._ `Object.keys(${data}).length ${op} ${schemaCode}`); - }, -}; -exports.default = def; -//# sourceMappingURL=limitProperties.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map deleted file mode 100644 index 56db84488..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"limitProperties.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/limitProperties.ts"],"names":[],"mappings":";;AAEA,mDAAuD;AAEvD,MAAM,KAAK,GAA2B;IACpC,OAAO,CAAC,EAAC,OAAO,EAAE,UAAU,EAAC;QAC3B,MAAM,IAAI,GAAG,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;QAC3D,OAAO,aAAG,CAAA,iBAAiB,IAAI,SAAS,UAAU,QAAQ,CAAA;IAC5D,CAAC;IACD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,WAAW,UAAU,GAAG;CACpD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;IAC3C,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAC,GAAG,GAAG,CAAA;QACvC,MAAM,EAAE,GAAG,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,mBAAS,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAS,CAAC,EAAE,CAAA;QACpE,GAAG,CAAC,SAAS,CAAC,WAAC,CAAA,eAAe,IAAI,YAAY,EAAE,IAAI,UAAU,EAAE,CAAC,CAAA;IACnE,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts deleted file mode 100644 index afa29d357..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type MultipleOfError = ErrorObject<"multipleOf", { - multipleOf: number; -}, number | { - $data: string; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js deleted file mode 100644 index 8626ae0f3..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const codegen_1 = require("../../compile/codegen"); -const error = { - message: ({ schemaCode }) => codegen_1.str `must be multiple of ${schemaCode}`, - params: ({ schemaCode }) => codegen_1._ `{multipleOf: ${schemaCode}}`, -}; -const def = { - keyword: "multipleOf", - type: "number", - schemaType: "number", - $data: true, - error, - code(cxt) { - const { gen, data, schemaCode, it } = cxt; - // const bdt = bad$DataType(schemaCode, def.schemaType, $data) - const prec = it.opts.multipleOfPrecision; - const res = gen.let("res"); - const invalid = prec - ? codegen_1._ `Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` - : codegen_1._ `${res} !== parseInt(${res})`; - cxt.fail$data(codegen_1._ `(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`); - }, -}; -exports.default = def; -//# sourceMappingURL=multipleOf.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map deleted file mode 100644 index ca52055f0..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"multipleOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/multipleOf.ts"],"names":[],"mappings":";;AAEA,mDAA4C;AAQ5C,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,aAAG,CAAA,uBAAuB,UAAU,EAAE;IACjE,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,gBAAgB,UAAU,GAAG;CACzD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACvC,sEAAsE;QACtE,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAA;QACxC,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC1B,MAAM,OAAO,GAAG,IAAI;YAClB,CAAC,CAAC,WAAC,CAAA,uBAAuB,GAAG,OAAO,GAAG,UAAU,IAAI,EAAE;YACvD,CAAC,CAAC,WAAC,CAAA,GAAG,GAAG,iBAAiB,GAAG,GAAG,CAAA;QAClC,GAAG,CAAC,SAAS,CAAC,WAAC,CAAA,IAAI,UAAU,cAAc,GAAG,MAAM,IAAI,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,CAAA;IACzF,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts deleted file mode 100644 index bf232ffc6..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type PatternError = ErrorObject<"pattern", { - pattern: string; -}, string | { - $data: string; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js deleted file mode 100644 index 7bb1587d9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const code_1 = require("../code"); -const codegen_1 = require("../../compile/codegen"); -const error = { - message: ({ schemaCode }) => codegen_1.str `must match pattern "${schemaCode}"`, - params: ({ schemaCode }) => codegen_1._ `{pattern: ${schemaCode}}`, -}; -const def = { - keyword: "pattern", - type: "string", - schemaType: "string", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, schemaCode } = cxt; - const regExp = $data ? codegen_1._ `(new RegExp(${schemaCode}, "u"))` : code_1.usePattern(gen, schema); // TODO regexp should be wrapped in try/catch - cxt.fail$data(codegen_1._ `!${regExp}.test(${data})`); - }, -}; -exports.default = def; -//# sourceMappingURL=pattern.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js.map deleted file mode 100644 index 9952aa40d..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"pattern.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/pattern.ts"],"names":[],"mappings":";;AAEA,kCAAkC;AAClC,mDAA4C;AAI5C,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,aAAG,CAAA,uBAAuB,UAAU,GAAG;IAClE,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,aAAa,UAAU,GAAG;CACtD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAC,GAAG,GAAG,CAAA;QAClD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,WAAC,CAAA,eAAe,UAAU,SAAS,CAAC,CAAC,CAAC,iBAAU,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA,CAAC,6CAA6C;QAClI,GAAG,CAAC,SAAS,CAAC,WAAC,CAAA,IAAI,MAAM,SAAS,IAAI,GAAG,CAAC,CAAA;IAC5C,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.d.ts deleted file mode 100644 index fe94d04ae..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type RequiredError = ErrorObject<"required", { - missingProperty: string; -}, string[] | { - $data: string; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js deleted file mode 100644 index 723c22ec9..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const code_1 = require("../code"); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const error = { - message: ({ params: { missingProperty } }) => codegen_1.str `must have required property '${missingProperty}'`, - params: ({ params: { missingProperty } }) => codegen_1._ `{missingProperty: ${missingProperty}}`, -}; -const def = { - keyword: "required", - type: "object", - schemaType: "array", - $data: true, - error, - code(cxt) { - const { gen, schema, schemaCode, data, $data, it } = cxt; - const { opts } = it; - if (!$data && schema.length === 0) - return; - const useLoop = schema.length >= opts.loopRequired; - if (it.allErrors) - allErrorsMode(); - else - exitOnErrorMode(); - if (opts.strictRequired) { - const props = cxt.parentSchema.properties; - const { definedProperties } = cxt.it; - for (const requiredKey of schema) { - if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === undefined && !definedProperties.has(requiredKey)) { - const schemaPath = it.schemaEnv.baseId + it.errSchemaPath; - const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`; - util_1.checkStrictMode(it, msg, it.opts.strictRequired); - } - } - } - function allErrorsMode() { - if (useLoop || $data) { - cxt.block$data(codegen_1.nil, loopAllRequired); - } - else { - for (const prop of schema) { - code_1.checkReportMissingProp(cxt, prop); - } - } - } - function exitOnErrorMode() { - const missing = gen.let("missing"); - if (useLoop || $data) { - const valid = gen.let("valid", true); - cxt.block$data(valid, () => loopUntilMissing(missing, valid)); - cxt.ok(valid); - } - else { - gen.if(code_1.checkMissingProp(cxt, schema, missing)); - code_1.reportMissingProp(cxt, missing); - gen.else(); - } - } - function loopAllRequired() { - gen.forOf("prop", schemaCode, (prop) => { - cxt.setParams({ missingProperty: prop }); - gen.if(code_1.noPropertyInData(gen, data, prop, opts.ownProperties), () => cxt.error()); - }); - } - function loopUntilMissing(missing, valid) { - cxt.setParams({ missingProperty: missing }); - gen.forOf(missing, schemaCode, () => { - gen.assign(valid, code_1.propertyInData(gen, data, missing, opts.ownProperties)); - gen.if(codegen_1.not(valid), () => { - cxt.error(); - gen.break(); - }); - }, codegen_1.nil); - } - }, -}; -exports.default = def; -//# sourceMappingURL=required.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js.map deleted file mode 100644 index fb05dbbc4..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/required.js.map +++ /dev/null @@ -1 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C,SAAS,CAAC,EAAC,eAAe,EAAE,IAAI,EAAC,CAAC,CAAA;gBACtC,GAAG,CAAC,EAAE,CAAC,uBAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAA;YAClF,CAAC,CAAC,CAAA;QACJ,CAAC;QAED,SAAS,gBAAgB,CAAC,OAAa,EAAE,KAAW;YAClD,GAAG,CAAC,SAAS,CAAC,EAAC,eAAe,EAAE,OAAO,EAAC,CAAC,CAAA;YACzC,GAAG,CAAC,KAAK,CACP,OAAO,EACP,UAAkB,EAClB,GAAG,EAAE;gBACH,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,qBAAc,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAA;gBACzE,GAAG,CAAC,EAAE,CAAC,aAAG,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE;oBACtB,GAAG,CAAC,KAAK,EAAE,CAAA;oBACX,GAAG,CAAC,KAAK,EAAE,CAAA;gBACb,CAAC,CAAC,CAAA;YACJ,CAAC,EACD,aAAG,CACJ,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts deleted file mode 100644 index c4f4b4ca7..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { CodeKeywordDefinition, ErrorObject } from "../../types"; -export declare type UniqueItemsError = ErrorObject<"uniqueItems", { - i: number; - j: number; -}, boolean | { - $data: string; -}>; -declare const def: CodeKeywordDefinition; -export default def; diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js deleted file mode 100644 index aa4abb9f3..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -const dataType_1 = require("../../compile/validate/dataType"); -const codegen_1 = require("../../compile/codegen"); -const util_1 = require("../../compile/util"); -const equal_1 = require("../../runtime/equal"); -const error = { - message: ({ params: { i, j } }) => codegen_1.str `must NOT have duplicate items (items ## ${j} and ${i} are identical)`, - params: ({ params: { i, j } }) => codegen_1._ `{i: ${i}, j: ${j}}`, -}; -const def = { - keyword: "uniqueItems", - type: "array", - schemaType: "boolean", - $data: true, - error, - code(cxt) { - const { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt; - if (!$data && !schema) - return; - const valid = gen.let("valid"); - const itemTypes = parentSchema.items ? dataType_1.getSchemaTypes(parentSchema.items) : []; - cxt.block$data(valid, validateUniqueItems, codegen_1._ `${schemaCode} === false`); - cxt.ok(valid); - function validateUniqueItems() { - const i = gen.let("i", codegen_1._ `${data}.length`); - const j = gen.let("j"); - cxt.setParams({ i, j }); - gen.assign(valid, true); - gen.if(codegen_1._ `${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j)); - } - function canOptimize() { - return itemTypes.length > 0 && !itemTypes.some((t) => t === "object" || t === "array"); - } - function loopN(i, j) { - const item = gen.name("item"); - const wrongType = dataType_1.checkDataTypes(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong); - const indices = gen.const("indices", codegen_1._ `{}`); - gen.for(codegen_1._ `;${i}--;`, () => { - gen.let(item, codegen_1._ `${data}[${i}]`); - gen.if(wrongType, codegen_1._ `continue`); - if (itemTypes.length > 1) - gen.if(codegen_1._ `typeof ${item} == "string"`, codegen_1._ `${item} += "_"`); - gen - .if(codegen_1._ `typeof ${indices}[${item}] == "number"`, () => { - gen.assign(j, codegen_1._ `${indices}[${item}]`); - cxt.error(); - gen.assign(valid, false).break(); - }) - .code(codegen_1._ `${indices}[${item}] = ${i}`); - }); - } - function loopN2(i, j) { - const eql = util_1.useFunc(gen, equal_1.default); - const outer = gen.name("outer"); - gen.label(outer).for(codegen_1._ `;${i}--;`, () => gen.for(codegen_1._ `${j} = ${i}; ${j}--;`, () => gen.if(codegen_1._ `${eql}(${data}[${i}], ${data}[${j}])`, () => { - cxt.error(); - gen.assign(valid, false).break(outer); - }))); - } - }, -}; -exports.default = def; -//# sourceMappingURL=uniqueItems.js.map \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map b/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map deleted file mode 100644 index 66d20710c..000000000 --- a/node_modules/table/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"uniqueItems.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/uniqueItems.ts"],"names":[],"mappings":";;AAEA,8DAAwF;AACxF,mDAAkD;AAClD,6CAA0C;AAC1C,+CAAuC;AAQvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,CAAC,EAAE,CAAC,EAAC,EAAC,EAAE,EAAE,CAC5B,aAAG,CAAA,2CAA2C,CAAC,QAAQ,CAAC,iBAAiB;IAC3E,MAAM,EAAE,CAAC,EAAC,MAAM,EAAE,EAAC,CAAC,EAAE,CAAC,EAAC,EAAC,EAAE,EAAE,CAAC,WAAC,CAAA,OAAO,CAAC,QAAQ,CAAC,GAAG;CACpD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,aAAa;IACtB,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAA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AK,CAAC,CAAA;YAC/B,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;YAC/B,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,WAAC,CAAA,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,CACrC,GAAG,CAAC,GAAG,CAAC,WAAC,CAAA,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,CACpC,GAAG,CAAC,EAAE,CAAC,WAAC,CAAA,GAAG,GAAG,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE;gBACnD,GAAG,CAAC,KAAK,EAAE,CAAA;gBACX,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YACvC,CAAC,CAAC,CACH,CACF,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"} \ No newline at end of file diff --git a/node_modules/table/node_modules/ajv/package.json b/node_modules/table/node_modules/ajv/package.json deleted file mode 100644 index b9395cb07..000000000 --- a/node_modules/table/node_modules/ajv/package.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "_from": "ajv@^8.0.1", - "_id": "ajv@8.0.4", - "_inBundle": false, - "_integrity": "sha512-v1qwknPv7rNGqtiaC4ywb3OZ3LNrEjbJL5igAe8eTbXOj8ye0XVul2pFRulwl/j3QfUKdQ/J9HZaYfQCnR7cvA==", - "_location": "/table/ajv", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "ajv@^8.0.1", - "name": "ajv", - "escapedName": "ajv", - "rawSpec": "^8.0.1", - "saveSpec": null, - "fetchSpec": "^8.0.1" - }, - "_requiredBy": [ - "/table" - ], - "_resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.4.tgz", - "_shasum": "7dc77632eb5dcde646b3aa18dd3bfe0d8965f379", - "_spec": "ajv@^8.0.1", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/table", - "author": { - "name": "Evgeny Poberezkin" - }, - "bugs": { - "url": "https://github.com/ajv-validator/ajv/issues" - }, - "bundleDependencies": false, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/ajv" - }, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "deprecated": false, - "description": "Another JSON Schema Validator", - "devDependencies": { - "@ajv-validator/config": "^0.3.0", - "@types/chai": "^4.2.12", - "@types/mocha": "^8.0.3", - "@types/node": "^14.0.27", - "@types/require-from-string": "^1.2.0", - "@typescript-eslint/eslint-plugin": "^3.8.0", - "@typescript-eslint/parser": "^3.8.0", - "@vuepress/shared-utils": "^1.8.2", - "ajv-formats": "^2.0.0", - "browserify": "^17.0.0", - "chai": "^4.0.1", - "cross-env": "^7.0.2", - "dayjs": "^1.10.4", - "dayjs-plugin-utc": "^0.1.2", - "eslint": "^7.8.1", - "eslint-config-prettier": "^7.0.0", - "glob": "^7.0.0", - "husky": "^6.0.0", - "if-node-version": "^1.0.0", - "jimp": "^0.16.1", - "js-beautify": "^1.7.3", - "json-schema-test": "^2.0.0", - "karma": "^5.0.0", - "karma-chrome-launcher": "^3.0.0", - "karma-mocha": "^2.0.0", - "lint-staged": "^10.2.11", - "mocha": "^8.0.1", - "node-fetch": "^2.6.1", - "nyc": "^15.0.0", - "prettier": "^2.0.5", - "terser": "^5.2.1", - "ts-node": "^9.0.0", - "tsify": "^5.0.2", - "typescript": "^4.2.0", - "vuepress": "^1.8.2" - }, - "files": [ - "dist/", - ".runkit_example.js" - ], - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - }, - "homepage": "https://ajv.js.org", - "husky": { - "hooks": { - "pre-commit": "lint-staged && npm test" - } - }, - "keywords": [ - "JSON", - "schema", - "validator", - "validation", - "jsonschema", - "json-schema", - "json-schema-validator", - "json-schema-validation" - ], - "license": "MIT", - "lint-staged": { - "*.{json,yaml,js,ts}": "prettier --write" - }, - "main": "dist/ajv.js", - "name": "ajv", - "nyc": { - "exclude": [ - "**/spec/**", - "node_modules" - ], - "reporter": [ - "lcov", - "text-summary" - ] - }, - "prettier": "@ajv-validator/config/prettierrc.json", - "repository": { - "type": "git", - "url": "git+https://github.com/ajv-validator/ajv.git" - }, - "runkitExampleFilename": ".runkit_example.js", - "scripts": { - "benchmark": "npm i && npm run build && npm link && cd ./benchmark && npm link ajv && npm i && node ./jtd", - "build": "rm -rf dist && tsc && cp -r lib/refs dist && rm dist/refs/json-schema-2019-09/index.ts && rm dist/refs/json-schema-2020-12/index.ts && rm dist/refs/jtd-schema.ts", - "bundle": "rm -rf bundle && node ./scripts/bundle.js ajv ajv7 ajv7 && node ./scripts/bundle.js 2019 ajv2019 ajv2019 && node ./scripts/bundle.js jtd ajvJTD ajvJTD", - "docs:build": "./scripts/prepare-site && vuepress build docs", - "docs:dev": "./scripts/prepare-site && vuepress dev docs", - "eslint": "eslint \"lib/**/*.ts\" \"spec/**/*.*s\" scripts --ignore-pattern spec/JSON-Schema-Test-Suite", - "json-tests": "rm -rf spec/_json/*.js && node scripts/jsontests", - "prepublish": "npm run build", - "prettier:check": "prettier --list-different \"./**/*.{json,yaml,js,ts}\"", - "prettier:write": "prettier --write \"./**/*.{json,yaml,js,ts}\"", - "test": "npm run json-tests && npm run prettier:check && npm run eslint && npm link && npm link ajv && npm run test-cov", - "test-all": "npm run test-cov && if-node-version 12 npm run test-browser", - "test-browser": "rm -rf .browser && npm run bundle && scripts/prepare-tests && karma start", - "test-ci": "AJV_FULL_TEST=true npm test", - "test-codegen": "nyc cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register 'spec/codegen.spec.ts' -R spec", - "test-cov": "nyc npm run test-spec", - "test-debug": "npm run test-spec -- --inspect-brk", - "test-karma": "karma start", - "test-spec": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register \"spec/**/*.spec.{ts,js}\" -R dot -g \\(.recursiveRef.with.no..recursiveAnchor\\|.dynamicRef.with.no..dynamicAnchor\\).in.the.initial.target.schema.resource -i" - }, - "types": "dist/ajv.d.ts", - "version": "8.0.4" -} diff --git a/node_modules/table/node_modules/json-schema-traverse/.eslintrc.yml b/node_modules/table/node_modules/json-schema-traverse/.eslintrc.yml deleted file mode 100644 index 618559ab6..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/.eslintrc.yml +++ /dev/null @@ -1,27 +0,0 @@ -extends: eslint:recommended -env: - node: true - browser: true -rules: - block-scoped-var: 2 - complexity: [2, 15] - curly: [2, multi-or-nest, consistent] - dot-location: [2, property] - dot-notation: 2 - indent: [2, 2, SwitchCase: 1] - linebreak-style: [2, unix] - new-cap: 2 - no-console: [2, allow: [warn, error]] - no-else-return: 2 - no-eq-null: 2 - no-fallthrough: 2 - no-invalid-this: 2 - no-return-assign: 2 - no-shadow: 1 - no-trailing-spaces: 2 - no-use-before-define: [2, nofunc] - quotes: [2, single, avoid-escape] - semi: [2, always] - strict: [2, global] - valid-jsdoc: [2, requireReturn: false] - no-control-regex: 0 diff --git a/node_modules/table/node_modules/json-schema-traverse/.github/FUNDING.yml b/node_modules/table/node_modules/json-schema-traverse/.github/FUNDING.yml deleted file mode 100644 index 44f80f417..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -github: epoberezkin -tidelift: "npm/json-schema-traverse" diff --git a/node_modules/table/node_modules/json-schema-traverse/.github/workflows/build.yml b/node_modules/table/node_modules/json-schema-traverse/.github/workflows/build.yml deleted file mode 100644 index f8ef5ba80..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/.github/workflows/build.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: build - -on: - push: - branches: [master] - pull_request: - branches: ["*"] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [10.x, 12.x, 14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm test - - name: Coveralls - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/node_modules/table/node_modules/json-schema-traverse/.github/workflows/publish.yml b/node_modules/table/node_modules/json-schema-traverse/.github/workflows/publish.yml deleted file mode 100644 index 924825b12..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/.github/workflows/publish.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: publish - -on: - release: - types: [published] - -jobs: - publish-npm: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ - - run: npm install - - run: npm test - - name: Publish beta version to npm - if: "github.event.release.prerelease" - run: npm publish --tag beta - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Publish to npm - if: "!github.event.release.prerelease" - run: npm publish - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/node_modules/table/node_modules/json-schema-traverse/LICENSE b/node_modules/table/node_modules/json-schema-traverse/LICENSE deleted file mode 100644 index 7f1543566..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Evgeny Poberezkin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/table/node_modules/json-schema-traverse/README.md b/node_modules/table/node_modules/json-schema-traverse/README.md deleted file mode 100644 index f3e60073a..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# json-schema-traverse -Traverse JSON Schema passing each schema object to callback - -[![build](https://github.com/epoberezkin/json-schema-traverse/workflows/build/badge.svg)](https://github.com/epoberezkin/json-schema-traverse/actions?query=workflow%3Abuild) -[![npm](https://img.shields.io/npm/v/json-schema-traverse)](https://www.npmjs.com/package/json-schema-traverse) -[![coverage](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master) - - -## Install - -``` -npm install json-schema-traverse -``` - - -## Usage - -```javascript -const traverse = require('json-schema-traverse'); -const schema = { - properties: { - foo: {type: 'string'}, - bar: {type: 'integer'} - } -}; - -traverse(schema, {cb}); -// cb is called 3 times with: -// 1. root schema -// 2. {type: 'string'} -// 3. {type: 'integer'} - -// Or: - -traverse(schema, {cb: {pre, post}}); -// pre is called 3 times with: -// 1. root schema -// 2. {type: 'string'} -// 3. {type: 'integer'} -// -// post is called 3 times with: -// 1. {type: 'string'} -// 2. {type: 'integer'} -// 3. root schema - -``` - -Callback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed. - -Callback is passed these parameters: - -- _schema_: the current schema object -- _JSON pointer_: from the root schema to the current schema object -- _root schema_: the schema passed to `traverse` object -- _parent JSON pointer_: from the root schema to the parent schema object (see below) -- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.) -- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema -- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'` - - -## Traverse objects in all unknown keywords - -```javascript -const traverse = require('json-schema-traverse'); -const schema = { - mySchema: { - minimum: 1, - maximum: 2 - } -}; - -traverse(schema, {allKeys: true, cb}); -// cb is called 2 times with: -// 1. root schema -// 2. mySchema -``` - -Without option `allKeys: true` callback will be called only with root schema. - - -## Enterprise support - -json-schema-traverse package is a part of [Tidelift enterprise subscription](https://tidelift.com/subscription/pkg/npm-json-schema-traverse?utm_source=npm-json-schema-traverse&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - it provides a centralised commercial support to open-source software users, in addition to the support provided by software maintainers. - - -## Security contact - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. Please do NOT report security vulnerability via GitHub issues. - - -## License - -[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE) diff --git a/node_modules/table/node_modules/json-schema-traverse/index.d.ts b/node_modules/table/node_modules/json-schema-traverse/index.d.ts deleted file mode 100644 index 0772daedb..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/index.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -declare function traverse( - schema: traverse.SchemaObject, - opts: traverse.Options, - cb?: traverse.Callback -): void; - -declare function traverse( - schema: traverse.SchemaObject, - cb: traverse.Callback -): void; - -declare namespace traverse { - interface SchemaObject { - $id?: string; - $schema?: string; - [x: string]: any; - } - - type Callback = ( - schema: SchemaObject, - jsonPtr: string, - rootSchema: SchemaObject, - parentJsonPtr?: string, - parentKeyword?: string, - parentSchema?: SchemaObject, - keyIndex?: string | number - ) => void; - - interface Options { - allKeys?: boolean; - cb?: - | Callback - | { - pre?: Callback; - post?: Callback; - }; - } -} - -export = traverse; diff --git a/node_modules/table/node_modules/json-schema-traverse/index.js b/node_modules/table/node_modules/json-schema-traverse/index.js deleted file mode 100644 index e521bfa85..000000000 --- a/node_modules/table/node_modules/json-schema-traverse/index.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict'; - -var traverse = module.exports = function (schema, opts, cb) { - // Legacy support for v0.3.1 and earlier. - if (typeof opts == 'function') { - cb = opts; - opts = {}; - } - - cb = opts.cb || cb; - var pre = (typeof cb == 'function') ? cb : cb.pre || function() {}; - var post = cb.post || function() {}; - - _traverse(opts, pre, post, schema, '', schema); -}; - - -traverse.keywords = { - additionalItems: true, - items: true, - contains: true, - additionalProperties: true, - propertyNames: true, - not: true, - if: true, - then: true, - else: true -}; - -traverse.arrayKeywords = { - items: true, - allOf: true, - anyOf: true, - oneOf: true -}; - -traverse.propsKeywords = { - $defs: true, - definitions: true, - properties: true, - patternProperties: true, - dependencies: true -}; - -traverse.skipKeywords = { - default: true, - enum: true, - const: true, - required: true, - maximum: true, - minimum: true, - exclusiveMaximum: true, - exclusiveMinimum: true, - multipleOf: true, - maxLength: true, - minLength: true, - pattern: true, - format: true, - maxItems: true, - minItems: true, - uniqueItems: true, - maxProperties: true, - minProperties: true -}; - - -function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { - if (schema && typeof schema == 'object' && !Array.isArray(schema)) { - pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); - for (var key in schema) { - var sch = schema[key]; - if (Array.isArray(sch)) { - if (key in traverse.arrayKeywords) { - for (var i=0; i=10.0.0" - }, - "homepage": "https://github.com/gajus/table#readme", - "husky": { - "hooks": { - "post-commit": "npm run create-readme && git add README.md && git commit -m 'docs: generate docs' --no-verify", - "pre-commit": "npm run lint && npm run test && npm run build" - } - }, - "keywords": [ - "ascii", - "text", - "table", - "align", - "ansi" - ], - "license": "BSD-3-Clause", - "main": "./dist/index.js", - "name": "table", - "nyc": { - "include": [ - "src/**/*.js" - ], - "instrument": false, - "reporter": [ - "text-lcov" - ], - "require": [ - "@babel/register" - ], - "sourceMap": false - }, - "repository": { - "type": "git", - "url": "git+https://github.com/gajus/table.git" - }, - "scripts": { - "build": "rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files && npm run create-validators && flow-copy-source src dist", - "create-readme": "gitdown ./.README/README.md --output-file ./README.md", - "create-validators": "ajv compile --all-errors --inline-refs=false -s src/schemas/config -s src/schemas/streamConfig -r src/schemas/shared -c ajv-keywords/dist/keywords/typeof -o | js-beautify > dist/validators.js", - "lint": "npm run build && eslint ./src ./test && flow", - "test": "mocha --require @babel/register" - }, - "version": "6.0.9" -} diff --git a/node_modules/v8-compile-cache/CHANGELOG.md b/node_modules/v8-compile-cache/CHANGELOG.md deleted file mode 100644 index d4da25694..000000000 --- a/node_modules/v8-compile-cache/CHANGELOG.md +++ /dev/null @@ -1,53 +0,0 @@ -# `v8-module-cache` Changelog - -## 2021-03-05, Version 2.3.0 - -* Fix use require.main instead of module.parent [#34](https://github.com/zertosh/v8-compile-cache/pull/34). - -## 2020-10-28, Version 2.2.0 - -* Added `V8_COMPILE_CACHE_CACHE_DIR` option [#23](https://github.com/zertosh/v8-compile-cache/pull/23). - -## 2020-05-30, Version 2.1.1 - -* Stop using process.umask() [#28](https://github.com/zertosh/v8-compile-cache/pull/28). - -## 2019-08-04, Version 2.1.0 - -* Fix Electron by calling the module wrapper with `Buffer` [#10](https://github.com/zertosh/v8-compile-cache/pull/10). - -## 2019-05-10, Version 2.0.3 - -* Add `LICENSE` file [#19](https://github.com/zertosh/v8-compile-cache/pull/19). -* Add "repository" to `package.json` (see [eea336e](https://github.com/zertosh/v8-compile-cache/commit/eea336eaa8360f9ded9342b8aa928e56ac6a7529)). -* Support `require.resolve.paths` (added in Node v8.9.0) [#20](https://github.com/zertosh/v8-compile-cache/pull/20)/[#22](https://github.com/zertosh/v8-compile-cache/pull/22). - -## 2018-08-06, Version 2.0.2 - -* Re-publish. - -## 2018-08-06, Version 2.0.1 - -* Support `require.resolve` options (added in Node v8.9.0). - -## 2018-04-30, Version 2.0.0 - -* Use `Buffer.alloc` instead of `new Buffer()`. -* Drop support for Node 5.x. - -## 2018-01-23, Version 1.1.2 - -* Instead of checking for `process.versions.v8`, check that `script.cachedDataProduced` is `true` (rather than `null`/`undefined`) for support to be considered existent. - -## 2018-01-23, Version 1.1.1 - -* Check for the existence of `process.versions.v8` before attaching hook (see [f8b0388](https://github.com/zertosh/v8-compile-cache/commit/f8b038848be94bc2c905880dd50447c73393f364)). - -## 2017-03-27, Version 1.1.0 - -* Safer cache directory creation (see [bcb3b12](https://github.com/zertosh/v8-compile-cache/commit/bcb3b12c819ab0927ec4408e70f612a6d50a9617)). - - The cache is now suffixed with the user's uid on POSIX systems (i.e. `/path/to/tmp/v8-compile-cache-1234`). - -## 2017-02-21, Version 1.0.0 - -* Initial release. diff --git a/node_modules/v8-compile-cache/README.md b/node_modules/v8-compile-cache/README.md deleted file mode 100644 index 6e0b99fba..000000000 --- a/node_modules/v8-compile-cache/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# v8-compile-cache - -[![Build Status](https://travis-ci.org/zertosh/v8-compile-cache.svg?branch=master)](https://travis-ci.org/zertosh/v8-compile-cache) - -`v8-compile-cache` attaches a `require` hook to use [V8's code cache](https://v8project.blogspot.com/2015/07/code-caching.html) to speed up instantiation time. The "code cache" is the work of parsing and compiling done by V8. - -The ability to tap into V8 to produce/consume this cache was introduced in [Node v5.7.0](https://nodejs.org/en/blog/release/v5.7.0/). - -## Usage - -1. Add the dependency: - - ```sh - $ npm install --save v8-compile-cache - ``` - -2. Then, in your entry module add: - - ```js - require('v8-compile-cache'); - ``` - -**Requiring `v8-compile-cache` in Node <5.7.0 is a noop – but you need at least Node 4.0.0 to support the ES2015 syntax used by `v8-compile-cache`.** - -## Options - -Set the environment variable `DISABLE_V8_COMPILE_CACHE=1` to disable the cache. - -Cache directory is defined by environment variable `V8_COMPILE_CACHE_CACHE_DIR` or defaults to `/v8-compile-cache-`. - -## Internals - -Cache files are suffixed `.BLOB` and `.MAP` corresponding to the entry module that required `v8-compile-cache`. The cache is _entry module specific_ because it is faster to load the entire code cache into memory at once, than it is to read it from disk on a file-by-file basis. - -## Benchmarks - -See https://github.com/zertosh/v8-compile-cache/tree/master/bench. - -**Load Times:** - -| Module | Without Cache | With Cache | -| ---------------- | -------------:| ----------:| -| `babel-core` | `218ms` | `185ms` | -| `yarn` | `153ms` | `113ms` | -| `yarn` (bundled) | `228ms` | `105ms` | - -_^ Includes the overhead of loading the cache itself._ - -## Acknowledgements - -* `FileSystemBlobStore` and `NativeCompileCache` are based on Atom's implementation of their v8 compile cache: - - https://github.com/atom/atom/blob/b0d7a8a/src/file-system-blob-store.js - - https://github.com/atom/atom/blob/b0d7a8a/src/native-compile-cache.js -* `mkdirpSync` is based on: - - https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 diff --git a/node_modules/v8-compile-cache/package.json b/node_modules/v8-compile-cache/package.json deleted file mode 100644 index ecf0da772..000000000 --- a/node_modules/v8-compile-cache/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "v8-compile-cache@^2.0.3", - "_id": "v8-compile-cache@2.3.0", - "_inBundle": false, - "_integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "_location": "/v8-compile-cache", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "v8-compile-cache@^2.0.3", - "name": "v8-compile-cache", - "escapedName": "v8-compile-cache", - "rawSpec": "^2.0.3", - "saveSpec": null, - "fetchSpec": "^2.0.3" - }, - "_requiredBy": [ - "/eslint" - ], - "_resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "_shasum": "2de19618c66dc247dcfb6f99338035d8245a2cee", - "_spec": "v8-compile-cache@^2.0.3", - "_where": "/Users/christopher/Projects/github-actions-mobsuccess/node_modules/eslint", - "author": { - "name": "Andres Suarez", - "email": "zertosh@gmail.com" - }, - "bugs": { - "url": "https://github.com/zertosh/v8-compile-cache/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Require hook for automatic V8 compile cache persistence", - "devDependencies": { - "babel-core": "6.26.3", - "eslint": "^7.12.1", - "flow-parser": "0.136.0", - "rimraf": "^2.5.4", - "rxjs": "6.6.3", - "semver": "^5.3.0", - "tap": "^9.0.0", - "temp": "^0.8.3", - "yarn": "1.22.10" - }, - "files": [ - "v8-compile-cache.js" - ], - "homepage": "https://github.com/zertosh/v8-compile-cache#readme", - "license": "MIT", - "main": "v8-compile-cache.js", - "name": "v8-compile-cache", - "repository": { - "type": "git", - "url": "git+https://github.com/zertosh/v8-compile-cache.git" - }, - "scripts": { - "bench": "bench/run.sh", - "eslint": "eslint --max-warnings=0 .", - "posttest": "npm run eslint", - "tap": "tap test/*-test.js", - "test": "npm run tap" - }, - "version": "2.3.0" -} diff --git a/node_modules/v8-compile-cache/v8-compile-cache.js b/node_modules/v8-compile-cache/v8-compile-cache.js deleted file mode 100644 index f094da40f..000000000 --- a/node_modules/v8-compile-cache/v8-compile-cache.js +++ /dev/null @@ -1,371 +0,0 @@ -'use strict'; - -const Module = require('module'); -const crypto = require('crypto'); -const fs = require('fs'); -const path = require('path'); -const vm = require('vm'); -const os = require('os'); - -const hasOwnProperty = Object.prototype.hasOwnProperty; - -//------------------------------------------------------------------------------ -// FileSystemBlobStore -//------------------------------------------------------------------------------ - -class FileSystemBlobStore { - constructor(directory, prefix) { - const name = prefix ? slashEscape(prefix + '.') : ''; - this._blobFilename = path.join(directory, name + 'BLOB'); - this._mapFilename = path.join(directory, name + 'MAP'); - this._lockFilename = path.join(directory, name + 'LOCK'); - this._directory = directory; - this._load(); - } - - has(key, invalidationKey) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - return this._invalidationKeys[key] === invalidationKey; - } else if (hasOwnProperty.call(this._storedMap, key)) { - return this._storedMap[key][0] === invalidationKey; - } - return false; - } - - get(key, invalidationKey) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - if (this._invalidationKeys[key] === invalidationKey) { - return this._memoryBlobs[key]; - } - } else if (hasOwnProperty.call(this._storedMap, key)) { - const mapping = this._storedMap[key]; - if (mapping[0] === invalidationKey) { - return this._storedBlob.slice(mapping[1], mapping[2]); - } - } - } - - set(key, invalidationKey, buffer) { - this._invalidationKeys[key] = invalidationKey; - this._memoryBlobs[key] = buffer; - this._dirty = true; - } - - delete(key) { - if (hasOwnProperty.call(this._memoryBlobs, key)) { - this._dirty = true; - delete this._memoryBlobs[key]; - } - if (hasOwnProperty.call(this._invalidationKeys, key)) { - this._dirty = true; - delete this._invalidationKeys[key]; - } - if (hasOwnProperty.call(this._storedMap, key)) { - this._dirty = true; - delete this._storedMap[key]; - } - } - - isDirty() { - return this._dirty; - } - - save() { - const dump = this._getDump(); - const blobToStore = Buffer.concat(dump[0]); - const mapToStore = JSON.stringify(dump[1]); - - try { - mkdirpSync(this._directory); - fs.writeFileSync(this._lockFilename, 'LOCK', {flag: 'wx'}); - } catch (error) { - // Swallow the exception if we fail to acquire the lock. - return false; - } - - try { - fs.writeFileSync(this._blobFilename, blobToStore); - fs.writeFileSync(this._mapFilename, mapToStore); - } finally { - fs.unlinkSync(this._lockFilename); - } - - return true; - } - - _load() { - try { - this._storedBlob = fs.readFileSync(this._blobFilename); - this._storedMap = JSON.parse(fs.readFileSync(this._mapFilename)); - } catch (e) { - this._storedBlob = Buffer.alloc(0); - this._storedMap = {}; - } - this._dirty = false; - this._memoryBlobs = {}; - this._invalidationKeys = {}; - } - - _getDump() { - const buffers = []; - const newMap = {}; - let offset = 0; - - function push(key, invalidationKey, buffer) { - buffers.push(buffer); - newMap[key] = [invalidationKey, offset, offset + buffer.length]; - offset += buffer.length; - } - - for (const key of Object.keys(this._memoryBlobs)) { - const buffer = this._memoryBlobs[key]; - const invalidationKey = this._invalidationKeys[key]; - push(key, invalidationKey, buffer); - } - - for (const key of Object.keys(this._storedMap)) { - if (hasOwnProperty.call(newMap, key)) continue; - const mapping = this._storedMap[key]; - const buffer = this._storedBlob.slice(mapping[1], mapping[2]); - push(key, mapping[0], buffer); - } - - return [buffers, newMap]; - } -} - -//------------------------------------------------------------------------------ -// NativeCompileCache -//------------------------------------------------------------------------------ - -class NativeCompileCache { - constructor() { - this._cacheStore = null; - this._previousModuleCompile = null; - } - - setCacheStore(cacheStore) { - this._cacheStore = cacheStore; - } - - install() { - const self = this; - const hasRequireResolvePaths = typeof require.resolve.paths === 'function'; - this._previousModuleCompile = Module.prototype._compile; - Module.prototype._compile = function(content, filename) { - const mod = this; - - function require(id) { - return mod.require(id); - } - - // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L28 - function resolve(request, options) { - return Module._resolveFilename(request, mod, false, options); - } - require.resolve = resolve; - - // https://github.com/nodejs/node/blob/v10.15.3/lib/internal/modules/cjs/helpers.js#L37 - // resolve.resolve.paths was added in v8.9.0 - if (hasRequireResolvePaths) { - resolve.paths = function paths(request) { - return Module._resolveLookupPaths(request, mod, true); - }; - } - - require.main = process.mainModule; - - // Enable support to add extra extension types - require.extensions = Module._extensions; - require.cache = Module._cache; - - const dirname = path.dirname(filename); - - const compiledWrapper = self._moduleCompile(filename, content); - - // We skip the debugger setup because by the time we run, node has already - // done that itself. - - // `Buffer` is included for Electron. - // See https://github.com/zertosh/v8-compile-cache/pull/10#issuecomment-518042543 - const args = [mod.exports, require, mod, filename, dirname, process, global, Buffer]; - return compiledWrapper.apply(mod.exports, args); - }; - } - - uninstall() { - Module.prototype._compile = this._previousModuleCompile; - } - - _moduleCompile(filename, content) { - // https://github.com/nodejs/node/blob/v7.5.0/lib/module.js#L511 - - // Remove shebang - var contLen = content.length; - if (contLen >= 2) { - if (content.charCodeAt(0) === 35/*#*/ && - content.charCodeAt(1) === 33/*!*/) { - if (contLen === 2) { - // Exact match - content = ''; - } else { - // Find end of shebang line and slice it off - var i = 2; - for (; i < contLen; ++i) { - var code = content.charCodeAt(i); - if (code === 10/*\n*/ || code === 13/*\r*/) break; - } - if (i === contLen) { - content = ''; - } else { - // Note that this actually includes the newline character(s) in the - // new output. This duplicates the behavior of the regular - // expression that was previously used to replace the shebang line - content = content.slice(i); - } - } - } - } - - // create wrapper function - var wrapper = Module.wrap(content); - - var invalidationKey = crypto - .createHash('sha1') - .update(content, 'utf8') - .digest('hex'); - - var buffer = this._cacheStore.get(filename, invalidationKey); - - var script = new vm.Script(wrapper, { - filename: filename, - lineOffset: 0, - displayErrors: true, - cachedData: buffer, - produceCachedData: true, - }); - - if (script.cachedDataProduced) { - this._cacheStore.set(filename, invalidationKey, script.cachedData); - } else if (script.cachedDataRejected) { - this._cacheStore.delete(filename); - } - - var compiledWrapper = script.runInThisContext({ - filename: filename, - lineOffset: 0, - columnOffset: 0, - displayErrors: true, - }); - - return compiledWrapper; - } -} - -//------------------------------------------------------------------------------ -// utilities -// -// https://github.com/substack/node-mkdirp/blob/f2003bb/index.js#L55-L98 -// https://github.com/zertosh/slash-escape/blob/e7ebb99/slash-escape.js -//------------------------------------------------------------------------------ - -function mkdirpSync(p_) { - _mkdirpSync(path.resolve(p_), 0o777); -} - -function _mkdirpSync(p, mode) { - try { - fs.mkdirSync(p, mode); - } catch (err0) { - if (err0.code === 'ENOENT') { - _mkdirpSync(path.dirname(p)); - _mkdirpSync(p); - } else { - try { - const stat = fs.statSync(p); - if (!stat.isDirectory()) { throw err0; } - } catch (err1) { - throw err0; - } - } - } -} - -function slashEscape(str) { - const ESCAPE_LOOKUP = { - '\\': 'zB', - ':': 'zC', - '/': 'zS', - '\x00': 'z0', - 'z': 'zZ', - }; - const ESCAPE_REGEX = /[\\:/\x00z]/g; // eslint-disable-line no-control-regex - return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]); -} - -function supportsCachedData() { - const script = new vm.Script('""', {produceCachedData: true}); - // chakracore, as of v1.7.1.0, returns `false`. - return script.cachedDataProduced === true; -} - -function getCacheDir() { - const v8_compile_cache_cache_dir = process.env.V8_COMPILE_CACHE_CACHE_DIR; - if (v8_compile_cache_cache_dir) { - return v8_compile_cache_cache_dir; - } - - // Avoid cache ownership issues on POSIX systems. - const dirname = typeof process.getuid === 'function' - ? 'v8-compile-cache-' + process.getuid() - : 'v8-compile-cache'; - const version = typeof process.versions.v8 === 'string' - ? process.versions.v8 - : typeof process.versions.chakracore === 'string' - ? 'chakracore-' + process.versions.chakracore - : 'node-' + process.version; - const cacheDir = path.join(os.tmpdir(), dirname, version); - return cacheDir; -} - -function getMainName() { - // `require.main.filename` is undefined or null when: - // * node -e 'require("v8-compile-cache")' - // * node -r 'v8-compile-cache' - // * Or, requiring from the REPL. - const mainName = require.main && typeof require.main.filename === 'string' - ? require.main.filename - : process.cwd(); - return mainName; -} - -//------------------------------------------------------------------------------ -// main -//------------------------------------------------------------------------------ - -if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) { - const cacheDir = getCacheDir(); - const prefix = getMainName(); - const blobStore = new FileSystemBlobStore(cacheDir, prefix); - - const nativeCompileCache = new NativeCompileCache(); - nativeCompileCache.setCacheStore(blobStore); - nativeCompileCache.install(); - - process.once('exit', () => { - if (blobStore.isDirty()) { - blobStore.save(); - } - nativeCompileCache.uninstall(); - }); -} - -module.exports.__TEST__ = { - FileSystemBlobStore, - NativeCompileCache, - mkdirpSync, - slashEscape, - supportsCachedData, - getCacheDir, - getMainName, -}; diff --git a/node_modules/yocto-queue/index.d.ts b/node_modules/yocto-queue/index.d.ts new file mode 100644 index 000000000..9541986b4 --- /dev/null +++ b/node_modules/yocto-queue/index.d.ts @@ -0,0 +1,56 @@ +declare class Queue implements Iterable { + /** + The size of the queue. + */ + readonly size: number; + + /** + Tiny queue data structure. + + The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow. + + @example + ``` + import Queue = require('yocto-queue'); + + const queue = new Queue(); + + queue.enqueue('🦄'); + queue.enqueue('🌈'); + + console.log(queue.size); + //=> 2 + + console.log(...queue); + //=> '🦄 🌈' + + console.log(queue.dequeue()); + //=> '🦄' + + console.log(queue.dequeue()); + //=> '🌈' + ``` + */ + constructor(); + + [Symbol.iterator](): IterableIterator; + + /** + Add a value to the queue. + */ + enqueue(value: ValueType): void; + + /** + Remove the next value in the queue. + + @returns The removed value or `undefined` if the queue is empty. + */ + dequeue(): ValueType | undefined; + + /** + Clear the queue. + */ + clear(): void; +} + +export = Queue; diff --git a/node_modules/yocto-queue/index.js b/node_modules/yocto-queue/index.js new file mode 100644 index 000000000..2f3e6dcd7 --- /dev/null +++ b/node_modules/yocto-queue/index.js @@ -0,0 +1,68 @@ +class Node { + /// value; + /// next; + + constructor(value) { + this.value = value; + + // TODO: Remove this when targeting Node.js 12. + this.next = undefined; + } +} + +class Queue { + // TODO: Use private class fields when targeting Node.js 12. + // #_head; + // #_tail; + // #_size; + + constructor() { + this.clear(); + } + + enqueue(value) { + const node = new Node(value); + + if (this._head) { + this._tail.next = node; + this._tail = node; + } else { + this._head = node; + this._tail = node; + } + + this._size++; + } + + dequeue() { + const current = this._head; + if (!current) { + return; + } + + this._head = this._head.next; + this._size--; + return current.value; + } + + clear() { + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + get size() { + return this._size; + } + + * [Symbol.iterator]() { + let current = this._head; + + while (current) { + yield current.value; + current = current.next; + } + } +} + +module.exports = Queue; diff --git a/node_modules/yocto-queue/license b/node_modules/yocto-queue/license new file mode 100644 index 000000000..fa7ceba3e --- /dev/null +++ b/node_modules/yocto-queue/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/yocto-queue/package.json b/node_modules/yocto-queue/package.json new file mode 100644 index 000000000..71a91017b --- /dev/null +++ b/node_modules/yocto-queue/package.json @@ -0,0 +1,43 @@ +{ + "name": "yocto-queue", + "version": "0.1.0", + "description": "Tiny queue data structure", + "license": "MIT", + "repository": "sindresorhus/yocto-queue", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=10" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "queue", + "data", + "structure", + "algorithm", + "queues", + "queuing", + "list", + "array", + "linkedlist", + "fifo", + "enqueue", + "dequeue", + "data-structure" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.13.1", + "xo": "^0.35.0" + } +} diff --git a/node_modules/yocto-queue/readme.md b/node_modules/yocto-queue/readme.md new file mode 100644 index 000000000..c72fefc48 --- /dev/null +++ b/node_modules/yocto-queue/readme.md @@ -0,0 +1,64 @@ +# yocto-queue [![](https://badgen.net/bundlephobia/minzip/yocto-queue)](https://bundlephobia.com/result?p=yocto-queue) + +> Tiny queue data structure + +You should use this package instead of an array if you do a lot of `Array#push()` and `Array#shift()` on large arrays, since `Array#shift()` has [linear time complexity](https://medium.com/@ariel.salem1989/an-easy-to-use-guide-to-big-o-time-complexity-5dcf4be8a444#:~:text=O(N)%E2%80%94Linear%20Time) *O(n)* while `Queue#dequeue()` has [constant time complexity](https://medium.com/@ariel.salem1989/an-easy-to-use-guide-to-big-o-time-complexity-5dcf4be8a444#:~:text=O(1)%20%E2%80%94%20Constant%20Time) *O(1)*. That makes a huge difference for large arrays. + +> A [queue](https://en.wikipedia.org/wiki/Queue_(abstract_data_type)) is an ordered list of elements where an element is inserted at the end of the queue and is removed from the front of the queue. A queue works based on the first-in, first-out ([FIFO](https://en.wikipedia.org/wiki/FIFO_(computing_and_electronics))) principle. + +## Install + +``` +$ npm install yocto-queue +``` + +## Usage + +```js +const Queue = require('yocto-queue'); + +const queue = new Queue(); + +queue.enqueue('🦄'); +queue.enqueue('🌈'); + +console.log(queue.size); +//=> 2 + +console.log(...queue); +//=> '🦄 🌈' + +console.log(queue.dequeue()); +//=> '🦄' + +console.log(queue.dequeue()); +//=> '🌈' +``` + +## API + +### `queue = new Queue()` + +The instance is an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), which means you can iterate over the queue front to back with a “for…of” loop, or use spreading to convert the queue to an array. Don't do this unless you really need to though, since it's slow. + +#### `.enqueue(value)` + +Add a value to the queue. + +#### `.dequeue()` + +Remove the next value in the queue. + +Returns the removed value or `undefined` if the queue is empty. + +#### `.clear()` + +Clear the queue. + +#### `.size` + +The size of the queue. + +## Related + +- [quick-lru](https://github.com/sindresorhus/quick-lru) - Simple “Least Recently Used” (LRU) cache diff --git a/package-lock.json b/package-lock.json index 81bb9d32a..89851c81d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,11 +13,20 @@ "@actions/github": "^4.0.0" }, "devDependencies": { - "eslint": "^7.22.0", + "eslint": "^8.57.0", "jest": "^26.6.3", "prettier": "2.2.1" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@actions/core": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", @@ -548,41 +557,113 @@ "node": ">=0.1.95" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "argparse": "^2.0.1" }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, "engines": { - "node": ">=8" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -844,6 +925,41 @@ "node": ">= 10.14.2" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@octokit/auth-token": { "version": "2.4.5", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", @@ -1078,6 +1194,12 @@ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -1107,9 +1229,9 @@ } }, "node_modules/acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -1140,15 +1262,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1177,9 +1290,9 @@ } }, "node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" @@ -1282,15 +1395,6 @@ "node": ">=0.10.0" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1590,19 +1694,6 @@ "node": ">=0.10.0" } }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1937,9 +2028,9 @@ } }, "node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2151,18 +2242,6 @@ "once": "^1.4.0" } }, - "node_modules/enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "dependencies": { - "ansi-colors": "^4.1.1" - }, - "engines": { - "node": ">=8.6" - } - }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2212,15 +2291,6 @@ "source-map": "~0.6.1" } }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/escodegen/node_modules/levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -2273,126 +2343,206 @@ } }, "node_modules/eslint": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", - "dev": true, - "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", - "ajv": "^6.10.0", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=8.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/mysticatea" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "dependencies": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/espree/node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/esprima": { @@ -2409,9 +2559,9 @@ } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2420,15 +2570,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2441,19 +2582,10 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" @@ -2826,6 +2958,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fb-watchman": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", @@ -2961,12 +3102,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -2985,20 +3120,6 @@ "node": "6.* || 8.* || >= 10.*" } }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -3059,21 +3180,21 @@ } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", - "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -3103,6 +3224,12 @@ "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -3154,18 +3281,6 @@ "node": ">=4" } }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -3290,9 +3405,9 @@ } }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -3385,21 +3500,6 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "node_modules/is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -3505,7 +3605,7 @@ "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3530,9 +3630,9 @@ } }, "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" @@ -3550,16 +3650,13 @@ "node": ">=0.12.0" } }, - "node_modules/is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, "node_modules/is-plain-object": { @@ -3585,18 +3682,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -4593,22 +4678,10 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "node_modules/lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "node_modules/lru-cache": { @@ -4727,9 +4800,9 @@ } }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" @@ -5017,17 +5090,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -5288,15 +5361,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/prompts": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", @@ -5344,6 +5408,26 @@ "node": ">=0.6" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -5404,18 +5488,6 @@ "node": ">=0.10.0" } }, - "node_modules/regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -5550,15 +5622,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -5624,6 +5687,16 @@ "node": ">=0.12" } }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -5648,6 +5721,29 @@ "node": "6.* || >= 7.*" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -5957,56 +6053,6 @@ "node": ">=8" } }, - "node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/slice-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -6360,12 +6406,12 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" @@ -6452,56 +6498,14 @@ "dependencies": { "has-flag": "^4.0.0" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/symbol-tree": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", - "dev": true - }, - "node_modules/table": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", - "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "lodash.clonedeep": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.4.tgz", - "integrity": "sha512-v1qwknPv7rNGqtiaC4ywb3OZ3LNrEjbJL5igAe8eTbXOj8ye0XVul2pFRulwl/j3QfUKdQ/J9HZaYfQCnR7cvA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": ">=8" } }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, "node_modules/terminal-link": { @@ -6815,12 +6819,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "node_modules/v8-to-istanbul": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz", @@ -7109,9 +7107,27 @@ "engines": { "node": ">=6" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, "@actions/core": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", @@ -7578,34 +7594,84 @@ "minimist": "^1.2.0" } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true + }, "@eslint/eslintrc": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", - "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^12.1.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "argparse": "^2.0.1" } } } }, + "@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -7825,6 +7891,32 @@ "chalk": "^4.0.0" } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@octokit/auth-token": { "version": "2.4.5", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", @@ -8053,6 +8145,12 @@ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", "dev": true }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -8076,9 +8174,9 @@ } }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, @@ -8100,12 +8198,6 @@ "uri-js": "^4.2.2" } }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -8202,12 +8294,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -8448,16 +8534,6 @@ "unset-value": "^1.0.0" } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -8734,9 +8810,9 @@ } }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -8899,15 +8975,6 @@ "once": "^1.4.0" } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -8942,12 +9009,6 @@ "source-map": "~0.6.1" }, "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - }, "levn": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", @@ -8990,98 +9051,142 @@ } }, "eslint": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.23.0.tgz", - "integrity": "sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.0", - "ajv": "^6.10.0", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.21", - "minimatch": "^3.0.4", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.4", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + } } }, "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "estraverse": "^5.2.0" } }, "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true } } @@ -9093,20 +9198,12 @@ "dev": true }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "requires": { "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } } }, "esrecurse": { @@ -9116,20 +9213,12 @@ "dev": true, "requires": { "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "esutils": { @@ -9431,6 +9520,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "fb-watchman": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", @@ -9535,12 +9633,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -9553,17 +9645,6 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -9609,18 +9690,18 @@ } }, "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" } }, "globals": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", - "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -9640,6 +9721,12 @@ "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "growly": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", @@ -9678,12 +9765,6 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -9784,9 +9865,9 @@ } }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true }, "import-fresh": { @@ -9857,15 +9938,6 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-boolean-object": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", - "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", - "dev": true, - "requires": { - "call-bind": "^1.0.0" - } - }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -9945,7 +10017,7 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true }, "is-fullwidth-code-point": { @@ -9961,9 +10033,9 @@ "dev": true }, "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -9975,10 +10047,10 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, - "is-number-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", - "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, "is-plain-object": { @@ -9998,12 +10070,6 @@ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, - "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -10791,22 +10857,10 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, - "lodash.flatten": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", - "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "lru-cache": { @@ -10897,9 +10951,9 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -11138,17 +11192,17 @@ } }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" } }, "p-each-series": { @@ -11330,12 +11384,6 @@ } } }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "prompts": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", @@ -11374,6 +11422,12 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -11421,12 +11475,6 @@ "safe-regex": "^1.1.0" } }, - "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", - "dev": true - }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -11529,12 +11577,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -11586,6 +11628,12 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -11601,6 +11649,15 @@ "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", "dev": true }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -11859,43 +11916,6 @@ "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -12189,12 +12209,12 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" } }, "strip-bom": { @@ -12263,43 +12283,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "table": { - "version": "6.0.9", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.9.tgz", - "integrity": "sha512-F3cLs9a3hL1Z7N4+EkSscsel3z55XT950AvB05bwayrNg5T1/gykXtigioTAjbltvbMSJvvhFCbnf6mX+ntnJQ==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "lodash.clonedeep": "^4.5.0", - "lodash.flatten": "^4.4.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - }, - "dependencies": { - "ajv": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.4.tgz", - "integrity": "sha512-v1qwknPv7rNGqtiaC4ywb3OZ3LNrEjbJL5igAe8eTbXOj8ye0XVul2pFRulwl/j3QfUKdQ/J9HZaYfQCnR7cvA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, "terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -12547,12 +12530,6 @@ "dev": true, "optional": true }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8-to-istanbul": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz", @@ -12786,6 +12763,12 @@ "camelcase": "^5.0.0", "decamelize": "^1.2.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index 7837c9ff3..9fe3f55ec 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "@actions/github": "^4.0.0" }, "devDependencies": { - "eslint": "^7.22.0", + "eslint": "^8.57.0", "jest": "^26.6.3", "prettier": "2.2.1" }